From patchwork Wed Mar 8 18:06:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 95054 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp27145obz; Wed, 8 Mar 2017 10:08:17 -0800 (PST) X-Received: by 10.36.216.4 with SMTP id b4mr7950487itg.100.1488996497707; Wed, 08 Mar 2017 10:08:17 -0800 (PST) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id i132si4593443iof.196.2017.03.08.10.08.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 10:08:17 -0800 (PST) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clfya-0007E4-SV; Wed, 08 Mar 2017 18:06:16 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clfyZ-0007DY-0M for xen-devel@lists.xen.org; Wed, 08 Mar 2017 18:06:15 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id 91/24-27751-61840C85; Wed, 08 Mar 2017 18:06:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsVysyfVTVfU40C EwZYDShZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bK9/NYC+6wVHRPOcbSwNjN0sXIxSEksIlR onXbVCjnNKPErU1T2bsYOTnYBDQl7nz+xARiiwhIS1z7fJkRxGYWKJRYffYfM4gtLGAuMfPmZ xYQm0VAVWLvnxtgcV4BS4lL5xaB1UsIyEvsarvI2sXIwcEpYCXx63w0SFgIqOTU8WOsExi5Fz AyrGLUKE4tKkst0jU01EsqykzPKMlNzMzRNTQw08tNLS5OTE/NSUwq1kvOz93ECPQvAxDsYPy 0LOAQoyQHk5Io71XVAxFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHjN3YFygkWp6akVaZk5wECD SUtw8CiJ8M53A0rzFhck5hZnpkOkTjHqctw4fuANkxBLXn5eqpQ47weQIgGQoozSPLgRsKC/x CgrJczLCHSUEE9BalFuZgmq/CtGcQ5GJWHeWJBLeDLzSuA2vQI6ggnoCG3XvSBHlCQipKQaGB NNeF9uPLmK87LB0y8hU7+dvvgleBO7+p+An4/Z/xytkul2Pf62e1/YNt277xjV9sZzBv5j43o 0Ycv8kKa1TPufHhVqMLAS95+mcObGcattUy3i1s054Fz/TUPyllsTs6zSwtZd07uW/nafmp6y IvqtN1d//u28HpNLFnOae5Y/1+yva4zrsVZiKc5INNRiLipOBAAtkb1edQIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1488996373!90431771!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26212 invoked from network); 8 Mar 2017 18:06:13 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-16.tower-27.messagelabs.com with SMTP; 8 Mar 2017 18:06:13 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D657CC28; Wed, 8 Mar 2017 10:06:12 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.218.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E218C3F23B; Wed, 8 Mar 2017 10:06:11 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 8 Mar 2017 18:06:01 +0000 Message-Id: <20170308180602.24430-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170308180602.24430-1-julien.grall@arm.com> References: <20170308180602.24430-1-julien.grall@arm.com> Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org, punit.agrawal@arm.com Subject: [Xen-devel] [PATCH 2/3] xen/arm: Introduce INVALID_VCPU_ID X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Define INVALID_VCPU_ID as MAX_VIRT_CPUS to avoid casting problem later on. At the moment it can always fit in uint8_t. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/include/asm-arm/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index ba61f65a39..6a92f53f72 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -46,6 +46,8 @@ #define MAX_VIRT_CPUS 8 #endif +#define INVALID_VCPU_ID MAX_VIRT_CPUS + #define asmlinkage /* Nothing needed */ #define __LINUX_ARM_ARCH__ 7