1. 25 Aug, 2023 8 commits
    • Will Deacon's avatar
      Merge branch 'for-next/perf' into for-next/core · f8f62118
      Will Deacon authored
      * for-next/perf:
        drivers/perf: hisi: Update HiSilicon PMU maintainers
        arm_pmu: acpi: Add a representative platform device for TRBE
        arm_pmu: acpi: Refactor arm_spe_acpi_register_device()
        hw_breakpoint: fix single-stepping when using bpf_overflow_handler
        perf/imx_ddr: don't enable counter0 if none of 4 counters are used
        perf/imx_ddr: speed up overflow frequency of cycle
        drivers/perf: hisi: Schedule perf session according to locality
        perf/arm-dmc620: Fix dmc620_pmu_irqs_lock/cpu_hotplug_lock circular lock dependency
        perf/smmuv3: Add MODULE_ALIAS for module auto loading
        perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09
        perf: pmuv3: Remove comments from armv8pmu_[enable|disable]_event()
        perf/arm-cmn: Add CMN-700 r3 support
        perf/arm-cmn: Refactor HN-F event selector macros
        perf/arm-cmn: Remove spurious event aliases
        drivers/perf: Explicitly include correct DT includes
        perf: pmuv3: Add Cortex A520, A715, A720, X3 and X4 PMUs
        dt-bindings: arm: pmu: Add Cortex A520, A715, A720, X3, and X4
        perf/smmuv3: Remove build dependency on ACPI
        perf: xgene_pmu: Convert to devm_platform_ioremap_resource()
        driver/perf: Add identifier sysfs file for Yitian 710 DDR
      f8f62118
    • Will Deacon's avatar
      Merge branch 'for-next/mm' into for-next/core · 7abb3e4e
      Will Deacon authored
      * for-next/mm:
        arm64: fix build warning for ARM64_MEMSTART_SHIFT
        arm64: Remove unsued extern declaration init_mem_pgprot()
        arm64/mm: Set only the PTE_DIRTY bit while preserving the HW dirty state
        arm64/mm: Add pte_rdonly() helper
        arm64/mm: Directly use ID_AA64MMFR2_EL1_VARange_MASK
        arm64/mm: Replace an open coding with ID_AA64MMFR1_EL1_HAFDBS_MASK
      7abb3e4e
    • Will Deacon's avatar
      Merge branch 'for-next/misc' into for-next/core · 438ddc3c
      Will Deacon authored
      * for-next/misc:
        arm64/sysreg: refactor deprecated strncpy
        arm64: sysreg: Generate C compiler warnings on {read,write}_sysreg_s arguments
        arm64: sdei: abort running SDEI handlers during crash
        arm64: Explicitly include correct DT includes
        arm64/Kconfig: Sort the RCpc feature under the ARMv8.3 features menu
        arm64: vdso: remove two .altinstructions related symbols
        arm64/ptrace: Clean up error handling path in sve_set_common()
      438ddc3c
    • Will Deacon's avatar
      Merge branch 'for-next/errata' into for-next/core · d36dccca
      Will Deacon authored
      * for-next/errata:
        arm64: errata: Group all Cortex-A510 errata together
      d36dccca
    • Will Deacon's avatar
      Merge branch 'for-next/entry' into for-next/core · cd074557
      Will Deacon authored
      * for-next/entry:
        arm64: syscall: unmask DAIF earlier for SVCs
      cd074557
    • Will Deacon's avatar
      Merge branch 'for-next/docs' into for-next/core · 0f4f768f
      Will Deacon authored
      * for-next/docs:
        Documentation: arm64: Correct SME ZA macros name
      0f4f768f
    • Will Deacon's avatar
      Merge branch 'for-next/cpufeature' into for-next/core · 1f5a062d
      Will Deacon authored
      * for-next/cpufeature:
        arm64/fpsimd: Only provide the length to cpufeature for xCR registers
        selftests/arm64: add HWCAP2_HBC test
        arm64: add HWCAP for FEAT_HBC (hinted conditional branches)
        arm64/cpufeature: Use ARM64_CPUID_FIELD() to match EVT
      1f5a062d
    • Jijie Shao's avatar
      drivers/perf: hisi: Update HiSilicon PMU maintainers · 21b61fe4
      Jijie Shao authored
      Since Guangbin and Shaokun have left HiSilicon and will no longer
      maintain the drivers, update the maintainer information and
      thanks for their work.
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Acked-by: default avatarYicong Yang <yangyicong@hisilicon.com>
      Link: https://lore.kernel.org/r/20230824024135.1291459-1-shaojijie@huawei.com
      [will: left the HNS3 title as-is to avoid the churn of resorting the entries]
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      21b61fe4
  2. 18 Aug, 2023 3 commits
  3. 16 Aug, 2023 6 commits
  4. 15 Aug, 2023 2 commits
  5. 11 Aug, 2023 1 commit
    • Mark Rutland's avatar
      arm64: syscall: unmask DAIF earlier for SVCs · f130ac0a
      Mark Rutland authored
      For a number of historical reasons, when handling SVCs we don't unmask
      DAIF in el0_svc() or el0_svc_compat(), and instead do so later in
      el0_svc_common(). This is unfortunate and makes it harder to make
      changes to the DAIF management in entry-common.c as we'd like to do as
      cleanup and preparation for FEAT_NMI support. We can move the DAIF
      unmasking to entry-common.c as long as we also hoist the
      fp_user_discard() logic, as reasoned below.
      
      We converted the syscall trace logic from assembly to C in commit:
      
        f37099b6 ("arm64: convert syscall trace logic to C")
      
      ... which was intended to have no functional change, and mirrored the
      existing assembly logic to avoid the risk of any functional regression.
      
      With the logic in C, it's clear that there is currently no reason to
      unmask DAIF so late within el0_svc_common():
      
      * The thread flags are read prior to unmasking DAIF, but are not
        consumed until after DAIF is unmasked, and we don't perform a
        read-modify-write sequence of the thread flags for which we might need
        to serialize against an IPI modifying the flags. Similarly, for any
        thread flags set by other threads, whether DAIF is masked or not has
        no impact.
      
        The read_thread_flags() helpers performs a single-copy-atomic read of
        the flags, and so this can safely be moved after unmasking DAIF.
      
      * The pt_regs::orig_x0 and pt_regs::syscallno fields are neither
        consumed nor modified by the handler for any DAIF exception (e.g.
        these do not exist in the `perf_event_arm_regs` enum and are not
        sampled by perf in its IRQ handler).
      
        Thus, the manipulation of pt_regs::orig_x0 and pt_regs::syscallno can
        safely be moved after unmasking DAIF.
      
      Given the above, we can safely hoist unmasking of DAIF out of
      el0_svc_common(), and into its immediate callers: do_el0_svc() and
      do_el0_svc_compat(). Further:
      
      * In do_el0_svc(), we sample the syscall number from
        pt_regs::regs[8]. This is not modified by the handler for any DAIF
        exception, and thus can safely be moved after unmasking DAIF.
      
        As fp_user_discard() operates on the live FP/SVE/SME register state,
        this needs to occur before we clear DAIF.IF, as interrupts could
        result in preemption which would cause this state to become foreign.
        As fp_user_discard() is the first function called within do_el0_svc(),
        it has no dependency on other parts of do_el0_svc() and can be moved
        earlier so long as it is called prior to unmasking DAIF.IF.
      
      * In do_el0_svc_compat(), we sample the syscall number from
        pt_regs::regs[7]. This is not modified by the handler for any DAIF
        exception, and thus can safely be moved after unmasking DAIF.
      
        Compat threads cannot use SVE or SME, so there's no need for
        el0_svc_compat() to call fp_user_discard().
      
      Given the above, we can safely hoist the unmasking of DAIF out of
      do_el0_svc() and do_el0_svc_compat(), and into their immediate callers:
      el0_svc() and el0_svc_compat(), so long a we also hoist
      fp_user_discard() into el0_svc().
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20230808101148.1064172-1-mark.rutland@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      f130ac0a
  6. 10 Aug, 2023 1 commit
    • Mark Brown's avatar
      arm64/fpsimd: Only provide the length to cpufeature for xCR registers · 01948b09
      Mark Brown authored
      For both SVE and SME we abuse the generic register field comparison
      support in the cpufeature code as part of our detection of unsupported
      variations in the vector lengths available to PEs, reporting the maximum
      vector lengths via ZCR_EL1.LEN and SMCR_EL1.LEN.  Since these are
      configuration registers rather than identification registers the
      assumptions the cpufeature code makes about how unknown bitfields behave
      are invalid, leading to warnings when SME features like FA64 are enabled
      and we hotplug a CPU:
      
        CPU features: SANITY CHECK: Unexpected variation in SYS_SMCR_EL1. Boot CPU: 0x0000000000000f, CPU3: 0x0000008000000f
        CPU features: Unsupported CPU feature variation detected.
      
      SVE has no controls other than the vector length so is not yet impacted
      but the same issue will apply there if any are defined.
      
      Since the only field we are interested in having the cpufeature code
      handle is the length field and we use a custom read function to obtain
      the value we can avoid these warnings by filtering out all other bits
      when we return the register value, if we're doing that we don't need to
      bother reading the register at all and can simply use the RDVL/RDSVL
      value we were filling in instead.
      
      Fixes: 2e0f2478 ("arm64/sve: Probe SVE capabilities and usable vector lengths")
      FixeS: b42990d3 ("arm64/sme: Identify supported SME vector lengths at boot")
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Link: https://lore.kernel.org/r/20230731-arm64-sme-fa64-hotplug-v2-1-7714c00dd902@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
      01948b09
  7. 04 Aug, 2023 5 commits
  8. 31 Jul, 2023 1 commit
  9. 28 Jul, 2023 3 commits
  10. 27 Jul, 2023 10 commits