Skip to contentSkip to conversation

x86/platform: Move AMD specific headers to <asm/amd/*.h>

PATCH Applied Ingo Molnar 3 participants 15 messages Apr 13, 2025 – Apr 14, 2025

Subsystems (23)
Documentation x86 Sound PCI +19 more subsystems
lore
Share & tools
lore
#0 lore raw

cover x86/platform: Move AMD specific headers to <asm/amd/*.h>

Also clean up some details while at it.

The Git tree of these patches can also be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/platform

Thanks,

Ingo

===============>
Ingo Molnar (6):
x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h> x86/platform/amd: Add standard header guards to <asm/amd/ibs.h> x86/platform/amd: Move the <asm/amd_nb.h> header to <asm/amd/nb.h> x86/platform/amd: Move the <asm/amd_hsmp.h> header to <asm/amd/hsmp.h> x86/platform/amd: Clean up the <asm/amd/hsmp.h> header guards a bit x86/platform/amd: Move the <asm/amd_node.h> header to <asm/amd/node.h>

 Documentation/userspace-api/ioctl/ioctl-number.rst | 2 +-
 MAINTAINERS                                        | 6 +++---
 arch/x86/events/amd/ibs.c                          | 2 +-
 arch/x86/include/asm/{amd_hsmp.h => amd/hsmp.h}    | 4 ++--
 arch/x86/include/asm/{amd-ibs.h => amd/ibs.h}      | 5 +++++
 arch/x86/include/asm/{amd_nb.h => amd/nb.h}        | 2 +-
 arch/x86/include/asm/{amd_node.h => amd/node.h}    | 0
 arch/x86/kernel/amd_gart_64.c                      | 2 +-
 arch/x86/kernel/amd_nb.c                           | 2 +-
 arch/x86/kernel/amd_node.c                         | 2 +-
 arch/x86/kernel/aperture_64.c                      | 2 +-
 arch/x86/kernel/cpu/cacheinfo.c                    | 2 +-
 arch/x86/kernel/cpu/mce/inject.c                   | 2 +-
 arch/x86/mm/amdtopology.c                          | 2 +-
 arch/x86/mm/numa.c                                 | 2 +-
 arch/x86/pci/amd_bus.c                             | 2 +-
 arch/x86/pci/fixup.c                               | 2 +-
 drivers/char/agp/amd64-agp.c                       | 2 +-
 drivers/edac/amd64_edac.c                          | 4 ++--
 drivers/hwmon/k10temp.c                            | 2 +-
 drivers/platform/x86/amd/hsmp/acpi.c               | 4 ++--
 drivers/platform/x86/amd/hsmp/hsmp.c               | 2 +-
 drivers/platform/x86/amd/hsmp/plat.c               | 4 ++--
 drivers/platform/x86/amd/pmc/mp1_stb.c             | 2 +-
 drivers/platform/x86/amd/pmc/pmc.c                 | 2 +-
 drivers/platform/x86/amd/pmf/core.c                | 2 +-
 drivers/pnp/quirks.c                               | 2 +-
 drivers/ras/amd/atl/internal.h                     | 4 ++--
 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 +-
 tools/perf/check-headers.sh                        | 2 +-
 tools/perf/util/amd-sample-raw.c                   | 2 +-
 34 files changed, 44 insertions(+), 39 deletions(-)
 rename arch/x86/include/asm/{amd_hsmp.h => amd/hsmp.h} (91%)
 rename arch/x86/include/asm/{amd-ibs.h => amd/ibs.h} (98%)
 rename arch/x86/include/asm/{amd_nb.h => amd/nb.h} (98%)
 rename arch/x86/include/asm/{amd_node.h => amd/node.h} (100%)
Signature · 1 line
2.45.2
#1 lore raw

PATCH 1/6 x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

Collect AMD specific platform header files in <asm/amd/*.h>.

Cc Borislav Petkov <[email protected]>
Cc Mario Limonciello <[email protected]>
---
 arch/x86/events/amd/ibs.c                     | 2 +-
 arch/x86/include/asm/{amd-ibs.h => amd/ibs.h} | 0
 tools/perf/check-headers.sh                   | 2 +-
 tools/perf/util/amd-sample-raw.c              | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/events/amd/ibs.c +1 -1
index 0252b7ea8bca..172619932fe3 100644
@@ -26,7 +26,7 @@ static u32 ibs_caps;
 #include <linux/hardirq.h>
 
 #include <asm/nmi.h>
-#include <asm/amd-ibs.h>
+#include <asm/amd/ibs.h>
 
 /* attr.config2 */
 #define IBS_SW_FILTER_MASK	1
arch/x86/include/asm/amd/ibs.h renamed from arch/x86/include/asm/amd-ibs.h +0 -0
similarity index 100%
rename from arch/x86/include/asm/amd-ibs.h
rename to arch/x86/include/asm/amd/ibs.h
tools/perf/check-headers.sh +1 -1
index a4499e5a6f9c..493a13830419 100755
@@ -185,7 +185,7 @@ done
 # diff with extra ignore lines
 check arch/x86/lib/memcpy_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))" -I"^#include <linux/cfi_types.h>"'
 check arch/x86/lib/memset_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memset_\(erms\|orig\))"'
-check arch/x86/include/asm/amd-ibs.h  '-I "^#include [<\"]\(asm/\)*msr-index.h"'
+check arch/x86/include/asm/amd/ibs.h  '-I "^#include [<\"]\(asm/\)*msr-index.h"'
 check arch/arm64/include/asm/cputype.h '-I "^#include [<\"]\(asm/\)*sysreg.h"'
 check include/linux/unaligned.h '-I "^#include <linux/unaligned/packed_struct.h>" -I "^#include <asm/byteorder.h>" -I "^#pragma GCC diagnostic"'
 check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"'
