From patchwork Wed Jan 29 18:18:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3553751 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B81FFC02DC for ; Wed, 29 Jan 2014 18:23:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6077201BA for ; Wed, 29 Jan 2014 18:23:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C11A92018E for ; Wed, 29 Jan 2014 18:23:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbaA2SSc (ORCPT ); Wed, 29 Jan 2014 13:18:32 -0500 Received: from mail-ig0-f181.google.com ([209.85.213.181]:64929 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167AbaA2SS3 (ORCPT ); Wed, 29 Jan 2014 13:18:29 -0500 Received: by mail-ig0-f181.google.com with SMTP id j1so5243129iga.2 for ; Wed, 29 Jan 2014 10:18:28 -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=OAfsukPrq4ckLpGebaa+9s81Yk/gJmiMobHZAEizd0w=; b=RFhEM7jMSoCfix8bTOdQGRprnLgBKeFDPYOE0d3Jl1xhpyZ+Qe0/ENH0JY4FtVFTCe AYH7ZkPpbvLx4v1UkmPfF8c+qJtZB8TgrNYIcV9GIlDdCOcBvaiZqCr1UZXN7C6wVmsP WytzqJQK1Wps34cE4C3jLRE2Yb7wBRYof07PyBZTqjiFPrEXWEduYvMzn2x1XNkKiTgM F8jnboIF2Hg02EmnWQuMdWjb6BGbv/rpwoZBziWzwWvDQeIOdkSCZxklLdj3abDZmGKi zGOmnzE62EYfYEzZ1FGZttm3Jy+xZf2eIaJU23o2xOTlGj2TfmrCHOiaj+1RumtL3PJW 4xnw== 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=OAfsukPrq4ckLpGebaa+9s81Yk/gJmiMobHZAEizd0w=; b=ewezvGREn88yNG6JrAfoTkgcYYv3MJaJx83lDPsRTYjNca0AF+likjGYrkRgky3OIG qp+/xpGnaBo70J5a+3Yo7pga6+yZel7harXgKrdzOx3WybmOScKEokZyXAoz6icx9Y+F 4QVoueQW2ujjYvOY7LlpyiM8JVhHoVJEiIoivu81xXTLXP0V/PIBC+tQrI4pzb0np0fU Jopxg/6nOPXsEXYC4dmiQ5YRX1MMbVDonTZ8iY5qukarVfVyj9ChAGhqW87kL9/tazuh i9HNDO1KAU/gyzJtC6nMSnBBEO48tSVmjC0q2HCsdIIv/ogtIZsOwg58KQKO7Ks2w2DV vNFw== X-Gm-Message-State: ALoCoQmi7XqtN2SeWLMx3vHnro8H8sFywXLH6k6KKs6uRu1y1VWKU6nYEHwJDZ89MyexMwW435JZL3CAX1oBMnWPDs4GNB7pg7D2vncUjmAlA777SatbuxnY4VxBhzpatU2M4XXW8tjQC3suq7qdB/voMpkuH822YRMrMuUAqp8j1/WsbF1tJYakzUOT8pivFJXEUnxpfn8SlQR1pAC2T+g5lsPLly10Gw== X-Received: by 10.50.147.72 with SMTP id ti8mr30365187igb.20.1391019508854; Wed, 29 Jan 2014 10:18:28 -0800 (PST) Received: from localhost ([172.29.123.160]) by mx.google.com with ESMTPSA id qb3sm11161049igb.7.2014.01.29.10.18.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 29 Jan 2014 10:18:27 -0800 (PST) Subject: [PATCH 08/17] x86/PCI: Remove mp_bus_to_node[], set_mp_bus_to_node(), get_mp_bus_to_node() 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:18:26 -0700 Message-ID: <20140129181826.15476.85192.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 There are no callers of get_mp_bus_to_node(), so we no longer need mp_bus_to_node[], get_mp_bus_to_node(), or set_mp_bus_to_node(). This removes them. Signed-off-by: Bjorn Helgaas --- arch/x86/include/asm/topology.h | 13 ------- arch/x86/pci/acpi.c | 4 +- arch/x86/pci/amd_bus.c | 10 ------ arch/x86/pci/common.c | 69 --------------------------------------- 4 files changed, 1 insertion(+), 95 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/topology.h b/arch/x86/include/asm/topology.h index 09046a1a6c35..c840571afa4e 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h @@ -140,17 +140,4 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources); #define smt_capable() (smp_num_siblings > 1) #endif -#ifdef CONFIG_NUMA -extern int get_mp_bus_to_node(int busnum); -extern void set_mp_bus_to_node(int busnum, int node); -#else -static inline int get_mp_bus_to_node(int busnum) -{ - return 0; -} -static inline void set_mp_bus_to_node(int busnum, int node) -{ -} -#endif - #endif /* _ASM_X86_TOPOLOGY_H */ diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 3f42c5c05bf6..78f27efa11e1 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -499,10 +499,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) pxm = acpi_get_pxm(device->handle); if (pxm >= 0) node = pxm_to_node(pxm); - if (node != -1) - set_mp_bus_to_node(busnum, node); - else #endif + if (node == -1) node = x86_pci_root_bus_node(busnum); if (node != -1 && !node_online(node)) diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index a48be98e9ded..a313a7fb6b86 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c @@ -44,15 +44,6 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link) return NULL; } -static void __init set_mp_bus_range_to_node(int min_bus, int max_bus, int node) -{ -#ifdef CONFIG_NUMA - int j; - - for (j = min_bus; j <= max_bus; j++) - set_mp_bus_to_node(j, node); -#endif -} /** * early_fill_mp_bus_to_node() * called before pcibios_scan_root and pci_scan_bus @@ -117,7 +108,6 @@ static int __init early_fill_mp_bus_info(void) min_bus = (reg >> 16) & 0xff; max_bus = (reg >> 24) & 0xff; node = (reg >> 4) & 0x07; - set_mp_bus_range_to_node(min_bus, max_bus, node); link = (reg >> 8) & 0x03; info = alloc_pci_root_info(min_bus, max_bus, node, link); diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index f7d6800f10d1..d491deddebae 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -683,72 +683,3 @@ int pci_ext_cfg_avail(void) else return 0; } - -/* - * NUMA info for PCI busses - * - * Early arch code is responsible for filling in reasonable values here. - * A node id of "-1" means "use current node". In other words, if a bus - * has a -1 node id, it's not tightly coupled to any particular chunk - * of memory (as is the case on some Nehalem systems). - */ -#ifdef CONFIG_NUMA - -#define BUS_NR 256 - -#ifdef CONFIG_X86_64 - -static int mp_bus_to_node[BUS_NR] = { - [0 ... BUS_NR - 1] = -1 -}; - -void set_mp_bus_to_node(int busnum, int node) -{ - if (busnum >= 0 && busnum < BUS_NR) - mp_bus_to_node[busnum] = node; -} - -int get_mp_bus_to_node(int busnum) -{ - int node = -1; - - if (busnum < 0 || busnum > (BUS_NR - 1)) - return node; - - node = mp_bus_to_node[busnum]; - - /* - * let numa_node_id to decide it later in dma_alloc_pages - * if there is no ram on that node - */ - if (node != -1 && !node_online(node)) - node = -1; - - return node; -} - -#else /* CONFIG_X86_32 */ - -static int mp_bus_to_node[BUS_NR] = { - [0 ... BUS_NR - 1] = -1 -}; - -void set_mp_bus_to_node(int busnum, int node) -{ - if (busnum >= 0 && busnum < BUS_NR) - mp_bus_to_node[busnum] = (unsigned char) node; -} - -int get_mp_bus_to_node(int busnum) -{ - int node; - - if (busnum < 0 || busnum > (BUS_NR - 1)) - return 0; - node = mp_bus_to_node[busnum]; - return node; -} - -#endif /* CONFIG_X86_32 */ - -#endif /* CONFIG_NUMA */