[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/3] Xen physical cpus interface (V2)
> >> +struct pcpu { > >> + struct list_head list; > >> + struct device dev; > >> + uint32_t cpu_id; > >> + uint32_t flags; > >> +}; > >> + > >> +static struct bus_type xen_pcpu_subsys = { > >> + .name = "xen_cpu", > >> + .dev_name = "xen_cpu", > >> +}; > >> + > >> +static DEFINE_MUTEX(xen_pcpu_lock); > >> + > >> +static LIST_HEAD(xen_pcpus); > > > > So what about the recommendation to get rid of that and > > instead do > > > > struct pcpu *xen_cpu; > > I'm not quite clear your meaning here, do you mean 'LIST_HEAD(xen_pcpus)' > instead of 'struct pcpu *xen_cpu'? No. Just use the embedded 'struct list_head' inside of 'struct pcpu' as your iterator. And your first 'struct pcpu' won't ever be deleted (as it is for CPU0), so you can iterate from that. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |