Merge tag 'common/for-v5.4-rc1/cpu-topology' of git://git.kernel.org/pub/scm/linux...
authorWill Deacon <will@kernel.org>
Wed, 14 Aug 2019 09:07:00 +0000 (10:07 +0100)
committerWill Deacon <will@kernel.org>
Wed, 14 Aug 2019 09:07:00 +0000 (10:07 +0100)
Pull in generic CPU topology changes from Paul Walmsley (RISC-V).

* tag 'common/for-v5.4-rc1/cpu-topology' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  MAINTAINERS: Add an entry for generic architecture topology
  base: arch_topology: update Kconfig help description
  RISC-V: Parse cpu topology during boot.
  arm: Use common cpu_topology structure and functions.
  cpu-topology: Move cpu topology code to common code.
  dt-binding: cpu-topology: Move cpu-map to a common binding.
  Documentation: DT: arm: add support for sockets defining package boundaries

1  2 
MAINTAINERS
arch/arm64/kernel/topology.c

diff --cc MAINTAINERS
Simple merge
@@@ -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;
  
 -      is_threaded = read_cpuid_mpidr() & MPIDR_MT_BITMASK;
 -
+       if (acpi_disabled)
+               return 0;
        for_each_possible_cpu(cpu) {
                int i, cache_id;