From patchwork Thu Mar 15 20:30:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 131847 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp1579207ljb; Thu, 15 Mar 2018 13:33:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELvbKNWwlZwBM/bixA6pTy6xuY0A/OU29prQp2DweK9GHH2TxJ6Yxlm/YTvXs9mUEeu4IHnX X-Received: by 2002:a24:8d03:: with SMTP id w3-v6mr7548809itd.65.1521146000965; Thu, 15 Mar 2018 13:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521146000; cv=none; d=google.com; s=arc-20160816; b=CZDkf/AZfj3L4qVd+QHYFTJV8O+3fyEJwBN2/E1VnU6dMp9GK88zjQN+Q2hOv+25+8 2LfViDweQfl+ZfCYoJQYda79kbR4o9bvY83y7rdWoYfWS89ZkxnA9ZAv7F7m5n9kGA1v ZvxKTdGfy399jIxY+Z7o76an5M1hdmJtbZUHMNToz4KfSW2KMY+ExI3BcIw2QuYq6HMI rxgsjEiotaOjcsv7ueZKgdvZzRBad/ySLx0QaRqSjqu5tD2J8hq+Neds/1qkfW864qwG I9CBY7tQAqzPtUUagM6xhNveiA0rITcnrZVg3MTQCyUbnIZJiLxRin0oJXWC99y6Au+Y e/NQ== 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:dkim-signature:arc-authentication-results; bh=jFsYEFDXLLVCz7ermkmUq1YNtjfAgZ13E/CyUhUyEdg=; b=ASQ2TUx9wVuy8OqgDYJp/JtZGboq+eIw/4Lj2VeSnPdITSbG1o4gqhAcB68+N02bfW v4LtKnj2psWKJbcitlbIZtHzHoiLeavsxo2FrbEl9helPQyPjoEQGenTscN0ejh0ZA/j yAlMGJePV7MolsmEckr462MUvv3G2cmcCyGFCWLt1pwgeiafli3MUEsv8DGGzrTWZFXv n+Jrb/cAaxgvwtGbmrNir1DBXuH9fOI9Uq+Uzums1DfvvBOFz4qmLVv1W5EF+OXwysIu w9b1DCu/Eq7lb1i5DYF70dCCw8+NDCqjGPMcyxCrKku8N14I+b7uIEWmId7kYJTWr2H3 ReWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ESikJ1uw; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id j83si3738201ioo.139.2018.03.15.13.33.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 13:33:20 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ESikJ1uw; 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; 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 1ewZX0-0003GE-GW; Thu, 15 Mar 2018 20:31:22 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewZWz-0003DV-93 for xen-devel@lists.xenproject.org; Thu, 15 Mar 2018 20:31:21 +0000 X-Inumbo-ID: ce49f9bf-288f-11e8-9728-bc764e045a96 Received: from mail-wm0-x241.google.com (unknown [2a00:1450:400c:c09::241]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id ce49f9bf-288f-11e8-9728-bc764e045a96; Thu, 15 Mar 2018 21:31:14 +0100 (CET) Received: by mail-wm0-x241.google.com with SMTP id h76so12875029wme.4 for ; Thu, 15 Mar 2018 13:31:20 -0700 (PDT) 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=no2uHRlHBiZBOe/nLb3d2Tzwk2SP7O7xWyj/rM6uRPM=; b=ESikJ1uwzt0TnCQYvN4mfYyc4Bbw0ZXTiT3GdjdMicRgC97HV7W7iferJ99eSTneW9 9oOumfDWL5EF/jTClBI7gYqocGVswL3ouT8CB9aryfG3G2gjIQ/S8k6yziMjjNnQW5cW U5vC8SlhqlhTnEXEtUchJE5l72xgS9okPSZlM= 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=no2uHRlHBiZBOe/nLb3d2Tzwk2SP7O7xWyj/rM6uRPM=; b=MeJbQu5qglqcwwuYC1HpGcZkvwVLw7gAzfK4sqkm3AKg8zGFuMlL9874IhOzfOyiGK Fo4uXUyE5K0x8Eoqs9UipKuBmD0sLzC9I0nm0kLwHwiEhJLwe+liav1pfcOOwSRlSbC3 IfprnbhQcjNyJRzZRvPU7R2HV0TZJgnSqrcEhE27X4SokHl0UEOOFMqUnYlcEoettyAv CrByK49+DZYNZLD7F9mKgezBKsUGEIy9E1zmVXf7hJrgAu1LpwckgF6dd0w97I6vo1Of +DMtfh6OTZ69t9jzX/PerAXVEOZI11Lg/8JUXGagXbprWZdZHQWiFopoVDLrGJjwYMBP GeJw== X-Gm-Message-State: AElRT7EuSux8+uEUsIaK8Hpl/hE+jCUIcwbVmZZkfcI81RvZiUtAS2pk TqBGnj1G4+sSV+pa6LMKUDIc2Q== X-Received: by 10.28.238.77 with SMTP id m74mr6260922wmh.79.1521145879218; Thu, 15 Mar 2018 13:31:19 -0700 (PDT) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id w125sm3217102wmw.20.2018.03.15.13.31.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Mar 2018 13:31:18 -0700 (PDT) From: Andre Przywara To: Stefano Stabellini , Julien Grall Date: Thu, 15 Mar 2018 20:30:18 +0000 Message-Id: <20180315203050.19791-14-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180315203050.19791-1-andre.przywara@linaro.org> References: <20180315203050.19791-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v2 13/45] ARM: vPL011: Use the VGIC's level triggered IRQs handling if available 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" The emulated ARM SBSA UART is using level triggered IRQ semantics, however the current VGIC can only handle edge triggered IRQs, really. Disable the existing workaround for this problem in case we have the new VGIC in place, which can properly handle level triggered IRQs. Signed-off-by: Andre Przywara Reviewed-by: Julien Grall --- Changelog v1 ... v2: - remove unneeded "!!" xen/arch/arm/vpl011.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c index 5dcf4bec18..a281eabd7e 100644 --- a/xen/arch/arm/vpl011.c +++ b/xen/arch/arm/vpl011.c @@ -54,6 +54,7 @@ static void vpl011_update_interrupt_status(struct domain *d) */ ASSERT(spin_is_locked(&vpl011->lock)); +#ifndef CONFIG_NEW_VGIC /* * TODO: PL011 interrupts are level triggered which means * that interrupt needs to be set/clear instead of being @@ -71,6 +72,9 @@ static void vpl011_update_interrupt_status(struct domain *d) vgic_inject_irq(d, NULL, GUEST_VPL011_SPI, true); vpl011->shadow_uartmis = uartmis; +#else + vgic_inject_irq(d, NULL, GUEST_VPL011_SPI, uartmis); +#endif } static uint8_t vpl011_read_data(struct domain *d)