Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ffbfdc2 authored by Will Deacon's avatar Will Deacon Committed by Srinivas Ramana
Browse files

arm64: cpufeature: Pass capability structure to ->enable callback



In order to invoke the CPU capability ->matches callback from the ->enable
callback for applying local-CPU workarounds, we need a handle on the
capability structure.

This patch passes a pointer to the capability structure to the ->enable
callback.

Change-Id: Ie9a18c7a5d721dcb3d3d6c6001c74366525cf87e
Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Git-commit: 0a0d111d40fd1dc588cc590fab6b55d86ddc71d3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarSrinivas Ramana <sramana@codeaurora.org>
parent 9a4b3ff7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -831,7 +831,8 @@ void __init enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)
			 * uses an IPI, giving us a PSTATE that disappears when
			 * we return.
			 */
			stop_machine(caps[i].enable, NULL, cpu_online_mask);
			stop_machine(caps[i].enable, (void *)&caps[i],
							cpu_online_mask);
}

#ifdef CONFIG_HOTPLUG_CPU
@@ -946,7 +947,7 @@ void verify_local_cpu_capabilities(void)
		if (!feature_matches(__raw_read_system_reg(caps[i].sys_reg), &caps[i]))
			fail_incapable_cpu("arm64_features", &caps[i]);
		if (caps[i].enable)
			caps[i].enable(NULL);
			caps[i].enable((void *)&caps[i]);
	}

	for (i = 0, caps = arm64_hwcaps; caps[i].matches; i++) {