From patchwork Wed Mar 30 23:48:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jake Oshins X-Patchwork-Id: 8705431 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 04199C0553 for ; Wed, 30 Mar 2016 22:13:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3462720389 for ; Wed, 30 Mar 2016 22:13:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 483DA20379 for ; Wed, 30 Mar 2016 22:13:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754700AbcC3WNX (ORCPT ); Wed, 30 Mar 2016 18:13:23 -0400 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:56353 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753639AbcC3WLu (ORCPT ); Wed, 30 Mar 2016 18:11:50 -0400 Received: from linuxonhyperv.com ([72.167.245.219]) by : HOSTING RELAY : with SMTP id lOICauciSetyNlOICadEq1; Wed, 30 Mar 2016 15:08:49 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 520) id E2758190304; Wed, 30 Mar 2016 16:49:12 -0700 (PDT) From: Jake Oshins To: linux-pci@vger.kernel.org, gregkh@linuxfoundation.org, kys@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, haiyangz@microsoft.com, haddenh@microsoft.com Cc: Jake Oshins Subject: [PATCH v2 3/7] drivers:hv: Use new vmbus_mmio_free() from client drivers. Date: Wed, 30 Mar 2016 16:48:43 -0700 Message-Id: <1459381727-25039-4-git-send-email-jakeo@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1459381727-25039-1-git-send-email-jakeo@microsoft.com> References: <1459381727-25039-1-git-send-email-jakeo@microsoft.com> X-CMAE-Envelope: MS4wfMGMKoIKCHPpEuhwaqpFuOwO/R3cWsX++n3uBiKbrkaCXA7r7pkQ4HlDbScWdx1vUZ2F2KabbtJ5waZGwRQ5ddjbORjY1Qhfoc9FHWUWR2+qUYfOh0uN PpA4kZA8blEx3mJx6aNeQJjVglWeVC/R1+7wOPJAuxM1vLFkQ+GcUPHKJ7iXwLMs7k8366yhNUOhjx8fwGBgHmM5tMz6ldZPXCtWYqw5f0RdyTmVDiKaZtMb MBW1jWt255BAZp3l00fa+oyx8a6Z0zLg9yRjnsRrcPB8FtguEgS/JIeNjDMv34g5SEmwjnLBR+kaxFGwMvGeJESD1pPs2jYRUUYuGVEF7ySCrdf6v1lCR24o YUehGCgQuOGBb6VxLoAz2PWQieqomsKRKCDE/ZOrDCDAcP0BkeqrkfaNwmxXzGl/vcMluFH814OCdTQ5GlkpigGAjyYEYuDEs/iTcucXl9XChIJDF5rE4b2S 2WgZw2XJA6z3UjVuHTZanz0KWa6PGLJ7kPdM0nSzjlKbrMKGW2mUf22gD0s= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch modifies all the callers of vmbus_mmio_allocate() to call vmbus_mmio_free() instead of release_mem_region(). Signed-off-by: Jake Oshins --- drivers/pci/host/pci-hyperv.c | 14 +++++++------- drivers/video/fbdev/hyperv_fb.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index ed651ba..f2559b6 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -1795,14 +1795,14 @@ static void hv_pci_free_bridge_windows(struct hv_pcibus_device *hbus) if (hbus->low_mmio_space && hbus->low_mmio_res) { hbus->low_mmio_res->flags |= IORESOURCE_BUSY; - release_mem_region(hbus->low_mmio_res->start, - resource_size(hbus->low_mmio_res)); + vmbus_free_mmio(hbus->low_mmio_res->start, + resource_size(hbus->low_mmio_res)); } if (hbus->high_mmio_space && hbus->high_mmio_res) { hbus->high_mmio_res->flags |= IORESOURCE_BUSY; - release_mem_region(hbus->high_mmio_res->start, - resource_size(hbus->high_mmio_res)); + vmbus_free_mmio(hbus->high_mmio_res->start, + resource_size(hbus->high_mmio_res)); } } @@ -1880,8 +1880,8 @@ static int hv_pci_allocate_bridge_windows(struct hv_pcibus_device *hbus) release_low_mmio: if (hbus->low_mmio_res) { - release_mem_region(hbus->low_mmio_res->start, - resource_size(hbus->low_mmio_res)); + vmbus_free_mmio(hbus->low_mmio_res->start, + resource_size(hbus->low_mmio_res)); } return ret; @@ -1924,7 +1924,7 @@ static int hv_allocate_config_window(struct hv_pcibus_device *hbus) static void hv_free_config_window(struct hv_pcibus_device *hbus) { - release_mem_region(hbus->mem_config->start, PCI_CONFIG_MMIO_LENGTH); + vmbus_free_mmio(hbus->mem_config->start, PCI_CONFIG_MMIO_LENGTH); } /** diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c index e2451bd..2fd49b2 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -743,7 +743,7 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) err3: iounmap(fb_virt); err2: - release_mem_region(par->mem->start, screen_fb_size); + vmbus_free_mmio(par->mem->start, screen_fb_size); par->mem = NULL; err1: if (!gen2vm) @@ -758,7 +758,7 @@ static void hvfb_putmem(struct fb_info *info) struct hvfb_par *par = info->par; iounmap(info->screen_base); - release_mem_region(par->mem->start, screen_fb_size); + vmbus_free_mmio(par->mem->start, screen_fb_size); par->mem = NULL; }