From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Liu, Jinsong" <jinsong.liu@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] Xen physical cpus interface (V2)
Date: Fri, 11 May 2012 15:31:37 -0400 [thread overview]
Message-ID: <20120511193137.GE3785@phenom.dumpdata.com> (raw)
In-Reply-To: <DE8DF0795D48FD4CA783C40EC82923351BA0B2@SHSMSX101.ccr.corp.intel.com>
> >> +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.
next prev parent reply other threads:[~2012-05-11 19:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 15:06 [PATCH 3/3] Xen physical cpus interface (V2) Liu, Jinsong
2012-05-11 14:04 ` Konrad Rzeszutek Wilk
2012-05-11 16:58 ` Liu, Jinsong
2012-05-11 19:31 ` Konrad Rzeszutek Wilk [this message]
2012-05-11 14:18 ` Konrad Rzeszutek Wilk
2012-05-11 17:28 ` Liu, Jinsong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120511193137.GE3785@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jinsong.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox