From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH v5 1/6] xen: Add convenient macro boot_cpu Date: Fri, 2 May 2014 16:52:05 +0100 Message-ID: <1399045930-17364-2-git-send-email-julien.grall@linaro.org> References: <1399045930-17364-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgFl3-000751-Ai for xen-devel@lists.xenproject.org; Fri, 02 May 2014 15:52:30 +0000 Received: by mail-ee0-f48.google.com with SMTP id e49so2109283eek.35 for ; Fri, 02 May 2014 08:52:15 -0700 (PDT) In-Reply-To: <1399045930-17364-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Keir Fraser , ian.campbell@citrix.com, tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org 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) + /* Linux compatibility. */ #define get_cpu_var(var) this_cpu(var) #define put_cpu_var(var) -- 1.7.10.4