]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
UBUNTU: SAUCE: s390/topology: don't inline cpu_to_node
authorColin Ian King <colin.king@canonical.com>
Thu, 30 Nov 2017 14:58:13 +0000 (14:58 +0000)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 16 Sep 2019 13:06:31 +0000 (15:06 +0200)
Inlining cpu_to_node ends up with the GPL exported array cpu_topology
being pulled into all sources that call cpu_to_node and indirectly
makes cpu_to_node into a function that has the same GPL exported
constraints.  This is unlike any other architecture where cpu_to_node
does not have this constraint. Fix this by making cpu_to_node a macro
that calls a non-inlined __cpu_to_node helper function that performs
the same as the original cpu_to_node.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/s390/include/asm/topology.h
arch/s390/kernel/topology.c

index cca406fdbe51fcf9985320c10988a02025b099bc..e0bce245f1e78318b400a829ac35a5e91d2fa98a 100644 (file)
@@ -68,11 +68,8 @@ static inline void topology_expect_change(void) { }
 
 #ifdef CONFIG_NUMA
 
-#define cpu_to_node cpu_to_node
-static inline int cpu_to_node(int cpu)
-{
-       return cpu_topology[cpu].node_id;
-}
+extern int __cpu_to_node(int cpu);
+#define cpu_to_node __cpu_to_node
 
 /* Returns a pointer to the cpumask of CPUs on node 'node'. */
 #define cpumask_of_node cpumask_of_node
index 2db6fb405a9a508bade68470b52b2ccd0ed58236..571bafd93c8f87fa68e0565beddcd0386106571c 100644 (file)
@@ -65,6 +65,13 @@ EXPORT_SYMBOL_GPL(cpu_topology);
 
 cpumask_t cpus_with_topology;
 
+int __cpu_to_node(int cpu)
+{
+       return cpu_topology[cpu].node_id;
+}
+
+EXPORT_SYMBOL(__cpu_to_node);
+
 static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu)
 {
        cpumask_t mask;