tools/perf/util/amd-sample-raw.c +1 -1
index 9d0ce88e90e4..456ce64ad822 100644
@@ -9,7 +9,7 @@
 #include <inttypes.h>
 
 #include <linux/string.h>
-#include "../../arch/x86/include/asm/amd-ibs.h"
+#include "../../arch/x86/include/asm/amd/ibs.h"
 
 #include "debug.h"
 #include "session.h"
Signature · 1 line
2.45.2
merge bot Applied
#2 lore raw

[tip: x86/merge] x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

The following commit has been merged into the x86/merge branch of tip:

The following commit has been merged into the x86/merge branch of tip:

Commit-ID:     3846389c03a8518884f09056611619bd1461ffc7
Gitweb:        https://git.kernel.org/tip/3846389c03a8518884f09056611619bd1461ffc7
Author:        Ingo Molnar <[email protected]>
AuthorDate:    Sun, 13 Apr 2025 10:41:39 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Mon, 14 Apr 2025 09:31:47 +02:00

x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

Collect AMD specific platform header files in <asm/amd/*.h>.

---
 arch/x86/events/amd/ibs.c        |   2 +-
 arch/x86/include/asm/amd-ibs.h   | 153 +------------------------------
 arch/x86/include/asm/amd/ibs.h   | 153 ++++++++++++++++++++++++++++++-
 tools/perf/check-headers.sh      |   2 +-
 tools/perf/util/amd-sample-raw.c |   2 +-
 5 files changed, 156 insertions(+), 156 deletions(-)
 delete mode 100644 arch/x86/include/asm/amd-ibs.h
 create mode 100644 arch/x86/include/asm/amd/ibs.h
arch/x86/events/amd/ibs.c +1 -1
index 0252b7e..1726199 100644
@@ -26,7 +26,7 @@ static u32 ibs_caps;
 #include <linux/hardirq.h>
 
 #include <asm/nmi.h>
-#include <asm/amd-ibs.h>
+#include <asm/amd/ibs.h>
 
 /* attr.config2 */
 #define IBS_SW_FILTER_MASK	1
arch/x86/include/asm/amd-ibs.h deleted +0 -153

153 lines not on this page · raw message

arch/x86/include/asm/amd/ibs.h new file +153 -0

153 lines not on this page · raw message

tools/perf/check-headers.sh +1 -1
index a4499e5..493a138 100755
@@ -185,7 +185,7 @@ done
 # diff with extra ignore lines
 check arch/x86/lib/memcpy_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))" -I"^#include <linux/cfi_types.h>"'
 check arch/x86/lib/memset_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memset_\(erms\|orig\))"'
-check arch/x86/include/asm/amd-ibs.h  '-I "^#include [<\"]\(asm/\)*msr-index.h"'
+check arch/x86/include/asm/amd/ibs.h  '-I "^#include [<\"]\(asm/\)*msr-index.h"'
 check arch/arm64/include/asm/cputype.h '-I "^#include [<\"]\(asm/\)*sysreg.h"'
 check include/linux/unaligned.h '-I "^#include <linux/unaligned/packed_struct.h>" -I "^#include <asm/byteorder.h>" -I "^#pragma GCC diagnostic"'
 check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"'
tools/perf/util/amd-sample-raw.c +1 -1
index 9d0ce88..456ce64 100644
@@ -9,7 +9,7 @@
 #include <inttypes.h>
 
 #include <linux/string.h>
-#include "../../arch/x86/include/asm/amd-ibs.h"
+#include "../../arch/x86/include/asm/amd/ibs.h"
 
 #include "debug.h"
 #include "session.h"
#3 lore raw

PATCH 2/6 x86/platform/amd: Add standard header guards to <asm/amd/ibs.h>

In reply to Ingo Molnar
Cc Borislav Petkov <[email protected]>
Cc Mario Limonciello <[email protected]>
---
 arch/x86/include/asm/amd/ibs.h | 5 +++++
 1 file changed, 5 insertions(+)
arch/x86/include/asm/amd/ibs.h +5 -0
index 77f3a589a99a..3ee5903982c2 100644
@@ -1,4 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_AMD_IBS_H
+#define _ASM_X86_AMD_IBS_H
+
 /*
  * From PPR Vol 1 for AMD Family 19h Model 01h B1
  * 55898 Rev 0.35 - Feb 5, 2021
@@ -151,3 +154,5 @@ struct perf_ibs_data {
 	};
 	u64		regs[MSR_AMD64_IBS_REG_COUNT_MAX];
 };
+
+#endif /* _ASM_X86_AMD_IBS_H */
Signature · 1 line
2.45.2
merge bot Applied
#4 lore raw

[tip: x86/merge] x86/platform/amd: Add standard header guards to <asm/amd/ibs.h>

The following commit has been merged into the x86/merge branch of tip:

The following commit has been merged into the x86/merge branch of tip:

Commit-ID:     861c6b1185fbb2e3fa158aa3aca75d2f767db2a8
Gitweb:        https://git.kernel.org/tip/861c6b1185fbb2e3fa158aa3aca75d2f767db2a8
Author:        Ingo Molnar <[email protected]>
AuthorDate:    Sun, 13 Apr 2025 10:41:40 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Mon, 14 Apr 2025 09:31:47 +02:00

x86/platform/amd: Add standard header guards to <asm/amd/ibs.h>

---
 arch/x86/include/asm/amd/ibs.h | 5 +++++
 1 file changed, 5 insertions(+)
