Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
864299f
ACPI / PPTT: Add a helper to fill a cpumask from a processor container
Nov 19, 2025
97ddf21
ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear levels
Nov 19, 2025
db70760
ACPI / PPTT: Add acpi_pptt_cache_v1_full to use pptt cache as one str…
benhor01 Nov 19, 2025
2254b29
ACPI / PPTT: Find cache level by cache-id
Nov 19, 2025
f59c8c8
ACPI / PPTT: Add a helper to fill a cpumask from a cache_id
Nov 19, 2025
554d8d9
arm64: kconfig: Add Kconfig entry for MPAM
Nov 19, 2025
87da89a
platform: Define platform_device_put cleanup handler
benhor01 Nov 19, 2025
98d1bab
ACPI: Define acpi_put_table cleanup handler and acpi_get_table_pointe…
benhor01 Nov 19, 2025
8474158
ACPI / MPAM: Parse the MPAM table
Nov 19, 2025
bbffd0a
arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate
Nov 19, 2025
253d035
arm_mpam: Add the class and component structures for firmware describ…
Nov 19, 2025
9a3b3b6
arm_mpam: Add MPAM MSC register layout definitions
Nov 19, 2025
5a08ad5
arm_mpam: Add cpuhp callbacks to probe MSC hardware
Nov 19, 2025
b80cd46
arm_mpam: Probe hardware to find the supported partid/pmg values
Nov 19, 2025
a3a702e
arm_mpam: Add helpers for managing the locking around the mon_sel reg…
Nov 19, 2025
d2231c5
arm_mpam: Probe the hardware features resctrl supports
Nov 19, 2025
c00313a
arm_mpam: Merge supported features during mpam_enable() into mpam_class
Nov 19, 2025
b674b6f
arm_mpam: Reset MSC controls from cpuhp callbacks
Nov 19, 2025
e6b2443
arm_mpam: Add a helper to touch an MSC from any CPU
Nov 19, 2025
0f2f900
arm_mpam: Extend reset logic to allow devices to be reset any time
Nov 19, 2025
dde6c0f
arm_mpam: Register and enable IRQs
Nov 19, 2025
1db9f99
arm_mpam: Use a static key to indicate when mpam is enabled
Nov 19, 2025
3fbeae1
arm_mpam: Allow configuration to be applied and restored during cpu o…
Nov 19, 2025
7257218
arm_mpam: Probe and reset the rest of the features
Nov 19, 2025
d6eabb5
arm_mpam: Add helpers to allocate monitors
Nov 19, 2025
4fd6983
arm_mpam: Add mpam_msmon_read() to read monitor value
Nov 19, 2025
de2d431
arm_mpam: Track bandwidth counter state for power management
Nov 19, 2025
8dc259f
arm_mpam: Consider overflow in bandwidth counter state
benhor01 Nov 19, 2025
ecf1711
arm_mpam: Probe for long/lwd mbwu counters
rohit-arm Nov 19, 2025
1b3fd0f
arm_mpam: Use long MBWU counters if supported
rohit-arm Nov 19, 2025
1450b36
arm_mpam: Add helper to reset saved mbwu state
Nov 19, 2025
4126230
arm_mpam: Add kunit test for bitmap reset
Nov 19, 2025
d203c90
arm_mpam: Add kunit tests for props_mismatch()
Nov 19, 2025
980b738
MAINTAINERS: new entry for MPAM Driver
benhor01 Nov 19, 2025
4d3eedf
arm_mpam: Ensure in_reset_state is false after applying configuration
henryZe Mar 13, 2026
8da160c
arm_mpam: Reset when feature configuration bit unset
benhor01 Mar 13, 2026
2fae201
arm64/sysreg: Add MPAMSM_EL1 register
benhor01 Mar 13, 2026
b496a66
KVM: arm64: Preserve host MPAM configuration when changing traps
benhor01 Mar 13, 2026
c69df84
KVM: arm64: Make MPAMSM_EL1 accesses UNDEF
benhor01 Mar 13, 2026
777a2f4
arm64: mpam: Context switch the MPAM registers
Mar 13, 2026
bd3b10d
arm64: mpam: Re-initialise MPAM regs when CPU comes online
Mar 13, 2026
f126c6c
arm64: mpam: Drop the CONFIG_EXPERT restriction
benhor01 Mar 13, 2026
dffc881
arm64: mpam: Advertise the CPUs MPAM limits to the driver
Mar 13, 2026
2a4125b
arm64: mpam: Add cpu_pm notifier to restore MPAM sysregs
Mar 13, 2026
47c5e27
arm64: mpam: Initialise and context switch the MPAMSM_EL1 register
benhor01 Mar 13, 2026
e2cc1cd
arm64: mpam: Add helpers to change a task or cpu's MPAM PARTID/PMG va…
Mar 13, 2026
732e593
KVM: arm64: Force guest EL1 to use user-space's partid configuration
Mar 13, 2026
48727d7
arm_mpam: resctrl: Add boilerplate cpuhp and domain allocation
Mar 13, 2026
abe6213
arm_mpam: resctrl: Pick the caches we will use as resctrl resources
Mar 13, 2026
0fe5719
arm_mpam: resctrl: Implement resctrl_arch_reset_all_ctrls()
Mar 13, 2026
2b0e0d0
arm_mpam: resctrl: Add resctrl_arch_get_config()
Mar 13, 2026
e0fa334
arm_mpam: resctrl: Implement helpers to update configuration
Mar 13, 2026
dec9bc5
arm_mpam: resctrl: Add plumbing against arm64 task and cpu hooks
Mar 13, 2026
7398a32
arm_mpam: resctrl: Add CDP emulation
Mar 13, 2026
a054fee
arm_mpam: resctrl: Hide CDP emulation behind CONFIG_EXPERT
benhor01 Mar 13, 2026
725bf1e
arm_mpam: resctrl: Convert to/from MPAMs fixed-point formats
Mar 13, 2026
295923d
arm_mpam: resctrl: Add rmid index helpers
benhor01 Mar 13, 2026
a4ae886
arm_mpam: resctrl: Wait for cacheinfo to be ready
benhor01 Mar 13, 2026
9bb9bb2
arm_mpam: resctrl: Add support for 'MB' resource
Mar 13, 2026
6430071
arm_mpam: resctrl: Add kunit test for control format conversions
Mar 13, 2026
629ae14
arm_mpam: resctrl: Add monitor initialisation and domain boilerplate
benhor01 Mar 13, 2026
612a22f
arm_mpam: resctrl: Add support for csu counters
Mar 13, 2026
7ae96e5
arm_mpam: resctrl: Allow resctrl to allocate monitors
Mar 13, 2026
ba60ed4
arm_mpam: resctrl: Add resctrl_arch_rmid_read()
Mar 13, 2026
8bbfe7a
arm_mpam: resctrl: Update the rmid reallocation limit
Mar 13, 2026
45a4598
arm_mpam: resctrl: Add empty definitions for assorted resctrl functions
Mar 13, 2026
61b57ce
arm64: mpam: Select ARCH_HAS_CPU_RESCTRL
Mar 13, 2026
e0d4f9b
arm_mpam: resctrl: Call resctrl_init() on platforms that can support …
Mar 13, 2026
9b6745f
arm_mpam: Add quirk framework
shankerd04 Mar 13, 2026
72e7b7f
arm_mpam: Add workaround for T241-MPAM-1
shankerd04 Mar 13, 2026
a764811
arm_mpam: Add workaround for T241-MPAM-4
shankerd04 Mar 13, 2026
fb12dea
arm_mpam: Add workaround for T241-MPAM-6
shankerd04 Mar 13, 2026
dc1efe4
arm_mpam: Quirk CMN-650's CSU NRDY behaviour
Mar 13, 2026
49e3244
arm64: mpam: Add initial MPAM documentation
benhor01 Mar 13, 2026
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
1 change: 1 addition & 0 deletions Documentation/arch/arm64/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ARM64 Architecture
memory
memory-tagging-extension
mops
mpam
perf
pointer-authentication
ptdump
Expand Down
72 changes: 72 additions & 0 deletions Documentation/arch/arm64/mpam.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. SPDX-License-Identifier: GPL-2.0

