[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240627224615.854162-6-rrichter@amd.com>
Date: Fri, 28 Jun 2024 00:46:14 +0200
From: Robert Richter <rrichter@....com>
To: Dan Williams <dan.j.williams@...el.com>, Davidlohr Bueso
<dave@...olabs.net>, Jonathan Cameron <jonathan.cameron@...wei.com>, "Dave
Jiang" <dave.jiang@...el.com>, Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>
CC: <linux-kernel@...r.kernel.org>, <linux-cxl@...r.kernel.org>, "Robert
Richter" <rrichter@....com>
Subject: [PATCH 5/5] cxl/acpi: Enable address translation for Zen4 platforms
Enable address translation for Zen4 platforms.
Link: https://lore.kernel.org/all/65c68969903b1_afa429460@dwillia2-xfh.jf.intel.com.notmuch/
Cc: Dan Williams <dan.j.williams@...el.com>
Signed-off-by: Robert Richter <rrichter@....com>
---
drivers/cxl/acpi.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 67f73a831bd3..9e7b9629b98d 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -11,6 +11,10 @@
#include "cxlpci.h"
#include "cxl.h"
+#ifdef CONFIG_X86
+#include <asm/cpu.h>
+#endif
+
#define CXL_RCRB_SIZE SZ_8K
struct cxl_cxims_data {
@@ -536,9 +540,14 @@ static int cxl_get_chbs(struct device *dev, struct acpi_device *hb,
return 0;
}
+static bool is_amd_zen4(void)
+{
+ return (IS_ENABLED(CONFIG_X86) && boot_cpu_has(X86_FEATURE_ZEN4));
+}
+
static void setup_platform_quirks(struct cxl_root *root)
{
- root->hpa_xlat_enable = 0;
+ root->hpa_xlat_enable = is_amd_zen4();
}
static int get_genport_coordinates(struct device *dev, struct cxl_dport *dport)
--
2.39.2
Powered by blists - more mailing lists