diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-11 16:09:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-11 16:09:04 -0400 |
commit | 7404bc27731f7213c8a747e8f392cd0e0a27ec63 (patch) | |
tree | 83da3acc0c26bcac8f3b667c85eb1c8fcd17d4ff | |
parent | 5c6b54600dd390a355a0e91ffd7998382908e178 (diff) | |
parent | 0583a4ef05987f7e0f3a7bdd3365e5dc36ca306d (diff) |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon:
"There's a small memblock accounting problem when freeing the initrd
and a Spectre-v2 mitigation for NVIDIA Denver CPUs which just requires
a match on the CPU ID register.
Summary:
- Mitigate Spectre-v2 for NVIDIA Denver CPUs
- Free memblocks corresponding to freed initrd area"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: capabilities: Add NVIDIA Denver CPU to bp_harden list
arm64: Add MIDR encoding for NVIDIA CPUs
arm64: To remove initrd reserved area entry from memblock
-rw-r--r-- | arch/arm64/include/asm/cputype.h | 6 | ||||
-rw-r--r-- | arch/arm64/kernel/cpu_errata.c | 1 | ||||
-rw-r--r-- | arch/arm64/mm/init.c | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 30014a9f8f2b..ea690b3562af 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h | |||
@@ -75,6 +75,7 @@ | |||
75 | #define ARM_CPU_IMP_CAVIUM 0x43 | 75 | #define ARM_CPU_IMP_CAVIUM 0x43 |
76 | #define ARM_CPU_IMP_BRCM 0x42 | 76 | #define ARM_CPU_IMP_BRCM 0x42 |
77 | #define ARM_CPU_IMP_QCOM 0x51 | 77 | #define ARM_CPU_IMP_QCOM 0x51 |
78 | #define ARM_CPU_IMP_NVIDIA 0x4E | ||
78 | 79 | ||
79 | #define ARM_CPU_PART_AEM_V8 0xD0F | 80 | #define ARM_CPU_PART_AEM_V8 0xD0F |
80 | #define ARM_CPU_PART_FOUNDATION 0xD00 | 81 | #define ARM_CPU_PART_FOUNDATION 0xD00 |
@@ -99,6 +100,9 @@ | |||
99 | #define QCOM_CPU_PART_FALKOR 0xC00 | 100 | #define QCOM_CPU_PART_FALKOR 0xC00 |
100 | #define QCOM_CPU_PART_KRYO 0x200 | 101 | #define QCOM_CPU_PART_KRYO 0x200 |
101 | 102 | ||
103 | #define NVIDIA_CPU_PART_DENVER 0x003 | ||
104 | #define NVIDIA_CPU_PART_CARMEL 0x004 | ||
105 | |||
102 | #define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53) | 106 | #define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53) |
103 | #define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57) | 107 | #define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57) |
104 | #define MIDR_CORTEX_A72 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A72) | 108 | #define MIDR_CORTEX_A72 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A72) |
@@ -114,6 +118,8 @@ | |||
114 | #define MIDR_QCOM_FALKOR_V1 MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR_V1) | 118 | #define MIDR_QCOM_FALKOR_V1 MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR_V1) |
115 | #define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR) | 119 | #define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR) |
116 | #define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO) | 120 | #define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO) |
121 | #define MIDR_NVIDIA_DENVER MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_DENVER) | ||
122 | #define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL) | ||
117 | 123 | ||
118 | #ifndef __ASSEMBLY__ | 124 | #ifndef __ASSEMBLY__ |
119 | 125 | ||
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index a900befadfe8..e4a1182deff7 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c | |||
@@ -316,6 +316,7 @@ static const struct midr_range arm64_bp_harden_smccc_cpus[] = { | |||
316 | MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2), | 316 | MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2), |
317 | MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR_V1), | 317 | MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR_V1), |
318 | MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), | 318 | MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), |
319 | MIDR_ALL_VERSIONS(MIDR_NVIDIA_DENVER), | ||
319 | {}, | 320 | {}, |
320 | }; | 321 | }; |
321 | 322 | ||
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 9f3c47acf8ff..1b18b4722420 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
@@ -646,8 +646,10 @@ static int keep_initrd __initdata; | |||
646 | 646 | ||
647 | void __init free_initrd_mem(unsigned long start, unsigned long end) | 647 | void __init free_initrd_mem(unsigned long start, unsigned long end) |
648 | { | 648 | { |
649 | if (!keep_initrd) | 649 | if (!keep_initrd) { |
650 | free_reserved_area((void *)start, (void *)end, 0, "initrd"); | 650 | free_reserved_area((void *)start, (void *)end, 0, "initrd"); |
651 | memblock_free(__virt_to_phys(start), end - start); | ||
652 | } | ||
651 | } | 653 | } |
652 | 654 | ||
653 | static int __init keepinitrd_setup(char *__unused) | 655 | static int __init keepinitrd_setup(char *__unused) |