====
MPAM
====

What is MPAM
============
MPAM (Memory Partitioning and Monitoring) is a feature in the CPUs and memory
system components such as the caches or memory controllers that allow memory
traffic to be labelled, partitioned and monitored.

Traffic is labelled by the CPU, based on the control or monitor group the
current task is assigned to using resctrl. Partitioning policy can be set
using the schemata file in resctrl, and monitor values read via resctrl.
See Documentation/filesystems/resctrl.rst for more details.

This allows tasks that share memory system resources, such as caches, to be
isolated from each other according to the partitioning policy (so called noisy
neighbours).

Supported Platforms
===================
Use of this feature requires CPU support, support in the memory system
components, and a description from firmware of where the MPAM device controls
are in the MMIO address space. (e.g. the 'MPAM' ACPI table).

The MMIO device that provides MPAM controls/monitors for a memory system
component is called a memory system component. (MSC).

Because the user interface to MPAM is via resctrl, only MPAM features that are
compatible with resctrl can be exposed to user-space.

MSC are considered as a group based on the topology. MSC that correspond with
the L3 cache are considered together, it is not possible to mix MSC between L2
and L3 to 'cover' a resctrl schema.

The supported features are:

* Cache portion bitmap controls (CPOR) on the L2 or L3 caches. To expose
CPOR at L2 or L3, every CPU must have a corresponding CPU cache at this
level that also supports the feature. Mismatched big/little platforms are
not supported as resctrl's controls would then also depend on task
placement.

