diff options
author | Daniel Axtens <dja@axtens.net> | 2016-07-11 20:54:52 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-14 07:12:06 -0400 |
commit | 95ec77c06e8e63fff50c497eca0668bf6da39813 (patch) | |
tree | bc1b47558bf4050f8efc3a757b2bc0837f57b93a /arch/powerpc | |
parent | 62c2c5cf387beb4bbf45045c3041dc9cfb40e5df (diff) |
powerpc: Make ppc_md.{halt, restart} __noreturn
powernv marks it's halt and restart calls as __noreturn. However,
ppc_md does not have this annotation. Add the annotation to ppc_md,
and then to every halt/restart function that is missing it.
Additionally, I have verified that all of these functions do not
return. Occasionally I have added a spin loop to be sure.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
33 files changed, 60 insertions, 55 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 6bdcd0da9e21..a9af1bd6a51e 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -111,8 +111,8 @@ struct machdep_calls { | |||
111 | /* To setup PHBs when using automatic OF platform driver for PCI */ | 111 | /* To setup PHBs when using automatic OF platform driver for PCI */ |
112 | int (*pci_setup_phb)(struct pci_controller *host); | 112 | int (*pci_setup_phb)(struct pci_controller *host); |
113 | 113 | ||
114 | void (*restart)(char *cmd); | 114 | void __noreturn (*restart)(char *cmd); |
115 | void (*halt)(void); | 115 | void __noreturn (*halt)(void); |
116 | void (*panic)(char *str); | 116 | void (*panic)(char *str); |
117 | void (*cpu_die)(void); | 117 | void (*cpu_die)(void); |
118 | 118 | ||
diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h index 0acc7c7c28d1..e94cede14522 100644 --- a/arch/powerpc/include/asm/mpc52xx.h +++ b/arch/powerpc/include/asm/mpc52xx.h | |||
@@ -275,7 +275,7 @@ extern int mpc5200_psc_ac97_gpio_reset(int psc_number); | |||
275 | extern void mpc52xx_map_common_devices(void); | 275 | extern void mpc52xx_map_common_devices(void); |
276 | extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); | 276 | extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); |
277 | extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node); | 277 | extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node); |
278 | extern void mpc52xx_restart(char *cmd); | 278 | extern void __noreturn mpc52xx_restart(char *cmd); |
279 | 279 | ||
280 | /* mpc52xx_gpt.c */ | 280 | /* mpc52xx_gpt.c */ |
281 | struct mpc52xx_gpt_priv; | 281 | struct mpc52xx_gpt_priv; |
diff --git a/arch/powerpc/include/asm/ppc4xx.h b/arch/powerpc/include/asm/ppc4xx.h index 033039a80c42..610a5119ad8c 100644 --- a/arch/powerpc/include/asm/ppc4xx.h +++ b/arch/powerpc/include/asm/ppc4xx.h | |||
@@ -13,6 +13,6 @@ | |||
13 | #ifndef __ASM_POWERPC_PPC4xx_H__ | 13 | #ifndef __ASM_POWERPC_PPC4xx_H__ |
14 | #define __ASM_POWERPC_PPC4xx_H__ | 14 | #define __ASM_POWERPC_PPC4xx_H__ |
15 | 15 | ||
16 | extern void ppc4xx_reset_system(char *cmd); | 16 | extern void __noreturn ppc4xx_reset_system(char *cmd); |
17 | 17 | ||
18 | #endif /* __ASM_POWERPC_PPC4xx_H__ */ | 18 | #endif /* __ASM_POWERPC_PPC4xx_H__ */ |
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 51400baa8d48..fa3e3c4367bd 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h | |||
@@ -339,9 +339,9 @@ extern int rtas_service_present(const char *service); | |||
339 | extern int rtas_call(int token, int, int, int *, ...); | 339 | extern int rtas_call(int token, int, int, int *, ...); |
340 | void rtas_call_unlocked(struct rtas_args *args, int token, int nargs, | 340 | void rtas_call_unlocked(struct rtas_args *args, int token, int nargs, |
341 | int nret, ...); | 341 | int nret, ...); |
342 | extern void rtas_restart(char *cmd); | 342 | extern void __noreturn rtas_restart(char *cmd); |
343 | extern void rtas_power_off(void); | 343 | extern void rtas_power_off(void); |
344 | extern void rtas_halt(void); | 344 | extern void __noreturn rtas_halt(void); |
345 | extern void rtas_os_term(char *str); | 345 | extern void rtas_os_term(char *str); |
346 | extern int rtas_get_sensor(int sensor, int index, int *state); | 346 | extern int rtas_get_sensor(int sensor, int index, int *state); |
347 | extern int rtas_get_sensor_fast(int sensor, int index, int *state); | 347 | extern int rtas_get_sensor_fast(int sensor, int index, int *state); |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 286354f00ff6..6a3e5de544ce 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -685,7 +685,7 @@ int rtas_set_indicator_fast(int indicator, int index, int new_value) | |||
685 | return rc; | 685 | return rc; |
686 | } | 686 | } |
687 | 687 | ||
688 | void rtas_restart(char *cmd) | 688 | void __noreturn rtas_restart(char *cmd) |
689 | { | 689 | { |
690 | if (rtas_flash_term_hook) | 690 | if (rtas_flash_term_hook) |
691 | rtas_flash_term_hook(SYS_RESTART); | 691 | rtas_flash_term_hook(SYS_RESTART); |
@@ -704,7 +704,7 @@ void rtas_power_off(void) | |||
704 | for (;;); | 704 | for (;;); |
705 | } | 705 | } |
706 | 706 | ||
707 | void rtas_halt(void) | 707 | void __noreturn rtas_halt(void) |
708 | { | 708 | { |
709 | if (rtas_flash_term_hook) | 709 | if (rtas_flash_term_hook) |
710 | rtas_flash_term_hook(SYS_HALT); | 710 | rtas_flash_term_hook(SYS_HALT); |
diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c index c11ce6516c8f..003973f65297 100644 --- a/arch/powerpc/platforms/44x/ppc476.c +++ b/arch/powerpc/platforms/44x/ppc476.c | |||
@@ -68,7 +68,7 @@ DECLARE_PCI_FIXUP_HEADER(0x1033, 0x0035, quirk_ppc_currituck_usb_fixup); | |||
68 | #define AVR_PWRCTL_RESET (0x02) | 68 | #define AVR_PWRCTL_RESET (0x02) |
69 | 69 | ||
70 | static struct i2c_client *avr_i2c_client; | 70 | static struct i2c_client *avr_i2c_client; |
71 | static void avr_halt_system(int pwrctl_flags) | 71 | static void __noreturn avr_halt_system(int pwrctl_flags) |
72 | { | 72 | { |
73 | /* Request the AVR to reset the system */ | 73 | /* Request the AVR to reset the system */ |
74 | i2c_smbus_write_byte_data(avr_i2c_client, | 74 | i2c_smbus_write_byte_data(avr_i2c_client, |
@@ -84,7 +84,7 @@ static void avr_power_off_system(void) | |||
84 | avr_halt_system(AVR_PWRCTL_PWROFF); | 84 | avr_halt_system(AVR_PWRCTL_PWROFF); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void avr_reset_system(char *cmd) | 87 | static void __noreturn avr_reset_system(char *cmd) |
88 | { | 88 | { |
89 | avr_halt_system(AVR_PWRCTL_RESET); | 89 | avr_halt_system(AVR_PWRCTL_RESET); |
90 | } | 90 | } |
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h index cc97f022d028..14ba49fd7938 100644 --- a/arch/powerpc/platforms/512x/mpc512x.h +++ b/arch/powerpc/platforms/512x/mpc512x.h | |||
@@ -18,6 +18,6 @@ extern void __init mpc512x_setup_arch(void); | |||
18 | extern int __init mpc5121_clk_init(void); | 18 | extern int __init mpc5121_clk_init(void); |
19 | extern const char *mpc512x_select_psc_compat(void); | 19 | extern const char *mpc512x_select_psc_compat(void); |
20 | extern const char *mpc512x_select_reset_compat(void); | 20 | extern const char *mpc512x_select_reset_compat(void); |
21 | extern void mpc512x_restart(char *cmd); | 21 | extern void __noreturn mpc512x_restart(char *cmd); |
22 | 22 | ||
23 | #endif /* __MPC512X_H__ */ | 23 | #endif /* __MPC512X_H__ */ |
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c index 452da2391153..6b4f4cb7009a 100644 --- a/arch/powerpc/platforms/512x/mpc512x_shared.c +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c | |||
@@ -47,7 +47,7 @@ static void __init mpc512x_restart_init(void) | |||
47 | of_node_put(np); | 47 | of_node_put(np); |
48 | } | 48 | } |
49 | 49 | ||
50 | void mpc512x_restart(char *cmd) | 50 | void __noreturn mpc512x_restart(char *cmd) |
51 | { | 51 | { |
52 | if (reset_module_base) { | 52 | if (reset_module_base) { |
53 | /* Enable software reset "RSTE" */ | 53 | /* Enable software reset "RSTE" */ |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index 26993826a797..565e3a83dc9e 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c | |||
@@ -243,8 +243,7 @@ EXPORT_SYMBOL(mpc52xx_get_xtal_freq); | |||
243 | /** | 243 | /** |
244 | * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer | 244 | * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer |
245 | */ | 245 | */ |
246 | void | 246 | void __noreturn mpc52xx_restart(char *cmd) |
247 | mpc52xx_restart(char *cmd) | ||
248 | { | 247 | { |
249 | local_irq_disable(); | 248 | local_irq_disable(); |
250 | 249 | ||
diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c index fc8b2d6a7d8d..c4f7029fc9ae 100644 --- a/arch/powerpc/platforms/82xx/pq2.c +++ b/arch/powerpc/platforms/82xx/pq2.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #define RMR_CSRE 0x00000001 | 23 | #define RMR_CSRE 0x00000001 |
24 | 24 | ||
25 | void pq2_restart(char *cmd) | 25 | void __noreturn pq2_restart(char *cmd) |
26 | { | 26 | { |
27 | local_irq_disable(); | 27 | local_irq_disable(); |
28 | setbits32(&cpm2_immr->im_clkrst.car_rmr, RMR_CSRE); | 28 | setbits32(&cpm2_immr->im_clkrst.car_rmr, RMR_CSRE); |
diff --git a/arch/powerpc/platforms/82xx/pq2.h b/arch/powerpc/platforms/82xx/pq2.h index a41f84ae2325..3080ce3441c1 100644 --- a/arch/powerpc/platforms/82xx/pq2.h +++ b/arch/powerpc/platforms/82xx/pq2.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _PQ2_H | 1 | #ifndef _PQ2_H |
2 | #define _PQ2_H | 2 | #define _PQ2_H |
3 | 3 | ||
4 | void pq2_restart(char *cmd); | 4 | void __noreturn pq2_restart(char *cmd); |
5 | 5 | ||
6 | #ifdef CONFIG_PCI | 6 | #ifdef CONFIG_PCI |
7 | int pq2ads_pci_init_irq(void); | 7 | int pq2ads_pci_init_irq(void); |
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c index 7e923cad56cf..8899aa9d11f5 100644 --- a/arch/powerpc/platforms/83xx/misc.c +++ b/arch/powerpc/platforms/83xx/misc.c | |||
@@ -35,7 +35,7 @@ static int __init mpc83xx_restart_init(void) | |||
35 | 35 | ||
36 | arch_initcall(mpc83xx_restart_init); | 36 | arch_initcall(mpc83xx_restart_init); |
37 | 37 | ||
38 | void mpc83xx_restart(char *cmd) | 38 | void __noreturn mpc83xx_restart(char *cmd) |
39 | { | 39 | { |
40 | #define RST_OFFSET 0x00000900 | 40 | #define RST_OFFSET 0x00000900 |
41 | #define RST_PROT_REG 0x00000018 | 41 | #define RST_PROT_REG 0x00000018 |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 0cf74d7ea1c5..ad484199eff7 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -65,7 +65,7 @@ | |||
65 | * mpc83xx_* files. Mostly for use by mpc83xx_setup | 65 | * mpc83xx_* files. Mostly for use by mpc83xx_setup |
66 | */ | 66 | */ |
67 | 67 | ||
68 | extern void mpc83xx_restart(char *cmd); | 68 | extern void __noreturn mpc83xx_restart(char *cmd); |
69 | extern long mpc83xx_time_init(void); | 69 | extern long mpc83xx_time_init(void); |
70 | extern int mpc837x_usb_cfg(void); | 70 | extern int mpc837x_usb_cfg(void); |
71 | extern int mpc834x_usb_cfg(void); | 71 | extern int mpc834x_usb_cfg(void); |
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c index 3dc1bda3ddc3..867a1078b488 100644 --- a/arch/powerpc/platforms/85xx/ksi8560.c +++ b/arch/powerpc/platforms/85xx/ksi8560.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | static void __iomem *cpld_base = NULL; | 45 | static void __iomem *cpld_base = NULL; |
46 | 46 | ||
47 | static void machine_restart(char *cmd) | 47 | static void __noreturn machine_restart(char *cmd) |
48 | { | 48 | { |
49 | if (cpld_base) | 49 | if (cpld_base) |
50 | out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR); | 50 | out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR); |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index d7e87ff912d7..5e0a0a24d5ce 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -83,7 +83,7 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, | |||
83 | return PCIBIOS_SUCCESSFUL; | 83 | return PCIBIOS_SUCCESSFUL; |
84 | } | 84 | } |
85 | 85 | ||
86 | static void mpc85xx_cds_restart(char *cmd) | 86 | static void __noreturn mpc85xx_cds_restart(char *cmd) |
87 | { | 87 | { |
88 | struct pci_dev *dev; | 88 | struct pci_dev *dev; |
89 | u_char tmp; | 89 | u_char tmp; |
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index c289fc77b4ba..b1ab6e96cb31 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c | |||
@@ -198,7 +198,7 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm) | |||
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | 200 | ||
201 | void mpc8xx_restart(char *cmd) | 201 | void __noreturn mpc8xx_restart(char *cmd) |
202 | { | 202 | { |
203 | car8xx_t __iomem *clk_r = immr_map(im_clkrst); | 203 | car8xx_t __iomem *clk_r = immr_map(im_clkrst); |
204 | 204 | ||
diff --git a/arch/powerpc/platforms/8xx/mpc8xx.h b/arch/powerpc/platforms/8xx/mpc8xx.h index 239a243a6161..31cc2ecace42 100644 --- a/arch/powerpc/platforms/8xx/mpc8xx.h +++ b/arch/powerpc/platforms/8xx/mpc8xx.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __MPC8xx_H | 11 | #ifndef __MPC8xx_H |
12 | #define __MPC8xx_H | 12 | #define __MPC8xx_H |
13 | 13 | ||
14 | extern void mpc8xx_restart(char *cmd); | 14 | extern void __noreturn mpc8xx_restart(char *cmd); |
15 | extern void mpc8xx_calibrate_decr(void); | 15 | extern void mpc8xx_calibrate_decr(void); |
16 | extern int mpc8xx_set_rtc_time(struct rtc_time *tm); | 16 | extern int mpc8xx_set_rtc_time(struct rtc_time *tm); |
17 | extern void mpc8xx_get_rtc_time(struct rtc_time *tm); | 17 | extern void mpc8xx_get_rtc_time(struct rtc_time *tm); |
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c index 2fe12046279e..3e12d8789252 100644 --- a/arch/powerpc/platforms/amigaone/setup.c +++ b/arch/powerpc/platforms/amigaone/setup.c | |||
@@ -123,7 +123,7 @@ static int __init request_isa_regions(void) | |||
123 | } | 123 | } |
124 | machine_device_initcall(amigaone, request_isa_regions); | 124 | machine_device_initcall(amigaone, request_isa_regions); |
125 | 125 | ||
126 | void amigaone_restart(char *cmd) | 126 | void __noreturn amigaone_restart(char *cmd) |
127 | { | 127 | { |
128 | local_irq_disable(); | 128 | local_irq_disable(); |
129 | 129 | ||
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 987d1b8d68e3..c55002f01dc1 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -239,7 +239,7 @@ out: | |||
239 | of_node_put(np); | 239 | of_node_put(np); |
240 | } | 240 | } |
241 | 241 | ||
242 | static void briq_restart(char *cmd) | 242 | static void __noreturn briq_restart(char *cmd) |
243 | { | 243 | { |
244 | local_irq_disable(); | 244 | local_irq_disable(); |
245 | if (briq_SPOR) | 245 | if (briq_SPOR) |
diff --git a/arch/powerpc/platforms/embedded6xx/c2k.c b/arch/powerpc/platforms/embedded6xx/c2k.c index ebd3963fdf91..782066245bb5 100644 --- a/arch/powerpc/platforms/embedded6xx/c2k.c +++ b/arch/powerpc/platforms/embedded6xx/c2k.c | |||
@@ -99,7 +99,7 @@ static void c2k_reset_board(void) | |||
99 | out_le32(mv64x60_gpp_reg_base + MV64x60_GPP_VALUE_SET, 0x00080004); | 99 | out_le32(mv64x60_gpp_reg_base + MV64x60_GPP_VALUE_SET, 0x00080004); |
100 | } | 100 | } |
101 | 101 | ||
102 | static void c2k_restart(char *cmd) | 102 | static void __noreturn c2k_restart(char *cmd) |
103 | { | 103 | { |
104 | c2k_reset_board(); | 104 | c2k_reset_board(); |
105 | msleep(100); | 105 | msleep(100); |
diff --git a/arch/powerpc/platforms/embedded6xx/gamecube.c b/arch/powerpc/platforms/embedded6xx/gamecube.c index fe0ed6ee285e..b17705c3f7a4 100644 --- a/arch/powerpc/platforms/embedded6xx/gamecube.c +++ b/arch/powerpc/platforms/embedded6xx/gamecube.c | |||
@@ -29,14 +29,14 @@ | |||
29 | #include "usbgecko_udbg.h" | 29 | #include "usbgecko_udbg.h" |
30 | 30 | ||
31 | 31 | ||
32 | static void gamecube_spin(void) | 32 | static void __noreturn gamecube_spin(void) |
33 | { | 33 | { |
34 | /* spin until power button pressed */ | 34 | /* spin until power button pressed */ |
35 | for (;;) | 35 | for (;;) |
36 | cpu_relax(); | 36 | cpu_relax(); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void gamecube_restart(char *cmd) | 39 | static void __noreturn gamecube_restart(char *cmd) |
40 | { | 40 | { |
41 | local_irq_disable(); | 41 | local_irq_disable(); |
42 | flipper_platform_reset(); | 42 | flipper_platform_reset(); |
@@ -49,7 +49,7 @@ static void gamecube_power_off(void) | |||
49 | gamecube_spin(); | 49 | gamecube_spin(); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void gamecube_halt(void) | 52 | static void __noreturn gamecube_halt(void) |
53 | { | 53 | { |
54 | gamecube_restart(NULL); | 54 | gamecube_restart(NULL); |
55 | } | 55 | } |
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c index 8c305c7c8977..8b6e76100895 100644 --- a/arch/powerpc/platforms/embedded6xx/holly.c +++ b/arch/powerpc/platforms/embedded6xx/holly.c | |||
@@ -193,7 +193,7 @@ void holly_show_cpuinfo(struct seq_file *m) | |||
193 | seq_printf(m, "machine\t\t: PPC750 GX/CL\n"); | 193 | seq_printf(m, "machine\t\t: PPC750 GX/CL\n"); |
194 | } | 194 | } |
195 | 195 | ||
196 | void holly_restart(char *cmd) | 196 | void __noreturn holly_restart(char *cmd) |
197 | { | 197 | { |
198 | __be32 __iomem *ocn_bar1 = NULL; | 198 | __be32 __iomem *ocn_bar1 = NULL; |
199 | unsigned long bar; | 199 | unsigned long bar; |
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c index 540eeb58d3f0..4c5089f05c7f 100644 --- a/arch/powerpc/platforms/embedded6xx/linkstation.c +++ b/arch/powerpc/platforms/embedded6xx/linkstation.c | |||
@@ -100,7 +100,7 @@ static void __init linkstation_init_IRQ(void) | |||
100 | extern void avr_uart_configure(void); | 100 | extern void avr_uart_configure(void); |
101 | extern void avr_uart_send(const char); | 101 | extern void avr_uart_send(const char); |
102 | 102 | ||
103 | static void linkstation_restart(char *cmd) | 103 | static void __noreturn linkstation_restart(char *cmd) |
104 | { | 104 | { |
105 | local_irq_disable(); | 105 | local_irq_disable(); |
106 | 106 | ||
@@ -113,7 +113,7 @@ static void linkstation_restart(char *cmd) | |||
113 | avr_uart_send('G'); /* "kick" */ | 113 | avr_uart_send('G'); /* "kick" */ |
114 | } | 114 | } |
115 | 115 | ||
116 | static void linkstation_power_off(void) | 116 | static void __noreturn linkstation_power_off(void) |
117 | { | 117 | { |
118 | local_irq_disable(); | 118 | local_irq_disable(); |
119 | 119 | ||
@@ -127,7 +127,7 @@ static void linkstation_power_off(void) | |||
127 | /* NOTREACHED */ | 127 | /* NOTREACHED */ |
128 | } | 128 | } |
129 | 129 | ||
130 | static void linkstation_halt(void) | 130 | static void __noreturn linkstation_halt(void) |
131 | { | 131 | { |
132 | linkstation_power_off(); | 132 | linkstation_power_off(); |
133 | /* NOTREACHED */ | 133 | /* NOTREACHED */ |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index df4ad95f183e..3eda5df6281a 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -146,7 +146,7 @@ void mpc7448_hpc2_show_cpuinfo(struct seq_file *m) | |||
146 | seq_printf(m, "vendor\t\t: Freescale Semiconductor\n"); | 146 | seq_printf(m, "vendor\t\t: Freescale Semiconductor\n"); |
147 | } | 147 | } |
148 | 148 | ||
149 | void mpc7448_hpc2_restart(char *cmd) | 149 | static void __noreturn mpc7448_hpc2_restart(char *cmd) |
150 | { | 150 | { |
151 | local_irq_disable(); | 151 | local_irq_disable(); |
152 | 152 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c index 8f65aa3747f5..1382e1f27518 100644 --- a/arch/powerpc/platforms/embedded6xx/mvme5100.c +++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c | |||
@@ -177,7 +177,7 @@ static void mvme5100_show_cpuinfo(struct seq_file *m) | |||
177 | seq_puts(m, "Machine\t\t: MVME5100\n"); | 177 | seq_puts(m, "Machine\t\t: MVME5100\n"); |
178 | } | 178 | } |
179 | 179 | ||
180 | static void mvme5100_restart(char *cmd) | 180 | static void __noreturn mvme5100_restart(char *cmd) |
181 | { | 181 | { |
182 | 182 | ||
183 | local_irq_disable(); | 183 | local_irq_disable(); |
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c index d572833ebd00..4596cba8c827 100644 --- a/arch/powerpc/platforms/embedded6xx/storcenter.c +++ b/arch/powerpc/platforms/embedded6xx/storcenter.c | |||
@@ -96,7 +96,7 @@ static void __init storcenter_init_IRQ(void) | |||
96 | mpic_init(mpic); | 96 | mpic_init(mpic); |
97 | } | 97 | } |
98 | 98 | ||
99 | static void storcenter_restart(char *cmd) | 99 | static void __noreturn storcenter_restart(char *cmd) |
100 | { | 100 | { |
101 | local_irq_disable(); | 101 | local_irq_disable(); |
102 | 102 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 352592d3e44e..ebaecb88df26 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c | |||
@@ -112,7 +112,7 @@ unsigned long __init wii_mmu_mapin_mem2(unsigned long top) | |||
112 | return delta + bl; | 112 | return delta + bl; |
113 | } | 113 | } |
114 | 114 | ||
115 | static void wii_spin(void) | 115 | static void __noreturn wii_spin(void) |
116 | { | 116 | { |
117 | local_irq_disable(); | 117 | local_irq_disable(); |
118 | for (;;) | 118 | for (;;) |
@@ -160,7 +160,7 @@ static void __init wii_setup_arch(void) | |||
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
163 | static void wii_restart(char *cmd) | 163 | static void __noreturn wii_restart(char *cmd) |
164 | { | 164 | { |
165 | local_irq_disable(); | 165 | local_irq_disable(); |
166 | 166 | ||
@@ -185,7 +185,7 @@ static void wii_power_off(void) | |||
185 | wii_spin(); | 185 | wii_spin(); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void wii_halt(void) | 188 | static void __noreturn wii_halt(void) |
189 | { | 189 | { |
190 | if (ppc_md.restart) | 190 | if (ppc_md.restart) |
191 | ppc_md.restart(NULL); | 191 | ppc_md.restart(NULL); |
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index a837188544c8..5f8f6f966608 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -94,7 +94,7 @@ static unsigned long maple_find_nvram_base(void) | |||
94 | return result; | 94 | return result; |
95 | } | 95 | } |
96 | 96 | ||
97 | static void maple_restart(char *cmd) | 97 | static void __noreturn maple_restart(char *cmd) |
98 | { | 98 | { |
99 | unsigned int maple_nvram_base; | 99 | unsigned int maple_nvram_base; |
100 | const unsigned int *maple_nvram_offset, *maple_nvram_command; | 100 | const unsigned int *maple_nvram_offset, *maple_nvram_command; |
@@ -119,9 +119,10 @@ static void maple_restart(char *cmd) | |||
119 | for (;;) ; | 119 | for (;;) ; |
120 | fail: | 120 | fail: |
121 | printk(KERN_EMERG "Maple: Manual Restart Required\n"); | 121 | printk(KERN_EMERG "Maple: Manual Restart Required\n"); |
122 | for (;;) ; | ||
122 | } | 123 | } |
123 | 124 | ||
124 | static void maple_power_off(void) | 125 | static void __noreturn maple_power_off(void) |
125 | { | 126 | { |
126 | unsigned int maple_nvram_base; | 127 | unsigned int maple_nvram_base; |
127 | const unsigned int *maple_nvram_offset, *maple_nvram_command; | 128 | const unsigned int *maple_nvram_offset, *maple_nvram_command; |
@@ -146,9 +147,10 @@ static void maple_power_off(void) | |||
146 | for (;;) ; | 147 | for (;;) ; |
147 | fail: | 148 | fail: |
148 | printk(KERN_EMERG "Maple: Manual Power-Down Required\n"); | 149 | printk(KERN_EMERG "Maple: Manual Power-Down Required\n"); |
150 | for (;;) ; | ||
149 | } | 151 | } |
150 | 152 | ||
151 | static void maple_halt(void) | 153 | static void __noreturn maple_halt(void) |
152 | { | 154 | { |
153 | maple_power_off(); | 155 | maple_power_off(); |
154 | } | 156 | } |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index d71b2c7e8403..7349644c9828 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -62,7 +62,7 @@ static int num_mce_regs; | |||
62 | static int nmi_virq = NO_IRQ; | 62 | static int nmi_virq = NO_IRQ; |
63 | 63 | ||
64 | 64 | ||
65 | static void pas_restart(char *cmd) | 65 | static void __noreturn pas_restart(char *cmd) |
66 | { | 66 | { |
67 | /* Need to put others cpu in hold loop so they're not sleeping */ | 67 | /* Need to put others cpu in hold loop so they're not sleeping */ |
68 | smp_send_stop(); | 68 | smp_send_stop(); |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 8dd78f4e1af4..bd83b52c9830 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -383,7 +383,7 @@ void __init_refok note_bootable_part(dev_t dev, int part, int goodness) | |||
383 | } | 383 | } |
384 | 384 | ||
385 | #ifdef CONFIG_ADB_CUDA | 385 | #ifdef CONFIG_ADB_CUDA |
386 | static void cuda_restart(void) | 386 | static void __noreturn cuda_restart(void) |
387 | { | 387 | { |
388 | struct adb_request req; | 388 | struct adb_request req; |
389 | 389 | ||
@@ -392,7 +392,7 @@ static void cuda_restart(void) | |||
392 | cuda_poll(); | 392 | cuda_poll(); |
393 | } | 393 | } |
394 | 394 | ||
395 | static void cuda_shutdown(void) | 395 | static void __noreturn cuda_shutdown(void) |
396 | { | 396 | { |
397 | struct adb_request req; | 397 | struct adb_request req; |
398 | 398 | ||
@@ -416,7 +416,7 @@ static void cuda_shutdown(void) | |||
416 | #define smu_shutdown() | 416 | #define smu_shutdown() |
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | static void pmac_restart(char *cmd) | 419 | static void __noreturn pmac_restart(char *cmd) |
420 | { | 420 | { |
421 | switch (sys_ctrler) { | 421 | switch (sys_ctrler) { |
422 | case SYS_CTRLER_CUDA: | 422 | case SYS_CTRLER_CUDA: |
@@ -430,9 +430,10 @@ static void pmac_restart(char *cmd) | |||
430 | break; | 430 | break; |
431 | default: ; | 431 | default: ; |
432 | } | 432 | } |
433 | while (1) ; | ||
433 | } | 434 | } |
434 | 435 | ||
435 | static void pmac_power_off(void) | 436 | static void __noreturn pmac_power_off(void) |
436 | { | 437 | { |
437 | switch (sys_ctrler) { | 438 | switch (sys_ctrler) { |
438 | case SYS_CTRLER_CUDA: | 439 | case SYS_CTRLER_CUDA: |
@@ -446,9 +447,10 @@ static void pmac_power_off(void) | |||
446 | break; | 447 | break; |
447 | default: ; | 448 | default: ; |
448 | } | 449 | } |
450 | while (1) ; | ||
449 | } | 451 | } |
450 | 452 | ||
451 | static void | 453 | static void __noreturn |
452 | pmac_halt(void) | 454 | pmac_halt(void) |
453 | { | 455 | { |
454 | pmac_power_off(); | 456 | pmac_power_off(); |
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 799c8580ab09..486ecd017535 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c | |||
@@ -80,7 +80,7 @@ static void ps3_power_save(void) | |||
80 | lv1_pause(0); | 80 | lv1_pause(0); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void ps3_restart(char *cmd) | 83 | static void __noreturn ps3_restart(char *cmd) |
84 | { | 84 | { |
85 | DBG("%s:%d cmd '%s'\n", __func__, __LINE__, cmd); | 85 | DBG("%s:%d cmd '%s'\n", __func__, __LINE__, cmd); |
86 | 86 | ||
@@ -96,7 +96,7 @@ static void ps3_power_off(void) | |||
96 | ps3_sys_manager_power_off(); /* never returns */ | 96 | ps3_sys_manager_power_off(); /* never returns */ |
97 | } | 97 | } |
98 | 98 | ||
99 | static void ps3_halt(void) | 99 | static void __noreturn ps3_halt(void) |
100 | { | 100 | { |
101 | DBG("%s:%d\n", __func__, __LINE__); | 101 | DBG("%s:%d\n", __func__, __LINE__); |
102 | 102 | ||
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 99269c041615..a09ca704de58 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -204,7 +204,7 @@ static int __init setup_rstcr(void) | |||
204 | 204 | ||
205 | arch_initcall(setup_rstcr); | 205 | arch_initcall(setup_rstcr); |
206 | 206 | ||
207 | void fsl_rstcr_restart(char *cmd) | 207 | void __noreturn fsl_rstcr_restart(char *cmd) |
208 | { | 208 | { |
209 | local_irq_disable(); | 209 | local_irq_disable(); |
210 | if (rstcr) | 210 | if (rstcr) |
@@ -228,10 +228,11 @@ EXPORT_SYMBOL(diu_ops); | |||
228 | * to initiate a partition restart when we're running under the Freescale | 228 | * to initiate a partition restart when we're running under the Freescale |
229 | * hypervisor. | 229 | * hypervisor. |
230 | */ | 230 | */ |
231 | void fsl_hv_restart(char *cmd) | 231 | void __noreturn fsl_hv_restart(char *cmd) |
232 | { | 232 | { |
233 | pr_info("hv restart\n"); | 233 | pr_info("hv restart\n"); |
234 | fh_partition_restart(-1); | 234 | fh_partition_restart(-1); |
235 | while (1) ; | ||
235 | } | 236 | } |
236 | 237 | ||
237 | /* | 238 | /* |
@@ -241,9 +242,10 @@ void fsl_hv_restart(char *cmd) | |||
241 | * function pointers, to shut down the partition when we're running under | 242 | * function pointers, to shut down the partition when we're running under |
242 | * the Freescale hypervisor. | 243 | * the Freescale hypervisor. |
243 | */ | 244 | */ |
244 | void fsl_hv_halt(void) | 245 | void __noreturn fsl_hv_halt(void) |
245 | { | 246 | { |
246 | pr_info("hv exit\n"); | 247 | pr_info("hv exit\n"); |
247 | fh_partition_stop(-1); | 248 | fh_partition_stop(-1); |
249 | while (1) ; | ||
248 | } | 250 | } |
249 | #endif | 251 | #endif |
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h index 4c5a19ef4f0b..433566a5ef19 100644 --- a/arch/powerpc/sysdev/fsl_soc.h +++ b/arch/powerpc/sysdev/fsl_soc.h | |||
@@ -19,7 +19,7 @@ extern u32 fsl_get_sys_freq(void); | |||
19 | struct spi_board_info; | 19 | struct spi_board_info; |
20 | struct device_node; | 20 | struct device_node; |
21 | 21 | ||
22 | extern void fsl_rstcr_restart(char *cmd); | 22 | extern void __noreturn fsl_rstcr_restart(char *cmd); |
23 | 23 | ||
24 | /* The different ports that the DIU can be connected to */ | 24 | /* The different ports that the DIU can be connected to */ |
25 | enum fsl_diu_monitor_port { | 25 | enum fsl_diu_monitor_port { |
@@ -42,8 +42,8 @@ struct platform_diu_data_ops { | |||
42 | 42 | ||
43 | extern struct platform_diu_data_ops diu_ops; | 43 | extern struct platform_diu_data_ops diu_ops; |
44 | 44 | ||
45 | void fsl_hv_restart(char *cmd); | 45 | void __noreturn fsl_hv_restart(char *cmd); |
46 | void fsl_hv_halt(void); | 46 | void __noreturn fsl_hv_halt(void); |
47 | 47 | ||
48 | #endif | 48 | #endif |
49 | #endif | 49 | #endif |