linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: Fix linux-next compile error in arch/arm/common/gic.c
@ 2012-01-02 16:33 Joerg Roedel
  2012-01-03  0:44 ` Yang Bai
  0 siblings, 1 reply; 7+ messages in thread
From: Joerg Roedel @ 2012-01-02 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

With CONFIG_SMP=n the following compile error occurs:

  CC      arch/arm/common/gic.o
arch/arm/common/gic.c: In function 'gic_init_bases':
arch/arm/common/gic.c:679:4: error: implicit declaration of function 'cpu_logical_map' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

This patch fixes the problem.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/arm/common/gic.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index b2dc2dd..b33f6b0 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -676,7 +676,10 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
 		}
 
 		for_each_possible_cpu(cpu) {
-			unsigned long offset = percpu_offset * cpu_logical_map(cpu);
+			unsigned long offset = percpu_offset;
+#ifdef CONFIG_SMP
+			offset *= cpu_logical_map(cpu);
+#endif
 			*per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
 			*per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
 		}
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-03 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-02 16:33 [PATCH] arm: Fix linux-next compile error in arch/arm/common/gic.c Joerg Roedel
2012-01-03  0:44 ` Yang Bai
2012-01-03  9:31   ` Joerg Roedel
2012-01-03 11:16   ` Marc Zyngier
2012-01-03 13:53     ` Rob Herring
2012-01-03 14:05       ` Marc Zyngier
2012-01-03 17:32         ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).