Merge branches 'for-next/misc' and 'for-next/mpam' into for-next/core

* for-next/misc:
  : Miscellaneous cleanups/fixes
  virt: arm-cca-guest: fix error check for RSI_INCOMPLETE
  arm64/hwcap: Include kernel-hwcap.h in list of generated files

* for-next/mpam:
  : Fix an unmount->remount problem with the CDP emulation, uninitialised
  : variable and checker warnings
  arm_mpam: resctrl: Make resctrl_mon_ctx_waiters static
  arm_mpam: resctrl: Fix the check for no monitor components found
  arm_mpam: resctrl: Fix MBA CDP alloc_capable handling on unmount
This commit is contained in:
Catalin Marinas
2026-04-20 13:11:50 +01:00
3 changed files with 13 additions and 3 deletions

View File

@@ -17,4 +17,5 @@ generic-y += parport.h
generic-y += user.h
generated-y += cpucap-defs.h
generated-y += kernel-hwcap.h
generated-y += sysreg-defs.h

View File

@@ -22,7 +22,7 @@
#include "mpam_internal.h"
DECLARE_WAIT_QUEUE_HEAD(resctrl_mon_ctx_waiters);
static DECLARE_WAIT_QUEUE_HEAD(resctrl_mon_ctx_waiters);
/*
* The classes we've picked to map to resctrl resources, wrapped
@@ -220,10 +220,18 @@ int resctrl_arch_set_cdp_enabled(enum resctrl_res_level rid, bool enable)
if (cdp_enabled && !mpam_resctrl_controls[RDT_RESOURCE_MBA].cdp_enabled)
mpam_resctrl_controls[RDT_RESOURCE_MBA].resctrl_res.alloc_capable = false;
/*
* If resctrl has attempted to enable CDP on MBA, re-enable MBA as two
* configurations will be provided so there is no aliasing problem.
*/
if (mpam_resctrl_controls[RDT_RESOURCE_MBA].cdp_enabled &&
mpam_resctrl_controls[RDT_RESOURCE_MBA].class)
mpam_resctrl_controls[RDT_RESOURCE_MBA].resctrl_res.alloc_capable = true;
/* On unmount when CDP is disabled, re-enable MBA */
if (!cdp_enabled && mpam_resctrl_controls[RDT_RESOURCE_MBA].class)
mpam_resctrl_controls[RDT_RESOURCE_MBA].resctrl_res.alloc_capable = true;
if (enable) {
if (mpam_partid_max < 1)
return -EINVAL;
@@ -1399,7 +1407,7 @@ mpam_resctrl_alloc_domain(unsigned int cpu, struct mpam_resctrl_res *res)
}
if (r->mon_capable) {
struct mpam_component *any_mon_comp;
struct mpam_component *any_mon_comp = NULL;
struct mpam_resctrl_mon *mon;
enum resctrl_event_id eventid;

View File

@@ -157,7 +157,8 @@ static int arm_cca_report_new(struct tsm_report *report, void *data)
} while (info.result == RSI_INCOMPLETE &&
info.offset < RSI_GRANULE_SIZE);
if (info.result != RSI_SUCCESS) {
/* Break out in case of failure */
if (info.result != RSI_SUCCESS && info.result != RSI_INCOMPLETE) {
ret = -ENXIO;
token_size = 0;
goto exit_free_granule_page;