aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/unicore32/kernel/process.c10
-rw-r--r--arch/unicore32/kernel/setup.h2
-rw-r--r--arch/unicore32/mm/mmu.c2
-rw-r--r--include/linux/reboot.h2
4 files changed, 9 insertions, 7 deletions
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c
index c9447691bdac..93dd035a8c33 100644
--- a/arch/unicore32/kernel/process.c
+++ b/arch/unicore32/kernel/process.c
@@ -51,14 +51,14 @@ void arch_cpu_idle(void)
51 local_irq_enable(); 51 local_irq_enable();
52} 52}
53 53
54static char reboot_mode = 'h'; 54static enum reboot_mode reboot_mode = REBOOT_HARD;
55 55
56int __init reboot_setup(char *str) 56int __init reboot_setup(char *str)
57{ 57{
58 reboot_mode = str[0]; 58 if ('s' == str[0])
59 reboot_mode = REBOOT_SOFT;
59 return 1; 60 return 1;
60} 61}
61
62__setup("reboot=", reboot_setup); 62__setup("reboot=", reboot_setup);
63 63
64void machine_halt(void) 64void machine_halt(void)
@@ -88,7 +88,7 @@ void machine_restart(char *cmd)
88 * we may need it to insert some 1:1 mappings so that 88 * we may need it to insert some 1:1 mappings so that
89 * soft boot works. 89 * soft boot works.
90 */ 90 */
91 setup_mm_for_reboot(reboot_mode); 91 setup_mm_for_reboot();
92 92
93 /* Clean and invalidate caches */ 93 /* Clean and invalidate caches */
94 flush_cache_all(); 94 flush_cache_all();
@@ -102,7 +102,7 @@ void machine_restart(char *cmd)
102 /* 102 /*
103 * Now handle reboot code. 103 * Now handle reboot code.
104 */ 104 */
105 if (reboot_mode == 's') { 105 if (reboot_mode == REBOOT_SOFT) {
106 /* Jump into ROM at address 0xffff0000 */ 106 /* Jump into ROM at address 0xffff0000 */
107 cpu_reset(VECTORS_BASE); 107 cpu_reset(VECTORS_BASE);
108 } else { 108 } else {
diff --git a/arch/unicore32/kernel/setup.h b/arch/unicore32/kernel/setup.h
index 30f749da8f73..f5c51b85ad24 100644
--- a/arch/unicore32/kernel/setup.h
+++ b/arch/unicore32/kernel/setup.h
@@ -22,7 +22,7 @@ extern void puv3_ps2_init(void);
22extern void pci_puv3_preinit(void); 22extern void pci_puv3_preinit(void);
23extern void __init puv3_init_gpio(void); 23extern void __init puv3_init_gpio(void);
24 24
25extern void setup_mm_for_reboot(char mode); 25extern void setup_mm_for_reboot(void);
26 26
27extern char __stubs_start[], __stubs_end[]; 27extern char __stubs_start[], __stubs_end[];
28extern char __vectors_start[], __vectors_end[]; 28extern char __vectors_start[], __vectors_end[];
diff --git a/arch/unicore32/mm/mmu.c b/arch/unicore32/mm/mmu.c
index 43c20b40e444..4f5a532bee13 100644
--- a/arch/unicore32/mm/mmu.c
+++ b/arch/unicore32/mm/mmu.c
@@ -445,7 +445,7 @@ void __init paging_init(void)
445 * the user-mode pages. This will then ensure that we have predictable 445 * the user-mode pages. This will then ensure that we have predictable
446 * results when turning the mmu off 446 * results when turning the mmu off
447 */ 447 */
448void setup_mm_for_reboot(char mode) 448void setup_mm_for_reboot(void)
449{ 449{
450 unsigned long base_pmdval; 450 unsigned long base_pmdval;
451 pgd_t *pgd; 451 pgd_t *pgd;
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 37d56c356a06..ca29a6ffc08e 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -13,6 +13,8 @@
13enum reboot_mode { 13enum reboot_mode {
14 REBOOT_COLD = 0, 14 REBOOT_COLD = 0,
15 REBOOT_WARM, 15 REBOOT_WARM,
16 REBOOT_HARD,
17 REBOOT_SOFT,
16}; 18};
17 19
18extern int register_reboot_notifier(struct notifier_block *); 20extern int register_reboot_notifier(struct notifier_block *);