 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 02/14] xen/asm-generic: introduce generic device.h
 Hi Oleksii, On 17/11/2023 12:24, Oleksii Kurochko wrote: Arm, PPC and RISC-V use the same device.h thereby device.hwas moved to asm-generic. I read "was moved" as the patch should also contain some deleted lines. But below, I only see the file introduced. Did you intend to also remove the version in arm/include/asm? 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. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> --- It is still open question if device.h should be in asm-generic. Need more opinions. I still think it should. But I guess you want others to answer? If so it would be worth to point out from who you seek opinions. NIT: Could we try to rationalize the number of #ifdef CONFIG_HAS_*? For example ... + +#ifdef HAS_PCI +#define dev_is_pci(dev) ((dev)->type == DEV_PCI) +#endif + +#ifdef CONFIG_HAS_DEVICE_TREE +#define dev_is_dt(dev) ((dev)->type == DEV_DT) +#endif ... this is another definition for Device-Tree only. It could be easily moved above the definitnion of dev_is_pci(). The others would be the DT_DEVICE_*() helpers. I guess you mean INTERRUPT_CONTROLLER? If so, can this be spelt out? (I don't think shorthand version is worth it here) Cheers, -- Julien Grall 
 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |