freebsd-src/sys/dev/hwpmc
Mitchell Horne a133f64239 hwpmc: split out PMC_OP_PMCATTACH/PMC_OP_PMCDETACH
Begin splitting out the large chunks of functional logic from the
syscall handler into separate helper functions. This keeps it separate
from the syscall control-flow logic, resulting in better readability
overall. It also wins back a level of indentation.

For this and the similar changes to follow, try to keep copyin() and
copyout() calls outside of the helper functions. The changes are
intended to have no functional impact, but do address style issues.

Reviewed by:	jkoshy
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40291
2023-06-14 13:34:21 -03:00
..
hwpmc_amd.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_amd.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_arm.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_arm64.c hwpmc: pass pmc pointer to more class methods 2023-05-06 14:49:19 -03:00
hwpmc_arm64.h
hwpmc_arm64_md.c hwpmc: use kstack_contains() 2023-05-06 14:49:19 -03:00
hwpmc_armv7.c hwpmc: pass pmc pointer to more class methods 2023-05-06 14:49:19 -03:00
hwpmc_armv7.h
hwpmc_cmn600.c hwpmc: pass pmc pointer to more class methods 2023-05-06 14:49:19 -03:00
hwpmc_cmn600.h Fix the SPDX-License-Identifier in CMN-600 files 2022-12-22 10:36:18 +00:00
hwpmc_core.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_core.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_dmc620.c hwpmc: pass pmc pointer to more class methods 2023-05-06 14:49:19 -03:00
hwpmc_dmc620.h Fix the SPDX-License-Identifier in DMC-620 files 2022-12-22 10:36:18 +00:00
hwpmc_e500.c hwpmc: pass pmc pointer to more class methods 2023-05-06 14:49:19 -03:00
hwpmc_intel.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_logging.c pmc: Rework PROCEXEC event to support PIEs 2023-05-31 00:20:36 +01:00
hwpmc_mod.c hwpmc: split out PMC_OP_PMCATTACH/PMC_OP_PMCDETACH 2023-06-14 13:34:21 -03:00
hwpmc_mpc7xxx.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_power8.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_powerpc.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_powerpc.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_ppc970.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_riscv.h
hwpmc_soft.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_soft.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_tsc.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_tsc.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_uncore.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_uncore.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
hwpmc_x86.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pmc_events.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pmu_dmc620.c hwpmc: Don't wrap entire files in #ifdef DEV_ACPI. 2023-03-01 10:31:53 -08:00
pmu_dmc620_reg.h Fix the SPDX-License-Identifier in DMC-620 files 2022-12-22 10:36:18 +00:00