From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbbDCJ3G (ORCPT ); Fri, 3 Apr 2015 05:29:06 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:32112 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbbDCJ3A (ORCPT ); Fri, 3 Apr 2015 05:29:00 -0400 From: Yijing Wang To: Bjorn Helgaas CC: Jiang Liu , , Yinghai Lu , , Marc Zyngier , , Russell King , , , Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , , "David S. Miller" , "Guan Xuetao" , , , Liviu Dudau , "Arnd Bergmann" , Geert Uytterhoeven , "Yijing Wang" , Yijing Wang Subject: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource Date: Fri, 3 Apr 2015 17:25:42 +0800 Message-ID: <1428053164-28277-10-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> References: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yijing Wang Sometimes, the bus resource start number is not equal to root bus number. For example, in pci_scan_bus(), we always add the default bus resource which start bus number is 0, but the root bus number callers given may != 0, so we need to update pci_host_bridge bus resource, because we would check whether host bridge bus resoruce is confict in later patch. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index ecc1a7c..1a9834b 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -26,8 +26,11 @@ static void pci_host_update_busn_res( struct resource_entry *window; resource_list_for_each_entry(window, resources) - if (window->res->flags & IORESOURCE_BUS) + if (window->res->flags & IORESOURCE_BUS) { + if (bus > window->res->start) + window->res->start = bus; return; + } pr_info( "No busn resource found for pci%04x:%02x, will use [bus %02x-ff]\n", -- 1.7.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com ([119.145.14.65]:32112 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbbDCJ3A (ORCPT ); Fri, 3 Apr 2015 05:29:00 -0400 From: Yijing Wang To: Bjorn Helgaas CC: Jiang Liu , , Yinghai Lu , , Marc Zyngier , , Russell King , , , Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , , "David S. Miller" , "Guan Xuetao" , , , Liviu Dudau , "Arnd Bergmann" , Geert Uytterhoeven , "Yijing Wang" , Yijing Wang Subject: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource Date: Fri, 3 Apr 2015 17:25:42 +0800 Message-ID: <1428053164-28277-10-git-send-email-wangyijing@huawei.com> In-Reply-To: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> References: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-pci-owner@vger.kernel.org List-ID: From: Yijing Wang Sometimes, the bus resource start number is not equal to root bus number. For example, in pci_scan_bus(), we always add the default bus resource which start bus number is 0, but the root bus number callers given may != 0, so we need to update pci_host_bridge bus resource, because we would check whether host bridge bus resoruce is confict in later patch. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index ecc1a7c..1a9834b 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -26,8 +26,11 @@ static void pci_host_update_busn_res( struct resource_entry *window; resource_list_for_each_entry(window, resources) - if (window->res->flags & IORESOURCE_BUS) + if (window->res->flags & IORESOURCE_BUS) { + if (bus > window->res->start) + window->res->start = bus; return; + } pr_info( "No busn resource found for pci%04x:%02x, will use [bus %02x-ff]\n", -- 1.7.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyijing@huawei.com (Yijing Wang) Date: Fri, 3 Apr 2015 17:25:42 +0800 Subject: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource In-Reply-To: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> References: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> Message-ID: <1428053164-28277-10-git-send-email-wangyijing@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Yijing Wang Sometimes, the bus resource start number is not equal to root bus number. For example, in pci_scan_bus(), we always add the default bus resource which start bus number is 0, but the root bus number callers given may != 0, so we need to update pci_host_bridge bus resource, because we would check whether host bridge bus resoruce is confict in later patch. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index ecc1a7c..1a9834b 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -26,8 +26,11 @@ static void pci_host_update_busn_res( struct resource_entry *window; resource_list_for_each_entry(window, resources) - if (window->res->flags & IORESOURCE_BUS) + if (window->res->flags & IORESOURCE_BUS) { + if (bus > window->res->start) + window->res->start = bus; return; + } pr_info( "No busn resource found for pci%04x:%02x, will use [bus %02x-ff]\n", -- 1.7.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Date: Fri, 03 Apr 2015 09:25:42 +0000 Subject: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource Message-Id: <1428053164-28277-10-git-send-email-wangyijing@huawei.com> List-Id: References: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> In-Reply-To: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bjorn Helgaas Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , dja@axtens.net, x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@vger.kernel.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven , Yijing Wang , Yijing Wang From: Yijing Wang Sometimes, the bus resource start number is not equal to root bus number. For example, in pci_scan_bus(), we always add the default bus resource which start bus number is 0, but the root bus number callers given may != 0, so we need to update pci_host_bridge bus resource, because we would check whether host bridge bus resoruce is confict in later patch. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index ecc1a7c..1a9834b 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -26,8 +26,11 @@ static void pci_host_update_busn_res( struct resource_entry *window; resource_list_for_each_entry(window, resources) - if (window->res->flags & IORESOURCE_BUS) + if (window->res->flags & IORESOURCE_BUS) { + if (bus > window->res->start) + window->res->start = bus; return; + } pr_info( "No busn resource found for pci%04x:%02x, will use [bus %02x-ff]\n", -- 1.7.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource Date: Fri, 3 Apr 2015 17:25:42 +0800 Message-ID: <1428053164-28277-10-git-send-email-wangyijing@huawei.com> References: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Return-path: In-Reply-To: <1428053164-28277-1-git-send-email-wangyijing@huawei.com> Sender: linux-alpha-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bjorn Helgaas Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , dja@axtens.net, x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven , Yijing Wang , Yijing Wang From: Yijing Wang Sometimes, the bus resource start number is not equal to root bus number. For example, in pci_scan_bus(), we always add the default bus resource which start bus number is 0, but the root bus number callers given may != 0, so we need to update pci_host_bridge bus resource, because we would check whether host bridge bus resoruce is confict in later patch. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index ecc1a7c..1a9834b 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -26,8 +26,11 @@ static void pci_host_update_busn_res( struct resource_entry *window; resource_list_for_each_entry(window, resources) - if (window->res->flags & IORESOURCE_BUS) + if (window->res->flags & IORESOURCE_BUS) { + if (bus > window->res->start) + window->res->start = bus; return; + } pr_info( "No busn resource found for pci%04x:%02x, will use [bus %02x-ff]\n", -- 1.7.1