]> Git Repo - J-linux.git/commitdiff
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
authorLinus Torvalds <[email protected]>
Tue, 16 Jul 2024 00:06:19 +0000 (17:06 -0700)
committerLinus Torvalds <[email protected]>
Tue, 16 Jul 2024 00:06:19 +0000 (17:06 -0700)
Pull arm64 updates from Catalin Marinas:
 "The biggest part is the virtual CPU hotplug that touches ACPI,
  irqchip. We also have some GICv3 optimisation for pseudo-NMIs that has
  been queued via the arm64 tree. Otherwise the usual perf updates,
  kselftest, various small cleanups.

  Core:

   - Virtual CPU hotplug support for arm64 ACPI systems

   - cpufeature infrastructure cleanups and making the FEAT_ECBHB ID
     bits visible to guests

   - CPU errata: expand the speculative SSBS workaround to more CPUs

   - GICv3, use compile-time PMR values: optimise the way regular IRQs
     are masked/unmasked when GICv3 pseudo-NMIs are used, removing the
     need for a static key in fast paths by using a priority value
     chosen dynamically at boot time

  ACPI:

   - 'acpi=nospcr' option to disable SPCR as default console for arm64

   - Move some ACPI code (cpuidle, FFH) to drivers/acpi/arm64/

  Perf updates:

   - Rework of the IMX PMU driver to enable support for I.MX95

   - Enable support for tertiary match groups in the CMN PMU driver

   - Initial refactoring of the CPU PMU code to prepare for the fixed
     instruction counter introduced by Arm v9.4

   - Add missing PMU driver MODULE_DESCRIPTION() strings

   - Hook up DT compatibles for recent CPU PMUs

  Kselftest updates:

   - Kernel mode NEON fp-stress

   - Cleanups, spelling mistakes

  Miscellaneous:

   - arm64 Documentation update with a minor clarification on TBI

   - Fix missing IPI statistics

   - Implement raw_smp_processor_id() using thread_info rather than a
     per-CPU variable (better code generation)

   - Make MTE checking of in-kernel asynchronous tag faults conditional
     on KASAN being enabled

   - Minor cleanups, typos"

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (69 commits)
  selftests: arm64: tags: remove the result script
  selftests: arm64: tags_test: conform test to TAP output
  perf: add missing MODULE_DESCRIPTION() macros
  arm64: smp: Fix missing IPI statistics
  irqchip/gic-v3: Fix 'broken_rdists' unused warning when !SMP and !ACPI
  ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64
  Documentation: arm64: Update memory.rst for TBI
  arm64/cpufeature: Replace custom macros with fields from ID_AA64PFR0_EL1
  KVM: arm64: Replace custom macros with fields from ID_AA64PFR0_EL1
  perf: arm_pmuv3: Include asm/arm_pmuv3.h from linux/perf/arm_pmuv3.h
  perf: arm_v6/7_pmu: Drop non-DT probe support
  perf/arm: Move 32-bit PMU drivers to drivers/perf/
  perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check
  perf: arm_pmuv3: Avoid assigning fixed cycle counter with threshold
  arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU
  perf: imx_perf: add support for i.MX95 platform
  perf: imx_perf: fix counter start and config sequence
  perf: imx_perf: refactor driver for imx93
  perf: imx_perf: let the driver manage the counter usage rather the user
  perf: imx_perf: add macro definitions for parsing config attr
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
arch/arm64/Kconfig
kernel/cpu.c

index fc01da74cf9936b3e3dffbab048db6775265ac3c,68d8acc38c8237e3a77bafc9cfe67528b14778f4..ee9f203438d9d360cdfa03105ce521e41583fba0
@@@ -12,7 -12,7 +12,7 @@@
        acpi=           [HW,ACPI,X86,ARM64,RISCV64,EARLY]
                        Advanced Configuration and Power Interface
                        Format: { force | on | off | strict | noirq | rsdt |
-                                 copy_dsdt }
+                                 copy_dsdt | nospcr }
                        force -- enable ACPI if default was off
                        on -- enable ACPI but allow fallback to DT [arm64,riscv64]
                        off -- disable ACPI if default was on
                                strictly ACPI specification compliant.
                        rsdt -- prefer RSDT over (default) XSDT
                        copy_dsdt -- copy DSDT to memory
