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/platforms/embedded6xx | |
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/platforms/embedded6xx')
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/c2k.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/gamecube.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/holly.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/linkstation.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/mvme5100.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/storcenter.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/wii.c | 6 |
8 files changed, 14 insertions, 14 deletions
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); |