* Memory bandwidth maximum controls (MBW_MAX) on or after the L3 cache.
resctrl uses the L3 cache-id to identify where the memory bandwidth
control is applied. For this reason the platform must have an L3 cache
with cache-id's supplied by firmware. (It doesn't need to support MPAM.)

To be exported as the 'MB' schema, the topology of the group of MSC chosen
must match the topology of the L3 cache so that the cache-id's can be
repainted. For example: Platforms with Memory bandwidth maximum controls
on CPU-less NUMA nodes cannot expose the 'MB' schema to resctrl as these
nodes do not have a corresponding L3 cache. If the memory bandwidth
control is on the memory rather than the L3 then there must be a single
global L3 as otherwise it is unknown which L3 the traffic came from. There
must be no caches between the L3 and the memory so that the two ends of
the path have equivalent traffic.

When the MPAM driver finds multiple groups of MSC it can use for the 'MB'
schema, it prefers the group closest to the L3 cache.

* Cache Storage Usage (CSU) counters can expose the 'llc_occupancy' provided
there is at least one CSU monitor on each MSC that makes up the L3 group.
Exposing CSU counters from other caches or devices is not supported.

Reporting Bugs
==============
If you are not seeing the counters or controls you expect please share the
debug messages produced when enabling dynamic debug and booting with:
dyndbg="file mpam_resctrl.c +pl"
9 changes: 9 additions & 0 deletions Documentation/arch/arm64/silicon-errata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ stable kernels.
| ARM | GIC-700 | #2941627 | ARM64_ERRATUM_2941627 |
+----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| ARM | CMN-650 | #3642720 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_845719 |
+----------------+-----------------+-----------------+-----------------------------+
| Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_843419 |
Expand Down Expand Up @@ -248,6 +251,12 @@ stable kernels.
+----------------+-----------------+-----------------+-----------------------------+
| NVIDIA | T241 GICv3/4.x | T241-FABRIC-4 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| NVIDIA | T241 MPAM | T241-MPAM-1 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| NVIDIA | T241 MPAM | T241-MPAM-4 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| NVIDIA | T241 MPAM | T241-MPAM-6 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 |
+----------------+-----------------+-----------------+-----------------------------+
Expand Down
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -17468,6 +17468,16 @@ S: Maintained
F: Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml
F: drivers/video/backlight/mp3309c.c

MPAM DRIVER
M: James Morse <james.morse@arm.com>
M: Ben Horgan <ben.horgan@arm.com>
R: Reinette Chatre <reinette.chatre@intel.com>
R: Fenghua Yu <fenghuay@nvidia.com>
S: Maintained
F: drivers/resctrl/mpam_*
F: drivers/resctrl/test_mpam_*
F: include/linux/arm_mpam.h

MPS MP2869 DRIVER
M: Wensheng Wang <wenswang@yeah.net>
L: linux-hwmon@vger.kernel.org
Expand Down
27 changes: 27 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,33 @@ config ARM64_TLB_RANGE
ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a
range of input addresses.

config ARM64_MPAM
bool "Enable support for MPAM"
select ARM64_MPAM_DRIVER
select ARCH_HAS_CPU_RESCTRL
help
Memory System Resource Partitioning and Monitoring (MPAM) is an
optional extension to the Arm architecture that allows each
transaction issued to the memory system to be labelled with a
Partition identifier (PARTID) and Performance Monitoring Group
identifier (PMG).

Memory system components, such as the caches, can be configured with
policies to control how much of various physical resources (such as
memory bandwidth or cache memory) the transactions labelled with each
PARTID can consume. Depending on the capabilities of the hardware,
the PARTID and PMG can also be used as filtering criteria to measure
the memory system resource consumption of different parts of a
workload.

Use of this extension requires CPU support, support in the
Memory System Components (MSC), and a description from firmware
of where the MSCs are in the address space.

MPAM is exposed to user-space via the resctrl pseudo filesystem.

This option enables the extra context switch code.

endmenu # "ARMv8.4 architectural features"

