]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cxl/acpi: Rename CFMW coherency restrictions
authorDavidlohr Bueso <dave@stgolabs.net>
Mon, 8 Sep 2025 16:00:34 +0000 (09:00 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 10 Sep 2025 15:09:10 +0000 (08:09 -0700)
ACPICA commit 710745713ad3a2543dbfb70e84764f31f0e46bdc

This has been renamed in more recent CXL specs, as
type3 (memory expanders) can also use HDM-DB for
device coherent memory.

Link: https://github.com/acpica/acpica/commit/710745713ad3a2543dbfb70e84764f31f0e46bdc
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20250908160034.86471-1-dave@stgolabs.net
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/acpi.c
include/acpi/actbl1.h
tools/testing/cxl/test/cxl.c

index f1625212b08ba3add6981d2b1d744a68d5f0693e..ff15dac3f294444130579ef447bf4ec7a384f39a 100644 (file)
@@ -116,9 +116,9 @@ static unsigned long cfmws_to_decoder_flags(int restrictions)
 {
        unsigned long flags = CXL_DECODER_F_ENABLE;
 
-       if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE2)
+       if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_DEVMEM)
                flags |= CXL_DECODER_F_TYPE2;
-       if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE3)
+       if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM)
                flags |= CXL_DECODER_F_TYPE3;
        if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_VOLATILE)
                flags |= CXL_DECODER_F_RAM;
index 99fd1588ff3822b0b36174c51d0e213e9ec7ee13..eb787dfbd2fa0019975a843bfb4848c36a27f3c0 100644 (file)
@@ -560,8 +560,8 @@ struct acpi_cedt_cfmws_target_element {
 
 /* Values for Restrictions field above */
 
-#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2      (1)
-#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3      (1<<1)
+#define ACPI_CEDT_CFMWS_RESTRICT_DEVMEM      (1)
+#define ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM (1<<1)
 #define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE   (1<<2)
 #define ACPI_CEDT_CFMWS_RESTRICT_PMEM       (1<<3)
 #define ACPI_CEDT_CFMWS_RESTRICT_FIXED      (1<<4)
index 6a25cca5636f75eb130327ce800b4fd69ad60c39..ba50338f8ada69dbff57da6754a9ef646abf27df 100644 (file)
@@ -210,7 +210,7 @@ static struct {
                        },
                        .interleave_ways = 0,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 4UL,
@@ -225,7 +225,7 @@ static struct {
                        },
                        .interleave_ways = 1,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 8UL,
@@ -240,7 +240,7 @@ static struct {
                        },
                        .interleave_ways = 0,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_PMEM,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 4UL,
@@ -255,7 +255,7 @@ static struct {
                        },
                        .interleave_ways = 1,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_PMEM,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 8UL,
@@ -270,7 +270,7 @@ static struct {
                        },
                        .interleave_ways = 0,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_PMEM,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 4UL,
@@ -285,7 +285,7 @@ static struct {
                        },
                        .interleave_ways = 0,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M,
@@ -302,7 +302,7 @@ static struct {
                        .interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
                        .interleave_ways = 0,
                        .granularity = 4,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_PMEM,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 8UL,
@@ -318,7 +318,7 @@ static struct {
                        .interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
                        .interleave_ways = 1,
                        .granularity = 0,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_PMEM,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_256M * 8UL,
@@ -334,7 +334,7 @@ static struct {
                        .interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
                        .interleave_ways = 8,
                        .granularity = 1,
-                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
+                       .restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
                                        ACPI_CEDT_CFMWS_RESTRICT_PMEM,
                        .qtg_id = FAKE_QTG_ID,
                        .window_size = SZ_512M * 6UL,