diff options
Diffstat (limited to 'drivers/firmware/psci.c')
-rw-r--r-- | drivers/firmware/psci.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index 442a42b5cece..1fa7284fb21d 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c | |||
@@ -29,14 +29,14 @@ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | * While a 64-bit OS can make calls with SMC32 calling conventions, for some | 31 | * While a 64-bit OS can make calls with SMC32 calling conventions, for some |
32 | * calls it is necessary to use SMC64 to pass or return 64-bit values. For such | 32 | * calls it is necessary to use SMC64 to pass or return 64-bit values. |
33 | * calls PSCI_0_2_FN_NATIVE(x) will choose the appropriate (native-width) | 33 | * For such calls PSCI_FN_NATIVE(version, name) will choose the appropriate |
34 | * function ID. | 34 | * (native-width) function ID. |
35 | */ | 35 | */ |
36 | #ifdef CONFIG_64BIT | 36 | #ifdef CONFIG_64BIT |
37 | #define PSCI_0_2_FN_NATIVE(name) PSCI_0_2_FN64_##name | 37 | #define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN64_##name |
38 | #else | 38 | #else |
39 | #define PSCI_0_2_FN_NATIVE(name) PSCI_0_2_FN_##name | 39 | #define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN_##name |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -170,7 +170,7 @@ static int psci_migrate(unsigned long cpuid) | |||
170 | static int psci_affinity_info(unsigned long target_affinity, | 170 | static int psci_affinity_info(unsigned long target_affinity, |
171 | unsigned long lowest_affinity_level) | 171 | unsigned long lowest_affinity_level) |
172 | { | 172 | { |
173 | return invoke_psci_fn(PSCI_0_2_FN_NATIVE(AFFINITY_INFO), | 173 | return invoke_psci_fn(PSCI_FN_NATIVE(0_2, AFFINITY_INFO), |
174 | target_affinity, lowest_affinity_level, 0); | 174 | target_affinity, lowest_affinity_level, 0); |
175 | } | 175 | } |
176 | 176 | ||
@@ -181,7 +181,7 @@ static int psci_migrate_info_type(void) | |||
181 | 181 | ||
182 | static unsigned long psci_migrate_info_up_cpu(void) | 182 | static unsigned long psci_migrate_info_up_cpu(void) |
183 | { | 183 | { |
184 | return invoke_psci_fn(PSCI_0_2_FN_NATIVE(MIGRATE_INFO_UP_CPU), | 184 | return invoke_psci_fn(PSCI_FN_NATIVE(0_2, MIGRATE_INFO_UP_CPU), |
185 | 0, 0, 0); | 185 | 0, 0, 0); |
186 | } | 186 | } |
187 | 187 | ||
@@ -274,16 +274,17 @@ static void __init psci_init_migrate(void) | |||
274 | static void __init psci_0_2_set_functions(void) | 274 | static void __init psci_0_2_set_functions(void) |
275 | { | 275 | { |
276 | pr_info("Using standard PSCI v0.2 function IDs\n"); | 276 | pr_info("Using standard PSCI v0.2 function IDs\n"); |
277 | psci_function_id[PSCI_FN_CPU_SUSPEND] = PSCI_0_2_FN_NATIVE(CPU_SUSPEND); | 277 | psci_function_id[PSCI_FN_CPU_SUSPEND] = |
278 | PSCI_FN_NATIVE(0_2, CPU_SUSPEND); | ||
278 | psci_ops.cpu_suspend = psci_cpu_suspend; | 279 | psci_ops.cpu_suspend = psci_cpu_suspend; |
279 | 280 | ||
280 | psci_function_id[PSCI_FN_CPU_OFF] = PSCI_0_2_FN_CPU_OFF; | 281 | psci_function_id[PSCI_FN_CPU_OFF] = PSCI_0_2_FN_CPU_OFF; |
281 | psci_ops.cpu_off = psci_cpu_off; | 282 | psci_ops.cpu_off = psci_cpu_off; |
282 | 283 | ||
283 | psci_function_id[PSCI_FN_CPU_ON] = PSCI_0_2_FN_NATIVE(CPU_ON); | 284 | psci_function_id[PSCI_FN_CPU_ON] = PSCI_FN_NATIVE(0_2, CPU_ON); |
284 | psci_ops.cpu_on = psci_cpu_on; | 285 | psci_ops.cpu_on = psci_cpu_on; |
285 | 286 | ||
286 | psci_function_id[PSCI_FN_MIGRATE] = PSCI_0_2_FN_NATIVE(MIGRATE); | 287 | psci_function_id[PSCI_FN_MIGRATE] = PSCI_FN_NATIVE(0_2, MIGRATE); |
287 | psci_ops.migrate = psci_migrate; | 288 | psci_ops.migrate = psci_migrate; |
288 | 289 | ||
289 | psci_ops.affinity_info = psci_affinity_info; | 290 | psci_ops.affinity_info = psci_affinity_info; |