From patchwork Mon Mar 5 16:03:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 130652 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2853479lja; Mon, 5 Mar 2018 08:06:56 -0800 (PST) X-Google-Smtp-Source: AG47ELtJQGqXs8n3NnRPB0Vin7Nmcm8WsOEqWyb6FZCVr2fkPekoaOr0JjkrDje+1d0NPU/ua9ZT X-Received: by 10.36.63.66 with SMTP id d63mr13823998ita.91.1520266015928; Mon, 05 Mar 2018 08:06:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520266015; cv=none; d=google.com; s=arc-20160816; b=VaJe3yagkmFJDM5LYQEUpmPXi7iJWUP020vPGxUvvVEczPl/0hNUtqxGNGjqAEZuos WXjq9dhPDTnWMLlDg8r7KV9WntC8PPEDdvQp+jMyv86NxyrF7Yw8mESZtQhfJ3vXNf/k dJFGdNGiswvsA9xxc/DyL4/cpDXar5FksntjXwQYm7my28DiYzQ9fTJ47OzFfJTm0zWW yyWqB7wUPvP93ugCI7oZOhJw5rSZwxuFxkiVa41G69AUB+9x0ySQ1lN1ukmw96fsvsPR yuUKJr/Ybj9VrgfojhDeDMAwL4ogQQ66Occ+kqw6BJ1v/Cq8vTtpF/c5EIVDRCK6PQES b9YA== 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=dOgkPHHGcVWQjmy7xG6acwOXyrKSgEpZJSfhIMNGoYk=; b=F2klgBRehyl9bi8XoOSMW80uqX7wFPQ8mlwxRqplJu7pycAUfqCD9tYCBeVg5RYs9G Z34CLbyasb1343TQEVeAMUYqg3PzF5X4hjr9ic1QCvaGzseCtn7TZ8GSTNq/O9wVNU7s sNhuo7fFxqvz/pW/bIf8S8KnauVZaDtjiLyeNoPSk/3pI8mnX1KF39nOoUCIsmVYukN9 enCM2bsXrkHanpOmIff3rr+xxyMrCr13ary6NC13h1UfwTGk17jb0g+EgDdmsK/iLYCQ e1kFZEtPLeKELjhIhZKk7eNZX7fclf7kKRlJeWMICpRhmvT/YYpZZYT9QDFnxvVcU8Fo EsSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GfQZUf1Z; 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 o65si6698333ioo.10.2018.03.05.08.06.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 08:06:55 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GfQZUf1Z; 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 1essbc-0007nk-6J; Mon, 05 Mar 2018 16:04:52 +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 1essba-0007jr-SS for xen-devel@lists.xenproject.org; Mon, 05 Mar 2018 16:04:50 +0000 X-Inumbo-ID: c726e9e1-208e-11e8-ba59-bc764e045a96 Received: from mail-wm0-x241.google.com (unknown [2a00:1450:400c:c09::241]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id c726e9e1-208e-11e8-ba59-bc764e045a96; Mon, 05 Mar 2018 17:03:44 +0100 (CET) Received: by mail-wm0-x241.google.com with SMTP id s206so13873376wme.0 for ; Mon, 05 Mar 2018 08:04:49 -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=tPnErMbi/tMYYav/y9dhab9VwQl8pbTtXeM6Y7MMe2o=; b=GfQZUf1ZJ8gLrtTFyk/KG86uCSsSvjGrKGUueoaV9FrNofzWuoZ3TC5m4Za8f93eC6 Ep5J36QSIyquuXXMcCEoi1hwgTx98hnbnmrUo2TnP4syLt17okyA6bef3KjM5WRavkns Me9y5WDwPjrLKkf+HNBastfyfPWwWdU7GGwV4= 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=tPnErMbi/tMYYav/y9dhab9VwQl8pbTtXeM6Y7MMe2o=; b=EUuvoWwvi96lN9lRh1HbMFf/z/lU7ulKqHEDQWu1vMExQ4NNaZ6yBo/0Se8hrXsEFM QIMltdPLb3jWS8zQSDdA1gCwhWXeDqffvgXMVBv7uu1TxdWuwrJCXMVcd/hzKtyhsd37 3elCnDXfFyR0PPi0pgL0zo07SIFiFioiY+8Z+aoWnooHBvEHasuD/X1RRRZz8j9JXrpU T1COqd5WYbO4sy4HzoumTaeua+tEpmhBEX8yS2Otsn+lBl3p2YQRZAapGYQzjNwD1yyl 4hu0lsgETMG6nYXYdvadf/cxQ9K37kSNEpQis9xVq2K2iAj5RFsxUnUsAV1W+dct360g C7mg== X-Gm-Message-State: AElRT7FZQ2TUDwxzFGp23IGsDTpFYzCvLFKukeiM/4pWy2IjenbwIQj4 Mg5MqDBTsGb+pkRg51/Pw+56bQ== X-Received: by 10.28.140.144 with SMTP id o138mr7890738wmd.138.1520265888649; Mon, 05 Mar 2018 08:04:48 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id y6sm6574381wmy.14.2018.03.05.08.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Mar 2018 08:04:48 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Mon, 5 Mar 2018 16:03:44 +0000 Message-Id: <20180305160415.16760-27-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180305160415.16760-1-andre.przywara@linaro.org> References: <20180305160415.16760-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH 26/57] 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 --- Changelog RFC ... v1: - no changes 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..197ece8873 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)