diff options
author | Emil Medve <Emilian.Medve@Freescale.com> | 2007-09-19 22:25:17 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-22 00:49:22 -0400 |
commit | 576e393e74e58bd4c949d551a3340accc8dbab0f (patch) | |
tree | e34350d88cb32ed8bd7128d738d8c8a2e11a3603 /arch/powerpc/kernel/setup_32.c | |
parent | 4c2a54b09ba35a409afc34bd331a57a994921664 (diff) |
[POWERPC] Fix build errors when BLOCK=n
These are the symptom error messages:
CC arch/powerpc/kernel/setup_32.o
In file included from include/linux/blkdev.h:17,
from include/linux/ide.h:13,
from arch/powerpc/kernel/setup_32.c:13:
include/linux/bsg.h:67: warning: 'struct request_queue' declared inside parameter list
include/linux/bsg.h:67: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/bsg.h:71: warning: 'struct request_queue' declared inside parameter list
In file included from arch/powerpc/kernel/setup_32.c:13:
include/linux/ide.h:857: error: field 'wrq' has incomplete type
CC arch/powerpc/kernel/ppc_ksyms.o
In file included from include/linux/blkdev.h:17,
from include/linux/ide.h:13,
from arch/powerpc/kernel/ppc_ksyms.c:15:
include/linux/bsg.h:67: warning: 'struct request_queue' declared inside parameter list
include/linux/bsg.h:67: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/bsg.h:71: warning: 'struct request_queue' declared inside parameter list
In file included from arch/powerpc/kernel/ppc_ksyms.c:15:
include/linux/ide.h:857: error: field 'wrq' has incomplete type
The fix tries to use the smallest scope CONFIG_* symbols that will fix
the build problem. In this case <linux/ide.h> needs to be included
only if IDE=y or IDE=m were selected. Also, ppc_ide_md is needed only
if BLK_DEV_IDE=y or BLK_DEV_IDE=m
Moved the EXPORT_SYMBOL(ppc_ide_md) from ppc_ksysms.c next to its
declaration in setup_32.c which made <linux/ide.h> not needed. With
<linux/ide.h> gone from ppc_ksyms.c, <asm/cacheflush.h> is needed to
address the following warnings and errors:
CC arch/powerpc/kernel/ppc_ksyms.o
arch/powerpc/kernel/ppc_ksyms.c:122: error: '__flush_icache_range' undeclared here (not in a function)
arch/powerpc/kernel/ppc_ksyms.c:122: warning: type defaults to 'int' in declaration of '__flush_icache_range'
arch/powerpc/kernel/ppc_ksyms.c:123: error: 'flush_dcache_range' undeclared here (not in a function)
arch/powerpc/kernel/ppc_ksyms.c:123: warning: type defaults to 'int' in declaration of 'flush_dcache_range'
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index a288a5f2dbc6..7474502dace5 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -10,7 +10,9 @@ | |||
10 | #include <linux/reboot.h> | 10 | #include <linux/reboot.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/initrd.h> | 12 | #include <linux/initrd.h> |
13 | #if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) | ||
13 | #include <linux/ide.h> | 14 | #include <linux/ide.h> |
15 | #endif | ||
14 | #include <linux/tty.h> | 16 | #include <linux/tty.h> |
15 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
16 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
@@ -49,7 +51,10 @@ | |||
49 | 51 | ||
50 | extern void bootx_init(unsigned long r4, unsigned long phys); | 52 | extern void bootx_init(unsigned long r4, unsigned long phys); |
51 | 53 | ||
54 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) | ||
52 | struct ide_machdep_calls ppc_ide_md; | 55 | struct ide_machdep_calls ppc_ide_md; |
56 | EXPORT_SYMBOL(ppc_ide_md); | ||
57 | #endif | ||
53 | 58 | ||
54 | int boot_cpuid; | 59 | int boot_cpuid; |
55 | EXPORT_SYMBOL_GPL(boot_cpuid); | 60 | EXPORT_SYMBOL_GPL(boot_cpuid); |