Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2023 18:32:59 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 57716e7361ae - main - sys/modules: fix bogus OPT_ACPI tests
Message-ID:  <202303011832.321IWxB3099803@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=57716e7361aea3fa578a0a8f2b5a65154d4819d4

commit 57716e7361aea3fa578a0a8f2b5a65154d4819d4
Author:     Nathaniel Wesley Filardo <nfilardo@microsoft.com>
AuthorDate: 2023-03-01 18:32:08 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-03-01 18:32:08 +0000

    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
---
 sys/modules/dpaa2/Makefile | 4 +---
 sys/modules/hwpmc/Makefile | 6 ++----
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/sys/modules/dpaa2/Makefile b/sys/modules/dpaa2/Makefile
index eeb9e7f340bf..72e8e46143c8 100644
--- a/sys/modules/dpaa2/Makefile
+++ b/sys/modules/dpaa2/Makefile
@@ -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 \
diff --git a/sys/modules/hwpmc/Makefile b/sys/modules/hwpmc/Makefile
index a72b3cf8d2fd..5e509c5499f3 100644
--- a/sys/modules/hwpmc/Makefile
+++ b/sys/modules/hwpmc/Makefile
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303011832.321IWxB3099803>