Skip to content

Commit

Permalink
arm64: Enable CPU capability verification unconditionally
Browse files Browse the repository at this point in the history
We verify the capabilities of the secondary CPUs only when
hotplug is enabled. The boot time activated CPUs do not
go through the verification by checking whether the system
wide capabilities were initialised or not.

This patch removes the capability check dependency on CONFIG_HOTPLUG_CPU,
to make sure that all the secondary CPUs go through the check.
The boot time activated CPUs will still skip the system wide
capability check. The plan is to hook in a check for CPU features
used by the kernel at early boot up, based on the Boot CPU values.

Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Suzuki K Poulose authored and Catalin Marinas committed Feb 25, 2016
1 parent bb90527 commit fd9c279
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions arch/arm64/include/asm/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,7 @@ void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
const char *info);
void check_local_cpu_errata(void);

#ifdef CONFIG_HOTPLUG_CPU
void verify_local_cpu_capabilities(void);
#else
static inline void verify_local_cpu_capabilities(void)
{
}
#endif

u64 read_system_reg(u32 id);

Expand Down
10 changes: 0 additions & 10 deletions arch/arm64/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,6 @@ enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)
on_each_cpu(caps[i].enable, NULL, true);
}

#ifdef CONFIG_HOTPLUG_CPU

/*
* Flag to indicate if we have computed the system wide
* capabilities based on the boot time active CPUs. This
Expand Down Expand Up @@ -922,14 +920,6 @@ void verify_local_cpu_capabilities(void)
}
}

#else /* !CONFIG_HOTPLUG_CPU */

static inline void set_sys_caps_initialised(void)
{
}

#endif /* CONFIG_HOTPLUG_CPU */

static void __init setup_feature_capabilities(void)
{
update_cpu_capabilities(arm64_features, "detected feature:");
Expand Down

0 comments on commit fd9c279

Please sign in to comment.