diff options
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 336f14e0e5c2..3455ad33de4c 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -75,9 +75,9 @@ extern void reboot_setup(char *str); | |||
75 | 75 | ||
76 | unsigned int processor_id; | 76 | unsigned int processor_id; |
77 | EXPORT_SYMBOL(processor_id); | 77 | EXPORT_SYMBOL(processor_id); |
78 | unsigned int __machine_arch_type; | 78 | unsigned int __machine_arch_type __read_mostly; |
79 | EXPORT_SYMBOL(__machine_arch_type); | 79 | EXPORT_SYMBOL(__machine_arch_type); |
80 | unsigned int cacheid; | 80 | unsigned int cacheid __read_mostly; |
81 | EXPORT_SYMBOL(cacheid); | 81 | EXPORT_SYMBOL(cacheid); |
82 | 82 | ||
83 | unsigned int __atags_pointer __initdata; | 83 | unsigned int __atags_pointer __initdata; |
@@ -91,24 +91,24 @@ EXPORT_SYMBOL(system_serial_low); | |||
91 | unsigned int system_serial_high; | 91 | unsigned int system_serial_high; |
92 | EXPORT_SYMBOL(system_serial_high); | 92 | EXPORT_SYMBOL(system_serial_high); |
93 | 93 | ||
94 | unsigned int elf_hwcap; | 94 | unsigned int elf_hwcap __read_mostly; |
95 | EXPORT_SYMBOL(elf_hwcap); | 95 | EXPORT_SYMBOL(elf_hwcap); |
96 | 96 | ||
97 | 97 | ||
98 | #ifdef MULTI_CPU | 98 | #ifdef MULTI_CPU |
99 | struct processor processor; | 99 | struct processor processor __read_mostly; |
100 | #endif | 100 | #endif |
101 | #ifdef MULTI_TLB | 101 | #ifdef MULTI_TLB |
102 | struct cpu_tlb_fns cpu_tlb; | 102 | struct cpu_tlb_fns cpu_tlb __read_mostly; |
103 | #endif | 103 | #endif |
104 | #ifdef MULTI_USER | 104 | #ifdef MULTI_USER |
105 | struct cpu_user_fns cpu_user; | 105 | struct cpu_user_fns cpu_user __read_mostly; |
106 | #endif | 106 | #endif |
107 | #ifdef MULTI_CACHE | 107 | #ifdef MULTI_CACHE |
108 | struct cpu_cache_fns cpu_cache; | 108 | struct cpu_cache_fns cpu_cache __read_mostly; |
109 | #endif | 109 | #endif |
110 | #ifdef CONFIG_OUTER_CACHE | 110 | #ifdef CONFIG_OUTER_CACHE |
111 | struct outer_cache_fns outer_cache; | 111 | struct outer_cache_fns outer_cache __read_mostly; |
112 | EXPORT_SYMBOL(outer_cache); | 112 | EXPORT_SYMBOL(outer_cache); |
113 | #endif | 113 | #endif |
114 | 114 | ||
@@ -126,6 +126,7 @@ EXPORT_SYMBOL(elf_platform); | |||
126 | static const char *cpu_name; | 126 | static const char *cpu_name; |
127 | static const char *machine_name; | 127 | static const char *machine_name; |
128 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; | 128 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; |
129 | struct machine_desc *machine_desc __initdata; | ||
129 | 130 | ||
130 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | 131 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; |
131 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; | 132 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; |
@@ -708,13 +709,11 @@ static struct init_tags { | |||
708 | { 0, ATAG_NONE } | 709 | { 0, ATAG_NONE } |
709 | }; | 710 | }; |
710 | 711 | ||
711 | static void (*init_machine)(void) __initdata; | ||
712 | |||
713 | static int __init customize_machine(void) | 712 | static int __init customize_machine(void) |
714 | { | 713 | { |
715 | /* customizes platform devices, or adds new ones */ | 714 | /* customizes platform devices, or adds new ones */ |
716 | if (init_machine) | 715 | if (machine_desc->init_machine) |
717 | init_machine(); | 716 | machine_desc->init_machine(); |
718 | return 0; | 717 | return 0; |
719 | } | 718 | } |
720 | arch_initcall(customize_machine); | 719 | arch_initcall(customize_machine); |
@@ -809,6 +808,7 @@ void __init setup_arch(char **cmdline_p) | |||
809 | 808 | ||
810 | setup_processor(); | 809 | setup_processor(); |
811 | mdesc = setup_machine(machine_arch_type); | 810 | mdesc = setup_machine(machine_arch_type); |
811 | machine_desc = mdesc; | ||
812 | machine_name = mdesc->name; | 812 | machine_name = mdesc->name; |
813 | 813 | ||
814 | if (mdesc->soft_reboot) | 814 | if (mdesc->soft_reboot) |
@@ -868,13 +868,9 @@ void __init setup_arch(char **cmdline_p) | |||
868 | cpu_init(); | 868 | cpu_init(); |
869 | tcm_init(); | 869 | tcm_init(); |
870 | 870 | ||
871 | /* | 871 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
872 | * Set up various architecture-specific pointers | 872 | handle_arch_irq = mdesc->handle_irq; |
873 | */ | 873 | #endif |
874 | arch_nr_irqs = mdesc->nr_irqs; | ||
875 | init_arch_irq = mdesc->init_irq; | ||
876 | system_timer = mdesc->timer; | ||
877 | init_machine = mdesc->init_machine; | ||
878 | 874 | ||
879 | #ifdef CONFIG_VT | 875 | #ifdef CONFIG_VT |
880 | #if defined(CONFIG_VGA_CONSOLE) | 876 | #if defined(CONFIG_VGA_CONSOLE) |
@@ -884,6 +880,9 @@ void __init setup_arch(char **cmdline_p) | |||
884 | #endif | 880 | #endif |
885 | #endif | 881 | #endif |
886 | early_trap_init(); | 882 | early_trap_init(); |
883 | |||
884 | if (mdesc->init_early) | ||
885 | mdesc->init_early(); | ||
887 | } | 886 | } |
888 | 887 | ||
889 | 888 | ||