From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753624AbdFVRIF (ORCPT ); Thu, 22 Jun 2017 13:08:05 -0400 Received: from terminus.zytor.com ([65.50.211.136]:44737 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbdFVRIE (ORCPT ); Thu, 22 Jun 2017 13:08:04 -0400 Date: Thu, 22 Jun 2017 10:02:27 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: axboe@kernel.dk, hch@lst.de, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, mpe@ellerman.id.au, keith.busch@intel.com, peterz@infradead.org, tglx@linutronix.de Reply-To: axboe@kernel.dk, hch@lst.de, mingo@kernel.org, hpa@zytor.com, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, mpe@ellerman.id.au, keith.busch@intel.com, peterz@infradead.org, tglx@linutronix.de In-Reply-To: <20170619235446.405975721@linutronix.de> References: <20170619235446.405975721@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] x86/apic: Move flat_cpu_mask_to_apicid_and() into C source Git-Commit-ID: ad95212ee6e0b62f38b287b40c9ab6a1ba3e892b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ad95212ee6e0b62f38b287b40c9ab6a1ba3e892b Gitweb: http://git.kernel.org/tip/ad95212ee6e0b62f38b287b40c9ab6a1ba3e892b Author: Thomas Gleixner AuthorDate: Tue, 20 Jun 2017 01:37:40 +0200 Committer: Thomas Gleixner CommitDate: Thu, 22 Jun 2017 18:21:21 +0200 x86/apic: Move flat_cpu_mask_to_apicid_and() into C source No point in having inlines assigned to function pointers at multiple places. Just bloats the text. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.405975721@linutronix.de --- arch/x86/include/asm/apic.h | 28 ++++++---------------------- arch/x86/kernel/apic/apic.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index bdffcd9..a86be0a 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -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, diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 2d75faf..e9b322f 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -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