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

Commit c085b837 authored by Marc Zyngier's avatar Marc Zyngier Committed by Isaac J. Manjarres
Browse files

arm64: ssbd: Add global mitigation state accessor



We're about to need the mitigation state in various parts of the
kernel in order to do the right thing for userspace and guests.

Let's expose an accessor that will let other subsystems know
about the state.

Change-Id: I8c96e8980817ea336935eda2729b023ec56a818e
Reviewed-by: default avatarJulien Grall <julien.grall@arm.com>
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Git-commit: c32e1736ca03904c03de0e4459a673be194f56fd
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 98617828
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -268,6 +268,16 @@ static inline bool system_uses_ttbr0_pan(void)
		!cpus_have_const_cap(ARM64_HAS_PAN);
}

static inline int arm64_get_ssbd_state(void)
{
#ifdef CONFIG_ARM64_SSBD
	extern int ssbd_state;
	return ssbd_state;
#else
	return ARM64_SSBD_UNKNOWN;
#endif
}

#endif /* __ASSEMBLY__ */

#endif