Message ID | 20220413183720.2444089-12-ben.widawsky@intel.com |
---|---|
State | New, archived |
Headers | show |
Series | Region driver | expand |
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c index a6b0c3181d0e..50e54e5d58c0 100644 --- a/drivers/cxl/acpi.c +++ b/drivers/cxl/acpi.c @@ -11,8 +11,8 @@ #include "cxl.h" /* Encode defined in CXL 2.0 8.2.5.12.7 HDM Decoder Control Register */ -#define CFMWS_INTERLEAVE_WAYS(x) (1 << (x)->interleave_ways) -#define CFMWS_INTERLEAVE_GRANULARITY(x) ((x)->granularity + 8) +#define CFMWS_INTERLEAVE_WAYS(x) (cxl_to_interleave_ways((x)->interleave_ways)) +#define CFMWS_INTERLEAVE_GRANULARITY(x) (cxl_to_interleave_granularity((x)->granularity)) static unsigned long cfmws_to_decoder_flags(int restrictions) {
Now that functionality to decode interleave ways and granularity is in a common place, use that functionality in the cxl_acpi driver. Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> --- drivers/cxl/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)