From patchwork Tue Sep 5 15:41:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9939247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7336260350 for ; Tue, 5 Sep 2017 15:42:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65EF3289B2 for ; Tue, 5 Sep 2017 15:42:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A824289B5; Tue, 5 Sep 2017 15:42:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E1F74289B2 for ; Tue, 5 Sep 2017 15:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=TkHppqnidhyqDImasXBDu0pGJi8OG760MPb7FpxJcoA=; b=d3Z/deciA4QNO3b+VhkRpj3Yij f8vdHoe8a2huurRfO02xO26EkMoIGVvVzicy5DKhR8TZ9Mjb3w5YaBJFrjMiji94OV987dvVP8Uyr eAH/43ZksXXvjlc1yUeCjA+wqCQYFUsIKfCD9SD3dkwc1fNTRc5NETB9H81Sz/3GXrod0wtt0HAoo P/m/7E6SbJY+gm8S2akm0VULjcUelCMJDkXaSHhhhkn16Jk6KHBau3BYQ+xpAEAcV2WY2Xv6F1o7E nAOTImN/+AenrKJu/cc2n6deC4PMVIaPLc3u5vKl4gN1gb27whODkrGLBX13QbjB1gnSPDIuPzEd+ EEQngEXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dpFzr-0007FX-8K; Tue, 05 Sep 2017 15:42:39 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dpFyv-0006IW-V6 for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2017 15:41:47 +0000 Received: by mail-wm0-x230.google.com with SMTP id i145so20982754wmf.1 for ; Tue, 05 Sep 2017 08:41: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=axy93iugscsBzbX2yvmRm3H4WcT7IB3eiSq+wjvYMw4=; b=IfzMl6YXRAICtsjzJ+uJZUzt5q/2X044XqigDrpeZfWxTdVUQBaNKc2iMue0zgImPc PlsPIES1iDLrbe+WXUJzZlcuT40OXPH/TK4qo+EGwx2N4qboglBlBAHnMM96vNXlk6Yh zlX0MmHELRKwSoD4L6OUt04ARZIu5+EL8JJ44= 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=axy93iugscsBzbX2yvmRm3H4WcT7IB3eiSq+wjvYMw4=; b=bLL//vqM5q8mqU0WenP3F0xEKZA2lrLOdsZqw/WOfQTxcRp9fk6YoU/rPQrGAc0b/q zBvw3fSqI3Wp9grfk+hPt9mL1/KhQK/DvU5D4jVZypNse//M1CKgnCh7dQIgBT2auUCu SifRu2HJXP64thr/kaBSXY/agFlVfpLuc0PffV9BRWChavZRXb4HKX2B/5BzaYS0odQ1 YuBod+3GLOANXB6rfzmg72brPnmHIkcqrpcnpfofJcXpn5T2B0o4Ltf3EGYRWG1IzMS5 PkW2duT7cygJPLD2vdbfU7ezSaLI8oBtfSCNN3B8w20UocgSHgnAD8BcNe9CV325zz49 OQOw== X-Gm-Message-State: AHPjjUhnPeUxZagWaxdlFxaTT5H9CYAAtrR2mV3pR1aFuPOsU2n0FGZt xyrWhrDdTRgUHwTY X-Google-Smtp-Source: ADKCNb5n1GDohQuBYY6jlKfxby5+12KiP6KjrqbVahbT6KuiCgHpwdzrati0CBd0SNUGjo7aI0LhOQ== X-Received: by 10.80.149.92 with SMTP id v28mr1167045eda.284.1504626079614; Tue, 05 Sep 2017 08:41:19 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id k19sm336273eda.73.2017.09.05.08.41.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Sep 2017 08:41:18 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL v2 3/5] KVM: arm/arm64: vITS: Drop its_ite->lpi field Date: Tue, 5 Sep 2017 17:41:04 +0200 Message-Id: <20170905154106.2945-4-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170905154106.2945-1-cdall@linaro.org> References: <20170905154106.2945-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170905_084142_273387_07E646C8 X-CRM114-Status: GOOD ( 12.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier For unknown reasons, the its_ite data structure carries an "lpi" field which contains the intid of the LPI. This is an obvious duplication of the vgic_irq->intid field, so let's fix the only user and remove the now useless field. Signed-off-by: Marc Zyngier Reviewed-by: Andre Przywara Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-its.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index aa6b68d..f51c1e1 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -144,7 +144,6 @@ struct its_ite { struct vgic_irq *irq; struct its_collection *collection; - u32 lpi; u32 event_id; }; @@ -813,7 +812,7 @@ static void vgic_its_free_collection(struct vgic_its *its, u32 coll_id) /* Must be called with its_lock mutex held */ static struct its_ite *vgic_its_alloc_ite(struct its_device *device, struct its_collection *collection, - u32 lpi_id, u32 event_id) + u32 event_id) { struct its_ite *ite; @@ -823,7 +822,6 @@ static struct its_ite *vgic_its_alloc_ite(struct its_device *device, ite->event_id = event_id; ite->collection = collection; - ite->lpi = lpi_id; list_add_tail(&ite->ite_list, &device->itt_head); return ite; @@ -873,7 +871,7 @@ static int vgic_its_cmd_handle_mapi(struct kvm *kvm, struct vgic_its *its, new_coll = collection; } - ite = vgic_its_alloc_ite(device, collection, lpi_nr, event_id); + ite = vgic_its_alloc_ite(device, collection, event_id); if (IS_ERR(ite)) { if (new_coll) vgic_its_free_collection(its, coll_id); @@ -1848,7 +1846,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev, next_offset = compute_next_eventid_offset(&dev->itt_head, ite); val = ((u64)next_offset << KVM_ITS_ITE_NEXT_SHIFT) | - ((u64)ite->lpi << KVM_ITS_ITE_PINTID_SHIFT) | + ((u64)ite->irq->intid << KVM_ITS_ITE_PINTID_SHIFT) | ite->collection->collection_id; val = cpu_to_le64(val); return kvm_write_guest(kvm, gpa, &val, ite_esz); @@ -1895,7 +1893,7 @@ static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id, if (!collection) return -EINVAL; - ite = vgic_its_alloc_ite(dev, collection, lpi_id, event_id); + ite = vgic_its_alloc_ite(dev, collection, event_id); if (IS_ERR(ite)) return PTR_ERR(ite);