[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 04/29] xen/asm-generic: introduce stub header device.h
On Mon, 2023-10-23 at 12:35 +0200, Jan Beulich wrote: > On 23.10.2023 12:12, Oleksii wrote: > > On Thu, 2023-10-19 at 11:14 +0200, Jan Beulich wrote: > > > 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. > > Yes, but the definition of GIC sounds common, so I decided to leave > > it. > > But it can be changed. > > > > > > > > > + 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. > > At least right now, I am using the same header device.h as in ARM, > > Are you? I just double checked, and I can't see yours matching > theirs. > First example of a difference is them having struct dev_archdata. I just tried to commit minimum for now. It is how device.h is looked ( but still I have to align with ARM's version, I used older version of it for some reason I don't remember ) now: I just tried to commit to the minimum for now. It is how device.h looks ( but still, I have to align it with ARM's version. I used an older version of it for some reason I don't remember ) now: https://gitlab.com/xen-project/people/olkur/xen/-/blob/latest/xen/arch/riscv/include/asm/device.h?ref_type=heads > ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |