Re: [PATCH v6 02/21] arm64: Allow mismatched 32-bit EL0 support

From
Catalin Marinas <catalin.marinas@arm.com>
Date
2021-05-21 10:42:04
Also in
linux-arm-kernel, lkml
Reply to
Will Deacon, 2021-05-18
On Tue, May 18, 2021 at 10:47:06AM +0100, Will Deacon wrote:
quoted hunk ↗ jump to hunk
+static int enable_mismatched_32bit_el0(unsigned int cpu)
+{
+	struct cpuinfo_arm64 *info = &per_cpu(cpu_data, cpu);
+	bool cpu_32bit = id_aa64pfr0_32bit_el0(info->reg_id_aa64pfr0);
+
+	if (cpu_32bit) {
+		cpumask_set_cpu(cpu, cpu_32bit_el0_mask);
+		static_branch_enable_cpuslocked(&arm64_mismatched_32bit_el0);
It may be worth only calling static_branch_enable_cpuslocked() if not
already set, in case you try this on a system with lots of CPUs.

-- 
Catalin
Thread (83 messages) 83 messages, 8 authors, last reply 2021-05-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help