From patchwork Mon Nov 24 09:41:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 41396 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4027824524 for ; Mon, 24 Nov 2014 09:43:24 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf3972895lbj.7 for ; Mon, 24 Nov 2014 01:43:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=psZxgYjX0VR0lJ+eAJg125hEgt5iwPKST83MP6dNlJo=; b=l9QarBuCwtRSqbkZVqhezpxZxjxye4GY6FQm8HSZi9sP9wcx069dgSAtgE8xMLGiyT 6yTMAAmjfiw/eofmJ87kH9tIo5hBhBPdoscCzGLUbqHRcUPKBE3YOSBvGlB3AxhcKgCC n3MXV0fAYmzB0sPPtP6YsO4yviQqAB54YaC7oZYKlThjuXtDtIvcvJeb/TINarOGWut5 ngvPjkxzkYFikQnoM/wJv/Y6KstjxGeIseQAplRix63qu4rfCqy34suQ9OVsQS7EK6M7 YqDbDRBsafJscx5OSIlpbM/G0Xp2tiY5PhBqkeZjGtcbPdd1jDj0fuBnx++TPSpBBONF C+0w== X-Gm-Message-State: ALoCoQnfkfrtR/Hpy4e5swLM1ubQLdSAor/NdpV1dpq/aLciq3dvVHHqC8D1XjVzM4a9RqP1Neaf X-Received: by 10.112.14.2 with SMTP id l2mr1114396lbc.5.1416822203206; Mon, 24 Nov 2014 01:43:23 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.202 with SMTP id ks10ls413461lac.72.gmail; Mon, 24 Nov 2014 01:43:22 -0800 (PST) X-Received: by 10.112.141.233 with SMTP id rr9mr19561457lbb.1.1416822202795; Mon, 24 Nov 2014 01:43:22 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id be17si14561566lab.86.2014.11.24.01.43.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 01:43:22 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gf13so7098052lab.41 for ; Mon, 24 Nov 2014 01:43:22 -0800 (PST) X-Received: by 10.152.8.170 with SMTP id s10mr19441906laa.56.1416822202427; Mon, 24 Nov 2014 01:43:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp223996lbc; Mon, 24 Nov 2014 01:43:21 -0800 (PST) X-Received: by 10.66.248.36 with SMTP id yj4mr31238553pac.51.1416822200956; Mon, 24 Nov 2014 01:43:20 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id lo4si20646700pab.123.2014.11.24.01.43.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 01:43:20 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xsq9d-0005m4-0U; Mon, 24 Nov 2014 09:41:57 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xsq9W-0005V4-5I for linux-arm-kernel@lists.infradead.org; Mon, 24 Nov 2014 09:41:50 +0000 Received: by mail-lb0-f179.google.com with SMTP id z11so2249185lbi.24 for ; Mon, 24 Nov 2014 01:41:26 -0800 (PST) X-Received: by 10.152.234.227 with SMTP id uh3mr19616761lac.69.1416822086822; Mon, 24 Nov 2014 01:41:26 -0800 (PST) Received: from localhost.localdomain (188-178-240-98-static.dk.customer.tdc.net. [188.178.240.98]) by mx.google.com with ESMTPSA id xn9sm3414416lbb.25.2014.11.24.01.41.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 01:41:25 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending Date: Mon, 24 Nov 2014 10:41:56 +0100 Message-Id: <1416822116-9044-1-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.1.2.330.g565301e.dirty X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141124_014150_390949_367181B5 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.179 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.217.179 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Marc Zyngier , Christoffer Dall , kvm@vger.kernel.org, Eric Auger X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 When 'injecting' an edge-triggered interrupt with a falling edge we shouldn't clear the pending state on the distributor. In fact, we don't, because the check in vgic_validate_injection would prevent us from ever reaching this bit of code. Remove the unreachable snippet. Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 3aaca49..f45cf16 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1643,8 +1643,6 @@ static bool vgic_update_irq_pending(struct kvm *kvm, int cpuid, vgic_dist_irq_clear_level(vcpu, irq_num); if (!vgic_dist_irq_soft_pend(vcpu, irq_num)) vgic_dist_irq_clear_pending(vcpu, irq_num); - } else { - vgic_dist_irq_clear_pending(vcpu, irq_num); } }