Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
dbcd098
drm: Plumb debugfs_init through to panels
dianders Feb 5, 2022
2a0ca5c
drm/ast: Implement polling for VGA and SIL164 connectors
tdz Mar 25, 2024
825f845
drm/hisilicon/hibmc: add dp aux in hibmc drivers
mark1188-ui Jan 3, 2025
a20fe96
drm/hisilicon/hibmc: add dp link moduel in hibmc drivers
mark1188-ui Jan 3, 2025
1d4953c
drm/hisilicon/hibmc: add dp hw moduel in hibmc driver
mark1188-ui Jan 3, 2025
cc41ee1
drm/hisilicon/hibmc: refactored struct hibmc_drm_private
mark1188-ui Jan 3, 2025
930b74b
drm/hisilicon/hibmc: add dp module in hibmc
mark1188-ui Jan 3, 2025
e978365
drm/hisilicon/hibmc: Replace module initialization with DRM helpers
tdz Dec 22, 2021
3271e56
drm/hisilicon/hibmc: Fix preferred depth and bpp
tdz Nov 23, 2022
0886d4d
drm/hisilicon/hibmc: Restructuring the header dp_reg.h
mark1188-ui Mar 31, 2025
f5252e0
drm/hisilicon/hibmc: Add dp serdes cfg to adjust serdes rate, voltage…
mark1188-ui Mar 31, 2025
b065e13
drm/hisilicon/hibmc: Add dp serdes cfg in dp process
mark1188-ui Mar 31, 2025
f8a1089
drm/hisilicon/hibmc: Refactor the member of drm_aux in struct hibmc_dp
mark1188-ui Mar 31, 2025
8648f32
drm/hisilicon/hibmc: Getting connector info and EDID by using AUX cha…
mark1188-ui Mar 31, 2025
34d8ff0
drm/hisilicon/hibmc: Add colorbar-cfg feature and its debugfs file
mark1188-ui Mar 31, 2025
93ff538
drm/hisilicon/hibmc: Enable this hot plug detect of irq feature
mark1188-ui Mar 31, 2025
a016094
drm/hisilicon/hibmc: Add MSI irq getting and requesting for HPD
mark1188-ui Mar 31, 2025
5dac8e2
drm/hisilicon/hibmc: Add vga connector detect functions
mark1188-ui Mar 31, 2025
41765b0
drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init …
mark1188-ui Aug 13, 2025
4e34242
drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local
mark1188-ui Aug 13, 2025
c468cc7
drm/hisilicon/hibmc: fix the hibmc loaded failed bug
mark1188-ui Aug 13, 2025
6e219a4
drm/hisilicon/hibmc: fix rare monitors cannot display problem
mark1188-ui Aug 13, 2025
9f9d35b
drm/hisilicon/hibmc: fix dp and vga cannot show together
mark1188-ui Aug 13, 2025
8dc0b4e
drm/hisilicon/hibmc: select CONFIG_DRM_DISPLAY_DP_HELPER
arndb Jan 27, 2025
90fbd49
kselftest/arm64: Add a test program to exercise the syscall ABI
broonie Dec 10, 2021
3eee872
kselftest/arm64: Add simple hwcap validation
broonie Aug 29, 2022
b0b353f
selftests/arm64: add HWCAP2_HBC test
jgouly Aug 4, 2023
7979dcb
arm64: trap implementation defined functionality in userspace
kristina-martsenko Jun 22, 2022
99db826
arm64: add HWCAP for FEAT_HBC (hinted conditional branches)
jgouly Aug 4, 2023
4e6289f
arm64: Add feature detection for fine grained traps
broonie Aug 15, 2023
02e14b5
arm64/sysreg: Update ID_AA64MMFR1_EL1 register
Nov 2, 2024
afac35c
arm64: setup: name 'tcr2' register
Nov 2, 2024
f6bf1f2
arm64/mm: Replace an open coding with ID_AA64MMFR1_EL1_HAFDBS_MASK
Jul 11, 2023
72e662f
arm64: Add support for FEAT_HAFT
Nov 2, 2024
640ecf4
arm64: Enable ARCH_HAS_NONLEAF_PMD_YOUNG
Nov 2, 2024
d72cd5d
arm64: pgtable: Warn unexpected pmdp_test_and_clear_young()
Nov 2, 2024
48b3788
KVM: arm64: initialize HCRX_EL2
kristina-martsenko May 9, 2023
f720aea
arm64/hwcap: Document allocation of upper bits of AT_HWCAP
broonie Jul 7, 2022
cf1461d
arm64/cpufeature: Store elf_hwcaps as a bitmap rather than unsigned long
broonie Jul 7, 2022
9c13709
tick/broadcast: Make takeover of broadcast hrtimer reliable
yuliao0214 Jul 11, 2024
127917b
cpu/SMT: Provide a default topology_is_primary_thread()
Mar 11, 2025
bfdf006
arch_topology: Don't set cluster identifier as physical package ident…
sudeep-holla Jul 4, 2022
4a4a4b3
arch_topology: Add support for parsing sockets in /cpu-map
sudeep-holla Jul 4, 2022
99b9db5
cpu/SMT: Move SMT prototypes into cpu_smt.h
mpe Jul 5, 2023
4428cc9
cpu/SMT: Store the current/max number of threads
mpe Jul 5, 2023
dc203a0
cpu/SMT: Remove topology_smt_supported()
ldu4 Jul 5, 2023
f6fba57
arch_topology: Support SMT control for OF based system
Mar 11, 2025
a78f25b
arm64: topology: Support SMT control on ACPI based system
Mar 11, 2025
9951478
arm64: Kconfig: Enable HOTPLUG_SMT
Mar 11, 2025
9f55a8a
hwtracing: hisi_ptt: Fix up for "iommu/dma: Make header private"
sfrothwell Sep 12, 2022
a9a188c
hwtracing: hisi_ptt: Optimize the trace data committing
Oct 10, 2023
446b380
PCI/DPC: Ignore Surprise Down error on hot removal
skoralah Feb 7, 2024
735c274
perf hisi-ptt: Fix memory leak in lseek failure handling
visitorckw Sep 30, 2023
68944e5
drivers/perf: hisi_pcie: Export supported Root Ports [bdf_min, bdf_max]
Aug 29, 2024
ae2502d
tick/broadcast: Move per CPU pointer access into the atomic section
KAGA-KOKO Jul 31, 2024
b01e666
drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
mark1188-ui Dec 10, 2025
8544397
drm/hisilicon/hibmc: add dp mode valid check
mark1188-ui Dec 10, 2025
f702020
drm/hisilicon/hibmc: fix no showing problem with loading hibmc manually
mark1188-ui Dec 10, 2025
2c80c9e
drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init.
mark1188-ui Dec 10, 2025
2df344d
downstream: x86/apic: Fix build error for topology_is_primary_thread
Sep 23, 2025
a1c3aef
cpufreq: Support per-policy performance boost
jiezhan0214 Aug 22, 2023
2a92776
cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_se…
Mar 12, 2024
8f09c34
cpufreq: Allow drivers to advertise boost enabled
superm1 Jun 26, 2024
db7304b
cpufreq: Introduce a more generic way to set default per-policy boost…
Jan 17, 2025
4fe1d4f
cpufreq: CPPC: Fix wrong max_freq in policy initialization
Jan 17, 2025
8b076de
cpufreq: ACPI: Defer setting boost MSRs
stuartwhayes Nov 2, 2022
5d1761b
cpufreq: ACPI: Only set boost MSRs on supported CPUs
stuartwhayes Dec 5, 2022
5d99e13
cpufreq: ACPI: Mark boost policy as enabled when setting boost
superm1 Jun 26, 2024
57d2626
cpufreq: ACPI: Remove set_boost in acpi_cpufreq_cpu_init()
Jan 17, 2025
a0be674
cpufreq: prevent NULL dereference in cpufreq_online()
AboorvaDevarajan Feb 5, 2025
1409d7a
cpufreq: governor: Fix negative 'idle_time' handling in dbs_update()
jiezhan0214 Feb 13, 2025
74ae787
cpufreq: Fix re-boost issue after hotplugging a CPU
Jan 17, 2025
17a9736
arch_topology: Introduce thermal pressure update function
lukaszluba-arm Nov 9, 2021
fd342ed
sched/topology: Add a new arch_scale_freq_ref() method
vingu-linaro Dec 11, 2023
5ed49bc
topology: Set capacity_freq_ref in all cases
vingu-linaro Jan 17, 2024
f86beb5
arch_topology: init capacity_freq_ref to 0
ionela-voinescu Aug 27, 2024
4e78700
cpufreq: Allow arch_freq_get_on_cpu to return an error
bea-arm Jan 31, 2025
420d7b0
cpufreq: Introduce an optional cpuinfo_avg_freq sysfs entry
bea-arm Jan 31, 2025
f39fe4e
arm64: Provide an AMU-based version of arch_freq_get_on_cpu
bea-arm Jan 31, 2025
2820689
arm64: Update AMU-based freq scale factor on entering idle
bea-arm Jan 31, 2025
ff5ccc5
arm64: Utilize for_each_cpu_wrap for reference lookup
bea-arm Feb 20, 2025
ab2a871
arch_topology: obtain cpu capacity using information from CPPC
ionela-voinescu Mar 10, 2022
fceb5e7
cpufreq/cppc: Set the frequency used for computing the capacity
vingu-linaro Dec 11, 2023
dcc540d
arm64/amu: Use capacity_ref_freq() to set AMU ratio
vingu-linaro Dec 11, 2023
11773c6
cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf}()
vingu-linaro Dec 11, 2023
7df9ef2
arm64, topology: enable use of init_cpu_capacity_cppc()
ionela-voinescu Mar 10, 2022
e245e4e
cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret'
nathanchance Nov 8, 2022
d7b7db1
cpufreq: ACPI: Re-sync CPU boost state on system resume
vireshk Apr 24, 2025
49f5462
perf arm-spe: Save context ID in record
german-arm Nov 11, 2021
4f28cd8
tools: arm64: Import sysreg.h
rananta468 Oct 7, 2021
7d588f7
arm64: perf: Simplify registration boilerplate
rmurphy-arm Dec 14, 2021
84553ff
tools arm64: Import cputype.h
AGSaidi Mar 24, 2022
c20fb41
perf cpumap: Add is_subset function
captain5050 Mar 28, 2022
a11384b
KVM/arm64: Don't emulate a PMU for 32-bit guests if feature not set
Apr 25, 2022
33768a2
arm64/sysreg: Introduce helpers for access to sysreg fields
broonie May 3, 2022
97d2d13
perf arm64: Add missing -I for tools/arch/arm64/include/ to find asm/…
Aug 11, 2022
99d38e1
perf tools: Sync addition of PERF_MEM_SNOOPX_PEER
AGSaidi Aug 11, 2022
db57555
perf arm-spe: Use SPE data source for neoverse cores
AGSaidi Aug 11, 2022
0e9b4cd
perf: Add system error and not in transaction branch types
Aug 24, 2022
c30939e
perf: Extend branch type classification
Aug 24, 2022
7805f84
perf: Capture branch privilege information
Aug 24, 2022
b9d0bf7
perf: Add PERF_BR_NEW_ARCH_[N] map for BRBE on arm64 platform
Aug 24, 2022
d54c001
perf: Consolidate branch sample filter helpers
Sep 6, 2022
bfa5def
perf/uapi: Define PERF_MEM_SNOOPX_PEER in kernel header file
Sep 28, 2022
60b8ce7
perf stat: Add struct perf_stat_aggr to perf_stat_evsel
namhyung Oct 18, 2022
c50bb3f
perf record: Add remaining branch filters: "no_cycles", "no_flags" & …
Dec 5, 2022
e7e3f9d
perf pmu: Remove duplication around EVENT_SOURCE_DEVICE_PATH
James-A-Clark Jan 20, 2023
367c178
perf arm-spe: Refactor arm-spe to support operation packet type
german-arm Mar 20, 2023
2bd9389
dmaengine: ioat: Free up __cleanup() name
Sep 27, 2022
1f8c81c
perf cpumap: Add intersect function
captain5050 May 26, 2023
b2c68bc
perf pmu: Add CPU map for "cpu" PMUs
captain5050 May 27, 2023
9135969
drivers/perf: hisi: Add support for HiSilicon H60PA and PAv3 PMU driver
Jun 15, 2023
fb72096
drivers/perf: hisi: Add support for HiSilicon UC PMU driver
Jun 15, 2023
59ed5cb
perf test bpf: Address error about non-null argument for epoll_pwait …
acmel Aug 1, 2023
2bb4564
perf header: Fix one memory leakage in perf_event__fprintf_event_upda…
Dec 7, 2023
eb151a2
KVM: arm64: PMU: Simplify PMCR_EL0 reset handling
Nov 24, 2022
34ce4a7
KVM: arm64: PMU: Add a helper to read a vCPU's PMCR_EL0
reijiw-kvm Oct 20, 2023
d8b76b2
drivers: perf: arm_pmuv3: Read PMMIR_EL1 unconditionally
Oct 13, 2023
bf11979
drivers: perf: arm_pmuv3: Drop some unused arguments from armv8_pmu_i…
Oct 16, 2023
155acda
arm: perf: Remove inlines from arm_pmuv3.c
James-A-Clark Dec 11, 2023
6a3beca
arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N
James-A-Clark Dec 11, 2023
43afc21
arm: perf: Use GENMASK for PMMIR fields
James-A-Clark Dec 11, 2023
306f729
arm: perf: Convert remaining fields to use GENMASK
James-A-Clark Dec 11, 2023
c1d738a
arm64: perf: Include threshold control fields in PMEVTYPER mask
James-A-Clark Dec 11, 2023
3e030c3
arm: pmu: Share user ABI format mechanism with SPE
James-A-Clark Dec 11, 2023
60b985d
arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs
James-A-Clark Dec 11, 2023
0b7b6cb
arm64: perf: Add support for event counting threshold
James-A-Clark Dec 11, 2023
20b3213
arm: perf: Fix ARCH=arm build with GCC
James-A-Clark Dec 15, 2023
c985a69
uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries
Feb 14, 2024
53f7df5
ACPI: IPMI: Add helper to wait for when SMI is selected
Mar 20, 2024
66ac2aa
hwmon: (acpi_power_meter) Ensure IPMI space handler is ready on Dell …
Mar 20, 2024
fab8865
arm64: arm_pmuv3: Correctly extract and check the PMUVer
Apr 11, 2024
0923678
perf arm: Workaround ARM PMUs cpu maps having offline cpus
captain5050 Jun 7, 2024
eed4399
drivers: arch_topology: Refactor do-while loops
vmezzela Jun 7, 2024
af2b86c
perf: arm_pmuv3: Avoid assigning fixed cycle counter with threshold
robherring Jun 26, 2024
219d75d
perf stat: Display iostat headers correctly
Aug 2, 2024
b8c65bc
binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4
broonie Oct 4, 2024
75f39ed
tools headers arm64: Sync arm64's cputype.h with the kernel sources
acmel Apr 9, 2022
2ac6b36
hwmon: (acpi_power_meter) Fix fail to load module on platform without…
LiHuiSong1 Nov 12, 2024
6932238
drivers/perf: hisi: Define a symbol namespace for HiSilicon Uncore PMUs
Dec 10, 2024
c8893fd
drivers/perf: hisi: Don't update the associated_cpus on CPU offline
Dec 10, 2024
ccfb263
drivers/perf: hisi: Migrate to one online CPU if no associated one on…
Dec 10, 2024
2b4164c
drivers/perf: hisi: Refactor the detection of associated CPUs
Dec 10, 2024
159a76e
drivers/perf: hisi: Extract topology information to a separate structure
Dec 10, 2024
5af61d8
drivers/perf: hisi: Add a common function to retrieve topology from f…
Dec 10, 2024
fa1d5c6
drivers/perf: hisi: Provide a generic implementation of cpumask/ident…
Dec 10, 2024
cae6f99
drivers/perf: hisi: Export associated CPUs of each PMU through sysfs
Dec 10, 2024
c0a9c0b
drivers/perf: hisi: Fix incorrect variable name "hha_pmu" in DDRC PMU…
Dec 10, 2024
80ae6b0
drivers/perf: hisi: Delete redundant blank line of DDRC PMU
Dec 10, 2024
3d77768
hwmon: (acpi_power_meter) Fix uninitialized variables
LiHuiSong1 Jan 9, 2025
4cdbd5b
hwmon: (acpi_power_meter) Fix update the power trip points on failure
LiHuiSong1 Jan 9, 2025
80cb9fb
hwmon: (acpi_power_meter) Fix a check for the return value of read_do…
Kazuhiro-Abe-fj Jan 15, 2025
7066b20
hwmon: (acpi_power_meter) Fix the fake power alarm reporting
LiHuiSong1 Feb 20, 2025
fa72367
hwmon: Fix the missing of 'average' word in hwmon_power_attr_templates
LiHuiSong1 Mar 4, 2025
5919767
hwmon: (acpi_power_meter) Replace the deprecated hwmon_device_register
LiHuiSong1 Mar 19, 2025
e6f5d7e
perf arm-spe: Add support for SPE Data Source packet on HiSilicon HIP12
Apr 25, 2025
cb29bcc
arm64/sysreg: Add BRBE registers and fields
Jun 11, 2025
eae7a90
drivers/perf: hisi: Simplify the probe process for each DDRC version
Jun 19, 2025
eaeacd9
drivers/perf: hisi: Add support for HiSilicon DDRC v3 PMU driver
Jun 19, 2025
e49b0a6
drivers/perf: hisi: Use ACPI driver_data to retrieve SLLC PMU informa…
Jun 19, 2025
64acfbc
drivers/perf: hisi: Add support for HiSilicon SLLC v3 PMU driver
Jun 19, 2025
51a8b9e
drivers/perf: hisi: Relax the event number check of v2 PMUs
Jun 19, 2025
92b9a0c
drivers/perf: hisi: Support PMUs with no interrupt
Jun 19, 2025
efaecf1
drivers/perf: hisi: Add support for HiSilicon NoC PMU
Aug 14, 2025
0744368
drivers/perf: hisi: Add support for HiSilicon MN PMU driver
Aug 14, 2025
9e4ce8c
drivers/perf: hisi: Relax the event ID check in the framework
Aug 29, 2025
bf9a2cc
drivers/perf: hisi: Export hisi_uncore_pmu_isr()
Aug 29, 2025
4271586
drivers/perf: hisi: Simplify the probe process of each L3C PMU version
Aug 29, 2025
053e7a0
drivers/perf: hisi: Extract the event filter check of L3C PMU
Aug 29, 2025
bafba78
drivers/perf: hisi: Extend the field of tt_core
Aug 29, 2025
3169581
drivers/perf: hisi: Refactor the event configuration of L3C PMU
Aug 29, 2025
d4c2117
drivers/perf: hisi: Add support for L3C PMU v3
Aug 29, 2025
17cafa2
perf: arm_pmuv3: Factor out PMCCNTR_EL0 use conditions
Aug 20, 2025
a2305fd
perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores
Sep 22, 2025
3775880
ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()
rafaeljw Dec 3, 2021
b47beca
ACPI: thermal: Use white space more consistently
rafaeljw Oct 4, 2022
e25d2cf
ACPI: thermal: Drop redundant parens from expressions
rafaeljw Oct 4, 2022
9b2ae4e
ACPI: thermal: Drop some redundant code
rafaeljw Oct 4, 2022
12b5fca
ACPI: make remove callback of ACPI driver void
Nov 13, 2022
e182b24
ACPI: thermal: Adjust critical.flags.valid check
rafaeljw Dec 5, 2022
b47e8e7
thermal: core: Encapsulate tz->device field
dlezcano Apr 19, 2023
42d55ed
ACPI: thermal: Use thermal_zone_device()
dlezcano Apr 19, 2023
e776a15
ACPI: thermal: Move to dedicated function sysfs extra attr creation
dlezcano Apr 19, 2023
61cdfd2
xhci: remove xhci_test_trb_in_td_math early development check
matnyman Feb 2, 2023
798ad84
xhci: Refactor interrupter code for initial multi interrupter support.
matnyman Feb 2, 2023
0bcfab1
xhci: add helpers for enabling and disabling interrupters
matnyman Feb 2, 2023
8063719
xhci: Limit time spent with xHC interrupts disabled during bus resume
matnyman Apr 10, 2025
150d069
spi: hisi-kunpeng: Delete the dump interface of data registers in deb…
Apr 10, 2024
1d85954
spi: hisi-kunpeng: Add validation for the minimum value of speed_hz
Apr 11, 2024
7b21a81
driver core: Provide device_match_acpi_handle() helper
andy-shev Oct 14, 2021
98fee79
gpiolib: acpi: Fix failed in acpi_gpiochip_find() by adding parent no…
May 13, 2024
5579202
arm64: module: move find_section to header
jgouly Aug 30, 2022
ea0d789
arm64: alternative: patch alternatives in the vDSO
jgouly Aug 30, 2022
0e3fc40
arm64: vdso: use SYS_CNTVCTSS_EL0 for gettimeofday
jgouly Aug 30, 2022
84e04ed
arm64: vdso: remove two .altinstructions related symbols
xhackerustc Jul 26, 2023
5bd5840
kselftest/arm64: Fix typo in hwcap check
broonie Aug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Documentation/admin-guide/perf/hisi-pcie-pmu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ The "identifier" sysfs file allows users to identify the version of the
PMU hardware device.