arch/x86/include/asm/amd/ibs.h +5 -0
index 77f3a58..3ee5903 100644
@@ -1,4 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_AMD_IBS_H
+#define _ASM_X86_AMD_IBS_H
+
 /*
  * From PPR Vol 1 for AMD Family 19h Model 01h B1
  * 55898 Rev 0.35 - Feb 5, 2021
@@ -151,3 +154,5 @@ struct perf_ibs_data {
 	};
 	u64		regs[MSR_AMD64_IBS_REG_COUNT_MAX];
 };
+
+#endif /* _ASM_X86_AMD_IBS_H */
#5 lore raw

PATCH 3/6 x86/platform/amd: Move the <asm/amd_nb.h> header to <asm/amd/nb.h>

In reply to Ingo Molnar

Collect AMD specific platform header files in <asm/amd/*.h>.

Cc Borislav Petkov <[email protected]>
Cc Mario Limonciello <[email protected]>
---
 arch/x86/include/asm/{amd_nb.h => amd/nb.h} | 0
 arch/x86/kernel/amd_gart_64.c               | 2 +-
 arch/x86/kernel/amd_nb.c                    | 2 +-
 arch/x86/kernel/aperture_64.c               | 2 +-
 arch/x86/kernel/cpu/cacheinfo.c             | 2 +-
 arch/x86/kernel/cpu/mce/inject.c            | 2 +-
 arch/x86/mm/amdtopology.c                   | 2 +-
 arch/x86/mm/numa.c                          | 2 +-
 arch/x86/pci/amd_bus.c                      | 2 +-
 drivers/char/agp/amd64-agp.c                | 2 +-
 drivers/edac/amd64_edac.c                   | 2 +-
 drivers/platform/x86/amd/pmc/mp1_stb.c      | 2 +-
 drivers/pnp/quirks.c                        | 2 +-
 drivers/ras/amd/atl/internal.h              | 2 +-
 14 files changed, 13 insertions(+), 13 deletions(-)
arch/x86/include/asm/amd/nb.h renamed from arch/x86/include/asm/amd_nb.h +0 -0
similarity index 100%
rename from arch/x86/include/asm/amd_nb.h
rename to arch/x86/include/asm/amd/nb.h
arch/x86/kernel/amd_gart_64.c +1 -1
index c884deca839b..3485d419c2f5 100644
@@ -39,7 +39,7 @@
 #include <asm/gart.h>
 #include <asm/set_memory.h>
 #include <asm/dma.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/x86_init.h>
 
 static unsigned long iommu_bus_base;	/* GART remapping area (physical) */
arch/x86/kernel/amd_nb.c +1 -1
index 6d12a9b69432..bac445d217e6 100644
@@ -13,7 +13,7 @@
 #include <linux/export.h>
 #include <linux/spinlock.h>
 #include <linux/pci_ids.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 static u32 *flush_words;
 
arch/x86/kernel/aperture_64.c +1 -1
index 89c0c8a3fc7e..769321185a08 100644
@@ -29,7 +29,7 @@
 #include <asm/gart.h>
 #include <asm/pci-direct.h>
 #include <asm/dma.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/x86_init.h>
 #include <linux/crash_dump.h>
 
arch/x86/kernel/cpu/cacheinfo.c +1 -1
index b3a520959b51..247fa8746fe5 100644
@@ -16,7 +16,7 @@
 #include <linux/stop_machine.h>
 #include <linux/sysfs.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/cacheinfo.h>
 #include <asm/cpufeature.h>
 #include <asm/mtrr.h>
arch/x86/kernel/cpu/mce/inject.c +1 -1
index 06e3cf7229ce..bb060f8326ef 100644
@@ -24,7 +24,7 @@
 #include <linux/pci.h>
 #include <linux/uaccess.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/apic.h>
 #include <asm/irq_vectors.h>
 #include <asm/mce.h>
arch/x86/mm/amdtopology.c +1 -1
index 628833afee37..f980b0eb0105 100644
@@ -25,7 +25,7 @@
 #include <asm/numa.h>
 #include <asm/mpspec.h>
 #include <asm/apic.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 static unsigned char __initdata nodeids[8];
 
arch/x86/mm/numa.c +1 -1
index 64e5cdb2460a..fed02d1073c7 100644
@@ -18,7 +18,7 @@
 #include <asm/e820/api.h>
 #include <asm/proto.h>
 #include <asm/dma.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 #include "numa_internal.h"
 
arch/x86/pci/amd_bus.c +1 -1
index 631512f7ec85..95ae1971a5f1 100644
@@ -5,7 +5,7 @@
 #include <linux/cpu.h>
 #include <linux/range.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/pci_x86.h>
 
 #include <asm/pci-direct.h>
drivers/char/agp/amd64-agp.c +1 -1
index 8e41731d3642..bf490967241a 100644
@@ -16,7 +16,7 @@
 #include <linux/mmzone.h>
 #include <asm/page.h>		/* PAGE_SIZE */
 #include <asm/e820/api.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/gart.h>
 #include "agp.h"
 
drivers/edac/amd64_edac.c +1 -1
index 90f0eb7cc5b9..417940f455d3 100644
@@ -2,7 +2,7 @@
 #include <linux/ras.h>
 #include <linux/string_choices.h>
 #include "amd64_edac.h"
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/amd_node.h>
 
 static struct edac_pci_ctl_info *pci_ctl;