menu "ARMv8.5 architectural features"
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/include/asm/el2_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@
check_override id_aa64pfr0, ID_AA64PFR0_EL1_MPAM_SHIFT, .Linit_mpam_\@, .Lskip_mpam_\@, x1, x2

.Linit_mpam_\@:
msr_s SYS_MPAM2_EL2, xzr // use the default partition
mov x0, #MPAM2_EL2_EnMPAMSM_MASK
msr_s SYS_MPAM2_EL2, x0 // use the default partition,
// and disable lower traps
mrs_s x0, SYS_MPAMIDR_EL1
tbz x0, #MPAMIDR_EL1_HAS_HCR_SHIFT, .Lskip_mpam_\@ // skip if no MPAMHCR reg
Expand Down
96 changes: 96 additions & 0 deletions arch/arm64/include/asm/mpam.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2025 Arm Ltd. */

#ifndef __ASM__MPAM_H
#define __ASM__MPAM_H

#include <linux/arm_mpam.h>
#include <linux/bitfield.h>
#include <linux/jump_label.h>
#include <linux/percpu.h>
#include <linux/sched.h>

#include <asm/sysreg.h>

DECLARE_STATIC_KEY_FALSE(mpam_enabled);
DECLARE_PER_CPU(u64, arm64_mpam_default);
DECLARE_PER_CPU(u64, arm64_mpam_current);

/*
* The value of the MPAM0_EL1 sysreg when a task is in resctrl's default group.
* This is used by the context switch code to use the resctrl CPU property
* instead. The value is modified when CDP is enabled/disabled by mounting
* the resctrl filesystem.
*/
extern u64 arm64_mpam_global_default;

#ifdef CONFIG_ARM64_MPAM
static inline u64 __mpam_regval(u16 partid_d, u16 partid_i, u8 pmg_d, u8 pmg_i)
{
return FIELD_PREP(MPAM0_EL1_PARTID_D, partid_d) |
FIELD_PREP(MPAM0_EL1_PARTID_I, partid_i) |
FIELD_PREP(MPAM0_EL1_PMG_D, pmg_d) |
FIELD_PREP(MPAM0_EL1_PMG_I, pmg_i);
}

static inline void mpam_set_cpu_defaults(int cpu, u16 partid_d, u16 partid_i,
u8 pmg_d, u8 pmg_i)
{
u64 default_val = __mpam_regval(partid_d, partid_i, pmg_d, pmg_i);

WRITE_ONCE(per_cpu(arm64_mpam_default, cpu), default_val);
}

/*
* The resctrl filesystem writes to the partid/pmg values for threads and CPUs,
* which may race with reads in mpam_thread_switch(). Ensure only one of the old
* or new values are used. Particular care should be taken with the pmg field as
* mpam_thread_switch() may read a partid and pmg that don't match, causing this
* value to be stored with cache allocations, despite being considered 'free' by
* resctrl.
*/
static inline u64 mpam_get_regval(struct task_struct *tsk)
{
return READ_ONCE(task_thread_info(tsk)->mpam_partid_pmg);
}

static inline void mpam_set_task_partid_pmg(struct task_struct *tsk,
u16 partid_d, u16 partid_i,
u8 pmg_d, u8 pmg_i)
{
u64 regval = __mpam_regval(partid_d, partid_i, pmg_d, pmg_i);

WRITE_ONCE(task_thread_info(tsk)->mpam_partid_pmg, regval);
}

static inline void mpam_thread_switch(struct task_struct *tsk)
{
u64 oldregval;
int cpu = smp_processor_id();
u64 regval = mpam_get_regval(tsk);

if (!static_branch_likely(&mpam_enabled))
return;

if (regval == READ_ONCE(arm64_mpam_global_default))
regval = READ_ONCE(per_cpu(arm64_mpam_default, cpu));

oldregval = READ_ONCE(per_cpu(arm64_mpam_current, cpu));
if (oldregval == regval)
return;

write_sysreg_s(regval | MPAM1_EL1_MPAMEN, SYS_MPAM1_EL1);
if (system_supports_sme())
write_sysreg_s(regval & (MPAMSM_EL1_PARTID_D | MPAMSM_EL1_PMG_D), SYS_MPAMSM_EL1);
isb();

/* Synchronising the EL0 write is left until the ERET to EL0 */
write_sysreg_s(regval, SYS_MPAM0_EL1);

WRITE_ONCE(per_cpu(arm64_mpam_current, cpu), regval);
}
#else
static inline void mpam_thread_switch(struct task_struct *tsk) {}
#endif /* CONFIG_ARM64_MPAM */

