sys/modules: fix bogus OPT_ACPI tests

ACPI is not handled specially by sys/conf/kern.opts.mk (unlike a few
options), so we should fall back on the generic behavior of
sys/conf/config.mk, which pulls from all the generated opt*.h files,
including opt_acpi.h, which will cause DEV_ACPI to be included in
KERN_OPTS.  Then the generic machinery in sys/conf/kmod.mk will cause
SRCS.DEV_ACPI to be included in SRCS when appropriate.

Reviewed by:	jhb, imp
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D38737
This commit is contained in:
Nathaniel Wesley Filardo 2023-03-01 10:32:08 -08:00 committed by John Baldwin
parent d90188eff5
commit 57716e7361
2 changed files with 3 additions and 7 deletions

View File

@ -21,12 +21,10 @@ SRCS+= bus_if.h device_if.h miibus_if.h
SRCS+= pcib_if.h pci_if.h
SRCS+= opt_acpi.h opt_platform.h
.if !empty(OPT_ACPI)
SRCS+= dpaa2_mc_acpi.c \
SRCS.DEV_ACPI= dpaa2_mc_acpi.c \
memac_mdio_acpi.c \
acpi_if.h \
acpi_bus_if.h
.endif
.if !empty(OPT_FDT)
SRCS+= dpaa2_mc_fdt.c \

View File

@ -12,10 +12,8 @@ SRCS+= vnode_if.h
.if ${MACHINE_CPUARCH} == "aarch64"
SRCS+= hwpmc_arm64.c hwpmc_arm64_md.c
.if !empty(OPT_ACPI)
SRCS+= cmn600.c hwpmc_cmn600.c
SRCS+= hwpmc_dmc620.c pmu_dmc620.c
.endif
SRCS.DEV_ACPI= cmn600.c hwpmc_cmn600.c
SRCS.DEV_ACPI+= hwpmc_dmc620.c pmu_dmc620.c
.endif
.if ${MACHINE_CPUARCH} == "amd64"