Skip to content

Commit 059717c

Browse files
anilskeshavamurthyrafaeljw
authored andcommitted
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 <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 8e66be0 commit 059717c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/acpi/acpi_mrrm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
#include <linux/string.h>
1515
#include <linux/sysfs.h>
1616

17-
static int max_mem_region = -ENOENT;
17+
/* Default assume one memory region covering all system memory, per the spec */
18+
static int max_mem_region = 1;
1819

1920
/* Access for use by resctrl file system */
2021
int acpi_mrrm_max_mem_region(void)

include/linux/acpi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ static inline acpi_handle acpi_get_processor_handle(int cpu)
10981098

10991099
static inline int acpi_mrrm_max_mem_region(void)
11001100
{
1101-
return -ENOENT;
1101+
return 1;
11021102
}
11031103

11041104
#endif /* !CONFIG_ACPI */

0 commit comments

Comments
 (0)