On 14.09.2023 16:56, Oleksii Kurochko wrote:
> --- /dev/null
> +++ b/xen/include/asm-generic/device.h
> @@ -0,0 +1,65 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASM_GENERIC_DEVICE_H__
> +#define __ASM_GENERIC_DEVICE_H__
> +
> +struct dt_device_node;
> +
> +enum device_type
> +{
> + DEV_DT,
> + DEV_PCI,
> +};
Are both of these really generic?
> +struct device {
> + enum device_type type;
> +#ifdef CONFIG_HAS_DEVICE_TREE
> + struct dt_device_node *of_node; /* Used by drivers imported from Linux */
> +#endif
> +};
> +
> +enum device_class
> +{
> + DEVICE_SERIAL,
> + DEVICE_IOMMU,
> + DEVICE_GIC,
This one certainly is Arm-specific.
> + DEVICE_PCI_HOSTBRIDGE,
And this one's PCI-specific.
Overall same question as before: Are you expecting that RISC-V is going to
get away without a customized header? I wouldn't think so.
Jan