The "bus" sysfs file allows users to get the bus number of Root Ports
monitored by PMU.
monitored by PMU. Furthermore users can get the Root Ports range in
[bdf_min, bdf_max] from "bdf_min" and "bdf_max" sysfs attributes
respectively.

Example usage of perf::

Expand Down
16 changes: 15 additions & 1 deletion Documentation/admin-guide/perf/hisi-pmu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ e.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in
SCCL ID #1.

The driver also provides a "cpumask" sysfs attribute, which shows the CPU core
ID used to count the uncore PMU event.
ID used to count the uncore PMU event. An "associated_cpus" sysfs attribute is
also provided to show the CPUs associated with this PMU. The "cpumask" indicates
the CPUs to open the events, usually as a hint for userspaces tools like perf.
It only contains one associated CPU from the "associated_cpus".

Example usage of perf::

Expand Down Expand Up @@ -98,6 +101,17 @@ CCL/ICL-ID. For I/O die, the ICL-ID is followed by:
5'b00011: HAC_ICL;
5'b10000: PCIe_ICL;

6. ch: NoC PMU supports filtering the event counts of certain transaction
channel with this option. The current supported channels are as follows:

- 3'b010: Request channel
- 3'b100: Snoop channel
- 3'b110: Response channel
- 3'b111: Data channel

7. tt_en: NoC PMU supports counting only transactions that have tracetag set
if this option is set. See the 2nd list for more information about tracetag.

Users could configure IDs to count data come from specific CCL/ICL, by setting
srcid_cmd & srcid_msk, and data desitined for specific CCL/ICL by setting
tgtid_cmd & tgtid_msk. A set bit in srcid_msk/tgtid_msk means the PMU will not
Expand Down
17 changes: 16 additions & 1 deletion Documentation/admin-guide/pm/cpufreq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,20 @@ are the following:
If that frequency cannot be determined, this attribute should not
be present.

``cpuinfo_avg_freq``
An average frequency (in KHz) of all CPUs belonging to a given policy,
derived from a hardware provided feedback and reported on a time frame
spanning at most few milliseconds.

This is expected to be based on the frequency the hardware actually runs
at and, as such, might require specialised hardware support (such as AMU
extension on ARM). If one cannot be determined, this attribute should
not be present.

Note, that failed attempt to retrieve current frequency for a given
CPU(s) will result in an appropriate error, i.e: EAGAIN for CPU that
remains idle (raised on ARM).

``cpuinfo_max_freq``
Maximum possible operating frequency the CPUs belonging to this policy
can run at (in kHz).
Expand Down Expand Up @@ -289,7 +303,8 @@ are the following:
Some architectures (e.g. ``x86``) may attempt to provide information
more precisely reflecting the current CPU frequency through this
attribute, but that still may not be the exact current CPU frequency as
seen by the hardware at the moment.
seen by the hardware at the moment. This behavior though, is only
available via c:macro:``CPUFREQ_ARCH_CUR_FREQ`` option.

