From patchwork Mon Mar 6 11:34:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 9606129 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 23CD86046A for ; Mon, 6 Mar 2017 13:47:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1335C2723E for ; Mon, 6 Mar 2017 13:47:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07A8A28418; Mon, 6 Mar 2017 13:47:14 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham 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 BD7202723E for ; Mon, 6 Mar 2017 13:47:13 +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=NmtbiVTonfsW2Q2Bz6g4KOxqyHpPSyuyloGhF57UrjQ=; b=n0GbNjYwepF4KlrTeOWI12oIC0 F1IlEGUvMMY2fIlROjE5ExxAsyUx+JySgSD4UhZXdvjK9z7LD9xCNgnYcupwZ+HQwgo/r+/IEqui4 QlQ+WXeMf7objlZQ88N+ZydPZVoXfIR4PrtcMatgwP1qIN3U4LkW8NPfhHD4f071QIxUmD+jKnqih z/mh4KBC5oOG3vhgpr8gK5Xu9ZlFeOivVYT1u87Bd0jchvoegsaalwV13m4PtKqqgzQjgpgG5jhu6 1nzlnH+iHsjRpSElZq/ENuy0LQCEA1xpGmtHoR7eYEKf6EqN3TwkIoKolRKD45PpIH7pT4MfyxB5Z S/xLCUqA==; 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 1cksyn-00010T-95; Mon, 06 Mar 2017 13:47:13 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cksvn-0006Ab-On for linux-arm-kernel@bombadil.infradead.org; Mon, 06 Mar 2017 13:44:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bjQxnKEyVAqBxthSxCw9FKPE6OhW8TmyUakorwoccpc=; b=Pklpjy2RHyFMRGvxJueld3M59 AbIJixvURemoJ9B+9jSwnU+jc59Q7II1kymemqI4pWjo7uqfAtb/y6QMdStFDTnCHvmfBluiODwvt n87rqKlrkebZvMlYttZShoV7DiMcFE3Tbvpa5I4aN68Pp/ivnYKRQTEm3bXcu9/qXCmwUQVQEiNRY fh+nI3fUT45K1TTj0koACbhSTRPJ/mX8LRlRZ5pAL2o4PgCuYIWAPSh/t03kTJNJY87RIjwcVFYC0 /NTc+gMiBT5Ffne1iwchVHgSygQI0/ighDHwtchizKkFxG9a1l6UbWCJiSk3+4cOl1ywO6ZT0kJ7W G49mWkcag==; Received: from mx1.redhat.com ([209.132.183.28]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckqvX-0005Dt-SU for linux-arm-kernel@lists.infradead.org; Mon, 06 Mar 2017 11:35:44 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3E119C049D5B; Mon, 6 Mar 2017 11:34:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-100.ams2.redhat.com [10.36.116.100]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v26BYbnS002618; Mon, 6 Mar 2017 06:34:50 -0500 From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, marc.zyngier@arm.com, christoffer.dall@linaro.org, vijayak@caviumnetworks.com, Vijaya.Kumar@cavium.com, peter.maydell@linaro.org, linux-arm-kernel@lists.infradead.org, drjones@redhat.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH v3 03/19] arm/arm64: vgic: turn vgic_find_mmio_region into public Date: Mon, 6 Mar 2017 12:34:18 +0100 Message-Id: <1488800074-21991-4-git-send-email-eric.auger@redhat.com> In-Reply-To: <1488800074-21991-1-git-send-email-eric.auger@redhat.com> References: <1488800074-21991-1-git-send-email-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 06 Mar 2017 11:34:54 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170306_063543_986825_2DCCC3FE X-CRM114-Status: GOOD ( 11.51 ) 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: andre.przywara@arm.com, pbonzini@redhat.com, dgilbert@redhat.com, quintela@redhat.com, Prasun.Kapoor@cavium.com 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 We plan to use vgic_find_mmio_region in vgic-its.c so let's turn it into a public function. Signed-off-by: Eric Auger Reviewed-by: Andre Przywara --- virt/kvm/arm/vgic/vgic-mmio.c | 3 +-- virt/kvm/arm/vgic/vgic-mmio.h | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-mmio.c b/virt/kvm/arm/vgic/vgic-mmio.c index 3654b4c..0427ddb 100644 --- a/virt/kvm/arm/vgic/vgic-mmio.c +++ b/virt/kvm/arm/vgic/vgic-mmio.c @@ -430,8 +430,7 @@ static int match_region(const void *key, const void *elt) return 0; } -/* Find the proper register handler entry given a certain address offset. */ -static const struct vgic_register_region * +const struct vgic_register_region * vgic_find_mmio_region(const struct vgic_register_region *region, int nr_regions, unsigned int offset) { diff --git a/virt/kvm/arm/vgic/vgic-mmio.h b/virt/kvm/arm/vgic/vgic-mmio.h index 98bb566..055ad42 100644 --- a/virt/kvm/arm/vgic/vgic-mmio.h +++ b/virt/kvm/arm/vgic/vgic-mmio.h @@ -192,4 +192,9 @@ u64 vgic_sanitise_shareability(u64 reg); u64 vgic_sanitise_field(u64 reg, u64 field_mask, int field_shift, u64 (*sanitise_fn)(u64)); +/* Find the proper register handler entry given a certain address offset */ +const struct vgic_register_region * +vgic_find_mmio_region(const struct vgic_register_region *region, + int nr_regions, unsigned int offset); + #endif