Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759572AbcDESU6 (ORCPT ); Tue, 5 Apr 2016 14:20:58 -0400 Received: from mail-bn1on0145.outbound.protection.outlook.com ([157.56.110.145]:38294 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751818AbcDESU4 convert rfc822-to-8bit (ORCPT ); Tue, 5 Apr 2016 14:20:56 -0400 From: KY Srinivasan To: Bjorn Helgaas , Jake Oshins CC: "linux-pci@vger.kernel.org" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" , Haiyang Zhang , Hadden Hoppert Subject: RE: [PATCH v4 3/7] drivers:hv: Use new vmbus_mmio_free() from client drivers. Thread-Topic: [PATCH v4 3/7] drivers:hv: Use new vmbus_mmio_free() from client drivers. Thread-Index: AQHRjGuwdtpMP1c4SkKHJGgHKL5sfp97sQyAgAAFvQA= Date: Tue, 5 Apr 2016 18:20:53 +0000 Message-ID: References: <1459558067-1725-1-git-send-email-jakeo@microsoft.com> <1459558067-1725-4-git-send-email-jakeo@microsoft.com> <20160405175949.GA15353@localhost> In-Reply-To: <20160405175949.GA15353@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2001:4898:80e8:2::71f] x-ms-office365-filtering-correlation-id: 6ffeb729-361f-4ca6-26e2-08d35d7f0639 x-microsoft-exchange-diagnostics: 1;SN2PR03MB1920;5:xiGH/c0AHxmemuPUii0fUZKXKNkpOE6rB9ZtLB4UWyURi+xBZJfuDuUIM/k3z1MpGDr6vpRdMD0XVCIAWXFOhxSlFqd1Va5yYADUqV3FjBIFVJ8QPYiCfXNp7HZGoGb9l1rCO3Yp0KlCFb2ZZBOCOQ==;24:0/zQNewOTgIlfK2gEBmd7chAPofKDZ+rth+rUnb7JwfL8UWbjrT7SvhWTp+aO/dzrDTWTFho2SsgUvpnbnrUY/cjarCTSI1oGyf5AWwxeoM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB1920; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(61426038)(61427038);SRVR:SN2PR03MB1920;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB1920; x-forefront-prvs: 0903DD1D85 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(24454002)(13464003)(50986999)(4326007)(76176999)(33656002)(54356999)(5005710100001)(10400500002)(10290500002)(1096002)(1511001)(586003)(6116002)(1220700001)(81166005)(99286002)(4001430100002)(5002640100001)(11100500001)(92566002)(5004730100002)(4001450100002)(2561002)(86612001)(87936001)(575784001)(106116001)(5001770100001)(86362001)(2900100001)(122556002)(102836003)(2906002)(5008740100001)(77096005)(15975445007)(3280700002)(3660700001)(107886002)(74316001)(76576001)(189998001)(2421001)(2950100001)(5003600100002)(19580405001)(8990500004)(19580395003)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR03MB1920;H:SN2PR03MB2142.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2016 18:20:53.4447 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB1920 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4832 Lines: 134 > -----Original Message----- > From: Bjorn Helgaas [mailto:helgaas@kernel.org] > Sent: Tuesday, April 5, 2016 11:00 AM > To: Jake Oshins > Cc: linux-pci@vger.kernel.org; gregkh@linuxfoundation.org; KY Srinivasan > ; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > vkuznets@redhat.com; Haiyang Zhang ; Hadden > Hoppert > Subject: Re: [PATCH v4 3/7] drivers:hv: Use new vmbus_mmio_free() from > client drivers. > > Hi Jake, > > On Fri, Apr 01, 2016 at 05:47:43PM -0700, Jake Oshins wrote: > > This patch modifies all the callers of vmbus_mmio_allocate() > > to call vmbus_mmio_free() instead of release_mem_region(). > > This changelog merely restates the C code. Presumably there's some > important difference between release_mem_region() and > vmbus_mmio_free(), and we need a hint about what that is. > > Oh, I see, there actually is no difference *yet*, but it's coming. > I'd combine this with patch 2. Then the patch is obviously correct > all by itself, and the changelog for patch 2 makes clear what's > happening. > > In changelogs, don't bother with "this patch does" or "this function > is introduced." The context is obvious because the changelog is part > of the commit. Write imperative sentences, e.g., "Call > vmbus_mmio_free() instead of release_mem_region()." > > > Signed-off-by: Jake Oshins > > I think this is the only change that touches PCI, so I assume this > series will be merged by somebody else. > > Acked-by: Bjorn Helgaas I am hoping this will go through Greg's tree. K. Y > > > --- > > 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.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 > https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fvger.ker > nel.org%2fmajordomo- > info.html&data=01%7c01%7ckys%40microsoft.com%7cf391db0d7312429368e > 908d35d7c17ed%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=bH6jnta > OKCSn%2fZw%2bCN1P9wV9%2bRk0om8hw4evDezjR0Q%3d