| 8ea457f7 | 09-Oct-2026 |
Sasha Levin <sashal@kernel.org> |
arm_mpam: make the mon_sel guard conditional only
Building arm64 allmodconfig with clang fails:
drivers/resctrl/mpam_internal.h:207:7: error: ignoring return value of function declared with 'wa
arm_mpam: make the mon_sel guard conditional only
Building arm64 allmodconfig with clang fails:
drivers/resctrl/mpam_internal.h:207:7: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result] 207 | mpam_mon_sel_lock(_T), mpam_mon_sel_unlock(_T));
mpam_mon_sel_lock() is __must_check and can fail: for an MSC accessed through the MPAM-Fb firmware interface it returns false when called from a context that cannot sleep. The mon_sel guard was defined with DEFINE_GUARD(), which calls it unconditionally and discards the result, so a guard(mon_sel) user would carry on without the lock and release it on scope exit. The unconditional guard only exists as the base for the conditional mon_sel_lock variant, which is the one actually used.
Define mon_sel_lock directly as a conditional guard class instead, as posix-timers does for lock_timer: the constructor returns NULL when the lock cannot be taken, and the destructor only releases a lock that was taken. ACQUIRE(mon_sel_lock, ...) works as before, including ACQUIRE_ERR() returning -EBUSY on failure, and there is no unconditional variant left to misuse.
Reported-by: kernelci.org bot <bot@kernelci.org> Closes: https://d.kernelci.org/i/maestro:66f869ecbbb5b8592562ffd89f049c5ddf682547 Closes: https://d.kernelci.org/i/maestro:647269216758644837afcaac8e67d8dbe713a0e2 Fixes: 0db1715e4c9c ("arm_mpam: propagate MSC access errors for hw_probe functions") Assisted-by: LLM Signed-off-by: Sasha Levin <sashal@kernel.org> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
| 197a7a41 | 03-Oct-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
In mpam_save_mbwu_state() the monitor values are read using __ris_msmon_read_locked() which checks if the configuration
arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
In mpam_save_mbwu_state() the monitor values are read using __ris_msmon_read_locked() which checks if the configuration provided matches that in the hardware and if not then resets the monitor. To avoid resetting the monitor before reading the value that needs saving only clear the configuration after the monitor is read.
Fixes: d056d29aefbe ("arm_mpam: Use __ris_msmon_read() for saving MBWU state") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
| cb351e3f | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: detect and enable MPAM-Fb PCC support
The Arm MPAM-Fb specification [1] describes a protocol to access MSC registers through a firmware interface. This requires a shared memory region to h
arm_mpam: detect and enable MPAM-Fb PCC support
The Arm MPAM-Fb specification [1] describes a protocol to access MSC registers through a firmware interface. This requires a shared memory region to hold the message, and a mailbox to trigger the access. For ACPI this is wrapped as a PCC channel, described using existing ACPI abstractions.
Add code to parse those PCC table descriptions associated with an MSC, and store the parsed information in the MSC struct. There can be multiple PCC channels, and each channel can serve multiple MSCs, so we need to keep track of the channel usage, using a list and a refcount.
This will be used by the MPAM-Fb access wrapper code.
[1] https://developer.arm.com/documentation/den0144/latest
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Ritwick Sharma <ritwick.sharma@arm.com> # on Arm AGI CPU Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Tested-by: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com> Reviewed-by: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 45365468 | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: change MPAM-Fb error IRQ to use a threaded IRQ handler
When an MPAM MSC gets into an error condition, it can trigger an error IRQ. We cannot really do much about those errors, but we at le
arm_mpam: change MPAM-Fb error IRQ to use a threaded IRQ handler
When an MPAM MSC gets into an error condition, it can trigger an error IRQ. We cannot really do much about those errors, but we at least query and log the error, then disable MPAM functionality.
This error report relies on reading the MSC's error status register (ESR) in the current hard-IRQ handler, which is not possible for MPAM-Fb based MSC accesses, since they involve mailbox routines that might sleep. The same is true for clearing the interrupt at the source, which requires a (potentially sleeping) MSC access as well.
Change the error IRQ handler to be a threaded interrupt, but keep the handling in the hard-IRQ part for MMIO MSCs. This is needed since the CPU affinity check in the MSC accessors requires a non-preemptible context. When the MSC is using an MPAM-Fb based access, we push the work into the threaded part of the handler, where the accessors are allowed to sleep. Also forbid per-CPU interrupts (PPIs) for MPAM-Fb, as we cannot use a threaded IRQ here.
The actual IRQ handler learns how to deal with errors. We cannot really handle them, but we can try our best to disable the IRQ anyway. Should the level IRQ line deactivation fail on the device side, we mask the IRQ on the irqchip level, to prevent an interrupt storm.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 0ef7c5eb | 01-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: add MPAM-Fb MSC firmware access support
The Arm MPAM Firmware-backed (Fb) Profile document[1] describes an alternative way of accessing the "Memory System Components" (MSC) in an MPAM enab
arm_mpam: add MPAM-Fb MSC firmware access support
The Arm MPAM Firmware-backed (Fb) Profile document[1] describes an alternative way of accessing the "Memory System Components" (MSC) in an MPAM enabled system.
Normally the MSCs are MMIO mapped, but in some implementations this might not be possible (MSC located outside of the local socket, MSC mapped secure-only) or desirable (direct MMIO access too slow or needs to be mediated through a control processor). MPAM-fb standardises a protocol to abstract MSC accesses, building on the SCMI protocol.
Add functions that do an MSC read or write access by redirecting the request through a firmware interface. For now this done via an ACPI PCC shared memory and mailbox combination.
Since the protocol used is only a small subset of the full SCMI spec, and the SCMI protocol has no full ACPI support anyway, open-code the (simple) SCMI message generation, for just the fields we need.
[1] https://developer.arm.com/documentation/den0144/latest
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Tested-by: Ritwick Sharma <ritwick.sharma@arm.com> # on Arm AGI CPU Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| ca539a37 | 01-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: prepare mon_sel locking for MPAM-Fb
The MSC MON_SEL register needs to be accessed from hardirq for the overflow interrupt, and when taking an IPI to access these registers on platforms whe
arm_mpam: prepare mon_sel locking for MPAM-Fb
The MSC MON_SEL register needs to be accessed from hardirq for the overflow interrupt, and when taking an IPI to access these registers on platforms where MSCs are not accesible from every CPU. This makes an irqsave spinlock the obvious lock to protect these registers. On systems with MPAM-Fb mailbox MSC access it must be able to sleep, meaning a mutex must be used. So MPAM-Fb platforms cannot support an overflow interrupt easily. Clearly these two methods can't exist for one MSC at the same time.
Change the mon_sel locking wrapper function to only use a spinlock when the MSC is accessed directly via MMIO. In case of MPAM-Fb, we use a mutex, but only if we are in a sleepable context. If that's not the case, we return an error. This should not happen, as MPAM-Fb by design does not require an MSC access to happen from a specific CPU, so there is no need for any IPIs or preemption disabling to satisfy CPU constraints. And since overflow interrupts are not supported at the moment anyway, we also wouldn't meet the other case. Bailing out early is already happening in rare occasions today.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| cea32229 | 01-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors in mpam_reset_class_locked()
The mpam_reset_ris() function can return an error, propagate this up through mpam_reset_component_locked() to mpam_reset_class_lock
arm_mpam: propagate MSC access errors in mpam_reset_class_locked()
The mpam_reset_ris() function can return an error, propagate this up through mpam_reset_component_locked() to mpam_reset_class_locked(), which is exported. The external caller is a void function, so cannot really handle the error at the moment, but at least we report everything on the MPAM interface side.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 49a5f825 | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for interrupt control
Allow the functions dealing with interrupt registration and enablement to check for and return errors, and propagate MSC read and write er
arm_mpam: propagate MSC access errors for interrupt control
Allow the functions dealing with interrupt registration and enablement to check for and return errors, and propagate MSC read and write errors from the lower level up. This does not cover the IRQ handler yet, as this needs some more attention.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 60e33a18 | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for mpam_reprogram_ris_partid()
Allow the mpam_reprogram_ris_partid() function to check for and return errors, and propagate MSC read and write errors from the
arm_mpam: propagate MSC access errors for mpam_reprogram_ris_partid()
Allow the mpam_reprogram_ris_partid() function to check for and return errors, and propagate MSC read and write errors from the lower level up. This also covers the callers of this function: mpam_reset_ris() and apply_config().
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper Reviewed-by: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com> [morse: Fixed merge conflicts in mpam_save_mbwu_state() and __ris_msmon_read()] Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| a3a94c13 | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for state saving function
Allow the mpam_save_mbwu_state() function to return an error, and propagate read and write errors from the lower level up.
Signed-off
arm_mpam: propagate MSC access errors for state saving function
Allow the mpam_save_mbwu_state() function to return an error, and propagate read and write errors from the lower level up.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper [morse: Fixed merge conflicts in mpam_save_mbwu_state() and __ris_msmon_read()] Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| d3269953 | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for __ris_msmon_read()
Allow the function for RIS accesses to return an error, and propagate read and write errors from the lower level up. This function is a b
arm_mpam: propagate MSC access errors for __ris_msmon_read()
Allow the function for RIS accesses to return an error, and propagate read and write errors from the lower level up. This function is a bit special, since it can be called via an SMP helper, so the prototype must stay as void. So propagate any errors using the "err" field in the struct passed in as the sole argument to that function.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper [morse: Fixed merge conflicts in mpam_save_mbwu_state() and __ris_msmon_read()] Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| e8166b11 | 01-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for msmon helpers
Allow the helper functions for msmon accesses to return an error, and propagate read and write errors from the lower level up.
Signed-off-by:
arm_mpam: propagate MSC access errors for msmon helpers
Allow the helper functions for msmon accesses to return an error, and propagate read and write errors from the lower level up.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper Tested-by: Ritwick Sharma <ritwick.sharma@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 7ec57e8b | 02-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for MBWU counters
Allow the mpam_msc_read_mbwu_l() function to return an error, and propagate errors from the lower level up. This also changes the users of thi
arm_mpam: propagate MSC access errors for MBWU counters
Allow the mpam_msc_read_mbwu_l() function to return an error, and propagate errors from the lower level up. This also changes the users of this function.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper [morse: Fixed merge conflicts in mpam_save_mbwu_state() and __ris_msmon_read()] Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 0db1715e | 01-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: propagate MSC access errors for hw_probe functions
Allow the functions probing for MSC hardware and features to return an error, and propagate read and write errors from the lower level up
arm_mpam: propagate MSC access errors for hw_probe functions
Allow the functions probing for MSC hardware and features to return an error, and propagate read and write errors from the lower level up. This uses some "scoped cleanup" functions like scoped_guard() and ACQUIRE() to avoid the complexity of error handling when a lock has been taken. Since the mon_sel_lock is a bit special (even more so in an upcoming patch), we define a new GUARD type for it.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 84e8795c | 01-Oct-2026 |
Andre Przywara <andre.przywara@arm.com> |
arm_mpam: let low level MSC accessors return an error
The upcoming MPAM-Fb support does not use MMIO primitives to access an MSC, but employs a shared-memory/doorbell based firmware protocol. Its co
arm_mpam: let low level MSC accessors return an error
The upcoming MPAM-Fb support does not use MMIO primitives to access an MSC, but employs a shared-memory/doorbell based firmware protocol. Its complexity means that it must be able to handle errors, whereas we always assume an MMIO based MSC access succeeds today.
Change the __mpam_read_reg() low level accessor function to return the requested data through a pointer, and return an error code instead. Also change the __mpam_write_reg() accessor function to return an error code. At the moment this is always 0, so all error handling paths are not exercised at the moment. This will change later when alternative MSC access methods like MPAM-Fb are activated.
Change all direct users of those MSC wrappers to comply with the new prototypes, though the errors are not propagated all the way up yet.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 1c394154 | 17-Sep-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: resctrl: Don't stop early when tearing down a class
An MPAM class can back more than one control and more than one monitor. mpam_resctrl_teardown_class() iterates through all the controls
arm_mpam: resctrl: Don't stop early when tearing down a class
An MPAM class can back more than one control and more than one monitor. mpam_resctrl_teardown_class() iterates through all the controls but stops if it finds a match which means classes backing more than one class aren't torn down. The same for monitors, in which case the mbwu counters will be leaked.
Stop terminating the loops early.
As we are already changing mpam_resctrl_teardown_class() remove the misleading comment. It doesn't call resctrl_exit() and isn't required to do so as the only caller does it first.
Fixes: fb481ec08699 ("arm_mpam: resctrl: Call resctrl_init() on platforms that can support resctrl") Reported-by: Sashiko <sashiko-bot@kernel.org> Signed-off-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 046384f0 | 17-Sep-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: Switch to kvzmalloc_objs() for allocation of component cfg
Each component cfg is sized by the size of a per-PARTID multiplied by the number of PARTIDs. On a platform sized to push the limi
arm_mpam: Switch to kvzmalloc_objs() for allocation of component cfg
Each component cfg is sized by the size of a per-PARTID multiplied by the number of PARTIDs. On a platform sized to push the limits of the specification, the allocation using kzalloc_objs() will consistently fail. Change to use kvzmalloc_objs() so that large allocations fall back to vmalloc() based allocations.
Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 1e105782 | 17-Sep-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: Don't loop forever if there is the maximum possible amount of PARTIDs
On a theoretical platform with the maximum possible number of usable PARTIDs, 0XFFFF, the loops iterating over PARTID
arm_mpam: Don't loop forever if there is the maximum possible amount of PARTIDs
On a theoretical platform with the maximum possible number of usable PARTIDs, 0XFFFF, the loops iterating over PARTID in mpam_reset_ris() and mpam_reprogram_ris() will never reach their termination condition leading to a system hang when register the cpu hotplug handlers when MPAM is enabling.
Fix these loops.
Fixes: f188a36ca241 ("arm_mpam: Reset MSC controls from cpuhp callbacks") Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 09ff5358 | 17-Sep-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: resctrl: Make read_mon_cdp_safe() self consistent
When read_mon_cdp_safe() is called with cdp_enabled equal to false then the reading returned in val is the sum of the monitor values for t
arm_mpam: resctrl: Make read_mon_cdp_safe() self consistent
When read_mon_cdp_safe() is called with cdp_enabled equal to false then the reading returned in val is the sum of the monitor values for the given component. However, when cdp_enabled equal to true it is again the sum of the monitor values but with the initial value of val also added. Both resctrl_arch_cntr_read() and resctrl_arch_rmid_read() call read_mon_cdp_safe() and are documented to return the val directly without consideration of the older value.
The val is always zeroed before read_mon_cdp_safe() is called except in __check_limbo() and __l3_mon_event_count_sum() but the latter is not relevant on MPAM systems. The extra accumulation in __check_limbo() means when there are multiple RMIDs in limbo some of them may be marked dirty when they are already clean.
Change the cdp_enabled equals true case to match the false case.
Fixes: fb56b29932ca ("arm_mpam: resctrl: Add resctrl_arch_rmid_read()") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> [morse: fixed commit message indenting and removed stale description] Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 724eae25 | 17-Sep-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: resctrl: Correct check that existing class is L3
The class used to back mbm_total_bytes can be either at the L3 or the memory. If a platform had candidate classes at both the memory and th
arm_mpam: resctrl: Correct check that existing class is L3
The class used to back mbm_total_bytes can be either at the L3 or the memory. If a platform had candidate classes at both the memory and the L3 then, as the check for whether the existing class is L3 or not in counter_update_class() is broken, the class that will be chosen depends on which order the classes are considered and so the probe order.
Fix the check.
Fixes: 1458c4f05335 ("arm_mpam: resctrl: Add support for csu counters") Tested-by: Gavin Shan <gshan@redhat.com> Signed-off-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|
| 4643335d | 17-Sep-2026 |
Ben Horgan <ben.horgan@arm.com> |
arm_mpam: Initialize all of struct mon_read in mpam_restore_mbwu_state()
m->err and *m->val may be read before initialization in __ris_msmon_read() when called from mpam_restore_mbwu_state().
Initi
arm_mpam: Initialize all of struct mon_read in mpam_restore_mbwu_state()
m->err and *m->val may be read before initialization in __ris_msmon_read() when called from mpam_restore_mbwu_state().
Initialize the whole struct mon_read in mpam_restore_mbwu_state() and fix the spelling of mbwu in the name.
Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
show more ...
|