From: Robert Richter <rrichter@amd.com>
To: Dan Williams <dan.j.williams@intel.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"Dave Jiang" <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-cxl@vger.kernel.org>,
"Robert Richter" <rrichter@amd.com>
Subject: [PATCH 5/5] cxl/acpi: Enable address translation for Zen4 platforms
Date: Fri, 28 Jun 2024 00:46:14 +0200 [thread overview]
Message-ID: <20240627224615.854162-6-rrichter@amd.com> (raw)
In-Reply-To: <20240627224615.854162-1-rrichter@amd.com>
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@intel.com>
Signed-off-by: Robert Richter <rrichter@amd.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
next prev parent reply other threads:[~2024-06-27 22:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 22:46 [PATCH 0/5] cxl: Address translation for HDM decoding Robert Richter
2024-06-27 22:46 ` [PATCH 1/5] cxl/hdm: Moving HDM specific code to core/hdm.c Robert Richter
2024-06-27 22:46 ` [PATCH 2/5] cxl/hdm: Implement address translation for HDM decoding Robert Richter
2024-06-27 22:46 ` [PATCH 3/5] cxl/acpi: Add platform flag for HPA address translation Robert Richter
2024-06-27 22:46 ` [PATCH 4/5] cxl/hdm: Setup HPA base for address translation using the HPA window in CFMWS Robert Richter
2024-06-27 22:46 ` Robert Richter [this message]
2024-06-29 8:22 ` [PATCH 5/5] cxl/acpi: Enable address translation for Zen4 platforms kernel test robot
2024-06-29 11:29 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240627224615.854162-6-rrichter@amd.com \
--to=rrichter@amd.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox