diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-03-04 00:35:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-04 00:35:43 -0500 |
commit | d2c032e3dc58137a7261a7824d3acce435db1d66 (patch) | |
tree | 7eea1c7c6103eefe879f07472eec99b3c41eb792 /arch/arm64/kernel/psci.c | |
parent | 7e8e385aaf6ed5b64b5d9108081cfcdcdd021b78 (diff) | |
parent | 13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff) |
Merge tag 'v4.0-rc2' into x86/asm, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/psci.c')
-rw-r--r-- | arch/arm64/kernel/psci.c | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index f1dbca7d5c96..9b8a70ae64a1 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c | |||
@@ -57,6 +57,9 @@ static struct psci_operations psci_ops; | |||
57 | static int (*invoke_psci_fn)(u64, u64, u64, u64); | 57 | static int (*invoke_psci_fn)(u64, u64, u64, u64); |
58 | typedef int (*psci_initcall_t)(const struct device_node *); | 58 | typedef int (*psci_initcall_t)(const struct device_node *); |
59 | 59 | ||
60 | asmlinkage int __invoke_psci_fn_hvc(u64, u64, u64, u64); | ||
61 | asmlinkage int __invoke_psci_fn_smc(u64, u64, u64, u64); | ||
62 | |||
60 | enum psci_function { | 63 | enum psci_function { |
61 | PSCI_FN_CPU_SUSPEND, | 64 | PSCI_FN_CPU_SUSPEND, |
62 | PSCI_FN_CPU_ON, | 65 | PSCI_FN_CPU_ON, |
@@ -109,40 +112,6 @@ static void psci_power_state_unpack(u32 power_state, | |||
109 | PSCI_0_2_POWER_STATE_AFFL_SHIFT; | 112 | PSCI_0_2_POWER_STATE_AFFL_SHIFT; |
110 | } | 113 | } |
111 | 114 | ||
112 | /* | ||
113 | * The following two functions are invoked via the invoke_psci_fn pointer | ||
114 | * and will not be inlined, allowing us to piggyback on the AAPCS. | ||
115 | */ | ||
116 | static noinline int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1, | ||
117 | u64 arg2) | ||
118 | { | ||
119 | asm volatile( | ||
120 | __asmeq("%0", "x0") | ||
121 | __asmeq("%1", "x1") | ||
122 | __asmeq("%2", "x2") | ||
123 | __asmeq("%3", "x3") | ||
124 | "hvc #0\n" | ||
125 | : "+r" (function_id) | ||
126 | : "r" (arg0), "r" (arg1), "r" (arg2)); | ||
127 | |||
128 | return function_id; | ||
129 | } | ||
130 | |||
131 | static noinline int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1, | ||
132 | u64 arg2) | ||
133 | { | ||
134 | asm volatile( | ||
135 | __asmeq("%0", "x0") | ||
136 | __asmeq("%1", "x1") | ||
137 | __asmeq("%2", "x2") | ||
138 | __asmeq("%3", "x3") | ||
139 | "smc #0\n" | ||
140 | : "+r" (function_id) | ||
141 | : "r" (arg0), "r" (arg1), "r" (arg2)); | ||
142 | |||
143 | return function_id; | ||
144 | } | ||
145 | |||
146 | static int psci_get_version(void) | 115 | static int psci_get_version(void) |
147 | { | 116 | { |
148 | int err; | 117 | int err; |
@@ -540,8 +509,6 @@ const struct cpu_operations cpu_psci_ops = { | |||
540 | .name = "psci", | 509 | .name = "psci", |
541 | #ifdef CONFIG_CPU_IDLE | 510 | #ifdef CONFIG_CPU_IDLE |
542 | .cpu_init_idle = cpu_psci_cpu_init_idle, | 511 | .cpu_init_idle = cpu_psci_cpu_init_idle, |
543 | #endif | ||
544 | #ifdef CONFIG_ARM64_CPU_SUSPEND | ||
545 | .cpu_suspend = cpu_psci_cpu_suspend, | 512 | .cpu_suspend = cpu_psci_cpu_suspend, |
546 | #endif | 513 | #endif |
547 | #ifdef CONFIG_SMP | 514 | #ifdef CONFIG_SMP |