[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 1/6] xen: Add convenient macro boot_cpu



On Tue, 2014-05-06 at 16:54 +0100, Julien Grall wrote:
> Hi Andrew,
> 
> On 05/02/2014 04:57 PM, Andrew Cooper wrote:
> > On 02/05/14 16:52, Julien Grall wrote:
> >> The macro boot_cpu will be used to get CPU variable from the boot CPU.
> >>
> >> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> >> Suggested-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> >> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> >> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> >> Cc: Keir Fraser <keir@xxxxxxx>
> >> ---
> >>  xen/include/xen/percpu.h |    3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/xen/include/xen/percpu.h b/xen/include/xen/percpu.h
> >> index abe0b11..0e848bf 100644
> >> --- a/xen/include/xen/percpu.h
> >> +++ b/xen/include/xen/percpu.h
> >> @@ -16,6 +16,9 @@
> >>  /* Preferred on Xen. Also see arch-defined per_cpu(). */
> >>  #define this_cpu(var)    __get_cpu_var(var)
> >>  
> >> +/* Access variable on boot CPU */
> >> +#define boot_cpu(var)   per_cpu(var, 0)
> >> +
> > 
> > What is this actually used for?
> 
> I use it to retrieve PPIs (per-processor interrupt) type and initialize
> PPIs for the new CPUs.

I wonder if perhaps this shouldn't be saved in a per-cpu variable then?



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.