Introduce generic headers
PATCH v7 3/7 xen/asm-generic: introduce stub header monitor.h
In reply to Oleksii KurochkoThe header is shared between several archs so it is moved to asm-generic.
Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h.
---
Changes in V7:
- Drop definition of arch_monitor_domctl_event for PPC.
- define arch_monitor_domctl_event in asm-generic/monitor.h.
- add "define HAS_ARCH_MONITOR_DOMCTL_EVENT" in arm/.../monitor.h as it has arch specific implementation.
---
Changes in V6:
- Rebase only.
---
Changes in V5:
- Switched partly Arm and PPC to asm-generic monitor.h only arch_monitor_get_capabilities() left in arch-specific/monitor.h.
- Updated the commit message.
---
Changes in V4:
- Removed the double blank line.
- Added Acked-by: Jan Beulich <[email protected]>.
- Update the commit message
---
Changes in V3:
- Use forward-declaration of struct domain instead of " #include <xen/sched.h> ".
- Add ' include <xen/errno.h> '
- Drop PPC's monitor.h.
---
Changes in V2:
- remove inclusion of "+#include <public/domctl.h>"
- add "struct xen_domctl_monitor_op;"
- remove one of SPDX tags.
--- xen/arch/arm/include/asm/monitor.h | 25 +----------- xen/arch/ppc/include/asm/monitor.h | 28 +------------ xen/arch/ppc/stubs.c | 8 ---- xen/include/asm-generic/monitor.h | 64 ++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 58 deletions(-) create mode 100644 xen/include/asm-generic/monitor.h
xen/arch/arm/include/asm/monitor.h +2 -23
@@ -25,34 +25,13 @@#include <xen/sched.h> #include <public/domctl.h> -static inline -void arch_monitor_allow_userspace (struct domain *d,bool allow_userspace) -{ -} +#define HAS_ARCH_MONITOR_DOMCTL_EVENT -static inline -int arch_monitor_domctl_op (struct domain *d,struct xen_domctl_monitor_op *mop) -{ -/* No arch-specific monitor ops on ARM. */ -return -EOPNOTSUPP ; -} +#include <asm-generic/monitor.h> int arch_monitor_domctl_event (struct domain *d,struct xen_domctl_monitor_op *mop); -static inline -int arch_monitor_init_domain (struct domain *d) -{ -/* No arch-specific domain initialization on ARM. */ -return 0 ; -} - -static inline -void arch_monitor_cleanup_domain (struct domain *d) -{ -/* No arch-specific domain cleanup on ARM. */ -} -static inline uint32_t arch_monitor_get_capabilities (struct domain *d) {uint32_t capabilities =0 ;
xen/arch/ppc/include/asm/monitor.h +1 -27
@@ -6,33 +6,7 @@#include <public/domctl.h> #include <xen/errno.h> -static inline -void arch_monitor_allow_userspace (struct domain *d,bool allow_userspace) -{ -} - -static inline -int arch_monitor_domctl_op (struct domain *d,struct xen_domctl_monitor_op *mop) -{ -/* No arch-specific monitor ops on PPC. */ -return -EOPNOTSUPP ; -} - -int arch_monitor_domctl_event (struct domain *d, -struct xen_domctl_monitor_op *mop); - -static inline -int arch_monitor_init_domain (struct domain *d) -{ -/* No arch-specific domain initialization on PPC. */ -return 0 ; -} - -static inline -void arch_monitor_cleanup_domain (struct domain *d) -{ -/* No arch-specific domain cleanup on PPC. */ -} +#include <asm-generic/monitor.h> static inline uint32_t arch_monitor_get_capabilities (struct domain *d) {
xen/arch/ppc/stubs.c +0 -8
@@ -95,14 +95,6 @@ void arch_get_domain_info(const struct domain *d,BUG_ON ("unimplemented" ); } -/* monitor.c */ - -int arch_monitor_domctl_event (struct domain *d, -struct xen_domctl_monitor_op *mop) -{ -BUG_ON ("unimplemented" ); -} -/* smp.c */ void arch_flush_tlb_mask (const cpumask_t *mask)
xen/include/asm-generic/monitor.h new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v7 4/7 xen/asm-generic: ifdef inclusion of <asm/mem_access.h>
In reply to Oleksii Kurochkoifdefing inclusion of <asm/mem_access.h> in <xen/mem_access.h> allows to avoid generation of empty <asm/mem_access.h> header for the case when !CONFIG_MEM_ACCESS.
For Arm it was explicitly added inclusion of <asm/mem_access.h> for p2m.c and traps.c because they require some functions from <asm/mem_access.h> which aren't available in case of !CONFIG_MEM_ACCESS.
---
Changes in V7:
- Nothing changed. Only rebase
---
Changes in V6:
- Remove the way how CONFIG_MEM_ACCESS is disabled for PPC and RISC-V.
- Disable the config in ppc64_defconfig and tiny64_defconfig (RISC-V).
---
Changes in V5:
- Added dependencies for "Config MEM_ACCESS" to be sure that randconfig will not turn on the config.
---
Changes in V4:
- Nothing changed. Only rebase.
---
Changes in V3:
- Remove unnecessary comment.
--- xen/arch/arm/p2m.c | 1 + xen/arch/arm/traps.c | 1 + xen/arch/ppc/configs/ppc64_defconfig | 1 + xen/arch/ppc/include/asm/mem_access.h | 5 ----- xen/arch/riscv/configs/tiny64_defconfig | 1 + xen/include/xen/mem_access.h | 2 ++ 6 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/mem_access.h
xen/arch/arm/p2m.c +1 -0
@@ -7,6 +7,7 @@#include <asm/event.h> #include <asm/flushtlb.h> #include <asm/guest_walk.h> +#include <asm/mem_access.h> #include <asm/page.h> #include <asm/traps.h>
xen/arch/arm/traps.c +1 -0
@@ -35,6 +35,7 @@#include <asm/cpufeature.h> #include <asm/event.h> #include <asm/hsr.h> +#include <asm/mem_access.h> #include <asm/mmio.h> #include <asm/regs.h> #include <asm/smccc.h>
xen/arch/ppc/configs/ppc64_defconfig +1 -0
@@ -6,6 +6,7 @@ # CONFIG_HYPFS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set +# CONFIG_MEM_ACCESS is not set CONFIG_PPC64=y CONFIG_DEBUG=y
xen/arch/ppc/include/asm/mem_access.h deleted +0 -5
@@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_MEM_ACCESS_H__ -#define __ASM_PPC_MEM_ACCESS_H__ - -#endif /* __ASM_PPC_MEM_ACCESS_H__ */
xen/arch/riscv/configs/tiny64_defconfig +1 -0
@@ -6,6 +6,7 @@ # CONFIG_HYPFS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set +# CONFIG_MEM_ACCESS is not set CONFIG_RISCV_64=y CONFIG_DEBUG=y
xen/include/xen/mem_access.h +2 -0
@@ -33,7 +33,9 @@*/ struct vm_event_st ; +#ifdef CONFIG_MEM_ACCESS #include <asm/mem_access.h> +#endif /* * Additional access types, which are used to further restrict
Signature · 1 line
2.43.0
v7 cover Introduce generic headers
Some headers are common between several architectures, so the current patch series provide them.
Another one reason to have them as generic is a simplification of adding support necessary to make a complete Xen build as it was/is being done in the patch series [1] and [2].
Also, instead of providing generic/stub headers, it was used "#ifdef CONFIG_* #include <asm/*.h> #endif" instead of providing empty headers.
This patch series is a pre-requisite for "Enable build of full Xen for RISC-V" [3].
[1] https://lore.kernel.org/xen-devel/[email protected]/
[2] https://lore.kernel.org/xen-devel/[email protected]/
[3] https://lore.kernel.org/xen-devel/[email protected]/
---
Changes in V7:
- The following patches were dropped because of rebasing as they were merged to staging:
- [PATCH v6 3/9] xen/asm-generic: introduce generic div64.h header
- [PATCH v6 6/9] xen/asm-generic: introduce stub header softirq.h
- [PATCH v6 7/9] xen: ifdef inclusion of <asm/grant_table.h> in <xen/grant_table.h>
- [PATCH v6 8/9] xen/asm-generic: ifdef inclusion of <asm/mem_access.h>
- [PATCH v6 5/9] xen/asm-generic: introduce stub header numa.h was dropped becaus of the patch: "[PATCH v2] NUMA: no need for asm/numa.h when !NUMA"
- Drop definition of arch_monitor_domctl_event for PPC.
- define arch_monitor_domctl_event in asm-generic/monitor.h.
- Add "define HAS_ARCH_MONITOR_DOMCTL_EVENT" in arm/.../monitor.h as it has arch specific implementation.
- keeping DEVICE_PCI_HOSTBRIDGE available for every build based on the reply:
https://lore.kernel.org/xen-devel/[email protected]/
- add comment above enum device_type.h with explanation about DEV_TYPE_MAX.
- drop #ifdef HAS_PCI around "(device_get_class(dev) == DEVICE_PCI_HOSTBRIDGE))" in ARM code.
- separate patch "[PATCH v6 9/9] xen/asm-generic: introduce generic device.h" into 3 patches.
---
Changes in V6:
- Fix the build script to work properly with EXTRA_FIXED_RANDCONFIG.
- Introduce separate randconfig yaml with fixed configs for RISC-V.
- Disable CONFIG_GRANT_TABLE and CONFIG_MEM_ACCESS for PPC and RISC-V.
- Remove change in Kconfig/common for CONFIG_GRANT_TABLE and CONFIG_MEM_ACCESS.
- Rebase on top of the latest staging.
---
Changes in V5:
- Update the patch series message as patch related to delay.h was merged.
- Rebase on top of staging because half of the patches of the patch series were
merged to staging branch.
- Add A-by for some of the patches.
- Add "depends on X86 || Arm" for CONFIG_GRANT_TABLE and CONFIG_MEM_ACCESS to be
sure it won't be turned on by randconfig in CI.
- Partly switch Arm and PPC to asm-generic/monitor.h.
- Some other minor changes
---
Changes in V4:
- Update the cover letter message
- Add Reviewed-by/Acked-by for patches:
[PATCH v3 01/14] xen/asm-generic: introduce stub header paging.h
[PATCH v3 03/14] xen/asm-generic: introduce generic hypercall.h
[PATCH v3 04/14] xen/asm-generic: introduce generic header iocap.h
[PATCH v3 05/14] xen/asm-generic: introduce stub header <asm/random.h>
[PATCH v3 06/14] xen/asm-generic: introduce generic header percpu.h
[PATCH v3 07/14] xen/asm-generic: introduce generalized hardirq.h
[PATCH v3 08/14] xen/asm-generic: introduce generic div64.h header
[PATCH v3 09/14] xen/asm-generic: introduce generic header altp2m.h
[PATCH v3 10/14] xen/asm-generic: introduce stub header monitor.h
[PATCH v3 11/14] xen/asm-generic: introduce stub header numa.h
[PATCH v3 12/14] xen/asm-generic: introduce stub header softirq.h
- Fix some code style and minor issues.
- Use asm-generic version of device.h for Arm and PPC.
---
Changes in V3:
- Update the commit message of the cover letter.
- Drop the following patch as it can be arch-specific enough:
* [PATCH v2 09/15] xen/asm-generic: introduce generic header smp.h
- Drop correspondent arch specific headers and use asm-generic version of
a header.
- Back to the patch series patches:
* xen: ifdef inclusion of <asm/grant_table.h> in <xen/grant_table.h>
* xen/asm-generic: ifdef inclusion of <asm/mem_access.h>
---
Changes in V2:
- Update the commit message of the cover letter.
- Drop the following patches because they are arch-specific or was sent as a separate patch:
- xen/asm-generic: introduce stub header event.h
- xen/asm-generic: introduce stub header spinlock.h
- [PATCH v1 03/29] xen/asm-generic: introduce stub header cpufeature.h
- [PATCH v1 07/29] xen/asm-generic: introduce stub header guest_atomics.h
- [PATCH v1 10/29] xen/asm-generic: introduce stub header iommu.h
- [PATCH v1 12/29] xen/asm-generic: introduce stub header pci.h because separate patch was sent [5]
- [PATCH v1 14/29] xen/asm-generic: introduce stub header setup.h
- [PATCH v1 15/29] xen/asm-generic: introduce stub header xenoprof.h because of [3].
- [PATCH v1 16/29] xen/asm-generic: introduce stub header flushtlb.h
- [PATCH v1 22/29] xen/asm-generic: introduce stub header delay.h because of [3]
- [PATCH v1 23/29] xen/asm-generic: introduce stub header domain.h
- [PATCH v1 24/29] xen/asm-generic: introduce stub header guest_access.h
- [PATCH v1 25/29] xen/asm-generic: introduce stub header irq.h ( probably not so generic as I expected, I'll back to it if it will be necessary in the future )
- [PATCH v1 28/29] xen/asm-generic: introduce stub header p2m.h ( probably not so generic as I expected, I'll back to it if it will be necessary in the future )
- For the rest of the patches please look at changes for each patch separately.
---
Oleksii Kurochko (7):
automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by
new line
automation: introduce fixed randconfig for RISC-V
xen/asm-generic: introduce stub header monitor.h
xen/asm-generic: ifdef inclusion of <asm/mem_access.h>
xen/asm-generic: introduce generic device.h
xen/arm: switch Arm to use asm-generic/device.h
xen/ppc: switch PPC to use asm-generic/device.h
automation/gitlab-ci/build.yaml | 8 +-
.../gitlab-ci/riscv-fixed-randconfig.yaml | 7 +
automation/scripts/build | 6 +-
xen/arch/arm/device.c | 5 +
xen/arch/arm/domain_build.c | 2 +-
xen/arch/arm/gic-v2.c | 4 +-
xen/arch/arm/gic-v3.c | 6 +-
xen/arch/arm/gic.c | 4 +-
xen/arch/arm/include/asm/Makefile | 1 +
xen/arch/arm/include/asm/monitor.h | 25 +---
xen/arch/arm/p2m.c | 1 +
xen/arch/arm/traps.c | 1 +
xen/arch/ppc/configs/ppc64_defconfig | 1 +
xen/arch/ppc/include/asm/Makefile | 1 +
xen/arch/ppc/include/asm/device.h | 53 --------
xen/arch/ppc/include/asm/mem_access.h | 5 -
xen/arch/ppc/include/asm/monitor.h | 28 +---
xen/arch/ppc/stubs.c | 8 --
xen/arch/riscv/configs/tiny64_defconfig | 1 +
.../asm => include/asm-generic}/device.h | 128 ++++++++++++------
xen/include/asm-generic/monitor.h | 64 +++++++++
xen/include/xen/mem_access.h | 2 +
22 files changed, 186 insertions(+), 175 deletions(-)
create mode 100644 automation/gitlab-ci/riscv-fixed-randconfig.yaml
delete mode 100644 xen/arch/ppc/include/asm/device.h
delete mode 100644 xen/arch/ppc/include/asm/mem_access.h
rename xen/{arch/arm/include/asm => include/asm-generic}/device.h (76%)
create mode 100644 xen/include/asm-generic/monitor.hSignature · 1 line
2.43.0
PATCH v7 1/7 automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line
Kconfig tool expects each configuration to be on a new line.
The current version of the build script puts all of ${EXTRA_FIXED_RANDCONFIG} in a single line and configs are seperated by spaces.
As a result, only the first configuration in ${EXTRA_FIXED_RANDCONFIG} will be used.
---
Changes in V7:
- Nothing changed. Only rebase
---
Changes in V6:
- The patch was introduced in this version of patch series.
--- automation/scripts/build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
automation/scripts/build +4 -2
@@ -14,7 +14,7 @@ if [[ "${RANDCONFIG}" == "y" ]]; then # Append job-specific fixed configuration if [[ -n "${EXTRA_FIXED_RANDCONFIG}" ]]; then - echo "${EXTRA_FIXED_RANDCONFIG}" >> xen/tools/kconfig/allrandom.config + sed "s/ /\n/g" <<< "${EXTRA_FIXED_RANDCONFIG}" > xen/tools/kconfig/allrandom.config fi make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
@@ -28,9 +28,11 @@ else echo "CONFIG_DEBUG=${debug}" >> xen/.config if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then - echo "${EXTRA_XEN_CONFIG}" >> xen/.config + sed "s/ /\n/g" <<< "${EXTRA_XEN_CONFIG}" >> xen/.config fi + cat xen/.config + make -j$(nproc) -C xen olddefconfig fi
Signature · 1 line
2.43.0
PATCH v7 2/7 automation: introduce fixed randconfig for RISC-V
In reply to Oleksii KurochkoThis patch introduces the file riscv-fixed-randconfig.yaml, which includes all configurations that should be disabled for randconfig builds.
---
The patch were introduced after discussion in a topic:
https://lore.kernel.org/xen-devel/[email protected]/
---
Changes in V7:
- Nothing changed. Only rebase
---
Changes in V6:
- The patch was introduced in this version of patch series.
--- automation/gitlab-ci/build.yaml | 8 ++++---- automation/gitlab-ci/riscv-fixed-randconfig.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 automation/gitlab-ci/riscv-fixed-randconfig.yaml
automation/gitlab-ci/build.yaml +4 -4
@@ -516,6 +516,8 @@ alpine-3.18-gcc-debug-arm64-boot-cpupools: CONFIG_BOOT_TIME_CPUPOOLS=y # RISC-V 64 cross-build +include: 'automation/gitlab-ci/riscv-fixed-randconfig.yaml' + archlinux-current-gcc-riscv64: extends: .gcc-riscv64-cross-build variables:
@@ -536,8 +538,7 @@ archlinux-current-gcc-riscv64-randconfig: CONTAINER: archlinux:current-riscv64 KBUILD_DEFCONFIG: tiny64_defconfig RANDCONFIG: y - EXTRA_FIXED_RANDCONFIG: - CONFIG_COVERAGE=n + EXTRA_FIXED_RANDCONFIG: !reference [.riscv-fixed-randconfig, variables, EXTRA_FIXED_RANDCONFIG] archlinux-current-gcc-riscv64-debug-randconfig: extends: .gcc-riscv64-cross-build-debug
@@ -545,8 +546,7 @@ archlinux-current-gcc-riscv64-debug-randconfig: CONTAINER: archlinux:current-riscv64 KBUILD_DEFCONFIG: tiny64_defconfig RANDCONFIG: y - EXTRA_FIXED_RANDCONFIG: - CONFIG_COVERAGE=n + EXTRA_FIXED_RANDCONFIG: !reference [.riscv-fixed-randconfig, variables, EXTRA_FIXED_RANDCONFIG] # Power cross-build debian-bullseye-gcc-ppc64le:
automation/gitlab-ci/riscv-fixed-randconfig.yaml new file +7 -0
@@ -0,0 +1,7 @@ +.riscv-fixed-randconfig: + variables: + EXTRA_FIXED_RANDCONFIG: + CONFIG_COVERAGE=n + CONFIG_EXPERT=y + CONFIG_GRANT_TABLE=n + CONFIG_MEM_ACCESS=n
Signature · 1 line
2.43.0
PATCH v7 6/7 xen/arm: switch Arm to use asm-generic/device.h
In reply to Oleksii Kurochko--- xen/arch/arm/device.c | 5 ++ xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/gic-v2.c | 4 +- xen/arch/arm/gic-v3.c | 6 +- xen/arch/arm/gic.c | 4 +- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/device.h | 124 ------------------------------ 7 files changed, 14 insertions(+), 132 deletions(-) delete mode 100644 xen/arch/arm/include/asm/device.h
xen/arch/arm/device.c +5 -0
@@ -16,7 +16,10 @@#include <xen/lib.h> extern const struct device_desc _sdevice[], _edevice[]; + +#ifdef CONFIG_ACPI extern const struct acpi_device_desc _asdevice[], _aedevice[]; +#endif int __init device_init (struct dt_device_node *dev,enum device_class class,const void *data)
@@ -45,6 +48,7 @@ int __init device_init(struct dt_device_node *dev, enum device_class class,return -EBADF ; } +#ifdef CONFIG_ACPI int __init acpi_device_init (enum device_class class,const void *data,int class_type) {const struct acpi_device_desc *desc;
@@ -61,6 +65,7 @@ int __init acpi_device_init(enum device_class class, const void *data, int class return -EBADF; } +#endif enum device_class device_get_class (const struct dt_device_node *dev) {
xen/arch/arm/domain_build.c +1 -1
@@ -1651,7 +1651,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,* Replace these nodes with our own. Note that the original may be * used_by DOMID_XEN so this check comes first. */ -if (device_get_class (node) ==DEVICE_GIC ) +if (device_get_class (node) ==DEVICE_INTERRUPT_CONTROLLER )return make_gic_node (d, kinfo->fdt, node);if (dt_match_node (timer_matches, node) )return make_timer_node (kinfo);
xen/arch/arm/gic-v2.c +2 -2
@@ -1366,7 +1366,7 @@ static const struct dt_device_match gicv2_dt_match[] __initconst = { /* sentinel */ }, }; -DT_DEVICE_START (gicv2,"GICv2" ,DEVICE_GIC ) +DT_DEVICE_START (gicv2,"GICv2" ,DEVICE_INTERRUPT_CONTROLLER ) .dt_match = gicv2_dt_match, .init = gicv2_dt_preinit,DT_DEVICE_END
@@ -1381,7 +1381,7 @@ static int __init gicv2_acpi_preinit(const void *data)return 0 ; } -ACPI_DEVICE_START (agicv2,"GICv2" ,DEVICE_GIC ) +ACPI_DEVICE_START (agicv2,"GICv2" ,DEVICE_INTERRUPT_CONTROLLER ) .class_type = ACPI_MADT_GIC_VERSION_V2, .init = gicv2_acpi_preinit,ACPI_DEVICE_END
xen/arch/arm/gic-v3.c +3 -3
@@ -1909,7 +1909,7 @@ static const struct dt_device_match gicv3_dt_match[] __initconst = { /* sentinel */ }, }; -DT_DEVICE_START (gicv3,"GICv3" ,DEVICE_GIC ) +DT_DEVICE_START (gicv3,"GICv3" ,DEVICE_INTERRUPT_CONTROLLER ) .dt_match = gicv3_dt_match, .init = gicv3_dt_preinit,DT_DEVICE_END
@@ -1924,12 +1924,12 @@ static int __init gicv3_acpi_preinit(const void *data)return 0 ; } -ACPI_DEVICE_START (agicv3,"GICv3" ,DEVICE_GIC ) +ACPI_DEVICE_START (agicv3,"GICv3" ,DEVICE_INTERRUPT_CONTROLLER ) .class_type =ACPI_MADT_GIC_VERSION_V3 , .init = gicv3_acpi_preinit, ACPI_DEVICE_END -ACPI_DEVICE_START (agicv4,"GICv4" ,DEVICE_GIC ) +ACPI_DEVICE_START (agicv4,"GICv4" ,DEVICE_INTERRUPT_CONTROLLER ) .class_type =ACPI_MADT_GIC_VERSION_V4 , .init = gicv3_acpi_preinit,ACPI_DEVICE_END
xen/arch/arm/gic.c +2 -2
@@ -234,7 +234,7 @@ static void __init gic_dt_preinit(void)if ( !dt_get_parent (node) )continue ; - rc =device_init (node,DEVICE_GIC ,NULL ); + rc =device_init (node,DEVICE_INTERRUPT_CONTROLLER ,NULL );if ( !rc ) {/* NOTE: Only one GIC is supported */
@@ -262,7 +262,7 @@ static void __init gic_acpi_preinit(void) dist = container_of(header, struct acpi_madt_generic_distributor, header); -if (acpi_device_init (DEVICE_GIC ,NULL , dist->version) ) +if (acpi_device_init (DEVICE_INTERRUPT_CONTROLLER ,NULL , dist->version) ) panic("Unable to find compatible GIC in the ACPI table\n"); }#else
xen/arch/arm/include/asm/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y += altp2m.h +generic-y += device.h generic-y += hardirq.h generic-y += iocap.h generic-y += paging.h
xen/arch/arm/include/asm/device.h deleted +0 -124
124 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v7 7/7 xen/ppc: switch PPC to use asm-generic/device.h
In reply to Oleksii Kurochko---
Changes in V7:
- newly introduced patch which is based on the previous version of the patch:
[PATCH v6 9/9] xen/asm-generic: introduce generic device.h
--- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53 ------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/device.h
xen/arch/ppc/include/asm/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y += altp2m.h +generic-y += device.h generic-y += div64.h generic-y += hardirq.h generic-y += hypercall.h
xen/arch/ppc/include/asm/device.h deleted +0 -53
53 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v7 5/7 xen/asm-generic: introduce generic device.h
In reply to Oleksii KurochkoArm, PPC and RISC-V use the same device.h thereby device.h was moved to asm-generic. Arm's device.h was taken as a base with the following changes:
- #ifdef PCI related things.
- #ifdef ACPI related things.
- Rename #ifdef guards.
- Add SPDX tag.
- #ifdef CONFIG_HAS_DEVICE_TREE related things.
- #ifdef-ing iommu related things with CONFIG_HAS_PASSTHROUGH.
---
Changes in V7:
- keeping DEVICE_PCI_HOSTBRIDGE available for every build based on the reply:
https://lore.kernel.org/xen-devel/[email protected]/
- add comment above enum device_type.h with explanation about DEV_TYPE_MAX.
- separate patch "[PATCH v6 9/9] xen/asm-generic: introduce generic device.h" into 3 patches.
---
Changes in V6:
- Rebase only.
---
Changes in V5:
- Removed generated file: xen/include/headers++.chk.new
- Removed pointless #ifdef CONFIG_HAS_DEVICE_TREE ... #endif for PPC as CONFIG_HAS_DEVICE_TREE will be always used for PPC.
---
Changes in V4:
- Updated the commit message
- Switched Arm and PPC to asm-generic version of device.h
- Replaced HAS_PCI with CONFIG_HAS_PCI
- ifdef-ing iommu filed of dev_archdata struct with CONFIG_HAS_PASSTHROUGH
- ifdef-ing iommu_fwspec of device struct with CONFIG_HAS_PASSTHROUGH
- ifdef-ing DT related things with CONFIG_HAS_DEVICE_TREE
- Updated the commit message ( remove a note with question about
if device.h should be in asm-generic or not )
- Replaced DEVICE_IC with DEVICE_INTERRUPT_CONTROLLER
- Rationalized usage of CONFIG_HAS_* in device.h
- Fixed indents for ACPI_DEVICE_START and ACPI_DEVICE_END
---
Changes in V3:
- ifdef device tree related things.
- update the commit message
---
Changes in V2:
- take ( as common ) device.h from Arm as PPC and RISC-V use it as a base.
- #ifdef PCI related things.
- #ifdef ACPI related things.
- rename DEVICE_GIC to DEVIC_IC.
- rename #ifdef guards.
- switch Arm and PPC to generic device.h
- add SPDX tag
- update the commit message
--- xen/include/asm-generic/device.h | 162 +++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 xen/include/asm-generic/device.h
xen/include/asm-generic/device.h new file +162 -0
@@ -0,0 +1,162 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DEVICE_H__ +#define __ASM_GENERIC_DEVICE_H__ + +#include <xen/stdbool.h> + +/* +* DEV_TYPE_MAX is currently not in use, but it was added because the enum may +* be empty when !HAS_DEVICE_TREE and !HAS_PCI, which could lead to +* a compilation error. +*/ +enum device_type +{ +#ifdef CONFIG_HAS_DEVICE_TREE +DEV_DT , +#endif + +#ifdef CONFIG_HAS_PCI +DEV_PCI , +#endif +DEV_TYPE_MAX , +}; + +enum device_class +{ +DEVICE_SERIAL , +DEVICE_IOMMU , +DEVICE_INTERRUPT_CONTROLLER , +DEVICE_PCI_HOSTBRIDGE , +/* Use for error */ +DEVICE_UNKNOWN , +}; + +struct dev_archdata { +#ifdef CONFIG_HAS_PASSTHROUGH +void *iommu;/* IOMMU private data */ +#endif +}; + +/* struct device - The basic device structure */ +struct device +{ +enum device_type type; +#ifdef CONFIG_HAS_DEVICE_TREE +struct dt_device_node *of_node;/* Used by drivers imported from Linux */ +#endif +struct dev_archdata archdata; +#ifdef CONFIG_HAS_PASSTHROUGH +struct iommu_fwspec *iommu_fwspec;/* per-device IOMMU instance data */ +#endif +}; + +typedef struct device device_t ; + +#ifdef CONFIG_HAS_DEVICE_TREE + +#include <xen/device_tree.h> + +#define dev_is_dt (dev) ((dev)->type == DEV_DT) + +/** +* device_init - Initialize a device +* @dev: device to initialize +* @class: class of the device (serial, network...) +* @data: specific data for initializing the device +* +* Return 0 on success. +*/ +int device_init (struct dt_device_node *dev,enum device_class class, +const void *data); + +/** +* device_get_type - Get the type of the device +* @dev: device to match +* +* Return the device type on success or DEVICE_ANY on failure +*/ +enum device_class device_get_class (const struct dt_device_node *dev); + +#define DT_DEVICE_START (_name, _namestr, _class) \ +static const struct device_desc __dev_desc_##_name __used \ +__section(".dev.info") = { \ + .name = _namestr, \ + .class = _class, \ + +#define DT_DEVICE_END \ +}; + +#else /* !CONFIG_HAS_DEVICE_TREE */ +#define dev_is_dt (dev) ((void)(dev), false) +#endif /* CONFIG_HAS_DEVICE_TREE */ + +#ifdef CONFIG_HAS_PCI +#define dev_is_pci (dev) ((dev)->type == DEV_PCI) +#else +#define dev_is_pci (dev) ((void)(dev), false) +#endif + +struct device_desc { +/* Device name */ +const char *name; +/* Device class */ +enum device_class class; + +#ifdef CONFIG_HAS_DEVICE_TREE + +/* List of devices supported by this driver */ +const struct dt_device_match *dt_match; +/* +* Device initialization. +* +* -EAGAIN is used to indicate that device probing is deferred. +*/ +int (*init)(struct dt_device_node *dev,const void *data); + +#endif +}; + +#ifdef CONFIG_ACPI + +struct acpi_device_desc { +/* Device name */ +const char *name; +/* Device class */ +enum device_class class; +/* type of device supported by the driver */ +const int class_type; +/* Device initialization */ +int (*init)(const void *data); +}; + +/** +* acpi_device_init - Initialize a device +* @class: class of the device (serial, network...) +* @data: specific data for initializing the device +* +* Return 0 on success. +*/ +int acpi_device_init (enum device_class class, +const void *data,int class_type); + +#define ACPI_DEVICE_START (_name, _namestr, _class) \ +static const struct acpi_device_desc __dev_desc_##_name __used \ +__section(".adev.info") = { \ + .name = _namestr, \ + .class = _class, \ + +#define ACPI_DEVICE_END \ +}; + +#endif /* CONFIG_ACPI */ + +#endif /* __ASM_GENERIC_DEVICE_H__ */ + +/* +* Local variables: +* mode: C +* c-file-style: "BSD" +* c-basic-offset: 4 +* indent-tabs-mode: nil +* End: +*/
Signature · 1 line
2.43.0
Re: [PATCH v7 3/7] xen/asm-generic: introduce stub header monitor.h
In reply to Oleksii KurochkoQuoted 9 lines · Oleksii Kurochko
The header is shared between several archs so it is moved to asm-generic.
Switch partly Arm and PPC to
asm-generic/monitor.hand onlyarch_monitor_get_capabilities()left inarch-specific/monitor.h.Signed-off-by Oleksii Kurochko <[email protected]>Acked-by Jan Beulich <[email protected]>
Re: [PATCH v7 4/7] xen/asm-generic: ifdef inclusion of <asm/mem_access.h>
In reply to Oleksii KurochkoQuoted 11 lines · Oleksii Kurochko
ifdefing inclusion of <
asm/mem_access.h> in <xen/mem_access.h> allows to avoid generation of empty <asm/mem_access.h> header for the case when !CONFIG_MEM_ACCESS.For Arm it was explicitly added inclusion of <
asm/mem_access.h> forp2m.candtraps.cbecause they require some functions from <asm/mem_access.h> which aren't available in case of !CONFIG_MEM_ACCESS.Suggested-by Jan Beulich <[email protected]>Signed-off-by Oleksii Kurochko <[email protected]>
Re: [PATCH v7 5/7] xen/asm-generic: introduce generic device.h
In reply to Oleksii KurochkoQuoted 2 lines · Oleksii Kurochko
Arm, PPC and RISC-V use the same
device.htherebydevice.hwas moved to asm-generic.
It's not "move" anymore with the splitting off of the Arm and PPC parts. For reasons mentioned before, I'm not exactly happy with it not being a move anymore, but I expect you were asked to split.
Quoted 3 lines
Arm's
device.hwas taken as a base with
the following changes:
- #ifdef PCI related things.
Well, not really, with ...
Quoted 11 lines
- #ifdef ACPI related things.
- Rename #ifdef guards.
- Add SPDX tag.
- #ifdefCONFIG_HAS_DEVICE_TREErelated things.
- #ifdef-ing iommu related things withCONFIG_HAS_PASSTHROUGH.Signed-off-by Oleksii Kurochko <[email protected]>---
Changes in V7:
- keepingDEVICE_PCI_HOSTBRIDGEavailable for every build based on the reply:https://lore.kernel.org/xen-devel/[email protected]/
... this. Specifically ...
Quoted 13 lines
xen/include/asm-generic/device.h new file +10
-0@@ -0,0 +1,162 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DEVICE_H__ +#define __ASM_GENERIC_DEVICE_H__ + +#include <xen/stdbool.h> + +/* +* DEV_TYPE_MAX is currently not in use, but it was added because the enum may +* be empty when !HAS_DEVICE_TREE and !HAS_PCI, which could lead to +* a compilation error.
xen/include/asm-generic/device.h line 20
Quoted 10 lines
xen/include/asm-generic/device.h new file +10
-0+*/ +enum device_type +{ +#ifdef CONFIG_HAS_DEVICE_TREE +DEV_DT , +#endif + +#ifdef CONFIG_HAS_PCI +DEV_PCI , +#endif
... this is now inconsistent with ...
xen/include/asm-generic/device.h line 29
Quoted 9 lines
xen/include/asm-generic/device.h new file +9
-0+ DEV_TYPE_MAX, +}; + +enum device_class +{ +DEVICE_SERIAL , +DEVICE_IOMMU , +DEVICE_INTERRUPT_CONTROLLER , +DEVICE_PCI_HOSTBRIDGE ,
... this. Either we want PCI-related #ifdef-ary, or we don't. There shouldn't be a mix (unless there's a good reason).
Also the use of blank lines inside the earlier enum would better be consistent.
Quoted 41 lines
xen/include/asm-generic/device.h new file +41
-0+/* Use for error */ + DEVICE_UNKNOWN, +}; + +struct dev_archdata { +#ifdef CONFIG_HAS_PASSTHROUGH +void *iommu;/* IOMMU private data */ +#endif +}; + +/* struct device - The basic device structure */ +struct device +{ +enum device_type type; +#ifdef CONFIG_HAS_DEVICE_TREE +struct dt_device_node *of_node;/* Used by drivers imported from Linux */ +#endif +struct dev_archdata archdata; +#ifdef CONFIG_HAS_PASSTHROUGH +struct iommu_fwspec *iommu_fwspec;/* per-device IOMMU instance data */ +#endif +}; + +typedef struct device device_t ; + +#ifdef CONFIG_HAS_DEVICE_TREE + +#include <xen/device_tree.h> + +#define dev_is_dt (dev) ((dev)->type == DEV_DT) + +/** +* device_init - Initialize a device +* @dev: device to initialize +* @class: class of the device (serial, network...) +* @data: specific data for initializing the device +* +* Return 0 on success. +*/ +int device_init (struct dt_device_node *dev,enum device_class class, +const void *data);
xen/include/asm-generic/device.h line 80
Quoted 10 lines
xen/include/asm-generic/device.h new file +10
-0+ +/** +* device_get_type - Get the type of the device +* @dev: device to match +* +* Return the device type on success or DEVICE_ANY on failure +*/ +enum device_class device_get_class (const struct dt_device_node *dev); + +#define DT_DEVICE_START (_name, _namestr, _class) \
Would be really nice if in the course of generalization these leading underscores would also disappear. Yes, that'll require changing two of the names more than just to drop the underscores, to account for ...
xen/include/asm-generic/device.h line 84
Quoted 4 lines
xen/include/asm-generic/device.h new file +4
-0+static const struct device_desc __dev_desc_##_name __used \ +__section(".dev.info") = { \ + .name = _namestr, \ + .class = _class, \
... these field names.
Also there's a strack backslash on the last line above.
Both comments similarly apply to the ACPI stuff further down.
Quoted 30 lines
xen/include/asm-generic/device.h new file +30
-0+#define DT_DEVICE_END \ +}; + +#else /* !CONFIG_HAS_DEVICE_TREE */ +#define dev_is_dt (dev) ((void)(dev), false) +#endif /* CONFIG_HAS_DEVICE_TREE */ + +#ifdef CONFIG_HAS_PCI +#define dev_is_pci (dev) ((dev)->type == DEV_PCI) +#else +#define dev_is_pci (dev) ((void)(dev), false) +#endif + +struct device_desc { +/* Device name */ +const char *name; +/* Device class */ +enum device_class class; + +#ifdef CONFIG_HAS_DEVICE_TREE + +/* List of devices supported by this driver */ +const struct dt_device_match *dt_match; +/* +* Device initialization. +* +* -EAGAIN is used to indicate that device probing is deferred. +*/ +int (*init)(struct dt_device_node *dev,const void *data); +
xen/include/asm-generic/device.h line 125
Quoted 10 lines
xen/include/asm-generic/device.h new file +10
-0+#endif +}; + +#ifdef CONFIG_ACPI + +struct acpi_device_desc { + /* Device name */ + const char *name; + /* Device class */ + enum device_class class;
I understand it's this way on Arm right now, and I'm also not going to insist that you do anything about it right here, but it's still odd that struct device_desc doesn't simply have a union to cover for both DT and ACPI.
Jan
Re: [PATCH v7 6/7] xen/arm: switch Arm to use asm-generic/device.h
In reply to Oleksii KurochkoQuoted 1 line · Oleksii Kurochko
Signed-off-by Oleksii Kurochko <[email protected]>
I'm not an Arm maintainer, but if I was I wouldn't let you get away with an empty description here. Specifically at least ...
Quoted 22 lines
xen/arch/arm/device.c +4
-0@@ -16,7 +16,10 @@#include <xen/lib.h> extern const struct device_desc _sdevice[], _edevice[]; + +#ifdef CONFIG_ACPI extern const struct acpi_device_desc _asdevice[], _aedevice[]; +#endif int __init device_init (struct dt_device_node *dev,enum device_class class,const void *data)@@ -45,6 +48,7 @@ int __init device_init(struct dt_device_node *dev, enum device_class class,return -EBADF ; } +#ifdef CONFIG_ACPI int __init acpi_device_init (enum device_class class,const void *data,int class_type) {const struct acpi_device_desc *desc;
xen/arch/arm/device.c int __init acpi_device_init(enum device_class class, const void *data, int class · line 68
Quoted 4 lines
xen/arch/arm/device.c +1
-0@@ -61,6 +65,7 @@ int __init acpi_device_init(enum device_class class, const void *data, int class return -EBADF; } +#endif
... this new #ifdef-ary would want justifying, imo.
Jan
Re: [PATCH v7 5/7] xen/asm-generic: introduce generic device.h
In reply to Jan BeulichQuoted 58 lines · Jan Beulich
Quoted 2 lines · Oleksii Kurochko
Arm, PPC and RISC-V use the same
device.htherebydevice.hwas moved to asm-generic.It's not "move" anymore with the splitting off of the Arm and PPC parts. For reasons mentioned before, I'm not exactly happy with it not being a move anymore, but I expect you were asked to split.
Quoted 3 lines
Arm's
device.hwas taken as a base with
the following changes:
- #ifdef PCI related things.Well, not really, with ...
Quoted 6 lines
- #ifdef ACPI related things.
- Rename #ifdef guards.
- Add SPDX tag.
- #ifdefCONFIG_HAS_DEVICE_TREErelated things.
- #ifdef-ing iommu related things withCONFIG_HAS_PASSTHROUGH.Quoted 7 lines
Signed-off-by Oleksii Kurochko <[email protected]>---
Changes in V7:
- keepingDEVICE_PCI_HOSTBRIDGEavailable for every build based on the reply:
https://lore.kernel.org/xen-devel/[email protected]/... this. Specifically ...
Quoted 16 lines
xen/include/asm-generic/device.h new file +8
-0@@ -0,0 +1,162 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DEVICE_H__ +#define __ASM_GENERIC_DEVICE_H__ + +#include <xen/stdbool.h> + +/* +* DEV_TYPE_MAX is currently not in use, but it was added because the enum may
+ * be empty when !HAS_DEVICE_TREE and !HAS_PCI, which could lead to
+ * a compilation error.
+ */xen/include/asm-generic/device.h line 20
Quoted 9 lines
xen/include/asm-generic/device.h new file +9
-0+enum device_type +{ +#ifdef CONFIG_HAS_DEVICE_TREE + DEV_DT, +#endif + +#ifdef CONFIG_HAS_PCI + DEV_PCI, +#endif ... this is now inconsistent with ...
Quoted 12 lines
xen/include/asm-generic/device.h line 29
Quoted 9 lines
+
DEV_TYPE_MAX,xen/include/asm-generic/device.h new file +8
-0+}; + +enum device_class +{ + DEVICE_SERIAL, + DEVICE_IOMMU, + DEVICE_INTERRUPT_CONTROLLER, + DEVICE_PCI_HOSTBRIDGE,... this. Either we want PCI-related #ifdef-ary, or we don't. There shouldn't be a mix (unless there's a good reason).
Agreed, I overlooked the fact that we now have inconsistency.
Then it is needed to update remove CONFIG_HAS_PCI in device_type enum too.
Quoted 77 lines
Also the use of blank lines inside the earlier enum would better be consistent.
Quoted 55 lines
+ /* Use for error */
+DEVICE_UNKNOWN,xen/include/asm-generic/device.h new file +14
-0+}; + +struct dev_archdata { +#ifdef CONFIG_HAS_PASSTHROUGH + void *iommu; /* IOMMU private data */ +#endif +}; + +/* struct device - The basic device structure */ +struct device +{ + enum device_type type; +#ifdef CONFIG_HAS_DEVICE_TREE + struct dt_device_node *of_node; /* Used by drivers importedfrom Linux */
xen/include/asm-generic/device.h new file +4
-0+#endif + struct dev_archdata archdata; +#ifdef CONFIG_HAS_PASSTHROUGH + struct iommu_fwspec *iommu_fwspec; /* per-device IOMMUinstance data */
xen/include/asm-generic/device.h new file +20
-0+#endif +}; + +typedef struct device device_t ; + +#ifdef CONFIG_HAS_DEVICE_TREE + +#include <xen/device_tree.h> + +#define dev_is_dt (dev) ((dev)->type == DEV_DT) + +/** +* device_init - Initialize a device +* @dev: device to initialize +* @class: class of the device (serial, network...) +* @data: specific data for initializing the device +* +* Return 0 on success. +*/ +int device_init(struct dt_device_node *dev, enum device_classclass,
+ const void *data);xen/include/asm-generic/device.h new file +8
-0+ +/** +* device_get_type - Get the type of the device +* @dev: device to match +* +* Return the device type on success or DEVICE_ANY on failure +*/ +enum device_class device_get_class(const struct dt_device_node*dev);
xen/include/asm-generic/device.h new file +2
-0+ +#define DT_DEVICE_START(_name, _namestr,Quoted 1 line
_class) \
Would be really nice if in the course of generalization these leading underscores would also disappear. Yes, that'll require changing two of the names more than just to drop the underscores, to account for
...Quoted 8 lines
+static const struct
device_desc__dev_desc_##_name __used \
+__section(".dev.info") =
{ \
+ .name =
_namestr, \
+ .class =
_class, \... these field names.
Quoted 1 line
Also there's a strack backslash on the last line above.
Sure, I'll drop the leading underscores. Thanks.
~ Oleksii
Quoted 52 lines
Both comments similarly apply to the ACPI stuff further down.
Quoted 32 lines
+#define
DT_DEVICE_END \xen/include/asm-generic/device.h new file +26
-0+}; + +#else /* !CONFIG_HAS_DEVICE_TREE */ +#define dev_is_dt (dev) ((void)(dev), false) +#endif /* CONFIG_HAS_DEVICE_TREE */ + +#ifdef CONFIG_HAS_PCI +#define dev_is_pci (dev) ((dev)->type == DEV_PCI) +#else +#define dev_is_pci (dev) ((void)(dev), false) +#endif + +struct device_desc { + /* Device name */ + const char *name; + /* Device class */ + enum device_class class; + +#ifdef CONFIG_HAS_DEVICE_TREE + + /* List of devices supported by this driver */ + const struct dt_device_match *dt_match; + /* + * Device initialization. + * + * -EAGAIN is used to indicate that device probing isdeferred.
+ */
+ int (*init)(structdt_device_node*dev, const void *data);xen/include/asm-generic/device.h new file +1
-0+xen/include/asm-generic/device.h line 125
Quoted 10 lines
xen/include/asm-generic/device.h new file +10
-0+#endif +}; + +#ifdef CONFIG_ACPI + +struct acpi_device_desc { + /* Device name */ + const char *name; + /* Device class */ + enum device_class class;I understand it's this way on Arm right now, and I'm also not going to insist that you do anything about it right here, but it's still odd that struct
device_descdoesn't simply have a union to cover for both DT and ACPI.Jan
Re: [PATCH v7 6/7] xen/arm: switch Arm to use asm-generic/device.h
In reply to Jan BeulichQuoted 31 lines · Jan Beulich
Quoted 1 line · Oleksii Kurochko
Signed-off-by Oleksii Kurochko <[email protected]>I'm not an Arm maintainer, but if I was I wouldn't let you get away with
an empty description here. Specifically at least ...Quoted 24 lines
xen/arch/arm/device.c +0
-0@@ -16,7 +16,10 @@ #include <xen/lib.h>
extern const structdevice_desc_sdevice[], _edevice[];xen/arch/arm/device.c +2
-0+ +#ifdef CONFIG_ACPI extern const struct
acpi_device_desc_asdevice[], _aedevice[]; +#endif
int__initdevice_init(structdt_device_node*dev, enumdevice_classclass,
const void *data)xen/arch/arm/device.c +0
-0@@ -45,6 +48,7 @@ int __init device_init(struct dt_device_node *dev, enum device_class class, return -EBADF; }
+#ifdefCONFIG_ACPI
int__initacpi_device_init(enum device_class class, const void *data, int class_type)
{
const structacpi_device_desc*desc;
Quoted 8 lines
Quoted 6 lines
xen/arch/arm/device.c +0
-0@@ -61,6 +65,7 @@ int __init acpi_device_init(enum device_classclass, const void *data, int class
return-EBADF;
}
+#endif... this new #ifdef-ary would want justifying, imo.
It was added because all ACPI-related things are under #ifdef CONFIG_ACPI. Therefore, if CONFIG_ACPI is disabled, it will result in a compilation error.
Perhaps, you are right; it would be better to include this information in the commit description.
~ Oleksii