From patchwork Tue Oct 3 03:10:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jintack Lim X-Patchwork-Id: 9981445 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 ED97060384 for ; Tue, 3 Oct 2017 03:11:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E166C2881D for ; Tue, 3 Oct 2017 03:11:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5DA328822; Tue, 3 Oct 2017 03:11:36 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 864832881D for ; Tue, 3 Oct 2017 03:11:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbdJCDL0 (ORCPT ); Mon, 2 Oct 2017 23:11:26 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:56458 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbdJCDLY (ORCPT ); Mon, 2 Oct 2017 23:11:24 -0400 Received: by mail-it0-f42.google.com with SMTP id g18so9701057itg.5 for ; Mon, 02 Oct 2017 20:11:24 -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; bh=OEkTNtQgNIwDEjdGAErVSDgoMPhru2aCaJh1dsrpkW4=; b=IlGSazM239ku5xv/YG5RQa7fk83k6tjgT59XcQ9iF/b42LG8+CEmexAXmDP118jNiq AU1JBDbZdD2GEQji/zi7wIw7vlRPLCBDYtYNDHxmJHj32aAsOEpg88dRdEnzCMWoFZ6+ 2VgHNehoBFF+lDyxcP5hnohcOJurS1sM+lg7k= 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; bh=OEkTNtQgNIwDEjdGAErVSDgoMPhru2aCaJh1dsrpkW4=; b=e2ZnOxVLqqWW+FHSAVtIWR+n3I324rWwgaue/cFsBNQAdvqNhOoel/zPwupLrY8PuQ akJ/AyU7tQCzvSy3aKtW1r6L/mTnaW77vVgW4GLp4wynCHf6I97vJ3cs7G8mL6Z3Tr7g 82PZrilaSfLXbc6F3JMAPbyc7N3PojpjZVk55Oiqyw6PzdN3MrLZ+Nk0K3+JrkzpDU6n E+RmaoGf6eM6puoeu3GfQYk8uDSvOe9Tsvlck+UbcKeBXNfOfIzkiCLof6Ix2NolzjC9 c1/gIrSpiUHzqIleFg32EXvMYGU76zJOiP0TgQR7h9YeZ/ElO9OWnC8ixkpFfip+bDoD nWNQ== X-Gm-Message-State: AMCzsaW+KGIK3vnFDdH6KKP/BFEeva4JGZ+ITrWsWj3uCZX34URwzO2p 8B1oBJDCKSJq9cm+FiUKE5t/dw== X-Google-Smtp-Source: AOwi7QD4PP1OfYOEPk6RecY7Dn05QoWYdJa396LI9ir2z+r/hV9YAeAyiE++cGiLdDzHU0GsvW/aUA== X-Received: by 10.36.14.200 with SMTP id 191mr22472184ite.133.1507000284307; Mon, 02 Oct 2017 20:11:24 -0700 (PDT) Received: from node.jintackl-qv28633.kvmarm-pg0.wisc.cloudlab.us (c220g1-031126.wisc.cloudlab.us. [128.104.222.76]) by smtp.gmail.com with ESMTPSA id h84sm5367193iod.72.2017.10.02.20.11.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 20:11:23 -0700 (PDT) From: Jintack Lim To: christoffer.dall@linaro.org, marc.zyngier@arm.com, kvmarm@lists.cs.columbia.edu Cc: jintack@cs.columbia.edu, pbonzini@redhat.com, rkrcmar@redhat.com, catalin.marinas@arm.com, will.deacon@arm.com, linux@armlinux.org.uk, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Jintack Lim Subject: [RFC PATCH v2 03/31] KVM: arm/arm64: Remove unused params in mmu functions Date: Mon, 2 Oct 2017 22:10:45 -0500 Message-Id: <1507000273-3735-1-git-send-email-jintack.lim@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christoffer Dall stage2_flush_xxx functions take a pointer to the kvm struct as the first parameter but they are never used. Clean this up before modifying mmu code for nested virtualization support. Signed-off-by: Christoffer Dall Signed-off-by: Jintack Lim --- virt/kvm/arm/mmu.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index f2d5b6c..0a5f5ca 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -315,8 +315,7 @@ static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size) } while (pgd++, addr = next, addr != end); } -static void stage2_flush_ptes(struct kvm *kvm, pmd_t *pmd, - phys_addr_t addr, phys_addr_t end) +static void stage2_flush_ptes(pmd_t *pmd, phys_addr_t addr, phys_addr_t end) { pte_t *pte; @@ -327,8 +326,7 @@ static void stage2_flush_ptes(struct kvm *kvm, pmd_t *pmd, } while (pte++, addr += PAGE_SIZE, addr != end); } -static void stage2_flush_pmds(struct kvm *kvm, pud_t *pud, - phys_addr_t addr, phys_addr_t end) +static void stage2_flush_pmds(pud_t *pud, phys_addr_t addr, phys_addr_t end) { pmd_t *pmd; phys_addr_t next; @@ -340,13 +338,12 @@ static void stage2_flush_pmds(struct kvm *kvm, pud_t *pud, if (pmd_thp_or_huge(*pmd)) kvm_flush_dcache_pmd(*pmd); else - stage2_flush_ptes(kvm, pmd, addr, next); + stage2_flush_ptes(pmd, addr, next); } } while (pmd++, addr = next, addr != end); } -static void stage2_flush_puds(struct kvm *kvm, pgd_t *pgd, - phys_addr_t addr, phys_addr_t end) +static void stage2_flush_puds(pgd_t *pgd, phys_addr_t addr, phys_addr_t end) { pud_t *pud; phys_addr_t next; @@ -358,7 +355,7 @@ static void stage2_flush_puds(struct kvm *kvm, pgd_t *pgd, if (stage2_pud_huge(*pud)) kvm_flush_dcache_pud(*pud); else - stage2_flush_pmds(kvm, pud, addr, next); + stage2_flush_pmds(pud, addr, next); } } while (pud++, addr = next, addr != end); } @@ -374,7 +371,7 @@ static void stage2_flush_memslot(struct kvm *kvm, pgd = kvm->arch.pgd + stage2_pgd_index(addr); do { next = stage2_pgd_addr_end(addr, end); - stage2_flush_puds(kvm, pgd, addr, next); + stage2_flush_puds(pgd, addr, next); } while (pgd++, addr = next, addr != end); }