From patchwork Tue Feb 21 11:26:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 94257 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp396472qgi; Tue, 21 Feb 2017 03:28:17 -0800 (PST) X-Received: by 10.36.200.9 with SMTP id w9mr27470062itf.113.1487676497177; Tue, 21 Feb 2017 03:28:17 -0800 (PST) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r30si20056863ioi.31.2017.02.21.03.28.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 03:28: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; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.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 1cg8aZ-0002pK-Vm; Tue, 21 Feb 2017 11:26:35 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg8aY-0002o3-Me for xen-devel@lists.xenproject.org; Tue, 21 Feb 2017 11:26:34 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 0C/43-25657-9E32CA85; Tue, 21 Feb 2017 11:26:33 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRWlGSWpSXmKPExsXiVRusq/tceU2 EwZV/nBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8alk1NZC/awVczZvJulgXE2axcjF4eQwAxG ibNrZ4E5LALzmCVufFnBAuJICPSzSsy5tIO9i5EDyImReDM5vouRE8gsk1i0u4kFxBYS0JI4e gpmUiuTxM6e/cwg9WwCJhKzOiRAakQElCTurZrMBGIzC4RK/HvWBjZSWCBa4sE2bpAwi4CqxL FXG1hBbF4Bb4nJtzYwQqySk7h5rpMZxOYU8JH4u+8lO8Rab4lpd1awTWAUWMDIsIpRozi1qCy 1SNfITC+pKDM9oyQ3MTNH19DAWC83tbg4MT01JzGpWC85P3cTIzCs6hkYGHcwNuz1O8QoycGk JMqbLbUmQogvKT+lMiOxOCO+qDQntfgQowwHh5IEr5wSUE6wKDU9tSItMwcY4DBpCQ4eJRHeI 4pAad7igsTc4sx0iNQpRmOOU58uvGTi2LXr8ksmIZa8/LxUKXHe6yClAiClGaV5cINgkXeJUV ZKmJeRgYFBiKcgtSg3swRV/hWjOAejkjBvJ8g9PJl5JXD7XgGdwgR0yk2PlSCnlCQipKQaGM3 kzMr5VVl2L4h5eWzm4+88jkWHpgQ6rhcLzl/4cVZRTpT+EdWjT98nvU+X2DTh0kL/QoFtKeem LRabxsT4a72qVoT68gVHnjNEqzi7islEl/FyHbDnnFv5tiFTufTbl12e84++PaW2b4dsem+69 J9dYgZP2Q5MTTHI/LJ9Zp+6Yu8/K6OWmUosxRmJhlrMRcWJACA9MsS3AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-16.tower-31.messagelabs.com!1487676389!79066021!1 X-Originating-IP: [74.125.83.45] 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 7901 invoked from network); 21 Feb 2017 11:26:30 -0000 Received: from mail-pg0-f45.google.com (HELO mail-pg0-f45.google.com) (74.125.83.45) by server-16.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 21 Feb 2017 11:26:30 -0000 Received: by mail-pg0-f45.google.com with SMTP id s67so23737608pgb.3 for ; Tue, 21 Feb 2017 03:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R47FuTVYg+U0X+tcvoTnObURmudGvO30WNDznzMvjJ4=; b=LlPVVfamDYdNGnymidQcOOWnTB+7AQIHUEOle85EbXWTbCc+EcytvA/NSSIrQonMxa udiK+Au1tsVRgzRc3tzpsJ54W/+/OUtegmmIx2zv+QCCWtkdKaVRokEU0vnFwUT+HUC1 WxGx+U6UHbHk5Cu3PY/oCEopB4WlGgolFQjDc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R47FuTVYg+U0X+tcvoTnObURmudGvO30WNDznzMvjJ4=; b=Ws9BvlmSiszSrMdvcTD7PuzJM4cyjk+c1RRR1Rx2jYMu5mC5hbURNGs71R7dqOAPG4 JvVLX16ng8F8VDV16uXNOiVNOeLRYc6/SHg6kyKuMBJEOdCSXr67DijglWhKE8XfyVG7 Sv1cFVOlOqgdfIXf07jtvBM8I4v/8PKGDgGTT602HQbRmgdoZ1ayxYVFOJblsEGshvPs KVAj6SHGmjaYS/ogjdgJVdlBZGUEtrBRTVgKBGpelFPtwsGw6XAIeeEWgDDzgRFmIzMt sbxvMJ79jzFBSHuwxbmOpv5r60QlrGQlr5InTeyhzoG/PdeX72lNKdtoriGjj47Xn6o3 n9Hw== X-Gm-Message-State: AMke39noByBdPM1qHBj4/F7rWCeWY2d/qwnggeIeg9WdC8LJuQaq9AK3j7ASPuH1w9lNX3Mh X-Received: by 10.84.194.1 with SMTP id g1mr5814589pld.98.1487676389261; Tue, 21 Feb 2017 03:26:29 -0800 (PST) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id p66sm40508627pfb.88.2017.02.21.03.26.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 03:26:28 -0800 (PST) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Tue, 21 Feb 2017 16:56:02 +0530 Message-Id: <1487676368-22356-6-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487676368-22356-1-git-send-email-bhupinder.thakur@linaro.org> References: <1487676368-22356-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH 05/11] xen/arm: vpl011: Initialize nr_spis in vgic_init in Xen to atleast 1 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" Ensure that nr_spis intialized in in vgic_init is atleast 1 to allow allocation of pl011 spi virq. Signed-off-by: Bhupinder Thakur --- xen/arch/arm/vgic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 364d5f0..614b3ec 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -121,6 +121,11 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis) /* Limit the number of virtual SPIs supported to (1020 - 32) = 988 */ if ( nr_spis > (1020 - NR_LOCAL_IRQS) ) return -EINVAL; +#ifdef CONFIG_VPL011_CONSOLE + /* Atleast 1 spi should be available for assigning to vpl011 */ + else if ( nr_spis < (1020 - NR_LOCAL_IRQS) ) + nr_spis += 1; +#endif d->arch.vgic.nr_spis = nr_spis;