From patchwork Tue Sep 5 14:52:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9939173 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 4DADF60350 for ; Tue, 5 Sep 2017 14:54:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E68B28995 for ; Tue, 5 Sep 2017 14:54:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33394289A5; Tue, 5 Sep 2017 14:54:00 +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 1710828995 for ; Tue, 5 Sep 2017 14:53:59 +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=l9r+NY40+jST7xk5MPqcj6lywV bq8ZLyqdK2atTCIz0Cwqsv2K5wx8YUyRDZOGZacfbtxjNin1SL4ZYBalrtXFMeVwxYHJcXbta3RWd 1kYDvMpoTV00KyWNe13mJ7P2XDqY+E9G/2L8NJl5+Ub0nu1LTRcWOTzHiP6oBFou3jy2xb/jG74d+ qRAvFnlROmoqXpfRc29Mh6ReRB7ZPgRum/2/5WmrWY2Z5ZBbneARpOXpWrCee4MOnJt+W5+1xBwsf g36NH0bwrkMeb9HU0HO5xwtUPmijdwYT8anTBM/8+W9umeD+TBJ3Xhm4gZaF/L6Lq1H/eqIbM+Slu XC158Y+A==; 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 1dpFEf-0000Fy-Nt; Tue, 05 Sep 2017 14:53:53 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dpFDY-0007aG-DE for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2017 14:52:54 +0000 Received: by mail-wm0-x231.google.com with SMTP id i145so20453034wmf.1 for ; Tue, 05 Sep 2017 07:52:25 -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=Zr4FkyRKS5y92B2fnUuXE5Rda2nkV6wz9G0Cm8tXFu/5RXuhI0T6NsDDP4h6kIdVKc tGBqQO6R505THo0gu9MBwus+l8Jd3ffEuoaWW7ImjNzOpi2azmqtyhKapyQ/2mzn4chb RUXRx5wtKAYdjYlCRUfFjzL4Au5cbjqBBTJLo= 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=EqrUD5zPD16Z32RBmEt2uXYl+XWNgbASzw9pfdusKq3j6uIJMg/fBwfnZ6s1i+HRcK vT6/bRzhzznx2PM2fdXD7B7uM2bK1VK9lxyYVY/ile7MriFfV048ixgyfY35aGouVTuS NwoImxtMW9SE2nYsBMGs8f0rgj/1H+/dkNpypPY5ZsNyhYvUBX4A3ExuGkuZNto0rZgM t4yhkzq7gOd6WdQRAyNVgcQP+AFp5ggCOsCxAiADP0pE72tn7+sJiofeEyQwn1j/DEAi 8Laki04Bv+KUtILw5uOxY2/H3BdA+LUIaTkkMPF8PzPWg/8Gln31r42KowviU4wVMElW HAvw== X-Gm-Message-State: AHPjjUgzqnk4vXTHk3oAaIV3UxBSB5bm+uVURtyVsVInu4SV4VE1xgkc Ah5LiAC7hHzMwBmY X-Google-Smtp-Source: ADKCNb5pH2Udy5LSRF7a1jtqZ6+Xk9SFnnS7s9x5WvD5DprQeOHheli06d8o7pj3bQEQCQfCbld/FQ== X-Received: by 10.80.180.184 with SMTP id w53mr3464405edd.176.1504623144290; Tue, 05 Sep 2017 07:52:24 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id a28sm293809edc.14.2017.09.05.07.52.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Sep 2017 07:52:23 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 6/8] KVM: arm/arm64: vITS: Drop its_ite->lpi field Date: Tue, 5 Sep 2017 16:52:05 +0200 Message-Id: <20170905145207.18447-7-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170905145207.18447-1-cdall@linaro.org> References: <20170905145207.18447-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170905_075244_967934_0851010B X-CRM114-Status: GOOD ( 11.95 ) 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);