From patchwork Wed Jan 29 18:17:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3553881 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 34D4E9F382 for ; Wed, 29 Jan 2014 18:24:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AE452018E for ; Wed, 29 Jan 2014 18:24:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3DDA201BC for ; Wed, 29 Jan 2014 18:24:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752990AbaA2SRr (ORCPT ); Wed, 29 Jan 2014 13:17:47 -0500 Received: from mail-ie0-f178.google.com ([209.85.223.178]:62671 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752964AbaA2SRo (ORCPT ); Wed, 29 Jan 2014 13:17:44 -0500 Received: by mail-ie0-f178.google.com with SMTP id x13so2481110ief.9 for ; Wed, 29 Jan 2014 10:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=yqWQ8CsOJflF3sTsaQ7yzPoHxkQzc3X3KBY84LYajQw=; b=XMaVB/P9u2KXTr4ptpxCenIL0I5Cpe89NCmqHvEZZIeKXB+rEwLpvXmddMtuT9DiEl HjcrLo7Xmmto0QfCBqamRRhd8Siom5L62lNy0X/hFG9q40VCqb2C0BtHCflfMjvH1yWJ qcwfXwiBZtijdMXQI4BgJSo1g3D5UbdrZ+GNspJB46/u1rJyP4qPi9tkl9+/Em+d+4Id 5Dwswr+nxuXhkIfNl+OS3QunPnptidoMEcQ2aS/mFCvamhZo7bKIoU3OLN8XtpzCQKqV 4B4uZjx8mt2jmSOgy5FxVbNK1a2Bmn0LtnSTlk8Vcok/MH5Puxo85O45xBw9O3hCEMkp 4XRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=yqWQ8CsOJflF3sTsaQ7yzPoHxkQzc3X3KBY84LYajQw=; b=DsgFvb/EHl72WcKU6KutNxFxnn5FbR9T4AUc7SyI5eKVVGCJSMId7w9dRKDphf+GQn TMKDN4RT3O/uRp1M0yRV0ZP3aWVYTvMf4pii5av1yKfMwBRpOcI5eFQd4xv1gNt9zNhD Xi1V9RJHm8i4d9k5igzgkZm4gJ/lg1t5uBMu2itMGBZvvM9SwygOgaR6z6FpUW4EaOai qkzlZsru319nDxnMtGKVD7hMQuKIttkXMd+XjN4oXt97R9cAMV0lX/aaKGqbnI72rIR+ yvrf5YOxrGvfiMfMgiDmcr1kLXRGu7rAF4RWT3vc/68cFAgaAMm7NaiKPPLRyeiecnPP xHiA== X-Gm-Message-State: ALoCoQk2PREVAc8i3GMUa6bbavkOTC5yz9EW+FrsbIp/5lTYxqQWIhj+jP1MbaEKQ+IWRYcIZzSdV1hqJtVez6LnmWo3TzaipwvakPVDt9ovEhWxNgU7Bwk3YWLY/CUaF8VxgJ7OEt+k9YbXpwxSFRbZ1gb5lgIMBHtX5tkRsbtj9TN+g4T9M7kXFoo9wD8oK/2zzIL+yapQ9/NFqeYBqS+JCByllRy4sw== X-Received: by 10.50.194.131 with SMTP id hw3mr10235638igc.4.1391019464115; Wed, 29 Jan 2014 10:17:44 -0800 (PST) Received: from localhost ([172.29.123.160]) by mx.google.com with ESMTPSA id t4sm70357234igm.10.2014.01.29.10.17.42 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 29 Jan 2014 10:17:43 -0800 (PST) Subject: [PATCH 02/17] x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_with_sysdata() To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org, x86@kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 29 Jan 2014 11:17:41 -0700 Message-ID: <20140129181741.15476.52860.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20140129174106.15476.7075.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20140129174106.15476.7075.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 pci_scan_bus_with_sysdata() and pcibios_scan_root() are quite similar: pci_scan_bus_with_sysdata pci_scan_bus_on_node(..., &pci_root_ops, -1) pcibios_scan_root pci_scan_bus_on_node(..., &pci_root_ops, get_mp_bus_to_node(busnum)) get_mp_bus_to_node() returns -1 if it couldn't find the node number, so this removes pci_scan_bus_with_sysdata() and uses pcibios_scan_root() instead. Signed-off-by: Bjorn Helgaas --- arch/x86/include/asm/pci.h | 1 - arch/x86/pci/common.c | 5 ----- arch/x86/pci/fixup.c | 6 +++--- arch/x86/pci/numaq_32.c | 6 +++--- arch/x86/pci/visws.c | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" 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/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 1ac6114c9ea5..4e891abf8b48 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -29,7 +29,6 @@ extern int noioapicreroute; /* scan a bus after allocating a pci_sysdata for it */ extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node); -extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); #ifdef CONFIG_PCI diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index c47bb2288bb9..f530c7e93250 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -697,11 +697,6 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) return bus; } -struct pci_bus *pci_scan_bus_with_sysdata(int busno) -{ - return pci_scan_bus_on_node(busno, &pci_root_ops, -1); -} - /* * NUMA info for PCI busses * diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index bca9e85daaa5..201833f5f1bc 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -25,9 +25,9 @@ static void pci_fixup_i450nx(struct pci_dev *d) dev_dbg(&d->dev, "i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); if (busno) - pci_scan_bus_with_sysdata(busno); /* Bus A */ + pcibios_scan_root(busno); /* Bus A */ if (suba < subb) - pci_scan_bus_with_sysdata(suba+1); /* Bus B */ + pcibios_scan_root(suba+1); /* Bus B */ } pcibios_last_bus = -1; } @@ -42,7 +42,7 @@ static void pci_fixup_i450gx(struct pci_dev *d) u8 busno; pci_read_config_byte(d, 0x4a, &busno); dev_info(&d->dev, "i440KX/GX host bridge; secondary bus %02x\n", busno); - pci_scan_bus_with_sysdata(busno); + pcibios_scan_root(busno); pcibios_last_bus = -1; } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 72c229f9ebcf..080eb0374fff 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c @@ -135,11 +135,11 @@ static void pci_fixup_i450nx(struct pci_dev *d) pxb, busno, suba, subb); if (busno) { /* Bus A */ - pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, busno)); + pcibios_scan_root(QUADLOCAL2BUS(quad, busno)); } if (suba < subb) { /* Bus B */ - pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, suba+1)); + pcibios_scan_root(QUADLOCAL2BUS(quad, suba+1)); } } pcibios_last_bus = -1; @@ -159,7 +159,7 @@ int __init pci_numaq_init(void) continue; printk("Scanning PCI bus %d for quad %d\n", QUADLOCAL2BUS(quad,0), quad); - pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, 0)); + pcibios_scan_root(QUADLOCAL2BUS(quad, 0)); } return 0; } diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 3e6d2a6db866..cd9d4d1681d2 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c @@ -78,8 +78,8 @@ int __init pci_visws_init(void) "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0); raw_pci_ops = &pci_direct_conf1; - pci_scan_bus_with_sysdata(pci_bus0); - pci_scan_bus_with_sysdata(pci_bus1); + pcibios_scan_root(pci_bus0); + pcibios_scan_root(pci_bus1); pci_fixup_irqs(pci_common_swizzle, visws_map_irq); pcibios_resource_survey(); /* Request bus scan */