]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86/apic: Move flat_cpu_mask_to_apicid_and() into C source
authorThomas Gleixner <tglx@linutronix.de>
Mon, 19 Jun 2017 23:37:40 +0000 (01:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Jun 2017 16:21:21 +0000 (18:21 +0200)
No point in having inlines assigned to function pointers at multiple
places. Just bloats the text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20170619235446.405975721@linutronix.de
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/apic.c

index bdffcd9eab2b27f6e211c3d5932007ca1328e47c..a86be0a082d0697b0609ff5239860875f6b3b274 100644 (file)
@@ -540,28 +540,12 @@ static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
 
 #endif
 
-static inline int
-flat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                           const struct cpumask *andmask,
-                           unsigned int *apicid)
-{
-       unsigned long cpu_mask = cpumask_bits(cpumask)[0] &
-                                cpumask_bits(andmask)[0] &
-                                cpumask_bits(cpu_online_mask)[0] &
-                                APIC_ALL_CPUS;
-
-       if (likely(cpu_mask)) {
-               *apicid = (unsigned int)cpu_mask;
-               return 0;
-       } else {
-               return -EINVAL;
-       }
-}
-
-extern int
-default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                              const struct cpumask *andmask,
-                              unsigned int *apicid);
+extern int flat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                                      const struct cpumask *andmask,
+                                      unsigned int *apicid);
+extern int default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                                         const struct cpumask *andmask,
+                                         unsigned int *apicid);
 
 static inline void
 flat_vector_allocation_domain(int cpu, struct cpumask *retmask,
index 2d75faf743f2794125b15497f7919736350be57f..e9b322f050512d9155a28ce8435b0dcaea3d3650 100644 (file)
@@ -2220,6 +2220,22 @@ int default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
        return -EINVAL;
 }
 
+int flat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                               const struct cpumask *andmask,
+                               unsigned int *apicid)
+{
+       unsigned long cpu_mask = cpumask_bits(cpumask)[0] &
+                                cpumask_bits(andmask)[0] &
+                                cpumask_bits(cpu_online_mask)[0] &
+                                APIC_ALL_CPUS;
+
+       if (likely(cpu_mask)) {
+               *apicid = (unsigned int)cpu_mask;
+               return 0;
+       }
+       return -EINVAL;
+}
+
 /*
  * Override the generic EOI implementation with an optimized version.
  * Only called during early boot when only one CPU is active and with