Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1475294
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] arm64: Use static keys for CPU features |
| Date | 2016-09-02 18:00 +0200 |
| Message-ID | <scZ2P-1kr-57@gated-at.bofh.it> (permalink) |
| References | <sa6Dv-3XY-27@gated-at.bofh.it> <sa6Dv-3XY-25@gated-at.bofh.it> <salCy-57G-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Aug 26, 2016 at 10:22:13AM +0100, Suzuki K. Poulose wrote:
> On 25/08/16 18:26, Catalin Marinas wrote:
> > static inline int __attribute_const__
> >diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> >index 62272eac1352..919b2d0d68ae 100644
> >--- a/arch/arm64/kernel/cpufeature.c
> >+++ b/arch/arm64/kernel/cpufeature.c
> >@@ -46,6 +46,9 @@ unsigned int compat_elf_hwcap2 __read_mostly;
> >
> > DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
> >
> >+DEFINE_STATIC_KEY_ARRAY_FALSE(cpu_hwcap_keys, ARM64_NCAPS);
> >+EXPORT_SYMBOL(cpu_hwcap_keys);
> >+
> > #define __ARM64_FTR_BITS(SIGNED, STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL) \
> > { \
> > .sign = SIGNED, \
> >diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> >index ed1b84fe6925..6a141e399daf 100644
> >--- a/arch/arm64/kernel/cpuinfo.c
> >+++ b/arch/arm64/kernel/cpuinfo.c
> >@@ -377,6 +377,12 @@ void cpuinfo_store_cpu(void)
> > void __init cpuinfo_store_boot_cpu(void)
> > {
> > struct cpuinfo_arm64 *info = &per_cpu(cpu_data, 0);
> >+
> >+ /*
> >+ * Initialise the static keys early as they may be enabled by
> >+ * check_local_cpu_errata() -> update_cpu_capabilities().
> >+ */
> >+ jump_label_init();
> > __cpuinfo_store_cpu(info);
>
> Just a heads up. I have a patch [1] which moves the "check_local_cpu_errata()"
> around to smp_prepare_boot_cpu(). This patch should still work fine with that
> case. Only that may be we could move the jump_lable_init() to smp_prepare_boot_cpu(),
> before we call "update_cpu_errata_work_arounds()" for Boot CPU.
IIUC, we wouldn't call update_cpu_errata_work_arounds() until the CPU
feature infrastructure is initialised via cpuinfo_store_boot_cpu(). So
I don't think moving the jump_label_init() call above is necessary.
> [1] https://lkml.kernel.org/r/1471525832-21209-4-git-send-email-suzuki.poulose@arm.com
--
Catalin
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] arm64: Use static keys for CPU features Catalin Marinas <catalin.marinas@arm.com> - 2016-08-25 19:30 +0200
[PATCH 2/2] arm64: Use static keys for CPU features Catalin Marinas <catalin.marinas@arm.com> - 2016-08-25 19:30 +0200
Re: [PATCH 2/2] arm64: Use static keys for CPU features Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-08-26 11:30 +0200
Re: [PATCH 2/2] arm64: Use static keys for CPU features Catalin Marinas <catalin.marinas@arm.com> - 2016-09-02 18:00 +0200
Re: [PATCH 2/2] arm64: Use static keys for CPU features Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-09-02 18:10 +0200
csiph-web