``scaling_driver``
The scaling driver currently in use.
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define arch_set_freq_scale topology_set_freq_scale
#define arch_scale_freq_capacity topology_get_freq_scale
#define arch_scale_freq_invariant topology_scale_freq_invariant
#define arch_scale_freq_ref topology_get_freq_ref
#endif

/* Replace task scheduler's default cpu-invariant accounting */
Expand All @@ -24,6 +25,7 @@
/* Replace task scheduler's default thermal pressure API */
#define arch_scale_thermal_pressure topology_get_thermal_pressure
#define arch_set_thermal_pressure topology_set_thermal_pressure
#define arch_update_thermal_pressure topology_update_thermal_pressure

#else

Expand Down
6 changes: 4 additions & 2 deletions arch/arm/kernel/perf_event_v7.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,10 @@ static int armv7pmu_set_event_filter(struct hw_perf_event *event,
{
unsigned long config_base = 0;

if (attr->exclude_idle)
return -EPERM;
if (attr->exclude_idle) {
pr_debug("ARM performance counters do not support mode exclusion\n");
return -EOPNOTSUPP;
}
if (attr->exclude_user)
config_base |= ARMV7_EXCLUDE_USER;
if (attr->exclude_kernel)
Expand Down
18 changes: 18 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config ARM64
select ARCH_HAS_KEEPINITRD
select ARCH_HAS_MEMBARRIER_SYNC_CORE
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
select ARCH_HAS_NONLEAF_PMD_YOUNG if ARM64_HAFT
select ARCH_HAS_PTE_DEVMAP
select ARCH_HAS_PTE_SPECIAL
select ARCH_HAS_SETUP_DMA_OPS
Expand Down Expand Up @@ -203,6 +204,7 @@ config ARM64
select HAVE_KPROBES
select HAVE_KRETPROBES
select HAVE_GENERIC_VDSO
select HOTPLUG_SMT if HOTPLUG_CPU
select IOMMU_DMA if IOMMU_SUPPORT
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
Expand Down Expand Up @@ -1944,6 +1946,22 @@ config ARM64_EPAN

The feature is detected at runtime, and will remain disabled
if the cpu does not implement the feature.

config ARM64_HAFT
bool "Support for Hardware managed Access Flag for Table Descriptors"
depends on ARM64_HW_AFDBM
default y
help
The ARMv8.9/ARMv9.5 introduces the feature Hardware managed Access
Flag for Table descriptors. When enabled an architectural executed
memory access will update the Access Flag in each Table descriptor
which is accessed during the translation table walk and for which
the Access Flag is 0. The Access Flag of the Table descriptor use
the same bit of PTE_AF.

The feature will only be enabled if all the CPUs in the system
support this feature. If unsure, say Y.

endmenu

config ARM64_SVE
Expand Down
7 changes: 4 additions & 3 deletions arch/arm64/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,10 @@ alternative_endif
*/
.macro reset_pmuserenr_el0, tmpreg
mrs \tmpreg, id_aa64dfr0_el1
sbfx \tmpreg, \tmpreg, #ID_AA64DFR0_PMUVER_SHIFT, #4
cmp \tmpreg, #1 // Skip if no PMU present
b.lt 9000f
ubfx \tmpreg, \tmpreg, #ID_AA64DFR0_EL1_PMUVer_SHIFT, #4
cmp \tmpreg, #ID_AA64DFR0_EL1_PMUVer_NI
ccmp \tmpreg, #ID_AA64DFR0_EL1_PMUVer_IMP_DEF, #4, ne
b.eq 9000f // Skip if no PMU present or IMP_DEF
msr pmuserenr_el0, xzr // Disable PMU access from EL0
9000:
.endm
Expand Down
8 changes: 7 additions & 1 deletion arch/arm64/include/asm/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <asm/hwcap.h>
#include <asm/sysreg.h>

#define MAX_CPU_FEATURES 64
#define MAX_CPU_FEATURES 128
#define cpu_feature(x) KERNEL_HWCAP_ ## x

#ifndef __ASSEMBLY__
Expand Down Expand Up @@ -808,6 +808,12 @@ static inline bool system_supports_tlb_range(void)
cpus_have_const_cap(ARM64_HAS_TLB_RANGE);
}

static inline bool system_supports_haft(void)
{
return IS_ENABLED(CONFIG_ARM64_HAFT) &&
cpus_have_final_cap(ARM64_HAFT);
}

int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt);
bool try_emulate_mrs(struct pt_regs *regs, u32 isn);