drivers/platform/x86/amd/pmc/mp1_stb.c +1 -1
index c005f00988f7..3b9b9f30faa3 100644
@@ -11,7 +11,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
drivers/pnp/quirks.c +1 -1
index 6085a1471de2..6e1d4bfd28ac 100644
@@ -290,7 +290,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
 
 #ifdef CONFIG_AMD_NB
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 static void quirk_amd_mmconfig_area(struct pnp_dev *dev)
 {
drivers/ras/amd/atl/internal.h +1 -1
index f9be26d25348..c63fee30cc18 100644
@@ -17,7 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/ras.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/amd_node.h>
 
 #include "reg_fields.h"
Signature · 1 line
2.45.2
merge bot Applied
#6 lore raw

[tip: x86/merge] x86/platform/amd: Move the <asm/amd_nb.h> header to <asm/amd/nb.h>

The following commit has been merged into the x86/merge branch of tip:

The following commit has been merged into the x86/merge branch of tip:

Commit-ID:     bcbb65559532891148d990527e9df6b8fc98e98d
Gitweb:        https://git.kernel.org/tip/bcbb65559532891148d990527e9df6b8fc98e98d
Author:        Ingo Molnar <[email protected]>
AuthorDate:    Mon, 14 Apr 2025 09:32:04 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Mon, 14 Apr 2025 09:34:14 +02:00

x86/platform/amd: Move the <asm/amd_nb.h> header to <asm/amd/nb.h>

Collect AMD specific platform header files in <asm/amd/*.h>.

---
 arch/x86/include/asm/amd/nb.h           | 77 ++++++++++++++++++++++++-
 arch/x86/include/asm/amd_nb.h           | 77 +------------------------
 arch/x86/kernel/amd_gart_64.c           |  2 +-
 arch/x86/kernel/amd_nb.c                |  2 +-
 arch/x86/kernel/aperture_64.c           |  2 +-
 arch/x86/kernel/cpu/amd_cache_disable.c |  2 +-
 arch/x86/kernel/cpu/cacheinfo.c         |  2 +-
 arch/x86/kernel/cpu/mce/inject.c        |  2 +-
 arch/x86/mm/amdtopology.c               |  2 +-
 arch/x86/mm/numa.c                      |  2 +-
 arch/x86/pci/amd_bus.c                  |  2 +-
 drivers/char/agp/amd64-agp.c            |  2 +-
 drivers/edac/amd64_edac.c               |  2 +-
 drivers/platform/x86/amd/pmc/mp1_stb.c  |  2 +-
 drivers/pnp/quirks.c                    |  2 +-
 drivers/ras/amd/atl/internal.h          |  2 +-
 16 files changed, 91 insertions(+), 91 deletions(-)
 create mode 100644 arch/x86/include/asm/amd/nb.h
 delete mode 100644 arch/x86/include/asm/amd_nb.h
arch/x86/include/asm/amd/nb.h new file +77 -0
new file mode 100644
index 0000000..adfa085
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_AMD_NB_H
+#define _ASM_X86_AMD_NB_H
+
+#include <linux/ioport.h>
+#include <linux/pci.h>
+#include <asm/amd_node.h>
+
+struct amd_nb_bus_dev_range {
+	u8 bus;
+	u8 dev_base;
+	u8 dev_limit;
+};
+
+extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
+
+extern bool early_is_amd_nb(u32 value);
+extern struct resource *amd_get_mmconfig_range(struct resource *res);
+extern void amd_flush_garts(void);
+extern int amd_numa_init(void);
+extern int amd_get_subcaches(int);
+extern int amd_set_subcaches(int, unsigned long);
+
+struct amd_l3_cache {
+	unsigned indices;
+	u8	 subcaches[4];
+};
+
+struct amd_northbridge {
+	struct pci_dev *misc;
+	struct pci_dev *link;
+	struct amd_l3_cache l3_cache;
+};
+
+struct amd_northbridge_info {
+	u16 num;
+	u64 flags;
+	struct amd_northbridge *nb;
+};
+
+#define AMD_NB_GART			BIT(0)
+#define AMD_NB_L3_INDEX_DISABLE		BIT(1)
+#define AMD_NB_L3_PARTITIONING		BIT(2)
+
+#ifdef CONFIG_AMD_NB
+
+u16 amd_nb_num(void);
+bool amd_nb_has_feature(unsigned int feature);
+struct amd_northbridge *node_to_amd_nb(int node);
+
+static inline bool amd_gart_present(void)
+{
+	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
+		return false;
+
+	/* GART present only on Fam15h, up to model 0fh */
+	if (boot_cpu_data.x86 == 0xf || boot_cpu_data.x86 == 0x10 ||
+	    (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model < 0x10))
+		return true;
+
+	return false;
+}
+
+#else
+
+#define amd_nb_num(x)		0
+#define amd_nb_has_feature(x)	false
+static inline struct amd_northbridge *node_to_amd_nb(int node)
+{
+	return NULL;
+}
+#define amd_gart_present(x)	false
+
+#endif
+
+
+#endif /* _ASM_X86_AMD_NB_H */
arch/x86/include/asm/amd_nb.h deleted +0 -77

77 lines not on this page · raw message

arch/x86/kernel/amd_gart_64.c +1 -1
index c884dec..3485d41 100644
@@ -39,7 +39,7 @@
 #include <asm/gart.h>
 #include <asm/set_memory.h>
 #include <asm/dma.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/x86_init.h>
 
 static unsigned long iommu_bus_base;	/* GART remapping area (physical) */
arch/x86/kernel/amd_nb.c +1 -1
index 5a8cc48..ffaad17 100644
@@ -14,7 +14,7 @@
 #include <linux/spinlock.h>
 #include <linux/pci_ids.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/cpuid.h>
 
 static u32 *flush_words;
arch/x86/kernel/aperture_64.c +1 -1
index 89c0c8a..7693211 100644
@@ -29,7 +29,7 @@
 #include <asm/gart.h>
 #include <asm/pci-direct.h>
 #include <asm/dma.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/x86_init.h>
 #include <linux/crash_dump.h>
 
arch/x86/kernel/cpu/amd_cache_disable.c +1 -1
index d860ad3..8843b95 100644
@@ -9,7 +9,7 @@
 #include <linux/pci.h>
 #include <linux/sysfs.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 #include "cpu.h"
 
