From patchwork Tue Feb 27 15:15:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 129833 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp402482edc; Tue, 27 Feb 2018 07:21:50 -0800 (PST) X-Google-Smtp-Source: AG47ELvAit3u81+zMtYGfs6AkFyp0/+oRIjxfWL2LYgIezt2715ZT9HmuCis2NfKY9GXOfXpAM8w X-Received: by 10.36.254.65 with SMTP id w62mr17392103ith.130.1519744910487; Tue, 27 Feb 2018 07:21:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519744910; cv=none; d=google.com; s=arc-20160816; b=eaIK8UEMbNJShg+9xiaFDg9VjwnPh8sn+xbGuzhmM5gChrh5hOnJFHjdjCPcHd+Lyx sCSZ+U3ZHrlGscjj15IVJciW+B73dcWoLZUJ2lOpiXT3/a0aA49KuWcfb6lOyHFX2cnp Uhj8DdpJwDRhNLgbw9D/ZmbbqZNHpMg0rRHNx8nV3xrKAFYLispuRenSqnt7CqjZVgTs zH5XJZeM8HlFdCxjbyi7cLYcOw5O3cFHBsExcChAZnfGTI84aZOUZnn/VsXjwhqKt0Xn dmwYz29Olyp8UzddZh/DQE3oJfbQnC+wex2R5aubrGrRkJWxqHmgLYdcTd55qq7BBADg aWuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=RTlambAR6zBQaE7/RUI9KAkR2yhyP1miaP6j05eMc2s=; b=ZpDythUATykiQKI0S14n7dmkhR9zJdCUrcPuT/jDFQaf4G6GxiVWbHuD8xaTB4Epi7 B0Djvhg4t9K//S/O3lgCbq7zC8zOWjbKaHZsRsm+Giyv2bL9T8AO9XKJHfnWUdROAyOQ r915zIh7heLEBh1goE2IpcEC5i32867TtN6KVh+opfuZl7CDyyXsMWrin77zBh9eoeos vG4uaXiMZocUVh7nMYE0SVxkwNkliuSZYvELikm8gDhMUm5BAYV+jkc3z7lF8cjWE+CP ZFaWydSjsl61tqGtGH8InL86g5shDAMKSwF7byh9eq7AvAscdrLifwEEYv1+OBJxOxrZ G/+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 29si7395342ioi.208.2018.02.27.07.21.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 07:21:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.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 1eqh2X-0005gT-Ja; Tue, 27 Feb 2018 15:19:37 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqh2W-0005fd-7R for xen-devel@lists.xenproject.org; Tue, 27 Feb 2018 15:19:36 +0000 X-Inumbo-ID: 68cde7ba-1bd1-11e8-b9b1-635ca7ef6cff Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 68cde7ba-1bd1-11e8-b9b1-635ca7ef6cff; Tue, 27 Feb 2018 15:18:05 +0000 (UTC) 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 E291B165C; Tue, 27 Feb 2018 07:16:09 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AFEA53F25C; Tue, 27 Feb 2018 07:16:08 -0800 (PST) From: julien.grall@arm.com To: xen-devel@lists.xenproject.org Date: Tue, 27 Feb 2018 15:15:55 +0000 Message-Id: <20180227151555.1953-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180227151555.1953-1-julien.grall@arm.com> References: <20180227151555.1953-1-julien.grall@arm.com> Cc: Stewart Hildebrand , andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH 3/3] xen/arm: domain_builder: irq sanity check logic fix X-BeenThere: xen-devel@lists.xenproject.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.xenproject.org Sender: "Xen-devel" From: Stewart Hildebrand Since commit "xen/arm: domain_build: Rework the way to allocate the event channel interrupt", it is not possible for an irq to be both below 16 and greater/equal than 32. Also fix the reference to linux documentation while we're at it. Signed-off-by: Stewart Hildebrand Signed-off-by: Julien Grall [Slightly rework the commit message] Acked-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index ed1a393bb5..28ee876b92 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -503,9 +503,10 @@ static void set_interrupt_ppi(gic_interrupt_t interrupt, unsigned int irq, { __be32 *cells = interrupt; - BUG_ON(irq < 16 && irq >= 32); + BUG_ON(irq < 16); + BUG_ON(irq >= 32); - /* See linux Documentation/devictree/bindings/arm/gic.txt */ + /* See linux Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt */ dt_set_cell(&cells, 1, 1); /* is a PPI */ dt_set_cell(&cells, 1, irq - 16); /* PPIs start at 16 */ dt_set_cell(&cells, 1, (cpumask << 8) | level);