Expand Down
4 changes: 3 additions & 1 deletion arch/arm64/include/asm/cputype.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@

#define HISI_CPU_PART_TSV110 0xD01
#define HISI_CPU_PART_TSV200 0xD02
#define HISI_CPU_PART_LINXICORE9100 0xD02
#define HISI_CPU_PART_LINXICORE9100 0xD02
#define HISI_CPU_PART_HIP12 0xD06

#define APPLE_CPU_PART_M1_ICESTORM 0x022
#define APPLE_CPU_PART_M1_FIRESTORM 0x023
Expand Down Expand Up @@ -162,6 +163,7 @@
#define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110)
#define MIDR_HISI_TSV200 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV200)
#define MIDR_HISI_LINXICORE9100 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_LINXICORE9100)
#define MIDR_HISI_HIP12 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP12)
#define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM)
#define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM)
#define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1)
Expand Down
19 changes: 15 additions & 4 deletions arch/arm64/include/asm/el2_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
isb
.endm

.macro __init_el2_hcrx
mrs x0, id_aa64mmfr1_el1
ubfx x0, x0, #ID_AA64MMFR1_EL1_HCX_SHIFT, #4
cbz x0, .Lskip_hcrx_\@
mov_q x0, HCRX_HOST_FLAGS
msr_s SYS_HCRX_EL2, x0
.Lskip_hcrx_\@:
.endm

