git: d90188eff5c5 - main - hwpmc: Don't wrap entire files in #ifdef DEV_ACPI.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Mar 2023 18:32:58 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d90188eff5c5e67d6d33926d6bb4c7b25e37cc4a commit d90188eff5c5e67d6d33926d6bb4c7b25e37cc4a Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-03-01 18:31:53 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-03-01 18:31:53 +0000 hwpmc: Don't wrap entire files in #ifdef DEV_ACPI. A subsequent commit will instead use existing infrastructure to exclude the files from hwpmc.ko for non-ACPI builds. Note that the original commit left the files as optional in sys/conf/files.arm64. This reverts commit 751d88119fdc1dff71d1390c7768942a9b857bc6. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D38736 --- sys/arm64/arm64/cmn600.c | 7 +------ sys/dev/hwpmc/hwpmc_cmn600.c | 9 +-------- sys/dev/hwpmc/pmu_dmc620.c | 6 ------ sys/modules/hwpmc/Makefile | 2 ++ 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/sys/arm64/arm64/cmn600.c b/sys/arm64/arm64/cmn600.c index c01abc444c8e..e71afa7c6a6c 100644 --- a/sys/arm64/arm64/cmn600.c +++ b/sys/arm64/arm64/cmn600.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2021-2022 Arm Ltd + * Copyright (c) 2021 ARM Ltd * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" -/* - * This depends on ACPI, but is built unconditionally in the hwpmc module. - */ -#ifdef DEV_ACPI #include <sys/param.h> #include <sys/bus.h> #include <sys/kernel.h> @@ -835,4 +831,3 @@ static driver_t cmn600_acpi_driver = { DRIVER_MODULE(cmn600, acpi, cmn600_acpi_driver, 0, 0); MODULE_VERSION(cmn600, 1); -#endif /* DEV_ACPI */ diff --git a/sys/dev/hwpmc/hwpmc_cmn600.c b/sys/dev/hwpmc/hwpmc_cmn600.c index 700a680514a9..fe98fdf969fc 100644 --- a/sys/dev/hwpmc/hwpmc_cmn600.c +++ b/sys/dev/hwpmc/hwpmc_cmn600.c @@ -3,7 +3,7 @@ * * Copyright (c) 2003-2008 Joseph Koshy * Copyright (c) 2007 The FreeBSD Foundation - * Copyright (c) 2021-2022 ARM Ltd + * Copyright (c) 2021 ARM Ltd * * Portions of this software were developed by A. Joseph Koshy under * sponsorship from the FreeBSD Foundation and Google, Inc. @@ -35,12 +35,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_acpi.h" - -/* - * This depends on ACPI, but is built unconditionally in the hwpmc module. - */ -#ifdef DEV_ACPI #include <sys/param.h> #include <sys/lock.h> #include <sys/malloc.h> @@ -830,4 +824,3 @@ pmc_cmn600_finalize(struct pmc_mdep *md) } MODULE_DEPEND(pmc, cmn600, 1, 1, 1); -#endif /* DEV_ACPI */ diff --git a/sys/dev/hwpmc/pmu_dmc620.c b/sys/dev/hwpmc/pmu_dmc620.c index 87efcc8b2b11..e8a9d83d4251 100644 --- a/sys/dev/hwpmc/pmu_dmc620.c +++ b/sys/dev/hwpmc/pmu_dmc620.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2021 Ampere Computing LLC - * Copyright (c) 2022 Arm Ltd * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,10 +33,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_acpi.h" -/* - * This depends on ACPI, but is built unconditionally in the hwpmc module. - */ -#ifdef DEV_ACPI #include <sys/param.h> #include <sys/bus.h> #include <sys/module.h> @@ -280,4 +275,3 @@ DRIVER_MODULE(pmu_dmc620, acpi, pmu_dmc620_acpi_driver, 0, 0); /* Reverse dependency. hwpmc needs DMC-620 on ARM64. */ MODULE_DEPEND(pmc, pmu_dmc620, 1, 1, 1); MODULE_VERSION(pmu_dmc620, 1); -#endif /* DEV_ACPI */ diff --git a/sys/modules/hwpmc/Makefile b/sys/modules/hwpmc/Makefile index 0db4c55e64f3..a72b3cf8d2fd 100644 --- a/sys/modules/hwpmc/Makefile +++ b/sys/modules/hwpmc/Makefile @@ -12,9 +12,11 @@ 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 +.endif .if ${MACHINE_CPUARCH} == "amd64" SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_tsc.c