From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul@pwsan.com>,
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>,
Jeremy Linton <jeremy.linton@arm.com>,
Atish Patra <atish.patra@wdc.com>
Subject: linux-next: manual merge of the risc-v tree with the arm64 tree
Date: Tue, 13 Aug 2019 09:34:47 +1000 [thread overview]
Message-ID: <20190813093447.747a5853@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3050 bytes --]
Hi all,
Today's linux-next merge of the risc-v tree got a conflict in:
arch/arm64/kernel/topology.c
between commit:
98dc19902a0b ("arm64: topology: Use PPTT to determine if PE is a thread")
from the arm64 tree and commit:
60c1b220d8bc ("cpu-topology: Move cpu topology code to common code.")
from the risc-v 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/kernel/topology.c
index 6106c49f84bc,6b95c91e7d67..000000000000
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@@ -296,72 -59,21 +59,32 @@@ topology_populated
update_siblings_masks(cpuid);
}
- static void clear_cpu_topology(int cpu)
- {
- struct cpu_topology *cpu_topo = &cpu_topology[cpu];
-
- cpumask_clear(&cpu_topo->llc_sibling);
- cpumask_set_cpu(cpu, &cpu_topo->llc_sibling);
-
- cpumask_clear(&cpu_topo->core_sibling);
- cpumask_set_cpu(cpu, &cpu_topo->core_sibling);
- cpumask_clear(&cpu_topo->thread_sibling);
- cpumask_set_cpu(cpu, &cpu_topo->thread_sibling);
- }
-
- static void __init reset_cpu_topology(void)
- {
- unsigned int cpu;
-
- for_each_possible_cpu(cpu) {
- struct cpu_topology *cpu_topo = &cpu_topology[cpu];
-
- cpu_topo->thread_id = -1;
- cpu_topo->core_id = 0;
- cpu_topo->package_id = -1;
- cpu_topo->llc_id = -1;
-
- clear_cpu_topology(cpu);
- }
- }
-
- void remove_cpu_topology(unsigned int cpu)
- {
- int sibling;
-
- for_each_cpu(sibling, topology_core_cpumask(cpu))
- cpumask_clear_cpu(cpu, topology_core_cpumask(sibling));
- for_each_cpu(sibling, topology_sibling_cpumask(cpu))
- cpumask_clear_cpu(cpu, topology_sibling_cpumask(sibling));
- for_each_cpu(sibling, topology_llc_cpumask(cpu))
- cpumask_clear_cpu(cpu, topology_llc_cpumask(sibling));
-
- clear_cpu_topology(cpu);
- }
-
#ifdef CONFIG_ACPI
+static bool __init acpi_cpu_is_threaded(int cpu)
+{
+ int is_threaded = acpi_pptt_cpu_is_thread(cpu);
+
+ /*
+ * if the PPTT doesn't have thread information, assume a homogeneous
+ * machine and return the current CPU's thread state.
+ */
+ if (is_threaded < 0)
+ is_threaded = read_cpuid_mpidr() & MPIDR_MT_BITMASK;
+
+ return !!is_threaded;
+}
+
/*
* Propagate the topology information of the processor_topology_node tree to the
* cpu_topology array.
*/
- static int __init parse_acpi_topology(void)
+ int __init parse_acpi_topology(void)
{
- bool is_threaded;
int cpu, topology_id;
+ if (acpi_disabled)
+ return 0;
+
- is_threaded = read_cpuid_mpidr() & MPIDR_MT_BITMASK;
-
for_each_possible_cpu(cpu) {
int i, cache_id;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2019-08-12 23:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 23:34 Stephen Rothwell [this message]
2019-08-13 8:24 ` linux-next: manual merge of the risc-v tree with the arm64 tree Will Deacon
2019-08-13 8:42 ` Stephen Rothwell
2019-08-13 8:53 ` Will Deacon
2019-08-13 22:24 ` Paul Walmsley
2019-08-14 9:00 ` Will Deacon
-- strict thread matches above, loose matches on Subject: below --
2021-01-27 23:27 Stephen Rothwell
2021-02-14 21:52 ` Stephen Rothwell
2024-03-14 23:31 Stephen Rothwell
2024-03-15 17:21 ` Palmer Dabbelt
2024-03-15 18:19 ` Catalin Marinas
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=20190813093447.747a5853@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=atish.patra@wdc.com \
--cc=catalin.marinas@arm.com \
--cc=jeremy.linton@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul@pwsan.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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