-                       For ARM64 and RISCV64, ONLY "acpi=off", "acpi=on" or
-                       "acpi=force" are available
+                       nospcr -- disable console in ACPI SPCR table as
+                               default _serial_ console on ARM64
+                       For ARM64, ONLY "acpi=off", "acpi=on", "acpi=force" or
+                       "acpi=nospcr" are available
+                       For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force"
+                       are available
  
                        See also Documentation/power/runtime_pm.rst, pci=noacpi
  
                        Documentation/networking/netconsole.rst for an
                        alternative.
  
 -              <DEVNAME>:<n>.<n>[,options]
 -                      Use the specified serial port on the serial core bus.
 -                      The addressing uses DEVNAME of the physical serial port
 -                      device, followed by the serial core controller instance,
 -                      and the serial port instance. The options are the same
 -                      as documented for the ttyS addressing above.
 -
 -                      The mapping of the serial ports to the tty instances
 -                      can be viewed with:
 -
 -                      $ ls -d /sys/bus/serial-base/devices/*:*.*/tty/*
 -                      /sys/bus/serial-base/devices/00:04:0.0/tty/ttyS0
 -
 -                      In the above example, the console can be addressed with
 -                      console=00:04:0.0. Note that a console addressed this
 -                      way will only get added when the related device driver
 -                      is ready. The use of an earlycon parameter in addition to
 -                      the console may be desired for console output early on.
 -
                uart[8250],io,<addr>[,options]
                uart[8250],mmio,<addr>[,options]
                uart[8250],mmio16,<addr>[,options]
                        Format: 0 | 1
                        Default set by CONFIG_INIT_ON_FREE_DEFAULT_ON.
  
 -      init_mlocked_on_free=   [MM] Fill freed userspace memory with zeroes if
 -                              it was mlock'ed and not explicitly munlock'ed
 -                              afterwards.
 -                              Format: 0 | 1
 -                              Default set by CONFIG_INIT_MLOCKED_ON_FREE_DEFAULT_ON
 -
        init_pkru=      [X86] Specify the default memory protection keys rights
                        register contents for all processes.  0x55555554 by
                        default (disallow access to all but pkey 0).  Can
                        the ->nocb_bypass queue.  The definition of "too
                        many" is supplied by this kernel boot parameter.
  
 +      rcutree.nohz_full_patience_delay= [KNL]
 +                      On callback-offloaded (rcu_nocbs) CPUs, avoid
 +                      disturbing RCU unless the grace period has
 +                      reached the specified age in milliseconds.
 +                      Defaults to zero.  Large values will be capped
 +                      at five seconds.  All values will be rounded down
 +                      to the nearest value representable by jiffies.
 +
        rcutree.qhimark= [KNL]
                        Set threshold of queued RCU callbacks beyond which
                        batch limiting is disabled.
diff --combined arch/arm64/Kconfig
index b6e8920364de22986378f3c64fdd3f4f87cf0643,167e51067508a18c37b7f5361e62bde87e0c21c0..79a656a62cbcd5cf5b0b9cf472098bca9edd6308
@@@ -5,6 -5,7 +5,7 @@@ config ARM6
        select ACPI_CCA_REQUIRED if ACPI
        select ACPI_GENERIC_GSI if ACPI
        select ACPI_GTDT if ACPI
+       select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
        select ACPI_IORT if ACPI
        select ACPI_REDUCED_HARDWARE_ONLY if ACPI
        select ACPI_MCFG if (ACPI && PCI)
@@@ -381,7 -382,7 +382,7 @@@ config BROKEN_GAS_INS
  
  config BUILTIN_RETURN_ADDRESS_STRIPS_PAC
        bool
-       # Clang's __builtin_return_adddress() strips the PAC since 12.0.0
+       # Clang's __builtin_return_address() strips the PAC since 12.0.0
        # https://github.com/llvm/llvm-project/commit/2a96f47c5ffca84cd774ad402cacd137f4bf45e2
        default y if CC_IS_CLANG
        # GCC's __builtin_return_address() strips the PAC since 11.1.0,
@@@ -1067,34 -1068,21 +1068,21 @@@ config ARM64_ERRATUM_311729
  
          If unsure, say Y.
  
- config ARM64_WORKAROUND_SPECULATIVE_SSBS
-       bool
  config ARM64_ERRATUM_3194386
-       bool "Cortex-X4: 3194386: workaround for MSR SSBS not self-synchronizing"
-       select ARM64_WORKAROUND_SPECULATIVE_SSBS
-       default y
-       help
-         This option adds the workaround for ARM Cortex-X4 erratum 3194386.
-         On affected cores "MSR SSBS, #0" instructions may not affect
-         subsequent speculative instructions, which may permit unexepected
-         speculative store bypassing.
-         Work around this problem by placing a speculation barrier after
-         kernel changes to SSBS. The presence of the SSBS special-purpose
-         register is hidden from hwcaps and EL0 reads of ID_AA64PFR1_EL1, such
-         that userspace will use the PR_SPEC_STORE_BYPASS prctl to change
-         SSBS.
-         If unsure, say Y.
- config ARM64_ERRATUM_3312417
-       bool "Neoverse-V3: 3312417: workaround for MSR SSBS not self-synchronizing"
-       select ARM64_WORKAROUND_SPECULATIVE_SSBS
+       bool "Cortex-{A720,X4,X925}/Neoverse-V3: workaround for MSR SSBS not self-synchronizing"
        default y
        help
-         This option adds the workaround for ARM Neoverse-V3 erratum 3312417.
+         This option adds the workaround for the following errata:
+         * ARM Cortex-A710 erratam 3324338
+         * ARM Cortex-A720 erratum 3456091
+         * ARM Cortex-X2 erratum 3324338
+         * ARM Cortex-X3 erratum 3324335
+         * ARM Cortex-X4 erratum 3194386
+         * ARM Cortex-X925 erratum 3324334
+         * ARM Neoverse N2 erratum 3324339
+         * ARM Neoverse V2 erratum 3324336
+         * ARM Neoverse-V3 erratum 3312417
  
          On affected cores "MSR SSBS, #0" instructions may not affect
          subsequent speculative instructions, which may permit unexepected
  
          If unsure, say Y.
  
  config CAVIUM_ERRATUM_22375
        bool "Cavium erratum 22375, 24313"
        default y
@@@ -1649,7 -1636,6 +1636,7 @@@ config RODATA_FULL_DEFAULT_ENABLE
  
  config ARM64_SW_TTBR0_PAN
        bool "Emulate Privileged Access Never using TTBR0_EL1 switching"
 +      depends on !KCSAN
        help
          Enabling this option prevents the kernel from accessing
          user-space memory directly by pointing TTBR0_EL1 to a reserved
diff --combined kernel/cpu.c
index 7121f058674a438c62acbc1d2bead7b532f4e05f,a2f3ad276814db2d113f0bfe844123217432cadd..5123121b1c484ea0592470ad474c8d001c0fc370
@@@ -1859,9 -1859,6 +1859,9 @@@ static inline bool cpuhp_bringup_cpus_p
  
  void __init bringup_nonboot_cpus(unsigned int max_cpus)
  {
 +      if (!max_cpus)
 +              return;
 +
        /* Try parallel bringup optimization if enabled */
        if (cpuhp_bringup_cpus_parallel(max_cpus))
                return;
