Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Aug 01, 2024
  2. Jun 12, 2024
  3. May 10, 2024
  4. Feb 20, 2024
  5. Feb 15, 2024
  6. Jan 18, 2024
  7. Jan 12, 2024
  8. Nov 16, 2023
    • Anshuman Khandual's avatar
      coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus · 4aff040b
      Anshuman Khandual authored
      
      This work arounds errata 1490853 on Cortex-A76, and Neoverse-N1, errata
      1491015 on Cortex-A77, errata 1502854 on Cortex-X1, and errata 1619801 on
      Neoverse-V1, based affected cpus, where software read for TRCIDR3.CCITMIN
      field in ETM gets an wrong value.
      
      If software uses the value returned by the TRCIDR3.CCITMIN register field,
      then it will limit the range which could be used for programming the ETM.
      In reality, the ETM could be programmed with a much smaller value than what
      is indicated by the TRCIDR3.CCITMIN field and still function correctly.
      
      If software reads the TRCIDR3.CCITMIN register field, corresponding to the
      instruction trace counting minimum threshold, observe the value 0x100 or a
      minimum cycle count threshold of 256. The correct value should be 0x4 or a
      minimum cycle count threshold of 4.
      
      This work arounds the problem via storing 4 in drvdata->ccitmin on affected
      systems where the TRCIDR3.CCITMIN has been 256, thus preserving cycle count
      threshold granularity.
      
      These errata information has been updated in Documentation/arch/arm64/silicon-errata.rst,
      but without their corresponding configs because these have been implemented
      directly in the driver.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: linux-doc@vger.kernel.org
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      [ Fixed location of silicon-errata.rst in commit description ]
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20230921033631.1298723-2-anshuman.khandual@arm.com
      4aff040b
  9. Sep 29, 2023
    • Rob Herring's avatar
      arm64: errata: Add Cortex-A520 speculative unprivileged load workaround · 471470bc
      Rob Herring authored
      
      Implement the workaround for ARM Cortex-A520 erratum 2966298. On an
      affected Cortex-A520 core, a speculatively executed unprivileged load
      might leak data from a privileged load via a cache side channel. The
      issue only exists for loads within a translation regime with the same
      translation (e.g. same ASID and VMID). Therefore, the issue only affects
      the return to EL0.
      
      The workaround is to execute a TLBI before returning to EL0 after all
      loads of privileged data. A non-shareable TLBI to any address is
      sufficient.
      
      The workaround isn't necessary if page table isolation (KPTI) is
      enabled, but for simplicity it will be. Page table isolation should
      normally be disabled for Cortex-A520 as it supports the CSV3 feature
      and the E0PD feature (used when KASLR is enabled).
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Link: https://lore.kernel.org/r/20230921194156.1050055-2-robh@kernel.org
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      471470bc
  10. Aug 15, 2023
  11. Jul 27, 2023
  12. Jun 21, 2023
  13. Jun 15, 2023
  14. Jun 08, 2023
  15. May 29, 2023
    • zhengyan's avatar
      irqchip/gic-v3: Work around affinity issues on ASR8601 · b4d81fab
      zhengyan authored
      
      The ASR8601 SoC combines ARMv8.2 CPUs from ARM with a GIC-500,
      also from ARM. However, the two are incompatible as the former
      expose an affinity in the form of (cluster, core, thread),
      while the latter can only deal with (cluster, core). If nothing
      is done, the GIC simply cannot route interrupts to the CPUs.
      
      Implement a workaround that shifts the affinity down by a level,
      ensuring the delivery of interrupts despite the implementation
      mismatch.
      
      Signed-off-by: default avatarzhengyan <zhengyan@asrmicro.com>
      [maz: rewrote commit message, reimplemented the workaround
       in a manageable way]
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      b4d81fab
  16. Apr 18, 2023
  17. Apr 08, 2023
    • Shanker Donthineni's avatar
      irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4 · 35727af2
      Shanker Donthineni authored
      The T241 platform suffers from the T241-FABRIC-4 erratum which causes
      unexpected behavior in the GIC when multiple transactions are received
      simultaneously from different sources. This hardware issue impacts
      NVIDIA server platforms that use more than two T241 chips
      interconnected. Each chip has support for 320 {E}SPIs.
      
      This issue occurs when multiple packets from different GICs are
      incorrectly interleaved at the target chip. The erratum text below
      specifies exactly what can cause multiple transfer packets susceptible
      to interleaving and GIC state corruption. GIC state corruption can
      lead to a range of problems, including kernel panics, and unexpected
      behavior.
      
      >From the erratum text:
        "In some cases, inter-socket AXI4 Stream packets with multiple
        transfers, may be interleaved by the fabric when presented to ARM
        Generic Interrupt Controller. GIC expects all transfers of a packet
        to be delivered without any interleaving.
      
        The following GICv3 commands may result in multiple transfer packets
        over inter-socket AXI4 Stream interface:
         - Register reads from GICD_I* and GICD_N*
         - Register writes to 64-bit GICD registers other than GICD_IROUTERn*
         - ITS command MOVALL
      
        Multiple commands in GICv4+ utilize multiple transfer packets,
        including VMOVP, VMOVI, VMAPP, and 64-bit register accesses."
      
        This issue impacts system configurations with more than 2 sockets,
        that require multi-transfer packets to be sent over inter-socket
        AXI4 Stream interface between GIC instances on different sockets.
        GICv4 cannot be supported. GICv3 SW model can only be supported
        with the workaround. Single and Dual socket configurations are not
        impacted by this issue and support GICv3 and GICv4."
      
      Link: https://developer.nvidia.com/docs/t241-fabric-4/nvidia-t241-fabric-4-errata.pdf
      
      
      
      Writing to the chip alias region of the GICD_In{E} registers except
      GICD_ICENABLERn has an equivalent effect as writing to the global
      distributor. The SPI interrupt deactivate path is not impacted by
      the erratum.
      
      To fix this problem, implement a workaround that ensures read accesses
      to the GICD_In{E} registers are directed to the chip that owns the
      SPI, and disable GICv4.x features. To simplify code changes, the
      gic_configure_irq() function uses the same alias region for both read
      and write operations to GICD_ICFGR.
      
      Co-developed-by: default avatarVikram Sethi <vsethi@nvidia.com>
      Signed-off-by: default avatarVikram Sethi <vsethi@nvidia.com>
      Signed-off-by: default avatarShanker Donthineni <sdonthineni@nvidia.com>
      Acked-by: Sudeep Holla <sudeep.holla@arm.com> (for SMCCC/SOC ID bits)
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20230319024314.3540573-2-sdonthineni@nvidia.com
      35727af2
  18. Jan 06, 2023
    • Anshuman Khandual's avatar
      arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption · 5db568e7
      Anshuman Khandual authored
      
      If a Cortex-A715 cpu sees a page mapping permissions change from executable
      to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers, on the
      next instruction abort caused by permission fault.
      
      Only user-space does executable to non-executable permission transition via
      mprotect() system call which calls ptep_modify_prot_start() and ptep_modify
      _prot_commit() helpers, while changing the page mapping. The platform code
      can override these helpers via __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION.
      
      Work around the problem via doing a break-before-make TLB invalidation, for
      all executable user space mappings, that go through mprotect() system call.
      This overrides ptep_modify_prot_start() and ptep_modify_prot_commit(), via
      defining HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION on the platform thus giving
      an opportunity to intercept user space exec mappings, and do the necessary
      TLB invalidation. Similar interceptions are also implemented for HugeTLB.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20230102061651.34745-1-anshuman.khandual@arm.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      5db568e7
  19. Dec 15, 2022
  20. Nov 18, 2022
    • Anshuman Khandual's avatar
      arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption · 44ecda71
      Anshuman Khandual authored
      
      If a Cortex-A715 cpu sees a page mapping permissions change from executable
      to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers, on the
      next instruction abort caused by permission fault.
      
      Only user-space does executable to non-executable permission transition via
      mprotect() system call which calls ptep_modify_prot_start() and ptep_modify
      _prot_commit() helpers, while changing the page mapping. The platform code
      can override these helpers via __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION.
      
      Work around the problem via doing a break-before-make TLB invalidation, for
      all executable user space mappings, that go through mprotect() system call.
      This overrides ptep_modify_prot_start() and ptep_modify_prot_commit(), via
      defining HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION on the platform thus giving
      an opportunity to intercept user space exec mappings, and do the necessary
      TLB invalidation. Similar interceptions are also implemented for HugeTLB.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Link: https://lore.kernel.org/r/20221116140915.356601-3-anshuman.khandual@arm.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      44ecda71
  21. Oct 07, 2022
  22. Sep 16, 2022
  23. Aug 23, 2022
    • Ionela Voinescu's avatar
      arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly · e89d120c
      Ionela Voinescu authored
      
      The AMU counter AMEVCNTR01 (constant counter) should increment at the same
      rate as the system counter. On affected Cortex-A510 cores, AMEVCNTR01
      increments incorrectly giving a significantly higher output value. This
      results in inaccurate task scheduler utilization tracking and incorrect
      feedback on CPU frequency.
      
      Work around this problem by returning 0 when reading the affected counter
      in key locations that results in disabling all users of this counter from
      using it either for frequency invariance or as FFH reference counter. This
      effect is the same to firmware disabling affected counters.
      
      Details on how the two features are affected by this erratum:
      
       - AMU counters will not be used for frequency invariance for affected
         CPUs and CPUs in the same cpufreq policy. AMUs can still be used for
         frequency invariance for unaffected CPUs in the system. Although
         unlikely, if no alternative method can be found to support frequency
         invariance for affected CPUs (cpufreq based or solution based on
         platform counters) frequency invariance will be disabled. Please check
         the chapter on frequency invariance at
         Documentation/scheduler/sched-capacity.rst for details of its effect.
      
       - Given that FFH can be used to fetch either the core or constant counter
         values, restrictions are lifted regarding any of these counters
         returning a valid (!0) value. Therefore FFH is considered supported
         if there is a least one CPU that support AMUs, independent of any
         counters being disabled or affected by this erratum. Clarifying
         comments are now added to the cpc_ffh_supported(), cpu_read_constcnt()
         and cpu_read_corecnt() functions.
      
      The above is achieved through adding a new erratum: ARM64_ERRATUM_2457168.
      
      Signed-off-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: James Morse <james.morse@arm.com>
      Link: https://lore.kernel.org/r/20220819103050.24211-1-ionela.voinescu@arm.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      e89d120c
  24. Jul 19, 2022
  25. Jul 05, 2022
  26. May 12, 2022
  27. Mar 07, 2022
  28. Feb 03, 2022
  29. Jan 28, 2022
  30. Jan 27, 2022
  31. Jan 24, 2022
  32. Oct 21, 2021
  33. Mar 25, 2021