arch/x86/kernel/cpu/cacheinfo.c +1 -1
index cc7ae2b..f866d94 100644
@@ -13,7 +13,7 @@
 #include <linux/cpuhotplug.h>
 #include <linux/stop_machine.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/cacheinfo.h>
 #include <asm/cpufeature.h>
 #include <asm/cpuid.h>
arch/x86/kernel/cpu/mce/inject.c +1 -1
index 06e3cf7..bb060f8 100644
@@ -24,7 +24,7 @@
 #include <linux/pci.h>
 #include <linux/uaccess.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/apic.h>
 #include <asm/irq_vectors.h>
 #include <asm/mce.h>
arch/x86/mm/amdtopology.c +1 -1
index 628833a..f980b0e 100644
@@ -25,7 +25,7 @@
 #include <asm/numa.h>
 #include <asm/mpspec.h>
 #include <asm/apic.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 static unsigned char __initdata nodeids[8];
 
arch/x86/mm/numa.c +1 -1
index 64e5cdb..fed02d1 100644
@@ -18,7 +18,7 @@
 #include <asm/e820/api.h>
 #include <asm/proto.h>
 #include <asm/dma.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 #include "numa_internal.h"
 
arch/x86/pci/amd_bus.c +1 -1
index 631512f..95ae197 100644
@@ -5,7 +5,7 @@
 #include <linux/cpu.h>
 #include <linux/range.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/pci_x86.h>
 
 #include <asm/pci-direct.h>
drivers/char/agp/amd64-agp.c +1 -1
index 8e41731..bf49096 100644
@@ -16,7 +16,7 @@
 #include <linux/mmzone.h>
 #include <asm/page.h>		/* PAGE_SIZE */
 #include <asm/e820/api.h>
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/gart.h>
 #include "agp.h"
 
drivers/edac/amd64_edac.c +1 -1
index 90f0eb7..417940f 100644
@@ -2,7 +2,7 @@
 #include <linux/ras.h>
 #include <linux/string_choices.h>
 #include "amd64_edac.h"
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/amd_node.h>
 
 static struct edac_pci_ctl_info *pci_ctl;
