diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 7 | ||||
-rw-r--r-- | arch/arm/kernel/machine_kexec.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 35 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 7 |
4 files changed, 31 insertions, 22 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index b145f16c91bc..3a456c6c7005 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -36,12 +36,11 @@ | |||
36 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 36 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
37 | ldr r1, =handle_arch_irq | 37 | ldr r1, =handle_arch_irq |
38 | mov r0, sp | 38 | mov r0, sp |
39 | ldr r1, [r1] | ||
40 | adr lr, BSYM(9997f) | 39 | adr lr, BSYM(9997f) |
41 | teq r1, #0 | 40 | ldr pc, [r1] |
42 | movne pc, r1 | 41 | #else |
43 | #endif | ||
44 | arch_irq_handler_default | 42 | arch_irq_handler_default |
43 | #endif | ||
45 | 9997: | 44 | 9997: |
46 | .endm | 45 | .endm |
47 | 46 | ||
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index e59bbd496c39..29620b632ed9 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -16,7 +16,7 @@ | |||
16 | extern const unsigned char relocate_new_kernel[]; | 16 | extern const unsigned char relocate_new_kernel[]; |
17 | extern const unsigned int relocate_new_kernel_size; | 17 | extern const unsigned int relocate_new_kernel_size; |
18 | 18 | ||
19 | extern void setup_mm_for_reboot(char mode); | 19 | extern void setup_mm_for_reboot(void); |
20 | 20 | ||
21 | extern unsigned long kexec_start_address; | 21 | extern unsigned long kexec_start_address; |
22 | extern unsigned long kexec_indirection_page; | 22 | extern unsigned long kexec_indirection_page; |
@@ -113,7 +113,7 @@ void machine_kexec(struct kimage *image) | |||
113 | kexec_reinit(); | 113 | kexec_reinit(); |
114 | local_irq_disable(); | 114 | local_irq_disable(); |
115 | local_fiq_disable(); | 115 | local_fiq_disable(); |
116 | setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/ | 116 | setup_mm_for_reboot(); |
117 | flush_cache_all(); | 117 | flush_cache_all(); |
118 | outer_flush_all(); | 118 | outer_flush_all(); |
119 | outer_disable(); | 119 | outer_disable(); |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 3d0c6fb74ae4..eeb3e16c6046 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -57,7 +57,7 @@ static const char *isa_modes[] = { | |||
57 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" | 57 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" |
58 | }; | 58 | }; |
59 | 59 | ||
60 | extern void setup_mm_for_reboot(char mode); | 60 | extern void setup_mm_for_reboot(void); |
61 | 61 | ||
62 | static volatile int hlt_counter; | 62 | static volatile int hlt_counter; |
63 | 63 | ||
@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused) | |||
92 | __setup("nohlt", nohlt_setup); | 92 | __setup("nohlt", nohlt_setup); |
93 | __setup("hlt", hlt_setup); | 93 | __setup("hlt", hlt_setup); |
94 | 94 | ||
95 | void arm_machine_restart(char mode, const char *cmd) | 95 | void soft_restart(unsigned long addr) |
96 | { | 96 | { |
97 | /* Disable interrupts first */ | 97 | /* Disable interrupts first */ |
98 | local_irq_disable(); | 98 | local_irq_disable(); |
@@ -103,7 +103,7 @@ void arm_machine_restart(char mode, const char *cmd) | |||
103 | * we may need it to insert some 1:1 mappings so that | 103 | * we may need it to insert some 1:1 mappings so that |
104 | * soft boot works. | 104 | * soft boot works. |
105 | */ | 105 | */ |
106 | setup_mm_for_reboot(mode); | 106 | setup_mm_for_reboot(); |
107 | 107 | ||
108 | /* Clean and invalidate caches */ | 108 | /* Clean and invalidate caches */ |
109 | flush_cache_all(); | 109 | flush_cache_all(); |
@@ -114,18 +114,17 @@ void arm_machine_restart(char mode, const char *cmd) | |||
114 | /* Push out any further dirty data, and ensure cache is empty */ | 114 | /* Push out any further dirty data, and ensure cache is empty */ |
115 | flush_cache_all(); | 115 | flush_cache_all(); |
116 | 116 | ||
117 | /* | 117 | cpu_reset(addr); |
118 | * Now call the architecture specific reboot code. | 118 | } |
119 | */ | ||
120 | arch_reset(mode, cmd); | ||
121 | 119 | ||
122 | /* | 120 | void arm_machine_restart(char mode, const char *cmd) |
123 | * Whoops - the architecture was unable to reboot. | 121 | { |
124 | * Tell the user! | 122 | /* Disable interrupts first */ |
125 | */ | 123 | local_irq_disable(); |
126 | mdelay(1000); | 124 | local_fiq_disable(); |
127 | printk("Reboot failed -- System halted\n"); | 125 | |
128 | while (1); | 126 | /* Call the architecture specific reboot code. */ |
127 | arch_reset(mode, cmd); | ||
129 | } | 128 | } |
130 | 129 | ||
131 | /* | 130 | /* |
@@ -253,7 +252,15 @@ void machine_power_off(void) | |||
253 | void machine_restart(char *cmd) | 252 | void machine_restart(char *cmd) |
254 | { | 253 | { |
255 | machine_shutdown(); | 254 | machine_shutdown(); |
255 | |||
256 | arm_pm_restart(reboot_mode, cmd); | 256 | arm_pm_restart(reboot_mode, cmd); |
257 | |||
258 | /* Give a grace period for failure to restart of 1s */ | ||
259 | mdelay(1000); | ||
260 | |||
261 | /* Whoops - the platform was unable to reboot. Tell the user! */ | ||
262 | printk("Reboot failed -- System halted\n"); | ||
263 | while (1); | ||
257 | } | 264 | } |
258 | 265 | ||
259 | void __show_regs(struct pt_regs *regs) | 266 | void __show_regs(struct pt_regs *regs) |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 3448a3f9cc8c..6c2b0db5d1e9 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -904,8 +904,8 @@ void __init setup_arch(char **cmdline_p) | |||
904 | machine_desc = mdesc; | 904 | machine_desc = mdesc; |
905 | machine_name = mdesc->name; | 905 | machine_name = mdesc->name; |
906 | 906 | ||
907 | if (mdesc->soft_reboot) | 907 | if (mdesc->restart_mode) |
908 | reboot_setup("s"); | 908 | reboot_setup(&mdesc->restart_mode); |
909 | 909 | ||
910 | init_mm.start_code = (unsigned long) _text; | 910 | init_mm.start_code = (unsigned long) _text; |
911 | init_mm.end_code = (unsigned long) _etext; | 911 | init_mm.end_code = (unsigned long) _etext; |
@@ -924,6 +924,9 @@ void __init setup_arch(char **cmdline_p) | |||
924 | paging_init(mdesc); | 924 | paging_init(mdesc); |
925 | request_standard_resources(mdesc); | 925 | request_standard_resources(mdesc); |
926 | 926 | ||
927 | if (mdesc->restart) | ||
928 | arm_pm_restart = mdesc->restart; | ||
929 | |||
927 | unflatten_device_tree(); | 930 | unflatten_device_tree(); |
928 | 931 | ||
929 | #ifdef CONFIG_SMP | 932 | #ifdef CONFIG_SMP |