From: James Morse james.morse@arm.com
resctrl stores the bitmaps and has a closid bitmap stored in u32.
MPAM supports bitmaps and partids bigger than this.
Add some preprocessor values that make it clear why MPAM clamps some of these values.
Signed-off-by: James Morse james.morse@arm.com --- include/linux/resctrl.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 8970dcf0e242..a88a43a0380d 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -26,6 +26,17 @@ int proc_resctrl_show(struct seq_file *m, /* max value for struct rdt_domain's mbps_val */ #define MBA_MAX_MBPS U32_MAX
+/* + * Resctrl uses a u32 as a closid bitmap. The maximum closid is 32. + */ +#define RESCTRL_MAX_CLOSID 32 + +/* + * Resctrl uses u32 to hold the user-space config. The maximum bitmap size is + * 32. + */ +#define RESCTRL_MAX_CBM 32 + /** * struct pseudo_lock_region - pseudo-lock region information * @s: Resctrl schema for the resource to which this