diff options
Diffstat (limited to 'arch/arm64/kernel/cpufeature.c')
| -rw-r--r-- | arch/arm64/kernel/cpufeature.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index d577f263cc4a..c02504ea304b 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c | |||
| @@ -19,7 +19,9 @@ | |||
| 19 | #define pr_fmt(fmt) "CPU features: " fmt | 19 | #define pr_fmt(fmt) "CPU features: " fmt |
| 20 | 20 | ||
| 21 | #include <linux/bsearch.h> | 21 | #include <linux/bsearch.h> |
| 22 | #include <linux/cpumask.h> | ||
| 22 | #include <linux/sort.h> | 23 | #include <linux/sort.h> |
| 24 | #include <linux/stop_machine.h> | ||
| 23 | #include <linux/types.h> | 25 | #include <linux/types.h> |
| 24 | #include <asm/cpu.h> | 26 | #include <asm/cpu.h> |
| 25 | #include <asm/cpufeature.h> | 27 | #include <asm/cpufeature.h> |
| @@ -941,7 +943,13 @@ void __init enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps) | |||
| 941 | { | 943 | { |
| 942 | for (; caps->matches; caps++) | 944 | for (; caps->matches; caps++) |
| 943 | if (caps->enable && cpus_have_cap(caps->capability)) | 945 | if (caps->enable && cpus_have_cap(caps->capability)) |
| 944 | on_each_cpu(caps->enable, NULL, true); | 946 | /* |
| 947 | * Use stop_machine() as it schedules the work allowing | ||
| 948 | * us to modify PSTATE, instead of on_each_cpu() which | ||
| 949 | * uses an IPI, giving us a PSTATE that disappears when | ||
| 950 | * we return. | ||
| 951 | */ | ||
| 952 | stop_machine(caps->enable, NULL, cpu_online_mask); | ||
| 945 | } | 953 | } |
| 946 | 954 | ||
| 947 | /* | 955 | /* |