drivers/platform/x86/amd/pmc/mp1_stb.c +1 -1
index c005f00..3b9b9f3 100644
@@ -11,7 +11,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
drivers/pnp/quirks.c +1 -1
index 6085a14..6e1d4bf 100644
@@ -290,7 +290,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
 
 #ifdef CONFIG_AMD_NB
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 
 static void quirk_amd_mmconfig_area(struct pnp_dev *dev)
 {
drivers/ras/amd/atl/internal.h +1 -1
index f9be26d..c63fee3 100644
@@ -17,7 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/ras.h>
 
-#include <asm/amd_nb.h>
+#include <asm/amd/nb.h>
 #include <asm/amd_node.h>
 
 #include "reg_fields.h"
#7 lore raw

PATCH 4/6 x86/platform/amd: Move the <asm/amd_hsmp.h> header to <asm/amd/hsmp.h>

In reply to Ingo Molnar

Collect AMD specific platform header files in <asm/amd/*.h>.

Cc Borislav Petkov <[email protected]>
Cc Mario Limonciello <[email protected]>
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Carlos Bilbao <[email protected]>
---
 Documentation/userspace-api/ioctl/ioctl-number.rst | 2 +-
 MAINTAINERS                                        | 4 ++--
 arch/x86/include/asm/{amd_hsmp.h => amd/hsmp.h}    | 2 +-
 drivers/platform/x86/amd/hsmp/acpi.c               | 2 +-
 drivers/platform/x86/amd/hsmp/hsmp.c               | 2 +-
 drivers/platform/x86/amd/hsmp/plat.c               | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
Documentation/userspace-api/ioctl/ioctl-number.rst +1 -1
index 7a1409ecc238..1142234335ab 100644
@@ -395,7 +395,7 @@ Code  Seq#    Include File                                           Comments
                                                                      <mailto:[email protected]>
 0xF6  all                                                            LTTng Linux Trace Toolkit Next Generation
                                                                      <mailto:[email protected]>
-0xF8  all    arch/x86/include/uapi/asm/amd_hsmp.h                    AMD HSMP EPYC system management interface driver
+0xF8  all    arch/x86/include/uapi/asm/amd/hsmp.h                    AMD HSMP EPYC system management interface driver
                                                                      <mailto:[email protected]>
 0xFD  all    linux/dm-ioctl.h
 0xFE  all    linux/isst_if.h
MAINTAINERS +2 -2
index 96b827049501..ce2942d0fef4 100644
@@ -1097,8 +1097,8 @@ R:	Carlos Bilbao <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/arch/x86/amd_hsmp.rst
-F:	arch/x86/include/asm/amd_hsmp.h
-F:	arch/x86/include/uapi/asm/amd_hsmp.h
+F:	arch/x86/include/asm/amd/hsmp.h
+F:	arch/x86/include/uapi/asm/amd/hsmp.h
 F:	drivers/platform/x86/amd/hsmp/
 
 AMD IOMMU (AMD-VI)
arch/x86/include/asm/amd/hsmp.h renamed from arch/x86/include/asm/amd_hsmp.h +1 -1
similarity index 91%
rename from arch/x86/include/asm/amd_hsmp.h
rename to arch/x86/include/asm/amd/hsmp.h
index 03c2ce3edaf5..f3253d27bf49 100644
@@ -3,7 +3,7 @@
 #ifndef _ASM_X86_AMD_HSMP_H_
 #define _ASM_X86_AMD_HSMP_H_
 
-#include <uapi/asm/amd_hsmp.h>
+#include <uapi/asm/amd/hsmp.h>
 
 #if IS_ENABLED(CONFIG_AMD_HSMP)
 int hsmp_send_message(struct hsmp_message *msg);
drivers/platform/x86/amd/hsmp/acpi.c +1 -1
index c1eccb3c80c5..3c7acb90c3ab 100644
@@ -9,7 +9,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <asm/amd_hsmp.h>
+#include <asm/amd/hsmp.h>
 
 #include <linux/acpi.h>
 #include <linux/device.h>
drivers/platform/x86/amd/hsmp/hsmp.c +1 -1
index a3ac09a90de4..e262e8a97b45 100644
@@ -7,7 +7,7 @@
  * This file provides a device implementation for HSMP interface
  */
 
-#include <asm/amd_hsmp.h>
+#include <asm/amd/hsmp.h>
 
 #include <linux/acpi.h>
 #include <linux/delay.h>
drivers/platform/x86/amd/hsmp/plat.c +1 -1
index b9782a078dbd..0eb73fcb9806 100644
@@ -9,7 +9,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <asm/amd_hsmp.h>
+#include <asm/amd/hsmp.h>
 
 #include <linux/build_bug.h>
 #include <linux/device.h>
Signature · 1 line
2.45.2
merge bot Applied
#8 lore raw

[tip: x86/merge] x86/platform/amd: Move the <asm/amd_hsmp.h> header to <asm/amd/hsmp.h>

The following commit has been merged into the x86/merge branch of tip:

The following commit has been merged into the x86/merge branch of tip:

Commit-ID:     d96c78684166bc0e7997d12d845882cb5824eed3
Gitweb:        https://git.kernel.org/tip/d96c78684166bc0e7997d12d845882cb5824eed3
Author:        Ingo Molnar <[email protected]>
AuthorDate:    Sun, 13 Apr 2025 10:41:42 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Mon, 14 Apr 2025 09:34:17 +02:00

x86/platform/amd: Move the <asm/amd_hsmp.h> header to <asm/amd/hsmp.h>

Collect AMD specific platform header files in <asm/amd/*.h>.

---
 MAINTAINERS                          |  2 +-
 arch/x86/include/asm/amd/hsmp.h      | 16 ++++++++++++++++
 arch/x86/include/asm/amd_hsmp.h      | 16 ----------------
 drivers/platform/x86/amd/hsmp/acpi.c |  2 +-
 drivers/platform/x86/amd/hsmp/hsmp.c |  2 +-
 drivers/platform/x86/amd/hsmp/plat.c |  2 +-
 6 files changed, 20 insertions(+), 20 deletions(-)
 create mode 100644 arch/x86/include/asm/amd/hsmp.h
 delete mode 100644 arch/x86/include/asm/amd_hsmp.h
MAINTAINERS +1 -1
index 61b9cc0..d4ea6d7 100644
@@ -1097,7 +1097,7 @@ R:	Carlos Bilbao <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/arch/x86/amd_hsmp.rst
-F:	arch/x86/include/asm/amd_hsmp.h
+F:	arch/x86/include/asm/amd/hsmp.h
 F:	arch/x86/include/uapi/asm/amd_hsmp.h
 F:	drivers/platform/x86/amd/hsmp/
 
arch/x86/include/asm/amd/hsmp.h new file +16 -0
new file mode 100644
index 0000000..03c2ce3
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+#ifndef _ASM_X86_AMD_HSMP_H_
+#define _ASM_X86_AMD_HSMP_H_
+
+#include <uapi/asm/amd_hsmp.h>
+
+#if IS_ENABLED(CONFIG_AMD_HSMP)
+int hsmp_send_message(struct hsmp_message *msg);
+#else
+static inline int hsmp_send_message(struct hsmp_message *msg)
+{
+	return -ENODEV;
+}
+#endif
+#endif /*_ASM_X86_AMD_HSMP_H_*/
arch/x86/include/asm/amd_hsmp.h deleted +0 -16
deleted file mode 100644
index 03c2ce3..0000000
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-
-#ifndef _ASM_X86_AMD_HSMP_H_
-#define _ASM_X86_AMD_HSMP_H_
-
-#include <uapi/asm/amd_hsmp.h>
-
-#if IS_ENABLED(CONFIG_AMD_HSMP)
-int hsmp_send_message(struct hsmp_message *msg);
-#else
-static inline int hsmp_send_message(struct hsmp_message *msg)
-{
-	return -ENODEV;
-}
-#endif
-#endif /*_ASM_X86_AMD_HSMP_H_*/
drivers/platform/x86/amd/hsmp/acpi.c +1 -1
index c1eccb3..3c7acb9 100644
@@ -9,7 +9,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <asm/amd_hsmp.h>
+#include <asm/amd/hsmp.h>
 
 #include <linux/acpi.h>
 #include <linux/device.h>
drivers/platform/x86/amd/hsmp/hsmp.c +1 -1
index a3ac09a..e262e8a 100644
@@ -7,7 +7,7 @@
  * This file provides a device implementation for HSMP interface
  */
 
-#include <asm/amd_hsmp.h>
+#include <asm/amd/hsmp.h>
 
 #include <linux/acpi.h>
 #include <linux/delay.h>
drivers/platform/x86/amd/hsmp/plat.c +1 -1
index b9782a0..0eb73fc 100644
@@ -9,7 +9,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <asm/amd_hsmp.h>
+#include <asm/amd/hsmp.h>
 
 #include <linux/build_bug.h>
 #include <linux/device.h>
#9 lore raw

PATCH 5/6 x86/platform/amd: Clean up the <asm/amd/hsmp.h> header guards a bit

In reply to Ingo Molnar

- There's no need for a newline after the SPDX line
- But there's a need for one before the closing header guard.

Collect AMD specific platform header files in <asm/amd/*.h>.

Cc Borislav Petkov <[email protected]>
Cc Mario Limonciello <[email protected]>
Cc Naveen Krishna Chatradhi <[email protected]>
Cc Carlos Bilbao <[email protected]>
---
 arch/x86/include/asm/amd/hsmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/amd/hsmp.h +1 -1
index f3253d27bf49..7674ad9c5cbf 100644
@@ -1,5 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-
 #ifndef _ASM_X86_AMD_HSMP_H_
 #define _ASM_X86_AMD_HSMP_H_
 
@@ -13,4 +12,5 @@ static inline int hsmp_send_message(struct hsmp_message *msg)
 	return -ENODEV;
 }
 #endif
+
 #endif /*_ASM_X86_AMD_HSMP_H_*/
Signature · 1 line
2.45.2
merge bot Applied
#10 lore raw

[tip: x86/merge] x86/platform/amd: Clean up the <asm/amd/hsmp.h> header guards a bit

The following commit has been merged into the x86/merge branch of tip:

The following commit has been merged into the x86/merge branch of tip:

Commit-ID:     5bb144e52c666dc0082a90662a5406133415cacc
Gitweb:        https://git.kernel.org/tip/5bb144e52c666dc0082a90662a5406133415cacc
Author:        Ingo Molnar <[email protected]>
AuthorDate:    Sun, 13 Apr 2025 10:41:43 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Mon, 14 Apr 2025 09:34:17 +02:00

x86/platform/amd: Clean up the <asm/amd/hsmp.h> header guards a bit

- There's no need for a newline after the SPDX line
- But there's a need for one before the closing header guard.

Collect AMD specific platform header files in <asm/amd/*.h>.

---
 arch/x86/include/asm/amd/hsmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/amd/hsmp.h +1 -1
index 03c2ce3..2137f62 100644
@@ -1,5 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-
 #ifndef _ASM_X86_AMD_HSMP_H_
 #define _ASM_X86_AMD_HSMP_H_
 
@@ -13,4 +12,5 @@ static inline int hsmp_send_message(struct hsmp_message *msg)
 	return -ENODEV;
 }
 #endif
+
 #endif /*_ASM_X86_AMD_HSMP_H_*/
#11 lore raw

PATCH 6/6 x86/platform/amd: Move the <asm/amd_node.h> header to <asm/amd/node.h>

In reply to Ingo Molnar

Collect AMD specific platform header files in <asm/amd/*.h>.

Cc Borislav Petkov <[email protected]>
Cc Mario Limonciello <[email protected]>
---
 MAINTAINERS                                     | 2 +-
 arch/x86/include/asm/amd/nb.h                   | 2 +-
 arch/x86/include/asm/{amd_node.h => amd/node.h} | 0
 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 +-
 16 files changed, 15 insertions(+), 15 deletions(-)
MAINTAINERS +1 -1
index ce2942d0fef4..684b62c42014 100644
@@ -1142,7 +1142,7 @@ M:	Mario Limonciello <[email protected]>
 M:	Yazen Ghannam <[email protected]>
 L:	[email protected]
 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
arch/x86/include/asm/amd/nb.h +1 -1
index adfa0854cf2d..ddb5108cf46c 100644
@@ -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;
arch/x86/include/asm/amd/node.h renamed from arch/x86/include/asm/amd_node.h +0 -0
similarity index 100%
rename from arch/x86/include/asm/amd_node.h
rename to arch/x86/include/asm/amd/node.h
arch/x86/kernel/amd_node.c +1 -1
index b670fa85c61b..a40176b62eb5 100644
@@ -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
arch/x86/pci/fixup.c +1 -1
index efefeb82ab61..36336299596b 100644
@@ -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>
 
drivers/edac/amd64_edac.c +1 -1
index 417940f455d3..25180165ca8e 100644
@@ -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;
 
drivers/hwmon/k10temp.c +1 -1
index 3685906cc57c..472bcf6092f6 100644
@@ -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");
drivers/platform/x86/amd/hsmp/acpi.c +1 -1
index 3c7acb90c3ab..02e22c1f3a1d 100644
@@ -23,7 +23,7 @@
 
 #include <uapi/asm-generic/errno-base.h>
 
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
 
 #include "hsmp.h"
 
drivers/platform/x86/amd/hsmp/plat.c +1 -1
index 0eb73fcb9806..c9a1b1ed4224 100644
@@ -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"
 
drivers/platform/x86/amd/pmc/pmc.c +1 -1
index d789d6cab794..e5c4e6be37f7 100644
@@ -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"
 
drivers/platform/x86/amd/pmf/core.c +1 -1
index a2cb2d5544f5..cecadae3f3bf 100644
@@ -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 */
drivers/ras/amd/atl/internal.h +1 -1
index c63fee30cc18..05bbee20eeaf 100644
@@ -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"
 
sound/soc/amd/acp/acp-rembrandt.c +1 -1
index 746b6ed72029..c30a7b59fbff 100644
@@ -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"
sound/soc/amd/acp/acp63.c +1 -1
index 52d895e624c7..0ddde14da7d5 100644
@@ -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"
sound/soc/amd/acp/acp70.c +1 -1
index 6d5f5ade075c..7f4a25b46576 100644
@@ -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"
 
sound/soc/sof/amd/acp.c +1 -1
index 7c6d647fa253..7e6f10726ff0 100644
@@ -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"
Signature · 1 line
2.45.2
merge bot Applied
#12 lore raw

[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:

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 <[email protected]>
AuthorDate:    Sun, 13 Apr 2025 10:41:44 +02:00
Committer:     Ingo Molnar <[email protected]>
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>.

---
 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
MAINTAINERS +1 -1
index d4ea6d7..14bbb43 100644
@@ -1142,7 +1142,7 @@ M:	Mario Limonciello <[email protected]>
 M:	Yazen Ghannam <[email protected]>
 L:	[email protected]
 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
arch/x86/include/asm/amd/nb.h +1 -1
index adfa085..ddb5108 100644
@@ -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;
arch/x86/include/asm/amd/node.h new file +60 -0

60 lines not on this page · raw message

arch/x86/include/asm/amd_node.h deleted +0 -60

60 lines not on this page · raw message

arch/x86/kernel/amd_node.c +1 -1
index b670fa8..a40176b 100644
@@ -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
arch/x86/pci/fixup.c +1 -1
index efefeb8..3633629 100644
@@ -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>
 
drivers/edac/amd64_edac.c +1 -1
index 417940f..2518016 100644
@@ -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;
 
drivers/hwmon/k10temp.c +1 -1
index 3685906..472bcf6 100644
@@ -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");
drivers/platform/x86/amd/hsmp/acpi.c +1 -1
index 3c7acb9..02e22c1 100644
@@ -23,7 +23,7 @@
 
 #include <uapi/asm-generic/errno-base.h>
 
-#include <asm/amd_node.h>
+#include <asm/amd/node.h>
 
 #include "hsmp.h"
 
drivers/platform/x86/amd/hsmp/plat.c +1 -1
index 0eb73fc..c9a1b1e 100644
@@ -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"
 
drivers/platform/x86/amd/pmc/pmc.c +1 -1
index d789d6c..e5c4e6b 100644
@@ -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"
 
drivers/platform/x86/amd/pmf/core.c +1 -1
index a2cb2d5..cecadae 100644
@@ -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 */
drivers/ras/amd/atl/internal.h +1 -1
index c63fee3..05bbee2 100644
@@ -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"
 
sound/soc/amd/acp/acp-rembrandt.c +1 -1
index 746b6ed..c30a7b5 100644
@@ -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"
sound/soc/amd/acp/acp63.c +1 -1
index 52d895e..0ddde14 100644
@@ -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"
sound/soc/amd/acp/acp70.c +1 -1
index 6d5f5ad..7f4a25b 100644
@@ -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"
 
sound/soc/sof/amd/acp.c +1 -1
index 7c6d647..7e6f107 100644
@@ -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"
maintainer
#13 lore raw
In reply to Ingo Molnar
Quoted 54 lines · Ingo Molnar

Also clean up some details while at it.

The Git tree of these patches can also be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/platform

Thanks,

Ingo

===============>
Ingo Molnar (6):
x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h> x86/platform/amd: Add standard header guards to <asm/amd/ibs.h> x86/platform/amd: Move the <asm/amd_nb.h> header to <asm/amd/nb.h> x86/platform/amd: Move the <asm/amd_hsmp.h> header to <asm/amd/hsmp.h> x86/platform/amd: Clean up the <asm/amd/hsmp.h> header guards a bit x86/platform/amd: Move the <asm/amd_node.h> header to <asm/amd/node.h>

Documentation/userspace-api/ioctl/ioctl-number.rst | 2 +-
MAINTAINERS                                        | 6 +++---
arch/x86/events/amd/ibs.c                          | 2 +-
arch/x86/include/asm/{amd_hsmp.h => amd/hsmp.h}    | 4 ++--
arch/x86/include/asm/{amd-ibs.h => amd/ibs.h}      | 5 +++++
arch/x86/include/asm/{amd_nb.h => amd/nb.h}        | 2 +-
arch/x86/include/asm/{amd_node.h => amd/node.h}    | 0
arch/x86/kernel/amd_gart_64.c                      | 2 +-
arch/x86/kernel/amd_nb.c                           | 2 +-
arch/x86/kernel/amd_node.c                         | 2 +-
arch/x86/kernel/aperture_64.c                      | 2 +-
arch/x86/kernel/cpu/cacheinfo.c                    | 2 +-
arch/x86/kernel/cpu/mce/inject.c                   | 2 +-
arch/x86/mm/amdtopology.c                          | 2 +-
arch/x86/mm/numa.c                                 | 2 +-
arch/x86/pci/amd_bus.c                             | 2 +-
arch/x86/pci/fixup.c                               | 2 +-
drivers/char/agp/amd64-agp.c                       | 2 +-
drivers/edac/amd64_edac.c                          | 4 ++--
drivers/hwmon/k10temp.c                            | 2 +-
drivers/platform/x86/amd/hsmp/acpi.c               | 4 ++--
drivers/platform/x86/amd/hsmp/hsmp.c               | 2 +-
drivers/platform/x86/amd/hsmp/plat.c               | 4 ++--
drivers/platform/x86/amd/pmc/mp1_stb.c             | 2 +-
drivers/platform/x86/amd/pmc/pmc.c                 | 2 +-
drivers/platform/x86/amd/pmf/core.c                | 2 +-
drivers/pnp/quirks.c                               | 2 +-
drivers/ras/amd/atl/internal.h                     | 4 ++--
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 +-
tools/perf/check-headers.sh                        | 2 +-
tools/perf/util/amd-sample-raw.c                   | 2 +-
34 files changed, 44 insertions(+), 39 deletions(-)
Quoted 4 lines

rename arch/x86/include/asm/{amd_hsmp.h => amd/hsmp.h} (91%) rename arch/x86/include/asm/{amd-ibs.h => amd/ibs.h} (98%) rename arch/x86/include/asm/{amd_nb.h => amd/nb.h} (98%) rename arch/x86/include/asm/{amd_node.h => amd/node.h} (100%)

Cool, /me like.

Thx.

Signature · 1 line
Sent from a small device: formatting sucks and brevity is inevitable.