#endif /* __ASM__MPAM_H */
2 changes: 2 additions & 0 deletions arch/arm64/include/asm/resctrl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/arm_mpam.h>
3 changes: 3 additions & 0 deletions arch/arm64/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ struct thread_info {
#ifdef CONFIG_SHADOW_CALL_STACK
void *scs_base;
void *scs_sp;
#endif
#ifdef CONFIG_ARM64_MPAM
u64 mpam_partid_pmg;
#endif
u32 cpu;
};
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_VMCORE_INFO) += vmcore_info.o
obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o
obj-$(CONFIG_ARM64_PTR_AUTH) += pointer_auth.o
obj-$(CONFIG_ARM64_MPAM) += mpam.o
obj-$(CONFIG_ARM64_MTE) += mte.o
obj-y += vdso-wrap.o
obj-$(CONFIG_COMPAT_VDSO) += vdso32-wrap.o
Expand Down
21 changes: 14 additions & 7 deletions arch/arm64/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
#include <asm/kvm_host.h>
#include <asm/mmu.h>
#include <asm/mmu_context.h>
#include <asm/mpam.h>
#include <asm/mte.h>
#include <asm/hypervisor.h>
#include <asm/processor.h>
Expand Down Expand Up @@ -2452,13 +2453,19 @@ test_has_mpam(const struct arm64_cpu_capabilities *entry, int scope)
static void
cpu_enable_mpam(const struct arm64_cpu_capabilities *entry)
{
/*
* Access by the kernel (at EL1) should use the reserved PARTID
* which is configured unrestricted. This avoids priority-inversion
* where latency sensitive tasks have to wait for a task that has
* been throttled to release the lock.
*/
write_sysreg_s(0, SYS_MPAM1_EL1);
int cpu = smp_processor_id();
u64 regval = 0;

if (IS_ENABLED(CONFIG_ARM64_MPAM) && static_branch_likely(&mpam_enabled))
regval = READ_ONCE(per_cpu(arm64_mpam_current, cpu));

write_sysreg_s(regval | MPAM1_EL1_MPAMEN, SYS_MPAM1_EL1);
if (cpus_have_cap(ARM64_SME))
write_sysreg_s(regval & (MPAMSM_EL1_PARTID_D | MPAMSM_EL1_PMG_D), SYS_MPAMSM_EL1);
isb();

/* Synchronising the EL0 write is left until the ERET to EL0 */
write_sysreg_s(regval, SYS_MPAM0_EL1);
}

static bool
Expand Down
62 changes: 62 additions & 0 deletions arch/arm64/kernel/mpam.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2025 Arm Ltd. */

#include <asm/mpam.h>

#include <linux/arm_mpam.h>
#include <linux/cpu_pm.h>
#include <linux/jump_label.h>
#include <linux/percpu.h>

DEFINE_STATIC_KEY_FALSE(mpam_enabled);
DEFINE_PER_CPU(u64, arm64_mpam_default);
DEFINE_PER_CPU(u64, arm64_mpam_current);

u64 arm64_mpam_global_default;

static int mpam_pm_notifier(struct notifier_block *self,
unsigned long cmd, void *v)
{
u64 regval;
int cpu = smp_processor_id();

switch (cmd) {
case CPU_PM_EXIT:
/*
* Don't use mpam_thread_switch() as the system register
* value has changed under our feet.
*/
regval = READ_ONCE(per_cpu(arm64_mpam_current, cpu));
write_sysreg_s(regval | MPAM1_EL1_MPAMEN, SYS_MPAM1_EL1);
if (system_supports_sme()) {
write_sysreg_s(regval & (MPAMSM_EL1_PARTID_D | MPAMSM_EL1_PMG_D),
SYS_MPAMSM_EL1);
}
isb();

write_sysreg_s(regval, SYS_MPAM0_EL1);

return NOTIFY_OK;
default:
return NOTIFY_DONE;
}
}

static struct notifier_block mpam_pm_nb = {
.notifier_call = mpam_pm_notifier,
};

static int __init arm64_mpam_register_cpus(void)
{
u64 mpamidr = read_sanitised_ftr_reg(SYS_MPAMIDR_EL1);
u16 partid_max = FIELD_GET(MPAMIDR_EL1_PARTID_MAX, mpamidr);
u8 pmg_max = FIELD_GET(MPAMIDR_EL1_PMG_MAX, mpamidr);

if (!system_supports_mpam())
return 0;

cpu_pm_register_notifier(&mpam_pm_nb);
return mpam_register_requestor(partid_max, pmg_max);
}
/* Must occur before mpam_msc_driver_init() from subsys_initcall() */
arch_initcall(arm64_mpam_register_cpus)
Loading