[PATCH PREEMPT_RT] Compilation fix for PPC

From: Sripathi Kodi
Date: Sat Jan 12 2008 - 13:09:58 EST


Hi,

2.6.24-rc5-rt1 won't compile on PPC if CONFIG_SMP is turned off.

CC arch/powerpc/kernel/pmc.o
In file included from include/asm/tlb.h:62,
from arch/powerpc/mm/mem.c:44:
include/asm-generic/tlb.h: In function âtlb_gather_mmuâ:
include/asm-generic/tlb.h:58: error: implicit declaration of function â__get_cpu_lockâ
include/asm-generic/tlb.h:58: error: âmmu_gathersâ undeclared (first use in this function)
include/asm-generic/tlb.h:58: error: (Each undeclared identifier is reported only once
include/asm-generic/tlb.h:58: error: for each function it appears in.)
include/asm-generic/tlb.h:58: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:58: warning: type defaults to âintâ in declaration of âtype nameâ
include/asm-generic/tlb.h:58: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:58: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:58: warning: type defaults to âintâ in declaration of âtype nameâ
include/asm-generic/tlb.h:58: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:58: error: implicit declaration of function â__get_cpu_var_lockedâ
include/asm-generic/tlb.h:58: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h: In function âtlb_finish_mmuâ:
include/asm-generic/tlb.h:96: error: âmmu_gathersâ undeclared (first use in this function)
include/asm-generic/tlb.h:96: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:96: warning: type defaults to âintâ in declaration of âtype nameâ
include/asm-generic/tlb.h:96: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:96: error: invalid lvalue in unary â&â
include/asm-generic/tlb.h:96: warning: type defaults to âintâ in declaration of âtype nameâ
include/asm-generic/tlb.h:96: error: invalid lvalue in unary â&â

The patch below fixes it.

Thanks,
Sripathi.

Signed-off-by: Sripathi Kodi <sripathik@xxxxxxxxxx>

diff -uprN linux-2.6.24-rc5-rt1_org/include/asm-powerpc/percpu.h linux-2.6.24-rc5-rt1/include/asm-powerpc/percpu.h
--- linux-2.6.24-rc5-rt1_org/include/asm-powerpc/percpu.h 2008-01-12 17:43:03.000000000 +0530
+++ linux-2.6.24-rc5-rt1/include/asm-powerpc/percpu.h 2008-01-12 17:43:58.000000000 +0530
@@ -68,6 +68,8 @@ extern void setup_per_cpu_areas(void);

#define __get_cpu_var(var) per_cpu__##var
#define __raw_get_cpu_var(var) per_cpu__##var
+#define __get_cpu_lock(var, cpu) per_cpu_lock__##var##_locked
+#define __get_cpu_var_locked(var, cpu) per_cpu__##var##_locked

#endif /* SMP */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/