/*
* Allow Non-secure EL1 and EL0 to access physical timer and counter.
* This is not necessary for VHE, since the host kernel runs in EL2,
Expand All @@ -40,13 +49,14 @@

.macro __init_el2_debug
mrs x1, id_aa64dfr0_el1
sbfx x0, x1, #ID_AA64DFR0_PMUVER_SHIFT, #4
cmp x0, #1
b.lt .Lskip_pmu_\@ // Skip if no PMU present
ubfx x0, x1, #ID_AA64DFR0_EL1_PMUVer_SHIFT, #4
cmp x0, #ID_AA64DFR0_EL1_PMUVer_NI
ccmp x0, #ID_AA64DFR0_EL1_PMUVer_IMP_DEF, #4, ne
b.eq .Lskip_pmu_\@ // Skip if no PMU present or IMP_DEF
mrs x0, pmcr_el0 // Disable debug access traps
ubfx x0, x0, #11, #5 // to EL2 and allow access to
.Lskip_pmu_\@:
csel x2, xzr, x0, lt // all PMU counters from EL1
csel x2, xzr, x0, eq // all PMU counters from EL1

/* Statistical profiling */
ubfx x0, x1, #ID_AA64DFR0_PMSVER_SHIFT, #4
Expand Down Expand Up @@ -187,6 +197,7 @@
*/
.macro init_el2_state
__init_el2_sctlr
__init_el2_hcrx
__init_el2_timers
__init_el2_debug
__init_el2_lor
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/include/asm/hwcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#define KERNEL_HWCAP_PACA __khwcap_feature(PACA)
#define KERNEL_HWCAP_PACG __khwcap_feature(PACG)

