git: cac0eab342c7 - main - sys/modules/hwpmc/Makefile: tidy up
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Jul 2026 15:01:24 UTC
The branch main has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=cac0eab342c702dc73e566e2038208c0bbc8fbd3
commit cac0eab342c702dc73e566e2038208c0bbc8fbd3
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2026-07-21 14:51:55 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-07-28 14:48:50 +0000
sys/modules/hwpmc/Makefile: tidy up
This module has several source files, with many conditional on the
platform architecture. Make it easier to read, and better for future
diffs against these lists.
- Convert to one SRC per line
- Simplify arm/armv7 condition
- Remove now-empty header comment
- Minor formatting
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
---
sys/modules/hwpmc/Makefile | 73 ++++++++++++++++++++++++++--------------------
1 file changed, 42 insertions(+), 31 deletions(-)
diff --git a/sys/modules/hwpmc/Makefile b/sys/modules/hwpmc/Makefile
index d13f52009600..52d64fc9ec42 100644
--- a/sys/modules/hwpmc/Makefile
+++ b/sys/modules/hwpmc/Makefile
@@ -1,41 +1,52 @@
-#
-#
-
.PATH: ${SRCTOP}/sys/dev/hwpmc
.PATH: ${SRCTOP}/sys/arm64/arm64
KMOD= hwpmc
-SRCS= bus_if.h device_if.h hwpmc_mod.c hwpmc_logging.c hwpmc_soft.c
-SRCS+= vnode_if.h
+SRCS= hwpmc_mod.c \
+ hwpmc_logging.c \
+ hwpmc_soft.c
+SRCS+= bus_if.h \
+ device_if.h \
+ vnode_if.h
.if ${MACHINE_CPUARCH} == "aarch64"
-SRCS+= hwpmc_arm64.c hwpmc_arm64_md.c
-SRCS.DEV_ACPI= cmn600.c hwpmc_cmn600.c
-SRCS.DEV_ACPI+= hwpmc_dmc620.c pmu_dmc620.c
-.endif
-
-.if ${MACHINE_CPUARCH} == "amd64"
-SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_ibs.c hwpmc_intel.c hwpmc_tsc.c
-SRCS+= hwpmc_x86.c hwpmc_uncore.c
-.endif
-
-.if ${MACHINE_CPUARCH} == "arm"
-SRCS+= hwpmc_arm.c
-.endif
-
-.if ${MACHINE_ARCH} == "armv7"
-SRCS+= hwpmc_armv7.c
-.endif
-
-.if ${MACHINE_CPUARCH} == "i386"
-SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_ibs.c hwpmc_intel.c
-SRCS+= hwpmc_tsc.c hwpmc_x86.c hwpmc_uncore.c
-.endif
-
-.if ${MACHINE_CPUARCH} == "powerpc"
-SRCS+= hwpmc_powerpc.c hwpmc_e500.c hwpmc_mpc7xxx.c hwpmc_ppc970.c \
- hwpmc_power8.c
+SRCS+= hwpmc_arm64.c \
+ hwpmc_arm64_md.c
+SRCS.DEV_ACPI= cmn600.c \
+ hwpmc_cmn600.c \
+ hwpmc_dmc620.c \
+ pmu_dmc620.c
+SRCS+= opt_acpi.h
+
+.elif ${MACHINE_CPUARCH} == "amd64"
+SRCS+= hwpmc_amd.c \
+ hwpmc_core.c \
+ hwpmc_ibs.c \
+ hwpmc_intel.c \
+ hwpmc_tsc.c \
+ hwpmc_uncore.c \
+ hwpmc_x86.c
+
+.elif ${MACHINE_CPUARCH} == "arm"
+SRCS+= hwpmc_arm.c \
+ hwpmc_armv7.c \
+
+.elif ${MACHINE_CPUARCH} == "i386"
+SRCS+= hwpmc_amd.c \
+ hwpmc_core.c \
+ hwpmc_ibs.c \
+ hwpmc_intel.c \
+ hwpmc_tsc.c \
+ hwpmc_uncore.c \
+ hwpmc_x86.c
+
+.elif ${MACHINE_CPUARCH} == "powerpc"
+SRCS+= hwpmc_e500.c \
+ hwpmc_mpc7xxx.c \
+ hwpmc_ppc970.c \
+ hwpmc_power8.c \
+ hwpmc_powerpc.c
.endif
.include <bsd.kmod.mk>