From 316a52e61cec9b3af1b073bdfdb18d7c943e28a5 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Thu, 19 Nov 2015 21:04:40 +0000 Subject: fixup! arm64: cpufeature: Allow early detect of specific features --- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/smp.c | 22 ++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 4457b297ea79..853a7c540333 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -588,7 +588,7 @@ static const struct arm64_cpu_capabilities arm64_early_features[] = { .min_field_value = 1, }, {} -} +}; static const struct arm64_cpu_capabilities arm64_features[] = { { diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index ca0bf862f905..6e1ce1c781d5 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -350,7 +350,7 @@ void __init smp_prepare_boot_cpu(void) * Conditionally switch to GIC PMR for interrupt masking (this * will be a nop if we are using normal interrupt masking) */ - maybe_switch_to_sysreg_cpuif(); + maybe_switch_to_sysreg_gic_cpuif(); } static u64 __init of_get_cpu_mpidr(struct device_node *dn) @@ -821,31 +821,13 @@ int setup_profiling_timer(unsigned int multiplier) return -EINVAL; } -/* - * IPI_CPU_BACKTRACE is either implemented either as a normal IRQ or, - * if the hardware can supports it, using a pseudo-NMI. - * - * The mechanism used to implement pseudo-NMI means that in both cases - * testing if the backtrace IPI is disabled requires us to check the - * PSR I bit. However in the later case we cannot use irqs_disabled() - * to check the I bit because, when the pseudo-NMI is active that - * function examines the GIC PMR instead. - */ -static unsigned long nmi_disabled(void) -{ - unsigned long flags; - - asm volatile("mrs %0, daif" : "=r"(flags) :: "memory"); - return flags & PSR_I_BIT; -} - static void raise_nmi(cpumask_t *mask) { /* * Generate the backtrace directly if we are running in a * calling context that is not preemptible by the backtrace IPI. */ - if (cpumask_test_cpu(smp_processor_id(), mask) && nmi_disabled()) + if (cpumask_test_cpu(smp_processor_id(), mask) && irqs_disabled()) nmi_cpu_backtrace(NULL); smp_cross_call(mask, IPI_CPU_BACKTRACE); -- cgit v1.2.3