#define __khwcap2_feature(x) (const_ilog2(HWCAP2_ ## x) + 32)
#define __khwcap2_feature(x) (const_ilog2(HWCAP2_ ## x) + 64)
#define KERNEL_HWCAP_DCPODP __khwcap2_feature(DCPODP)
#define KERNEL_HWCAP_SVE2 __khwcap2_feature(SVE2)
#define KERNEL_HWCAP_SVEAES __khwcap2_feature(SVEAES)
Expand All @@ -108,6 +108,7 @@
#define KERNEL_HWCAP_ECV __khwcap2_feature(ECV)
#define KERNEL_HWCAP_AFP __khwcap2_feature(AFP)
#define KERNEL_HWCAP_RPRES __khwcap2_feature(RPRES)
#define KERNEL_HWCAP_HBC __khwcap2_feature(HBC)

/*
* This yields a mask that user programs can use to figure out what
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/include/asm/kvm_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#define HCR_VM (UL(1) << 0)
#define HCR_RES0 ((UL(1) << 48) | (UL(1) << 39))

#define HCRX_EL2_TCR2En (UL(1) << 14)

/*
* The bits we set in HCR:
* TLOR: Trap LORegion register accesses
Expand All @@ -89,6 +91,7 @@
#define HCR_HOST_NVHE_FLAGS (HCR_RW | HCR_API | HCR_APK | HCR_ATA)
#define HCR_HOST_NVHE_PROTECTED_FLAGS (HCR_HOST_NVHE_FLAGS | HCR_TSC)
#define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H)
#define HCRX_HOST_FLAGS (HCRX_EL2_TCR2En)

/* TCR_EL2 Registers bits */
#define TCR_EL2_RES1 ((1U << 31) | (1 << 23))
Expand Down
15 changes: 15 additions & 0 deletions arch/arm64/include/asm/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,19 @@ static inline bool plt_entry_is_initialized(const struct plt_entry *e)
return e->adrp || e->add || e->br;
}

