On Thu, Nov 07, 2019 at 10:12:30AM +0000, Suzuki K Poulose wrote:
quoted
+static void cpu_enable_e0pd(struct arm64_cpu_capabilities const *cap)
+{
+ /*
+ * The cpu_enable() callback gets called even on CPUs that
+ * don't detect the feature so we need to verify if we can
+ * enable.
+ */
+ if (this_cpu_has_cap(ARM64_HAS_E0PD))
+ sysreg_clear_set(tcr_el1, 0, TCR_E0PD1);
+}
Given that this is a SYSTEM_FEATURE now, we don't need the extra check.
All CPUs are guaranteed to have the feature, otherwise they would be
rejected early.
It's not strictly required but it does no harm, helps people who are
doing CPU local stuff see that this might be an issue if they just look
at other users rather than the header and it means that if someone
changes things (I'm actually been sitting on a patch for that but I want
to postpone any discussion about that until after at least the initial
three patches are merged).