diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-09 23:53:40 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-09 23:53:40 -0500 |
commit | 49b09853df1a303876b82a6480efb2f7b45ef041 (patch) | |
tree | bf3d76ff0ddfe2e854f48ed890258ad89fa9c1dc /arch | |
parent | d3d2176a0bc696b5365ce0e8f82a29a521d85fd0 (diff) |
powerpc: Move some extern declarations from C code into headers
This also make klimit have the same type on 32-bit as on 64-bit,
namely unsigned long, and defines and initializes it in one place.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 8 | ||||
-rw-r--r-- | arch/powerpc/mm/init_32.c | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 3 |
7 files changed, 4 insertions, 21 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 1bf3642cb859..6391a4a0709a 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -71,10 +71,6 @@ struct isa_reg_property { | |||
71 | typedef int interpret_func(struct device_node *, unsigned long *, | 71 | typedef int interpret_func(struct device_node *, unsigned long *, |
72 | int, int, int); | 72 | int, int, int); |
73 | 73 | ||
74 | extern struct rtas_t rtas; | ||
75 | extern struct lmb lmb; | ||
76 | extern unsigned long klimit; | ||
77 | |||
78 | static int __initdata dt_root_addr_cells; | 74 | static int __initdata dt_root_addr_cells; |
79 | static int __initdata dt_root_size_cells; | 75 | static int __initdata dt_root_size_cells; |
80 | 76 | ||
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 06e4ef215627..bae4bff138f1 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -69,6 +69,8 @@ int _machine = 0; | |||
69 | EXPORT_SYMBOL(_machine); | 69 | EXPORT_SYMBOL(_machine); |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | unsigned long klimit = (unsigned long) _end; | ||
73 | |||
72 | /* | 74 | /* |
73 | * This still seems to be needed... -- paulus | 75 | * This still seems to be needed... -- paulus |
74 | */ | 76 | */ |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index f73d7681b2e9..c98cfcc9cd9a 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -279,7 +279,6 @@ arch_initcall(ppc_init); | |||
279 | /* Warning, IO base is not yet inited */ | 279 | /* Warning, IO base is not yet inited */ |
280 | void __init setup_arch(char **cmdline_p) | 280 | void __init setup_arch(char **cmdline_p) |
281 | { | 281 | { |
282 | extern char *klimit; | ||
283 | extern void do_init_bootmem(void); | 282 | extern void do_init_bootmem(void); |
284 | 283 | ||
285 | /* so udelay does something sensible, assume <= 1000 bogomips */ | 284 | /* so udelay does something sensible, assume <= 1000 bogomips */ |
@@ -338,7 +337,7 @@ void __init setup_arch(char **cmdline_p) | |||
338 | init_mm.start_code = PAGE_OFFSET; | 337 | init_mm.start_code = PAGE_OFFSET; |
339 | init_mm.end_code = (unsigned long) _etext; | 338 | init_mm.end_code = (unsigned long) _etext; |
340 | init_mm.end_data = (unsigned long) _edata; | 339 | init_mm.end_data = (unsigned long) _edata; |
341 | init_mm.brk = (unsigned long) klimit; | 340 | init_mm.brk = klimit; |
342 | 341 | ||
343 | /* Save unparsed command line copy for /proc/cmdline */ | 342 | /* Save unparsed command line copy for /proc/cmdline */ |
344 | strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); | 343 | strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index be607b877a55..6791668213e7 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -96,14 +96,6 @@ extern void udbg_init_maple_realmode(void); | |||
96 | do { udbg_putc = call_rtas_display_status_delay; } while(0) | 96 | do { udbg_putc = call_rtas_display_status_delay; } while(0) |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | /* extern void *stab; */ | ||
100 | extern unsigned long klimit; | ||
101 | |||
102 | extern void mm_init_ppc64(void); | ||
103 | extern void early_init_devtree(void *flat_dt); | ||
104 | extern void unflatten_device_tree(void); | ||
105 | extern void check_for_initrd(void); | ||
106 | |||
107 | int have_of = 1; | 99 | int have_of = 1; |
108 | int boot_cpuid = 0; | 100 | int boot_cpuid = 0; |
109 | int boot_cpuid_phys = 0; | 101 | int boot_cpuid_phys = 0; |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 4612a79dfb6e..7d4b8b5f0606 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -84,9 +84,6 @@ void MMU_init(void); | |||
84 | /* XXX should be in current.h -- paulus */ | 84 | /* XXX should be in current.h -- paulus */ |
85 | extern struct task_struct *current_set[NR_CPUS]; | 85 | extern struct task_struct *current_set[NR_CPUS]; |
86 | 86 | ||
87 | char *klimit = _end; | ||
88 | struct device_node *memory_node; | ||
89 | |||
90 | extern int init_bootmem_done; | 87 | extern int init_bootmem_done; |
91 | 88 | ||
92 | /* | 89 | /* |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index e274cf10205c..1134f70f231d 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -80,8 +80,6 @@ | |||
80 | #warning TASK_SIZE is smaller than it needs to be. | 80 | #warning TASK_SIZE is smaller than it needs to be. |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | unsigned long klimit = (unsigned long)_end; | ||
84 | |||
85 | /* max amount of RAM to use */ | 83 | /* max amount of RAM to use */ |
86 | unsigned long __max_memory; | 84 | unsigned long __max_memory; |
87 | 85 | ||
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 623c39aa0436..1f338341d8f2 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
41 | #include <asm/firmware.h> | 41 | #include <asm/firmware.h> |
42 | #include <asm/systemcfg.h> | 42 | #include <asm/systemcfg.h> |
43 | 43 | #include <asm/system.h> | |
44 | #include <asm/time.h> | 44 | #include <asm/time.h> |
45 | #include <asm/paca.h> | 45 | #include <asm/paca.h> |
46 | #include <asm/cache.h> | 46 | #include <asm/cache.h> |
@@ -85,7 +85,6 @@ static void iSeries_pci_final_fixup(void) { } | |||
85 | int piranha_simulator; | 85 | int piranha_simulator; |
86 | 86 | ||
87 | extern int rd_size; /* Defined in drivers/block/rd.c */ | 87 | extern int rd_size; /* Defined in drivers/block/rd.c */ |
88 | extern unsigned long klimit; | ||
89 | extern unsigned long embedded_sysmap_start; | 88 | extern unsigned long embedded_sysmap_start; |
90 | extern unsigned long embedded_sysmap_end; | 89 | extern unsigned long embedded_sysmap_end; |
91 | 90 | ||