@@@ -1894,8 -1891,8 +1894,8 @@@ int freeze_secondary_cpus(int primary
        cpumask_clear(frozen_cpus);
  
        pr_info("Disabling non-boot CPUs ...\n");
 -      for_each_online_cpu(cpu) {
 -              if (cpu == primary)
 +      for (cpu = nr_cpu_ids - 1; cpu >= 0; cpu--) {
 +              if (!cpu_online(cpu) || cpu == primary)
                        continue;
  
                if (pm_wakeup_pending()) {
@@@ -2449,7 -2446,7 +2449,7 @@@ EXPORT_SYMBOL_GPL(__cpuhp_state_add_ins
   * The caller needs to hold cpus read locked while calling this function.
   * Return:
   *   On success:
 - *      Positive state number if @state is CPUHP_AP_ONLINE_DYN;
 + *      Positive state number if @state is CPUHP_AP_ONLINE_DYN or CPUHP_BP_PREPARE_DYN;
   *      0 for all other states
   *   On failure: proper (negative) error code
   */
@@@ -2472,7 -2469,7 +2472,7 @@@ int __cpuhp_setup_state_cpuslocked(enu
        ret = cpuhp_store_callbacks(state, name, startup, teardown,
                                    multi_instance);
  
 -      dynstate = state == CPUHP_AP_ONLINE_DYN;
 +      dynstate = state == CPUHP_AP_ONLINE_DYN || state == CPUHP_BP_PREPARE_DYN;
        if (ret > 0 && dynstate) {
                state = ret;
                ret = 0;
  out:
        mutex_unlock(&cpuhp_state_mutex);
        /*
 -       * If the requested state is CPUHP_AP_ONLINE_DYN, return the
 -       * dynamically allocated state in case of success.
 +       * If the requested state is CPUHP_AP_ONLINE_DYN or CPUHP_BP_PREPARE_DYN,
 +       * return the dynamically allocated state in case of success.
         */
        if (!ret && dynstate)
                return state;
@@@ -3072,6 -3069,9 +3072,9 @@@ EXPORT_SYMBOL(__cpu_possible_mask)
  struct cpumask __cpu_online_mask __read_mostly;
  EXPORT_SYMBOL(__cpu_online_mask);
  
+ struct cpumask __cpu_enabled_mask __read_mostly;
+ EXPORT_SYMBOL(__cpu_enabled_mask);
  struct cpumask __cpu_present_mask __read_mostly;
  EXPORT_SYMBOL(__cpu_present_mask);
  
This page took 0.103203 seconds and 4 git commands to generate.