From patchwork Wed Jan 29 18:17:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 315193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 62AB92C00CA for ; Thu, 30 Jan 2014 05:24:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752705AbaA2SRl (ORCPT ); Wed, 29 Jan 2014 13:17:41 -0500 Received: from mail-ie0-f171.google.com ([209.85.223.171]:42809 "EHLO mail-ie0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752858AbaA2SRh (ORCPT ); Wed, 29 Jan 2014 13:17:37 -0500 Received: by mail-ie0-f171.google.com with SMTP id as1so2475259iec.30 for ; Wed, 29 Jan 2014 10:17:36 -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=fmGobmL9tqwjDTWoyjAg2BuPvk792kaodgmL4v2bgx0=; b=OsVPqdmfXGcxaaSR/IQfO8bHCxoFumhQWhhj10euRBolPNflC35UPFMAZ1l9MBJAfy eBZbDjr4Zlhz5g1d5D8sPY6SD9+MljNlISrWou0xR7MKiS++HUr2RIdB73bLe2OI1uRA Ctuacwfxqyksmgg5XrhRl8eYAMDNJKtJGX+EPTd+MOAPHeCap3QFHg3YTKnEF1Hv64vi XjUqCn7RnPSLG2Fl2FdtgoCcu1qr9ebUUz38NBRZpCNdc12pYG+deuczMG3A3ePtc1j/ f5tSFsqtNYnZF1qVW/s0/Jau3sdY+58Jg1eLED5LOZ1OjWH40zsuZzWgHztGtG2ubeVW QXfQ== 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=fmGobmL9tqwjDTWoyjAg2BuPvk792kaodgmL4v2bgx0=; b=mpQQYZTo8huNHPf3AUt+E7xkzDg+xzRlOhScfeSzETwrq87WDohzK6N7pdjOsCQVXD S2m1LE/GOzo9HCnYozNydyS9TPo6GHM+fw9Yij0/OqlbsB/8Silzdu99Mt4PmVF3pzu3 MsXiWULuQ93XvQGFGiqylExmUTebO25fCzSm0BrfQSayYmria0TwoaMtuS5KqZqPlA/D dlPPhWPRIiCyDA7Kt4iAfRG1rEaTAl3kRtW1ORRUN57+za9NT2ka6qoxAoOY7hs9gj3y uaspJtDRZPWgqPZBIeJW1qXBaXh3OZ5WV2zPpiSc0qZnyiGkwZfTNP9xtzR4NR9vYQ6O Kq6g== X-Gm-Message-State: ALoCoQlMHUQaaCzNinOHGSd+ds1VPTQqYYckNmKhbaMjwuhEUaZEzPuCqY4iR4sFsC1hqj6XZXAt+wl+zlSPUz0gmCEVF1eM5iUcw4tpXQmdfwJ7dv0DEAFATR7Y4+nllXW/Xd1KiJIYY4O2OlG8Fz5RAgxIy4xJt7ePApA02SrCNwbLD4gg/93vHAHQz8KLVBML8EubfpHK1tVEky1skRT4sBcjDiheFbgTJ7oTd4ZB0oDEW1INMFA= X-Received: by 10.50.222.99 with SMTP id ql3mr9918529igc.42.1391019456788; Wed, 29 Jan 2014 10:17:36 -0800 (PST) Received: from localhost ([172.29.123.160]) by mx.google.com with ESMTPSA id h6sm70357865igy.8.2014.01.29.10.17.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 29 Jan 2014 10:17:34 -0800 (PST) Subject: [PATCH 01/17] x86/PCI: Drop pcibios_scan_root() check for bus already scanned 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:33 -0700 Message-ID: <20140129181732.15476.79292.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-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The PCI core checks to see whether we've already scanned a bus, so we don't need to do it in pcibios_scan_root(). Here's where it happens in the core: pcibios_scan_root pci_scan_bus_on_node pci_scan_root_bus pci_create_root_bus b2 = pci_find_bus(pci_domain_nr(b), bus) if (b2) goto err_out; # already scanned this bus This removes the check from pcibios_scan_root(). Signed-off-by: Bjorn Helgaas --- arch/x86/pci/common.c | 9 --------- 1 file changed, 9 deletions(-) -- 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/arch/x86/pci/common.c b/arch/x86/pci/common.c index 981c2dbd72cc..c47bb2288bb9 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -458,15 +458,6 @@ void __init dmi_check_pciprobe(void) struct pci_bus *pcibios_scan_root(int busnum) { - struct pci_bus *bus = NULL; - - while ((bus = pci_find_next_bus(bus)) != NULL) { - if (bus->number == busnum) { - /* Already scanned */ - return bus; - } - } - return pci_scan_bus_on_node(busnum, &pci_root_ops, get_mp_bus_to_node(busnum)); }