Skip to contentSkip to conversation

mpc8xx: fix build with CONFIG_MODULES=y

RFC PATCH New Anton Vorontsov 2 participants 5 messages Sep 18, 2007 – Sep 19, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 mpc8xx: fix build with CONFIG_MODULES=y

Hi all,

It seems there is no __res in the arch/powerpc. How it was used in the new tree, can we now safely remove it? At least kernel builds with that patch.

Thanks,

---
 arch/powerpc/kernel/ppc_ksyms.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +0 -3
index 430c502..b4163c3 100644
@@ -180,9 +180,6 @@ EXPORT_SYMBOL(cacheable_memcpy);
 EXPORT_SYMBOL(cpm_install_handler);
 EXPORT_SYMBOL(cpm_free_handler);
 #endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx)
-EXPORT_SYMBOL(__res);
-#endif
 
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(next_mmu_context);
Signature · 1 line
1.5.0.6
#1 lore raw

RFC PATCH 1/1 sysdev/commproc.c: fix build caused by undefined symbols

cpm_install_handler and cpm_free_handler neither used nor defined for arch/powerpc.

This causes MPC8xx build failure, patch used to fix that.

---
 arch/powerpc/kernel/ppc_ksyms.c |    5 -----
 include/asm-powerpc/commproc.h  |    3 ---
 2 files changed, 0 insertions(+), 8 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +0 -5
index b4163c3..4d28774 100644
@@ -176,11 +176,6 @@ EXPORT_SYMBOL(console_drivers);
 EXPORT_SYMBOL(cacheable_memcpy);
 #endif
 
-#ifdef  CONFIG_8xx
-EXPORT_SYMBOL(cpm_install_handler);
-EXPORT_SYMBOL(cpm_free_handler);
-#endif /* CONFIG_8xx */
-
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);
include/asm-powerpc/commproc.h +0 -3
index 3972487..0d92012 100644
@@ -686,7 +686,4 @@ typedef struct risc_timer_pram {
 #define CICR_IEN		((uint)0x00000080)	/* Int. enable */
 #define CICR_SPS		((uint)0x00000001)	/* SCC Spread */
 
-extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
-extern void cpm_free_handler(int vec);
-
 #endif /* __CPM_8XX__ */
Signature · 1 line
1.5.0.6
#2 lore raw

Re: [PATCH] [POWERPC][RFC] sysdev/commproc.c: fix build caused by undefined symbols

Quoted 4 lines · Anton Vorontsov

cpm_install_handler and cpm_free_handler neither used nor defined for arch/powerpc.

This causes MPC8xx build failure, patch used to fix that.

can you add the __res fix, and EXPORT() and do these three as one patch and improve the commit message. I'm guessing this all shows up when we try to build with CONFIG_MODULES=y. Put the actual compile failures in the commit message.

- k

#3 lore raw

PATCH 1/1 Fix various build errors seen on MPC885ADS with CONFIG_MODULES=y

Quoted 6 lines · Kumar Gala
Quoted 3 lines · Anton Vorontsov

cpm_install_handler and cpm_free_handler neither used nor defined for arch/powerpc.

Quoted 9 lines
Quoted 1 line

This causes MPC8xx build failure, patch used to fix that.

can you add the __res fix, and EXPORT() and do these three as one patch and improve the commit message. I'm guessing this all shows up when we try to build with CONFIG_MODULES=y. Put the actual compile failures in the commit message.

- k

Done, thanks.

- - - -
From: Anton Vorontsov <[email protected]>
Subject: [POWERPC] Fix various build errors seen on MPC885ADS with CONFIG_MODULES=y

CC arch/powerpc/kernel/ppc_ksyms.o
arch/powerpc/kernel/ppc_ksyms.c:184: error: __res' undeclared here (not in a function) arch/powerpc/kernel/ppc_ksyms.c:184: warning: type defaults to int' in declaration of `__res' make[1]: *** [arch/powerpc/kernel/ppc_ksyms.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

There is no __res in the arch/powerpc tree.

LD .tmp_vmlinux1
arch/powerpc/kernel/built-in.o(__ksymtab+0x1b0): undefined reference to cpm_free_handler' arch/powerpc/kernel/built-in.o(__ksymtab+0x1b8): undefined reference to cpm_install_handler'
make: *** [.tmp_vmlinux1] Error 1

cpm_install_handler and cpm_free_handler neither used nor defined for arch/powerpc.

CC arch/powerpc/sysdev/commproc.o
arch/powerpc/sysdev/commproc.c:390: error: redefinition of '__kstrtab_cpm_dpram_addr' arch/powerpc/sysdev/commproc.c:384: error: previous definition of '__kstrtab_cpm_dpram_addr' was here arch/powerpc/sysdev/commproc.c:390: error: redefinition of '__ksymtab_cpm_dpram_addr' arch/powerpc/sysdev/commproc.c:384: error: previous definition of '__ksymtab_cpm_dpram_addr' was here make[1]: *** [arch/powerpc/sysdev/commproc.o] Error 1
make: *** [arch/powerpc/sysdev] Error 2

Second export should be for cpm_dpram_phys not cpm_dpram_addr, this is copy-n-paste problem.

---
 arch/powerpc/kernel/ppc_ksyms.c |    8 --------
 arch/powerpc/sysdev/commproc.c  |    2 +-
 include/asm-powerpc/commproc.h  |    3 ---
 3 files changed, 1 insertions(+), 12 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +0 -8
index 430c502..4d28774 100644
@@ -176,14 +176,6 @@ EXPORT_SYMBOL(console_drivers);
 EXPORT_SYMBOL(cacheable_memcpy);
 #endif
 
-#ifdef  CONFIG_8xx
-EXPORT_SYMBOL(cpm_install_handler);
-EXPORT_SYMBOL(cpm_free_handler);
-#endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx)
-EXPORT_SYMBOL(__res);
-#endif
-
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);
arch/powerpc/sysdev/commproc.c +1 -1
index b562afc..160a8b4 100644
@@ -387,4 +387,4 @@ uint cpm_dpram_phys(u8* addr)
 {
 	return (dpram_pbase + (uint)(addr - dpram_vbase));
 }
-EXPORT_SYMBOL(cpm_dpram_addr);
+EXPORT_SYMBOL(cpm_dpram_phys);
include/asm-powerpc/commproc.h +0 -3
index 3972487..0d92012 100644
@@ -686,7 +686,4 @@ typedef struct risc_timer_pram {
 #define CICR_IEN		((uint)0x00000080)	/* Int. enable */
 #define CICR_SPS		((uint)0x00000001)	/* SCC Spread */
 
-extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
-extern void cpm_free_handler(int vec);
-
 #endif /* __CPM_8XX__ */
Signature · 1 line
1.5.0.6
#4 lore raw

PATCH 1/1 sysdev/commproc.c: fix copy-n-paste problem

In reply to Anton Vorontsov

Second export should be for cpm_dpram_phys not cpm_dpram_addr.

---
 arch/powerpc/sysdev/commproc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/sysdev/commproc.c +1 -1
index b562afc..160a8b4 100644
@@ -387,4 +387,4 @@ uint cpm_dpram_phys(u8* addr)
 {
 	return (dpram_pbase + (uint)(addr - dpram_vbase));
 }
-EXPORT_SYMBOL(cpm_dpram_addr);
+EXPORT_SYMBOL(cpm_dpram_phys);
Signature · 1 line
1.5.0.6