ACPI: MRRM: Fix default max memory region
authorAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Fri, 23 May 2025 17:20:01 +0000 (13:20 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 May 2025 18:05:02 +0000 (20:05 +0200)
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 <anil.s.keshavamurthy@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20250523172001.1761634-1-anil.s.keshavamurthy@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_mrrm.c
include/linux/acpi.h

index 2f22f013959ad6a853f004bdb888bd95654908c2..26c1a4e6b6ec51c8c15b0391eebd5f489f6b67ff 100644 (file)
@@ -14,7 +14,8 @@
 #include <linux/string.h>
 #include <linux/sysfs.h>
 
-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)
index c409f4cecb09026335c718b8bb0e0f5945be3b34..d9ba7b4fa2cd03bad9c4f1bb0cbda9db99fdcfb6 100644 (file)
@@ -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 */