Fix loading the hwpmc module when ACPI is enabled
authorAndrew Turner <andrew@FreeBSD.org>
Thu, 22 Dec 2022 10:10:46 +0000 (10:10 +0000)
committerAndrew Turner <andrew@FreeBSD.org>
Thu, 22 Dec 2022 10:36:18 +0000 (10:36 +0000)
commit751d88119fdc1dff71d1390c7768942a9b857bc6
tree9a6a10501d50e733037242567973e4b1cdf22df9
parentc1a2798faa3d8a76a7b9023d859629b5c0532d9b
Fix loading the hwpmc module when ACPI is enabled

In 0a9a4d2cd6092 a check for OPT_ACPI was added to the hwpmc Makefile
to fix loading the module in a kernel where ACPI has been disabled.
This broke loading the module when ACPI was enabled in the build as
OPT_ACPI isn't a Makefile macro so was always disabled.

Move this check to the C files where the DEV_ACPI macro does exist.

Reviewed by: gnn
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D37773
sys/arm64/arm64/cmn600.c
sys/dev/hwpmc/hwpmc_cmn600.c
sys/dev/hwpmc/pmu_dmc620.c
sys/modules/hwpmc/Makefile