From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Catalin Marinas <catalin.marinas@arm•com>, Will Deacon <will@kernel•org>
Cc: Linux Next Mailing List <linux-next@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Marc Zyngier <marc.zyngier@arm•com>,
James Morse <james.morse@arm•com>
Subject: linux-next: manual merge of the arm64 tree with Linus' tree
Date: Mon, 28 Oct 2019 08:39:14 +1100 [thread overview]
Message-ID: <20191028083914.4735554b@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3956 bytes --]
Hi all,
Today's linux-next merge of the arm64 tree got conflicts in:
arch/arm64/include/asm/cpucaps.h
arch/arm64/kernel/cpu_errata.c
between commits:
d3ec3a08fa70 ("arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set")
93916beb7014 ("arm64: Enable workaround for Cavium TX2 erratum 219 when running SMT")
9405447ef79b ("arm64: Avoid Cavium TX2 erratum 219 when switching TTBR")
from Linus' tree and commit:
05460849c3b5 ("arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419")
from the arm64 tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/arm64/include/asm/cpucaps.h
index ac1dbca3d0cd,f05afaec18cd..000000000000
--- a/arch/arm64/include/asm/cpucaps.h
+++ b/arch/arm64/include/asm/cpucaps.h
@@@ -52,9 -52,8 +52,10 @@@
#define ARM64_HAS_IRQ_PRIO_MASKING 42
#define ARM64_HAS_DCPODP 43
#define ARM64_WORKAROUND_1463225 44
-#define ARM64_WORKAROUND_1542419 45
+#define ARM64_WORKAROUND_CAVIUM_TX2_219_TVM 45
+#define ARM64_WORKAROUND_CAVIUM_TX2_219_PRFM 46
++#define ARM64_WORKAROUND_1542419 47
- #define ARM64_NCAPS 47
-#define ARM64_NCAPS 46
++#define ARM64_NCAPS 48
#endif /* __ASM_CPUCAPS_H */
diff --cc arch/arm64/kernel/cpu_errata.c
index 6c3b10a41bd8,bf29b59e096f..000000000000
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@@ -624,30 -618,18 +619,42 @@@ check_branch_predictor(const struct arm
return (need_wa > 0);
}
+static const __maybe_unused struct midr_range tx2_family_cpus[] = {
+ MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN),
+ MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2),
+ {},
+};
+
+static bool __maybe_unused
+needs_tx2_tvm_workaround(const struct arm64_cpu_capabilities *entry,
+ int scope)
+{
+ int i;
+
+ if (!is_affected_midr_range_list(entry, scope) ||
+ !is_hyp_mode_available())
+ return false;
+
+ for_each_possible_cpu(i) {
+ if (MPIDR_AFFINITY_LEVEL(cpu_logical_map(i), 0) != 0)
+ return true;
+ }
+
+ return false;
+}
+
+ static bool __maybe_unused
+ has_neoverse_n1_erratum_1542419(const struct arm64_cpu_capabilities *entry,
+ int scope)
+ {
+ u32 midr = read_cpuid_id();
+ bool has_dic = read_cpuid_cachetype() & BIT(CTR_DIC_SHIFT);
+ const struct midr_range range = MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1);
+
+ WARN_ON(scope != SCOPE_LOCAL_CPU || preemptible());
+ return is_midr_in_range(midr, &range) && has_dic;
+ }
+
#ifdef CONFIG_HARDEN_EL2_VECTORS
static const struct midr_range arm64_harden_el2_vectors[] = {
@@@ -877,18 -859,15 +884,28 @@@ const struct arm64_cpu_capabilities arm
.matches = has_cortex_a76_erratum_1463225,
},
#endif
+#ifdef CONFIG_CAVIUM_TX2_ERRATUM_219
+ {
+ .desc = "Cavium ThunderX2 erratum 219 (KVM guest sysreg trapping)",
+ .capability = ARM64_WORKAROUND_CAVIUM_TX2_219_TVM,
+ ERRATA_MIDR_RANGE_LIST(tx2_family_cpus),
+ .matches = needs_tx2_tvm_workaround,
+ },
+ {
+ .desc = "Cavium ThunderX2 erratum 219 (PRFM removal)",
+ .capability = ARM64_WORKAROUND_CAVIUM_TX2_219_PRFM,
+ ERRATA_MIDR_RANGE_LIST(tx2_family_cpus),
+ },
++#endif
+ #ifdef CONFIG_ARM64_ERRATUM_1542419
+ {
+ /* we depend on the firmware portion for correctness */
+ .desc = "ARM erratum 1542419 (kernel portion)",
+ .capability = ARM64_WORKAROUND_1542419,
+ .type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
+ .matches = has_neoverse_n1_erratum_1542419,
+ .cpu_enable = cpu_enable_trap_ctr_access,
+ },
#endif
{
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2019-10-27 21:39 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-27 21:39 Stephen Rothwell [this message]
2019-10-28 8:39 ` linux-next: manual merge of the arm64 tree with Linus' tree Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2025-11-12 22:55 Stephen Rothwell
2025-05-21 1:34 Stephen Rothwell
2025-05-21 8:40 ` Will Deacon
2023-01-24 21:36 Stephen Rothwell
2023-01-25 9:26 ` Catalin Marinas
2022-03-08 22:42 Stephen Rothwell
2022-03-09 12:20 ` Will Deacon
2022-03-08 22:38 Stephen Rothwell
2021-11-03 22:32 Stephen Rothwell
2021-11-05 9:34 ` Will Deacon
2021-03-28 22:29 Stephen Rothwell
2021-03-29 9:22 ` Catalin Marinas
2020-07-26 23:18 Stephen Rothwell
2019-06-24 23:31 Stephen Rothwell
2018-12-10 21:52 Stephen Rothwell
2018-12-11 10:16 ` Catalin Marinas
2018-12-06 22:18 Stephen Rothwell
2018-12-07 12:16 ` Will Deacon
2018-12-07 14:27 ` Suzuki K Poulose
2018-07-23 22:50 Stephen Rothwell
2018-07-24 9:29 ` Will Deacon
2018-01-16 22:30 Stephen Rothwell
2018-01-16 22:25 Stephen Rothwell
2018-01-14 21:32 Stephen Rothwell
2018-01-14 21:40 ` Catalin Marinas
2018-01-11 21:23 Stephen Rothwell
2018-01-12 12:25 ` Catalin Marinas
2017-10-31 20:57 Stephen Rothwell
2017-11-13 6:09 ` Stephen Rothwell
2017-11-13 9:15 ` Catalin Marinas
2017-11-13 10:38 ` Lorenzo Pieralisi
2017-10-19 11:28 Mark Brown
2017-10-19 12:50 ` Lorenzo Pieralisi
2017-08-23 23:22 Stephen Rothwell
2017-09-04 5:59 ` Stephen Rothwell
2016-11-21 23:34 Stephen Rothwell
2016-11-22 13:31 ` Catalin Marinas
2016-09-11 23:17 Stephen Rothwell
2016-09-05 1:27 Stephen Rothwell
2016-07-11 0:14 Stephen Rothwell
2016-04-28 23:59 Stephen Rothwell
2016-04-29 8:49 ` Will Deacon
2016-03-21 23:15 Stephen Rothwell
2016-03-23 11:14 ` Catalin Marinas
2016-03-06 23:48 Stephen Rothwell
2015-10-31 23:53 Stephen Rothwell
2015-11-02 10:39 ` Catalin Marinas
2015-01-26 23:45 Stephen Rothwell
2013-06-17 0:37 Stephen Rothwell
2012-12-05 23:17 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191028083914.4735554b@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=catalin.marinas@arm$(echo .)com \
--cc=james.morse@arm$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=marc.zyngier@arm$(echo .)com \
--cc=will@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox