From 059717c2ba1f745f35f4bbb8991e408c12031f1e Mon Sep 17 00:00:00 2001 From: Anil S Keshavamurthy Date: Fri, 23 May 2025 13:20:01 -0400 Subject: [PATCH] ACPI: MRRM: Fix default max memory region Per the spec, the default max memory region must be 1 covering all system memory. When platform does not provide ACPI MRRM table or when CONFIG_ACPI is opted out, the acpi_mrrm_max_mem_region() function defaults to returning 1 region complying to RDT spec. Signed-off-by: Anil S Keshavamurthy Reviewed-by: Tony Luck Link: https://patch.msgid.link/20250523172001.1761634-1-anil.s.keshavamurthy@intel.com Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_mrrm.c | 3 ++- include/linux/acpi.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_mrrm.c b/drivers/acpi/acpi_mrrm.c index 2f22f013959a..26c1a4e6b6ec 100644 --- a/drivers/acpi/acpi_mrrm.c +++ b/drivers/acpi/acpi_mrrm.c @@ -14,7 +14,8 @@ #include #include -static int max_mem_region = -ENOENT; +/* Default assume one memory region covering all system memory, per the spec */ +static int max_mem_region = 1; /* Access for use by resctrl file system */ int acpi_mrrm_max_mem_region(void) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index c409f4cecb09..d9ba7b4fa2cd 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1098,7 +1098,7 @@ static inline acpi_handle acpi_get_processor_handle(int cpu) static inline int acpi_mrrm_max_mem_region(void) { - return -ENOENT; + return 1; } #endif /* !CONFIG_ACPI */ -- 2.50.1