On Mon Jun 2, 2025 at 9:51 AM CEST, Jan Beulich wrote: > On 30.05.2025 14:02, Alejandro Vallejo wrote: >> --- a/xen/include/asm-generic/device.h >> +++ b/xen/include/asm-generic/device.h >> @@ -6,9 +6,7 @@ >> >> enum device_type >> { >> -#ifdef CONFIG_HAS_DEVICE_TREE >> DEV_DT, >> -#endif > > Why would this enumerator need exposing on a non-DT arch? In fact I would have > hoped for ...
A non-DT arch would not include this. x86 doesn't. > >> DEV_PCI > > ... this to be hidden for arch-es not supporting PCI. > > Similar concerns elsewhere in this change. > > Jan This file is exclusively used by arches supporting DT to abstract away where the device came from. x86 does not use it at all, and while it wouldn't be impossible to compile-out DEV_PCI, it would needlessly pollute the codebase with no measurable gain, because the abstractions still need to stay. This patch is merely removing ifdefs that don't amount to anything in practice, and I'd rather not go further than that. Cheers, Alejandro