From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 1/6] xen: Add convenient macro boot_cpu Date: Mon, 12 May 2014 13:36:28 +0100 Message-ID: <5370C04C.4050803@linaro.org> References: <1399045930-17364-1-git-send-email-julien.grall@linaro.org> <1399045930-17364-2-git-send-email-julien.grall@linaro.org> <5363C07F.8040603@citrix.com> <5369059C.7060506@linaro.org> <1399543050.9513.25.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WjpT6-00042V-5u for xen-devel@lists.xenproject.org; Mon, 12 May 2014 12:36:32 +0000 Received: by mail-ee0-f52.google.com with SMTP id e53so4566093eek.25 for ; Mon, 12 May 2014 05:36:30 -0700 (PDT) In-Reply-To: <1399543050.9513.25.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Keir Fraser , Andrew Cooper , Ian Jackson , tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 05/08/2014 10:57 AM, Ian Campbell wrote: > 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 >>>> Suggested-by: Ian Campbell >>>> Cc: Ian Jackson >>>> Cc: Jan Beulich >>>> Cc: Keir Fraser >>>> --- >>>> 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? As talked on patch #2, I will drop this patch and use a static variable to store PPIs type. Regards, -- Julien Grall