|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 6/6] xen/common: move device initialization code to common code
On 26/09/2024 18:54, Oleksii Kurochko wrote:
>
>
> Remove the device initialization code from `xen/arch/arm/device.c`
> and move it to the common code to avoid duplication and make it accessible
> for both ARM and other architectures.
> device_get_class(), device_init(), _sdevice[] and _edevice[] are wrapped by
> "#ifdef CONFIG_HAS_DEVICE_TREE" for the case if an arch doesn't support
> device tree.
>
> Remove unnecessary inclusions of <asm/device.h> and <xen/init.h> from
> `xen/arch/arm/device.c` as no code in the file relies on these headers.
> Fix the inclusion order by moving <asm/setup.h> after <xen/*> headers to
> resolve a compilation error:
> ./include/public/xen.h:968:35: error: unknown type name 'uint64_t'
> 968 | __DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t);
> | ^~~~~~~~
> ./include/public/arch-arm.h:191:21: note: in definition of macro
> '___DEFINE_XEN_GUEST_HANDLE'
> 191 | typedef union { type *p; uint64_aligned_t q; } \
> | ^~~~
> ./include/public/xen.h:968:1: note: in expansion of macro
> '__DEFINE_XEN_GUEST_HANDLE'
> 968 | __DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t);
> because <asm/setup.h> includes <public/version.h>, which in turn includes
> "xen.h", which requires <xen/types.h> to be processed correctly.
> Additionally, add <xen/device_tree.h> to `device.c` as functions from this
> header are used within the file.
>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |