[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174461850519.31282.4192093382144476566.tip-bot2@tip-bot2>
Date: Mon, 14 Apr 2025 08:15:05 -0000
From: "tip-bot2 for Ingo Molnar" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>, "Borislav Petkov (AMD)" <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mario Limonciello <superm1@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/merge] x86/platform/amd: Move the <asm/amd_node.h> header
to <asm/amd/node.h>
The following commit has been merged into the x86/merge branch of tip:
Commit-ID: 0a35c9280a9105e601cfe23b7c15522a195fa412
Gitweb: https://git.kernel.org/tip/0a35c9280a9105e601cfe23b7c15522a195fa412
Author: Ingo Molnar <mingo@...nel.org>
AuthorDate: Sun, 13 Apr 2025 10:41:44 +02:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Mon, 14 Apr 2025 09:34:17 +02:00
x86/platform/amd: Move the <asm/amd_node.h> header to <asm/amd/node.h>
Collect AMD specific platform header files in <asm/amd/*.h>.
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Borislav Petkov (AMD) <bp@...en8.de>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mario Limonciello <superm1@...nel.org>
Link: https://lore.kernel.org/r/20250413084144.3746608-7-mingo@kernel.org
---
MAINTAINERS | 2 +-
arch/x86/include/asm/amd/nb.h | 2 +-
arch/x86/include/asm/amd/node.h | 60 +++++++++++++++++++++++++++-
arch/x86/include/asm/amd_node.h | 60 +---------------------------
arch/x86/kernel/amd_node.c | 2 +-
arch/x86/pci/fixup.c | 2 +-
drivers/edac/amd64_edac.c | 2 +-
drivers/hwmon/k10temp.c | 2 +-
drivers/platform/x86/amd/hsmp/acpi.c | 2 +-
drivers/platform/x86/amd/hsmp/plat.c | 2 +-
drivers/platform/x86/amd/pmc/pmc.c | 2 +-
drivers/platform/x86/amd/pmf/core.c | 2 +-
drivers/ras/amd/atl/internal.h | 2 +-
sound/soc/amd/acp/acp-rembrandt.c | 2 +-
sound/soc/amd/acp/acp63.c | 2 +-
sound/soc/amd/acp/acp70.c | 2 +-
sound/soc/sof/amd/acp.c | 2 +-
17 files changed, 75 insertions(+), 75 deletions(-)
create mode 100644 arch/x86/include/asm/amd/node.h
delete mode 100644 arch/x86/include/asm/amd_node.h
diff --git a/MAINTAINERS b/MAINTAINERS
index d4ea6d7..14bbb43 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1142,7 +1142,7 @@ M: Mario Limonciello <mario.limonciello@....com>
M: Yazen Ghannam <yazen.ghannam@....com>
L: linux-kernel@...r.kernel.org
S: Supported
-F: arch/x86/include/asm/amd_node.h
+F: arch/x86/include/asm/amd/node.h
F: arch/x86/kernel/amd_node.c
AMD PDS CORE DRIVER
diff --git a/arch/x86/include/asm/amd/nb.h b/arch/x86/include/asm/amd/nb.h
index adfa085..ddb5108 100644
--- a/arch/x86/include/asm/amd/nb.h
+++ b/arch/x86/include/asm/amd/nb.h
@@ -4,7 +4,7 @@
#include <linux/ioport.h>
#include <linux/pci.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
struct amd_nb_bus_dev_range {
u8 bus;
diff --git a/arch/x86/include/asm/amd/node.h b/arch/x86/include/asm/amd/node.h
new file mode 100644
index 0000000..23fe617
--- /dev/null
+++ b/arch/x86/include/asm/amd/node.h
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * AMD Node helper functions and common defines
+ *
+ * Copyright (c) 2024, Advanced Micro Devices, Inc.
+ * All Rights Reserved.
+ *
+ * Author: Yazen Ghannam <Yazen.Ghannam@....com>
+ *
+ * Note:
+ * Items in this file may only be used in a single place.
+ * However, it's prudent to keep all AMD Node functionality
+ * in a unified place rather than spreading throughout the
+ * kernel.
+ */
+
+#ifndef _ASM_X86_AMD_NODE_H_
+#define _ASM_X86_AMD_NODE_H_
+
+#include <linux/pci.h>
+
+#define MAX_AMD_NUM_NODES 8
+#define AMD_NODE0_PCI_SLOT 0x18
+
+struct pci_dev *amd_node_get_func(u16 node, u8 func);
+struct pci_dev *amd_node_get_root(u16 node);
+
+static inline u16 amd_num_nodes(void)
+{
+ return topology_amd_nodes_per_pkg() * topology_max_packages();
+}
+
+#ifdef CONFIG_AMD_NODE
+int __must_check amd_smn_read(u16 node, u32 address, u32 *value);
+int __must_check amd_smn_write(u16 node, u32 address, u32 value);
+
+/* Should only be used by the HSMP driver. */
+int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write);
+#else
+static inline int __must_check amd_smn_read(u16 node, u32 address, u32 *value) { return -ENODEV; }
+static inline int __must_check amd_smn_write(u16 node, u32 address, u32 value) { return -ENODEV; }
+
+static inline int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write)
+{
+ return -ENODEV;
+}
+#endif /* CONFIG_AMD_NODE */
+
+/* helper for use with read_poll_timeout */
+static inline int smn_read_register(u32 reg)
+{
+ int data, rc;
+
+ rc = amd_smn_read(0, reg, &data);
+ if (rc)
+ return rc;
+
+ return data;
+}
+#endif /*_ASM_X86_AMD_NODE_H_*/
diff --git a/arch/x86/include/asm/amd_node.h b/arch/x86/include/asm/amd_node.h
deleted file mode 100644
index 23fe617..0000000
--- a/arch/x86/include/asm/amd_node.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * AMD Node helper functions and common defines
- *
- * Copyright (c) 2024, Advanced Micro Devices, Inc.
- * All Rights Reserved.
- *
- * Author: Yazen Ghannam <Yazen.Ghannam@....com>
- *
- * Note:
- * Items in this file may only be used in a single place.
- * However, it's prudent to keep all AMD Node functionality
- * in a unified place rather than spreading throughout the
- * kernel.
- */
-
-#ifndef _ASM_X86_AMD_NODE_H_
-#define _ASM_X86_AMD_NODE_H_
-
-#include <linux/pci.h>
-
-#define MAX_AMD_NUM_NODES 8
-#define AMD_NODE0_PCI_SLOT 0x18
-
-struct pci_dev *amd_node_get_func(u16 node, u8 func);
-struct pci_dev *amd_node_get_root(u16 node);
-
-static inline u16 amd_num_nodes(void)
-{
- return topology_amd_nodes_per_pkg() * topology_max_packages();
-}
-
-#ifdef CONFIG_AMD_NODE
-int __must_check amd_smn_read(u16 node, u32 address, u32 *value);
-int __must_check amd_smn_write(u16 node, u32 address, u32 value);
-
-/* Should only be used by the HSMP driver. */
-int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write);
-#else
-static inline int __must_check amd_smn_read(u16 node, u32 address, u32 *value) { return -ENODEV; }
-static inline int __must_check amd_smn_write(u16 node, u32 address, u32 value) { return -ENODEV; }
-
-static inline int __must_check amd_smn_hsmp_rdwr(u16 node, u32 address, u32 *value, bool write)
-{
- return -ENODEV;
-}
-#endif /* CONFIG_AMD_NODE */
-
-/* helper for use with read_poll_timeout */
-static inline int smn_read_register(u32 reg)
-{
- int data, rc;
-
- rc = amd_smn_read(0, reg, &data);
- if (rc)
- return rc;
-
- return data;
-}
-#endif /*_ASM_X86_AMD_NODE_H_*/
diff --git a/arch/x86/kernel/amd_node.c b/arch/x86/kernel/amd_node.c
index b670fa8..a40176b 100644
--- a/arch/x86/kernel/amd_node.c
+++ b/arch/x86/kernel/amd_node.c
@@ -9,7 +9,7 @@
*/
#include <linux/debugfs.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
/*
* AMD Nodes are a physical collection of I/O devices within an SoC. There can be one
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index efefeb8..3633629 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -9,7 +9,7 @@
#include <linux/pci.h>
#include <linux/suspend.h>
#include <linux/vgaarb.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include <asm/hpet.h>
#include <asm/pci_x86.h>
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 417940f..2518016 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3,7 +3,7 @@
#include <linux/string_choices.h>
#include "amd64_edac.h"
#include <asm/amd/nb.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
static struct edac_pci_ctl_info *pci_ctl;
diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 3685906..472bcf6 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -20,7 +20,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include <asm/processor.h>
MODULE_DESCRIPTION("AMD Family 10h+ CPU core temperature monitor");
diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
index 3c7acb9..02e22c1 100644
--- a/drivers/platform/x86/amd/hsmp/acpi.c
+++ b/drivers/platform/x86/amd/hsmp/acpi.c
@@ -23,7 +23,7 @@
#include <uapi/asm-generic/errno-base.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "hsmp.h"
diff --git a/drivers/platform/x86/amd/hsmp/plat.c b/drivers/platform/x86/amd/hsmp/plat.c
index 0eb73fc..c9a1b1e 100644
--- a/drivers/platform/x86/amd/hsmp/plat.c
+++ b/drivers/platform/x86/amd/hsmp/plat.c
@@ -18,7 +18,7 @@
#include <linux/platform_device.h>
#include <linux/sysfs.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "hsmp.h"
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index d789d6c..e5c4e6b 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -28,7 +28,7 @@
#include <linux/seq_file.h>
#include <linux/uaccess.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "pmc.h"
diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index a2cb2d5..cecadae 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -14,7 +14,7 @@
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "pmf.h"
/* PMF-SMU communication registers */
diff --git a/drivers/ras/amd/atl/internal.h b/drivers/ras/amd/atl/internal.h
index c63fee3..05bbee2 100644
--- a/drivers/ras/amd/atl/internal.h
+++ b/drivers/ras/amd/atl/internal.h
@@ -18,7 +18,7 @@
#include <linux/ras.h>
#include <asm/amd/nb.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "reg_fields.h"
diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c
index 746b6ed..c30a7b5 100644
--- a/sound/soc/amd/acp/acp-rembrandt.c
+++ b/sound/soc/amd/acp/acp-rembrandt.c
@@ -22,7 +22,7 @@
#include <linux/pci.h>
#include <linux/pm_runtime.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "amd.h"
#include "../mach-config.h"
diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c
index 52d895e..0ddde14 100644
--- a/sound/soc/amd/acp/acp63.c
+++ b/sound/soc/amd/acp/acp63.c
@@ -21,7 +21,7 @@
#include <linux/pm_runtime.h>
#include <linux/pci.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "amd.h"
#include "acp-mach.h"
diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c
index 6d5f5ad..7f4a25b 100644
--- a/sound/soc/amd/acp/acp70.c
+++ b/sound/soc/amd/acp/acp70.c
@@ -23,7 +23,7 @@
#include "amd.h"
#include "acp-mach.h"
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#define DRV_NAME "acp_asoc_acp70"
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index 7c6d647..7e6f107 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/pci.h>
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
#include "../ops.h"
#include "acp.h"
Powered by blists - more mailing lists