Skip to content

Commit c427290

Browse files
Davidlohr Buesodavejiang
authored andcommitted
cxl/acpi: Rename CFMW coherency restrictions
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: acpica/acpica@7107457 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>
1 parent 4dfa641 commit c427290

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

drivers/cxl/acpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ static unsigned long cfmws_to_decoder_flags(int restrictions)
116116
{
117117
unsigned long flags = CXL_DECODER_F_ENABLE;
118118

119-
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE2)
119+
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_DEVMEM)
120120
flags |= CXL_DECODER_F_TYPE2;
121-
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE3)
121+
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM)
122122
flags |= CXL_DECODER_F_TYPE3;
123123
if (restrictions & ACPI_CEDT_CFMWS_RESTRICT_VOLATILE)
124124
flags |= CXL_DECODER_F_RAM;

include/acpi/actbl1.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ struct acpi_cedt_cfmws_target_element {
560560

561561
/* Values for Restrictions field above */
562562

563-
#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
564-
#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
563+
#define ACPI_CEDT_CFMWS_RESTRICT_DEVMEM (1)
564+
#define ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM (1<<1)
565565
#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
566566
#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
567567
#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)

tools/testing/cxl/test/cxl.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static struct {
210210
},
211211
.interleave_ways = 0,
212212
.granularity = 4,
213-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
213+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
214214
ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
215215
.qtg_id = FAKE_QTG_ID,
216216
.window_size = SZ_256M * 4UL,
@@ -225,7 +225,7 @@ static struct {
225225
},
226226
.interleave_ways = 1,
227227
.granularity = 4,
228-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
228+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
229229
ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
230230
.qtg_id = FAKE_QTG_ID,
231231
.window_size = SZ_256M * 8UL,
@@ -240,7 +240,7 @@ static struct {
240240
},
241241
.interleave_ways = 0,
242242
.granularity = 4,
243-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
243+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
244244
ACPI_CEDT_CFMWS_RESTRICT_PMEM,
245245
.qtg_id = FAKE_QTG_ID,
246246
.window_size = SZ_256M * 4UL,
@@ -255,7 +255,7 @@ static struct {
255255
},
256256
.interleave_ways = 1,
257257
.granularity = 4,
258-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
258+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
259259
ACPI_CEDT_CFMWS_RESTRICT_PMEM,
260260
.qtg_id = FAKE_QTG_ID,
261261
.window_size = SZ_256M * 8UL,
@@ -270,7 +270,7 @@ static struct {
270270
},
271271
.interleave_ways = 0,
272272
.granularity = 4,
273-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
273+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
274274
ACPI_CEDT_CFMWS_RESTRICT_PMEM,
275275
.qtg_id = FAKE_QTG_ID,
276276
.window_size = SZ_256M * 4UL,
@@ -285,7 +285,7 @@ static struct {
285285
},
286286
.interleave_ways = 0,
287287
.granularity = 4,
288-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
288+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
289289
ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
290290
.qtg_id = FAKE_QTG_ID,
291291
.window_size = SZ_256M,
@@ -302,7 +302,7 @@ static struct {
302302
.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
303303
.interleave_ways = 0,
304304
.granularity = 4,
305-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
305+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
306306
ACPI_CEDT_CFMWS_RESTRICT_PMEM,
307307
.qtg_id = FAKE_QTG_ID,
308308
.window_size = SZ_256M * 8UL,
@@ -318,7 +318,7 @@ static struct {
318318
.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
319319
.interleave_ways = 1,
320320
.granularity = 0,
321-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
321+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
322322
ACPI_CEDT_CFMWS_RESTRICT_PMEM,
323323
.qtg_id = FAKE_QTG_ID,
324324
.window_size = SZ_256M * 8UL,
@@ -334,7 +334,7 @@ static struct {
334334
.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
335335
.interleave_ways = 8,
336336
.granularity = 1,
337-
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
337+
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
338338
ACPI_CEDT_CFMWS_RESTRICT_PMEM,
339339
.qtg_id = FAKE_QTG_ID,
340340
.window_size = SZ_512M * 6UL,

0 commit comments

Comments
 (0)