aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/psci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/psci.c')
-rw-r--r--arch/arm64/kernel/psci.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 4f97db3d7363..ea4828a4aa96 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -176,22 +176,20 @@ static const struct of_device_id psci_of_match[] __initconst = {
176 {}, 176 {},
177}; 177};
178 178
179int __init psci_init(void) 179void __init psci_init(void)
180{ 180{
181 struct device_node *np; 181 struct device_node *np;
182 const char *method; 182 const char *method;
183 u32 id; 183 u32 id;
184 int err = 0;
185 184
186 np = of_find_matching_node(NULL, psci_of_match); 185 np = of_find_matching_node(NULL, psci_of_match);
187 if (!np) 186 if (!np)
188 return -ENODEV; 187 return;
189 188
190 pr_info("probing function IDs from device-tree\n"); 189 pr_info("probing function IDs from device-tree\n");
191 190
192 if (of_property_read_string(np, "method", &method)) { 191 if (of_property_read_string(np, "method", &method)) {
193 pr_warning("missing \"method\" property\n"); 192 pr_warning("missing \"method\" property\n");
194 err = -ENXIO;
195 goto out_put_node; 193 goto out_put_node;
196 } 194 }
197 195
@@ -201,7 +199,6 @@ int __init psci_init(void)
201 invoke_psci_fn = __invoke_psci_fn_smc; 199 invoke_psci_fn = __invoke_psci_fn_smc;
202 } else { 200 } else {
203 pr_warning("invalid \"method\" property: %s\n", method); 201 pr_warning("invalid \"method\" property: %s\n", method);
204 err = -EINVAL;
205 goto out_put_node; 202 goto out_put_node;
206 } 203 }
207 204
@@ -227,7 +224,7 @@ int __init psci_init(void)
227 224
228out_put_node: 225out_put_node:
229 of_node_put(np); 226 of_node_put(np);
230 return err; 227 return;
231} 228}
232 229
233#ifdef CONFIG_SMP 230#ifdef CONFIG_SMP
@@ -251,7 +248,7 @@ static int cpu_psci_cpu_boot(unsigned int cpu)
251{ 248{
252 int err = psci_ops.cpu_on(cpu_logical_map(cpu), __pa(secondary_entry)); 249 int err = psci_ops.cpu_on(cpu_logical_map(cpu), __pa(secondary_entry));
253 if (err) 250 if (err)
254 pr_err("psci: failed to boot CPU%d (%d)\n", cpu, err); 251 pr_err("failed to boot CPU%d (%d)\n", cpu, err);
255 252
256 return err; 253 return err;
257} 254}
@@ -278,7 +275,7 @@ static void cpu_psci_cpu_die(unsigned int cpu)
278 275
279 ret = psci_ops.cpu_off(state); 276 ret = psci_ops.cpu_off(state);
280 277
281 pr_crit("psci: unable to power off CPU%u (%d)\n", cpu, ret); 278 pr_crit("unable to power off CPU%u (%d)\n", cpu, ret);
282} 279}
283#endif 280#endif
284 281