From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: RE: [PATCH][DOM0] Expose physical CPU information in dom0
Date: Thu, 12 Nov 2009 10:46:58 -0500 [thread overview]
Message-ID: <20091112154658.GA32409@phenom.dumpdata.com> (raw)
In-Reply-To: <E2263E4A5B2284449EEBD0AAB751098418E55575DA@PDSMSX501.ccr.corp.intel.com>
Some little comments..
.. snip ..
> + if (info->flags & XEN_PCPU_FLAGS_INVALID) {
> + /* The pcpu has been removed */
> + *result = 0;
You use #defines for the other cases. Should there be
one for 0? Is 0 PCPU_REMOVED?
> + if (pcpu) {
> + raw_notifier_call_chain(&xen_pcpu_chain,
> + XEN_PCPU_REMOVE,
> + (void *)(long)pcpu->xen_id);
> + xen_pcpu_free(pcpu);
> + *result = PCPU_REMOVED;
> + }
> + return NULL;
> + }
> +
> +
> + if (!pcpu) {
> + *result = PCPU_ADDED;
> + pcpu = init_pcpu(info);
> + if (pcpu == NULL) {
> + printk(KERN_WARNING "Failed to init pcpu %x\n",
> + info->xen_cpuid);
> + *result = -1;
How about #define PCPU_BAD -1?
.. snip..
> +/*
> + * type: 0 add, 1 remove
> + */
Why not make this an enum?
> +int xen_pcpu_hotplug(int type, uint32_t apic_id)
next prev parent reply other threads:[~2009-11-12 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-06 8:20 [PATCH][DOM0] Expose physical CPU information in dom0 Jiang, Yunhong
2009-11-12 15:38 ` Jiang, Yunhong
2009-11-12 15:46 ` Konrad Rzeszutek Wilk [this message]
2009-11-12 16:08 ` Jiang, Yunhong
2009-11-13 9:42 ` Jiang, Yunhong
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=20091112154658.GA32409@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.com \
--cc=yunhong.jiang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.