* [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions
@ 2025-09-08 16:00 Davidlohr Bueso
2025-09-08 20:42 ` Dave Jiang
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Davidlohr Bueso @ 2025-09-08 16:00 UTC (permalink / raw)
To: rafael.j.wysocki, dave.jiang
Cc: dan.j.williams, jonathan.cameron, alejandro.lucero-palau,
ira.weiny, alison.schofield, a.manzanares, linux-acpi, linux-cxl,
linux-kernel, Davidlohr Bueso, Rafael J . Wysocki
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>
---
drivers/cxl/acpi.c | 4 ++--
include/acpi/actbl1.h | 4 ++--
tools/testing/cxl/test/cxl.c | 18 +++++++++---------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 26c494704437..2cf75b553f26 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -128,9 +128,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;
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 99fd1588ff38..eb787dfbd2fa 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -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)
diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 6a25cca5636f..ba50338f8ada 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -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,
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions
2025-09-08 16:00 [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions Davidlohr Bueso
@ 2025-09-08 20:42 ` Dave Jiang
2025-09-08 21:38 ` Gregory Price
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dave Jiang @ 2025-09-08 20:42 UTC (permalink / raw)
To: Davidlohr Bueso, rafael.j.wysocki
Cc: dan.j.williams, jonathan.cameron, alejandro.lucero-palau,
ira.weiny, alison.schofield, a.manzanares, linux-acpi, linux-cxl,
linux-kernel, Rafael J . Wysocki
On 9/8/25 9:00 AM, Davidlohr Bueso wrote:
> 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: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/acpi.c | 4 ++--
> include/acpi/actbl1.h | 4 ++--
> tools/testing/cxl/test/cxl.c | 18 +++++++++---------
> 3 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 26c494704437..2cf75b553f26 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -128,9 +128,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;
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index 99fd1588ff38..eb787dfbd2fa 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -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)
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index 6a25cca5636f..ba50338f8ada 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -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,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions
2025-09-08 16:00 [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions Davidlohr Bueso
2025-09-08 20:42 ` Dave Jiang
@ 2025-09-08 21:38 ` Gregory Price
2025-09-09 14:06 ` Jonathan Cameron
2025-09-09 15:20 ` Dave Jiang
3 siblings, 0 replies; 5+ messages in thread
From: Gregory Price @ 2025-09-08 21:38 UTC (permalink / raw)
To: Davidlohr Bueso
Cc: rafael.j.wysocki, dave.jiang, dan.j.williams, jonathan.cameron,
alejandro.lucero-palau, ira.weiny, alison.schofield, a.manzanares,
linux-acpi, linux-cxl, linux-kernel, Rafael J . Wysocki
On Mon, Sep 08, 2025 at 09:00:34AM -0700, Davidlohr Bueso wrote:
> 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>
Reviewed-by: Gregory Price <gourry@gourry.net>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
> drivers/cxl/acpi.c | 4 ++--
> include/acpi/actbl1.h | 4 ++--
> tools/testing/cxl/test/cxl.c | 18 +++++++++---------
> 3 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 26c494704437..2cf75b553f26 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -128,9 +128,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;
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index 99fd1588ff38..eb787dfbd2fa 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -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)
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index 6a25cca5636f..ba50338f8ada 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -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,
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions
2025-09-08 16:00 [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions Davidlohr Bueso
2025-09-08 20:42 ` Dave Jiang
2025-09-08 21:38 ` Gregory Price
@ 2025-09-09 14:06 ` Jonathan Cameron
2025-09-09 15:20 ` Dave Jiang
3 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2025-09-09 14:06 UTC (permalink / raw)
To: Davidlohr Bueso
Cc: rafael.j.wysocki, dave.jiang, dan.j.williams,
alejandro.lucero-palau, ira.weiny, alison.schofield, a.manzanares,
linux-acpi, linux-cxl, linux-kernel, Rafael J . Wysocki
On Mon, 8 Sep 2025 09:00:34 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> 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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions
2025-09-08 16:00 [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions Davidlohr Bueso
` (2 preceding siblings ...)
2025-09-09 14:06 ` Jonathan Cameron
@ 2025-09-09 15:20 ` Dave Jiang
3 siblings, 0 replies; 5+ messages in thread
From: Dave Jiang @ 2025-09-09 15:20 UTC (permalink / raw)
To: Davidlohr Bueso, rafael.j.wysocki
Cc: dan.j.williams, jonathan.cameron, alejandro.lucero-palau,
ira.weiny, alison.schofield, a.manzanares, linux-acpi, linux-cxl,
linux-kernel, Rafael J . Wysocki
On 9/8/25 9:00 AM, Davidlohr Bueso wrote:
> 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>
Applied to cxl/next
58b3de3bf52315f3b30075fd2b077ec8d2c4f0ca
> ---
> drivers/cxl/acpi.c | 4 ++--
> include/acpi/actbl1.h | 4 ++--
> tools/testing/cxl/test/cxl.c | 18 +++++++++---------
> 3 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 26c494704437..2cf75b553f26 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -128,9 +128,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;
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index 99fd1588ff38..eb787dfbd2fa 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -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)
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index 6a25cca5636f..ba50338f8ada 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -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,
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-09 15:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 16:00 [PATCH v2] cxl/acpi: Rename CFMW coherency restrictions Davidlohr Bueso
2025-09-08 20:42 ` Dave Jiang
2025-09-08 21:38 ` Gregory Price
2025-09-09 14:06 ` Jonathan Cameron
2025-09-09 15:20 ` Dave Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox