From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753225AbcDBQdb (ORCPT ); Sat, 2 Apr 2016 12:33:31 -0400 Received: from p3plsmtps2ded04.prod.phx3.secureserver.net ([208.109.80.198]:41632 "EHLO p3plsmtps2ded04.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960AbcDBQd3 (ORCPT ); Sat, 2 Apr 2016 12:33:29 -0400 x-originating-ip: 72.167.245.219 From: "K. Y. Srinivasan" To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com Cc: Jake Oshins , "K. Y. Srinivasan" Subject: [PATCH 4/6] hv: Use new vmbus_mmio_free() from client drivers. Date: Sat, 2 Apr 2016 11:10:59 -0700 Message-Id: <1459620661-16720-4-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1459620661-16720-1-git-send-email-kys@microsoft.com> References: <1459620638-16681-1-git-send-email-kys@microsoft.com> <1459620661-16720-1-git-send-email-kys@microsoft.com> X-CMAE-Envelope: MS4wfJ1S9nit96J/WsWOW5EKPQWmDECL0c5z2GSwl+Hgcy7kIFou2t5z98rQzEJH0/Gq/3yzJkYBgGZ3XIMeoM+LwvWRggN88BHjF92eQq8BzkFErI7ne+LU awQojafrIWX1JzWU0t3Vv3uNoCCEkyiZ7hyc6Zsy2IqOI422M/kbFZQl8nvRh5Gv9PVWPH4pklsMuw6vmePHugojcZEFnzaV6Wa0e5yp5z7X1xeZMcelnwx3 cfe0m7+fDn+wMcX7Qhf82CkAPS5YQvT+7y1ScQiOBoCFRLl+AS5sflcvpFRBeb5HYnGV0pOhAr6vUfJXYvuDI5VB52BQuvrJTijXVxlZ/BYw6OCE2mlB2APo KNP0HgfFyCbMp5mB4+uiivbv16S/eHwOJEmHIwal35+5jrqZ0RH117HHTynHQCSW9zgTgMtyErOdSBJu2I7iwI8NhPwXdA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jake Oshins 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 Signed-off-by: K. Y. Srinivasan --- drivers/pci/host/pci-hyperv.c | 14 +++++++------- drivers/video/fbdev/hyperv_fb.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) 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; } -- 1.7.4.1