From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932353AbcARRX1 (ORCPT ); Mon, 18 Jan 2016 12:23:27 -0500 Received: from mail-by2on0099.outbound.protection.outlook.com ([207.46.100.99]:61910 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932299AbcARRXR (ORCPT ); Mon, 18 Jan 2016 12:23:17 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ganapatrao.Kulkarni@caviumnetworks.com; From: Ganapatrao Kulkarni To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Subject: [RFC PATCH v9 6/6] topology, cleanup: Avoid redefinition of cpumask_of_pcibus in asm header files. Date: Mon, 18 Jan 2016 22:06:05 +0530 Message-ID: <1453134965-6125-7-git-send-email-gkulkarni@caviumnetworks.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1453134965-6125-1-git-send-email-gkulkarni@caviumnetworks.com> References: <1453134965-6125-1-git-send-email-gkulkarni@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0010.INDPRD01.PROD.OUTLOOK.COM (25.164.117.17) To BY1PR0701MB1691.namprd07.prod.outlook.com (25.162.110.29) X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1691;2:tzi68DKWgY6oeY8HVO3HDE5+Mp1mh3LfsC7gJxdJxibuFG2+WNWY0biUeQkGEok/ijLVsCU8kwtS68OMqhDNh/QmHqpm1knk86czJzMyRi6PSk+qCcugEBEl4ZXkEHio2UHTXv20hizrW5B4PLGDRQ==;3:Qr42sh3EXKlCs+sd804DIICK2upcgusLdwfB05KV0V4zUcKA1f77I+xkDXRcS+bo0kaLZbH//D+8o6ZjPMhlVXeCmJfBGL5BIeuhZ/kTODsFtMXIdYak+LVDcpwQ1VFC;25:ZgWK39iDCdH54LsyFJHCiWT8WJKGZ6WE0zj4pQ1MvqdUy+/lYAzPQBnZZz7SXtsTu7UAopK0Kcv/e6gvQQYhvwyTnXj7yXHCOOfkZAWJdOJ6ei9tVgeHQy3DQBddgnypcZXHwA7Rsp5HDGhN0tBcBHKqa7InyYgVOGTUAnSHtyAryU7/6kTRbUh5Dj+acX2fmm8gJMNJ4MNoR2cd/Ct3ekaN/Lz83LVMco1J2i0+p6QUeWQeWse3nrQqPC9ftS/m X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1691; X-MS-Office365-Filtering-Correlation-Id: 60fb9918-3745-4442-68b1-08d32025b898 X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1691;20:o/xE8C5dwl8lnI0D3D67/SmLUHo5DIpcJa2ohyklK1fCBeaJgtI+HDYwZfO3ynj2v2JnYSAHmpnG5tqiUfTaXpcAms+gTX92viYIbLowCjmvFLNwHwB3/hx9rfwr7VtBMtOA5dKqJE1/75J6/DoeeNEGTm52qKvnzgRPpbKZrobIKN2ZNGrWgNWtHSsWtPSbm649JvLngHEMxGfMTG3RjFXeazGQG+jbAmuresCy9tv2yVQXhbNbqLCw0FAHGzkSyOnmL6HhU0JPCOGIiOELx6uDf3v/9rcRSGqFfOa3oRB6LincCstzFT7kvi5zPX6h7bKUDDW+Slf6vBhgllPdQdY7T9iK/JOcfJLMHFDIY9ZOWWT8uXtiLqPs5E6ngzb88ArE2OzEMgbzoXZB9p6xOVa5BPDtsnY0VoBauU/Wt1f+O711PgV/0TuIUzdiyndL0QlzHFBa11YkeQqrQVxQSte+5gN5b4S3eCRy7J3oHOzdQvuwSVz5XU5SKi1GBRUf3U9zFZN5lv+mpmL1Miwt8vargh/CXkPlp3Lu50JAtg32LsrOd99Su/2egeM5xdjjQdQyHS4p1cNtfDhdLDqKiCn/7XVeeAyCKr9SsZS1V4Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001);SRVR:BY1PR0701MB1691;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1691; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1691;4:ztkbKaMUoKzigkbE1oC5iMZl4ZwWLcjqnBkO5JhtRKilkI/hEoX9TKft1iMeyXrekNbPa9oUdYWdwpbrw4/2HCGTGoLRvCo3SrYPM28hqRcBAvi8+RxQkjkeV3ZRvlHM7vCSd/DxZuWQ5VkjIFd90kFz7FrPN7Q+jT3UgrLRI/8iNaYCFgJizKrk5A8XOMneWnHhhAjQ0SPWifBncA2Zi28Z0PphOSxXqyzypuljwuWuFaJF+pHokDffBLhk+NWvTbjbwW9RK3OMrkh8Bou3zGs//Rm+H0DMSebasljgaYvj/EKmKjRwkz24nuj+xi2vagPIPBtMTXAlo9ECYFOBi7bbmJnrQn0geEh+ryPgWgaONiHmEMhKQTKzxuG6fkYs X-Forefront-PRVS: 08252193F3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(189002)(5009440100003)(87976001)(66066001)(4326007)(6116002)(5008740100001)(575784001)(2201001)(1096002)(36756003)(3846002)(586003)(189998001)(19580395003)(47776003)(5004730100002)(50466002)(2441003)(50226001)(19580405001)(76176999)(48376002)(97736004)(101416001)(50986999)(5001770100001)(5003940100001)(4001450100002)(33646002)(229853001)(92566002)(2906002)(40100003)(105586002)(42186005)(77096005)(106356001)(122386002)(2950100001)(7099028)(921003)(217873001)(83996005)(1121003)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1691;H:mypc.cavium.com.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1691;23:SupzakJunR0cv4AN0BM6IUaUeDpkmXEj+L28cos?= =?us-ascii?Q?2keCM83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?us-ascii?Q?alhgR7gn/QWPFRiAJu00NFM9uz36hrAt4bH73PbCxCd+8br9apIEirFDfASA?= =?us-ascii?Q?X8MR2d5bd0DFW6X4r/R25X7/bO/F71wkAp8/fOVhXAWz3+EkStzRvi5zWa9m?= =?us-ascii?Q?Twz7hww+/OXcSqIUU59fnosfDztW4DlXZ0yzcv5NBQkQq8jEbDdDtQB1P0+Q?= =?us-ascii?Q?HVA/deFqr8k8f7JjsGIP8is3B4baNQciHPqov/m6x+72Sk732b8ZQVPfUhgo?= =?us-ascii?Q?x4QzCr2CmqgNBfmd3H2BE7U/zUBvRoMmbjtiBruOCgjCReZ/zwHC414f0ag?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1691;5:MaF05XBqU+3iqpUUjJ3euqlMUK1NekWB6f93wLD0Y4NWIwO8s5KryMYfZS5j0nunjMfSowuiWKfTXSXdKA3LFrSd1SxPale1tMAT+lJUA694JcRJI4vYmECOelXN0eJup+F6p2kA0u4lKdx/ls6hGw==;24:GAncT3+EfRZzcStDlCR0epY1cHEPHx/uZysRx23x6L3LWGM20Z6sty1+bzOENN6g+lKBTKV3pEdMZ39iao8cH+2gk5hl6w4nGeeu2EBtdcI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2016 16:37:47.3649 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1691 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At present cpumask_of_pcibus is defined for !CONFIG_NUMA and moving out to common will allow to use for numa too. This also avoids redefinition of this macro in respective architecture header files. Signed-off-by: Ganapatrao Kulkarni --- arch/arm64/include/asm/topology.h | 3 --- arch/ia64/include/asm/topology.h | 4 ---- arch/metag/include/asm/topology.h | 3 --- arch/powerpc/include/asm/topology.h | 4 ---- arch/s390/include/asm/pci.h | 2 +- arch/s390/include/asm/topology.h | 1 + arch/sh/include/asm/topology.h | 3 --- arch/x86/include/asm/pci.h | 2 +- arch/x86/include/asm/topology.h | 1 + include/asm-generic/topology.h | 4 ++-- 10 files changed, 6 insertions(+), 21 deletions(-) diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h index 8b57339..6e1f62c 100644 --- a/arch/arm64/include/asm/topology.h +++ b/arch/arm64/include/asm/topology.h @@ -26,9 +26,6 @@ const struct cpumask *cpu_coregroup_mask(int cpu); struct pci_bus; int pcibus_to_node(struct pci_bus *bus); -#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ - cpu_all_mask : \ - cpumask_of_node(pcibus_to_node(bus))) #endif /* CONFIG_NUMA */ diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 3ad8f69..2778eb6 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h @@ -58,10 +58,6 @@ void build_cpu_to_node_map(void); extern void arch_fix_phys_package_id(int num, u32 slot); -#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ - cpu_all_mask : \ - cpumask_of_node(pcibus_to_node(bus))) - #include #endif /* _ASM_IA64_TOPOLOGY_H */ diff --git a/arch/metag/include/asm/topology.h b/arch/metag/include/asm/topology.h index e95f874..b285196 100644 --- a/arch/metag/include/asm/topology.h +++ b/arch/metag/include/asm/topology.h @@ -9,9 +9,6 @@ #define cpumask_of_node(node) ((void)node, cpu_online_mask) #define pcibus_to_node(bus) ((void)(bus), -1) -#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ - cpu_all_mask : \ - cpumask_of_node(pcibus_to_node(bus))) #endif diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index 8b3b46b..eee025d 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h @@ -32,10 +32,6 @@ static inline int pcibus_to_node(struct pci_bus *bus) } #endif -#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ - cpu_all_mask : \ - cpumask_of_node(pcibus_to_node(bus))) - extern int __node_distance(int, int); #define node_distance(a, b) __node_distance(a, b) diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index c873e68..539fb2d 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -205,7 +205,7 @@ static inline int __pcibus_to_node(const struct pci_bus *bus) } static inline const struct cpumask * -cpumask_of_pcibus(const struct pci_bus *bus) +__cpumask_of_pcibus(const struct pci_bus *bus) { return cpu_online_mask; } diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 94fc55f..280eafc 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h @@ -78,6 +78,7 @@ static inline const struct cpumask *cpumask_of_node(int node) #define parent_node(node) (node) #define pcibus_to_node(bus) __pcibus_to_node(bus) +#define cpumask_of_pcibus(bus) __cpumask_of_pcibus(bus) #define node_distance(a, b) __node_distance(a, b) diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h index b0a282d..357983d 100644 --- a/arch/sh/include/asm/topology.h +++ b/arch/sh/include/asm/topology.h @@ -9,9 +9,6 @@ #define cpumask_of_node(node) ((void)node, cpu_online_mask) #define pcibus_to_node(bus) ((void)(bus), -1) -#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ - cpu_all_mask : \ - cpumask_of_node(pcibus_to_node(bus))) #endif diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 4625943..4a6f358 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -121,7 +121,7 @@ static inline int __pcibus_to_node(const struct pci_bus *bus) } static inline const struct cpumask * -cpumask_of_pcibus(const struct pci_bus *bus) +__cpumask_of_pcibus(const struct pci_bus *bus) { int node; diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 0fb4648..980f6ee 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h @@ -91,6 +91,7 @@ extern void setup_node_to_cpumask_map(void); #define parent_node(node) (node) #define pcibus_to_node(bus) __pcibus_to_node(bus) +#define cpumask_of_pcibus(bus) __cpumask_of_pcibus(bus) extern int __node_distance(int, int); #define node_distance(a, b) __node_distance(a, b) diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index fc824e2..ee305f1 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -54,14 +54,14 @@ #define pcibus_to_node(bus) ((void)(bus), -1) #endif +#endif /* !CONFIG_NUMA */ + #ifndef cpumask_of_pcibus #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ cpu_all_mask : \ cpumask_of_node(pcibus_to_node(bus))) #endif -#endif /* CONFIG_NUMA */ - #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES) #ifndef set_numa_mem -- 1.8.1.4