static inline const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
const char *name)
{
const Elf_Shdr *s, *se;
const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;

for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) {
if (strcmp(name, secstrs + s->sh_name) == 0)
return s;
}

return NULL;
}

#endif /* __ASM_MODULE_H */
10 changes: 6 additions & 4 deletions arch/arm64/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static inline void __pud_populate(pud_t *pudp, phys_addr_t pmdp, pudval_t prot)

static inline void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmdp)
{
pudval_t pudval = PUD_TYPE_TABLE;
pudval_t pudval = PUD_TYPE_TABLE | PUD_TABLE_AF;

pudval |= (mm == &init_mm) ? PUD_TABLE_UXN : PUD_TABLE_PXN;
__pud_populate(pudp, __pa(pmdp), pudval);
Expand All @@ -48,7 +48,7 @@ static inline void __p4d_populate(p4d_t *p4dp, phys_addr_t pudp, p4dval_t prot)

static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4dp, pud_t *pudp)
{
p4dval_t p4dval = P4D_TYPE_TABLE;
p4dval_t p4dval = P4D_TYPE_TABLE | P4D_TABLE_AF;

p4dval |= (mm == &init_mm) ? P4D_TABLE_UXN : P4D_TABLE_PXN;
__p4d_populate(p4dp, __pa(pudp), p4dval);
Expand Down Expand Up @@ -77,14 +77,16 @@ static inline void
pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep)
{
VM_BUG_ON(mm && mm != &init_mm);
__pmd_populate(pmdp, __pa(ptep), PMD_TYPE_TABLE | PMD_TABLE_UXN);
__pmd_populate(pmdp, __pa(ptep),
PMD_TYPE_TABLE | PMD_TABLE_AF | PMD_TABLE_UXN);
}

static inline void
pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep)
{
VM_BUG_ON(mm == &init_mm);
__pmd_populate(pmdp, page_to_phys(ptep), PMD_TYPE_TABLE | PMD_TABLE_PXN);
__pmd_populate(pmdp, page_to_phys(ptep),
PMD_TYPE_TABLE | PMD_TABLE_AF | PMD_TABLE_PXN);
}

#endif
3 changes: 3 additions & 0 deletions arch/arm64/include/asm/pgtable-hwdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
#define P4D_TYPE_MASK (_AT(p4dval_t, 3) << 0)
#define P4D_TYPE_SECT (_AT(p4dval_t, 1) << 0)
#define P4D_SECT_RDONLY (_AT(p4dval_t, 1) << 7) /* AP[2] */
#define P4D_TABLE_AF (_AT(p4dval_t, 1) << 10) /* Ignored if no FEAT_HAFT */
#define P4D_TABLE_PXN (_AT(p4dval_t, 1) << 59)
#define P4D_TABLE_UXN (_AT(p4dval_t, 1) << 60)

Expand All @@ -105,6 +106,7 @@
#define PUD_TYPE_MASK (_AT(pudval_t, 3) << 0)
#define PUD_TYPE_SECT (_AT(pudval_t, 1) << 0)
#define PUD_SECT_RDONLY (_AT(pudval_t, 1) << 7) /* AP[2] */
#define PUD_TABLE_AF (_AT(pudval_t, 1) << 10) /* Ignored if no FEAT_HAFT */
#define PUD_TABLE_PXN (_AT(pudval_t, 1) << 59)
#define PUD_TABLE_UXN (_AT(pudval_t, 1) << 60)

Expand All @@ -115,6 +117,7 @@
#define PMD_TYPE_TABLE (_AT(pmdval_t, 3) << 0)
#define PMD_TYPE_SECT (_AT(pmdval_t, 1) << 0)
#define PMD_TABLE_BIT (_AT(pmdval_t, 1) << 1)
#define PMD_TABLE_AF (_AT(pmdval_t, 1) << 10) /* Ignored if no FEAT_HAFT */

/*
* Section
Expand Down
10 changes: 8 additions & 2 deletions arch/arm64/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -852,15 +852,17 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
return young;
}

#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG)
#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long address,
pmd_t *pmdp)
{
/* Operation applies to PMD table entry only if FEAT_HAFT is enabled */
VM_WARN_ON(pmd_table(READ_ONCE(*pmdp)) && !system_supports_haft());
return ptep_test_and_clear_young(vma, address, (pte_t *)pmdp);
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG */

#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
Expand Down Expand Up @@ -1013,6 +1015,10 @@ static inline bool arch_faults_on_old_pte(void)
}
#define arch_faults_on_old_pte arch_faults_on_old_pte

#ifdef CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG
#define arch_has_hw_nonleaf_pmd_young system_supports_haft
#endif

/*
* Experimentally, it's cheap to set the access flag in hardware and we
* benefit from prefaulting mappings as 'old' to start with.
Expand Down
Loading