Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5493438pxb; Wed, 26 Jan 2022 13:20:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPmfG3vghevV+ysPnBeA8XcHjqbprkzganrrvN/IinqakSFmH5Zmlb9B1aYJUc9KQe2Gpf X-Received: by 2002:a17:90b:4b42:: with SMTP id mi2mr10517031pjb.245.1643232052255; Wed, 26 Jan 2022 13:20:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643232052; cv=none; d=google.com; s=arc-20160816; b=jbpddt2TuAGF9SRsXwMXeeDhMGYCQvgTxfxvMobyeiO+UVbmXIm1yAE6aGFlmdOhKL Z397/Xr2ZBC4c/NrVcJ6OOXqCU2azg/KNuXh/Sj23bGJdXfN6jbt6scv/8UP0xAyM4Kx fm4O3DBXU7WzYVpVPd+Cgax50PtY6KydoOC2P9ElSLt66CcY9BMpUazgGrrroIRQyFmt 0rt/CsB02smq3kvvlcWbGxo4dSPY0v6iTYcV0+avk0igD44ZpITsm2qf2sCXeQwhxW02 hS12KuekmjywIKtAqrd1GhCmF7qwpouhumgrqiGH13JhSXBM8X8q4+7xZpmG+vG5vAIM Py1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=szHkPXjHnhgkdFcM9yC3gEge6ubgcyYjma/Ws+m7Kt4=; b=l6mbTlgl7L8bx6esMexaFKjOCQo0UywTsCUb3GDMCnjWHd7m2yXWMU98xy7aOtG0XW 0+Y/mZ8jjgDgoLc3la3do2ywg69DRiTB6ytSbfBmontPCMA+eQKf8E2VZFJw2Uyi5hcp 1z6bc54KCAdPNT8wgGlwfV/Op25Eth3P5Waeq60rhbpGEYhuR6vDDgcvPPMpQUOBasjI M/JYzdmE4TkN02FdECTeuTGh7us/EHZIzPXNNvDrCcQzVLImJF9VcDTZHLNhjRWRUJ/Q +gXdmVVkUpSyYaXpJNC6xKYNH8g8NZ4IjPLeAw1/vxCnQrC/tj5NXoIAMpaBkxGrf6GC bBjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pbK5j5ZA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sFCxN5Z1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si239736plz.621.2022.01.26.13.20.40; Wed, 26 Jan 2022 13:20:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pbK5j5ZA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sFCxN5Z1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239728AbiAZNah (ORCPT + 99 others); Wed, 26 Jan 2022 08:30:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239552AbiAZNab (ORCPT ); Wed, 26 Jan 2022 08:30:31 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06A36C06173B; Wed, 26 Jan 2022 05:30:30 -0800 (PST) Date: Wed, 26 Jan 2022 13:30:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643203828; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=szHkPXjHnhgkdFcM9yC3gEge6ubgcyYjma/Ws+m7Kt4=; b=pbK5j5ZAeh4XG0Oaw6z3tgzmEMxD+r4PIt5SLYj/e4Q9Ez48+dg8hFX2ArCkdb6q3eH8vg Bupd5/Y2F8+KiMbFjkK8+SxALw/K5JJG365GeQh2EqsBPcmrjT6vGVixjFP++3sivb6tPz 0MrShsyKWK275yPhxj+vwBhTFpW3H9kW++vn92A14yKJN6uuJuLIXrr1U1fJ0AxqO0KPnh 8I9mAWWHw7dOo67BqoLllICW5CfdyjXz1N4qX46SLsU0o0+YmJNpdIVQXj4HVSuntWICih I7nAqp4WIePrKFi3Mq9bNjzePHDn7NZkzquMQXWxYa8xAiL0yLijl+0cwNxySQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643203828; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=szHkPXjHnhgkdFcM9yC3gEge6ubgcyYjma/Ws+m7Kt4=; b=sFCxN5Z11KSHYb1upl0vTNmoVAdg0OKn2cfm9skwy6YycLpnxSUhfww4P33+Oc5uIecMH8 jjGifv+vr4OOwmDA== From: "tip-bot2 for Borislav Petkov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] cpumask: Always inline helpers which use bit manipulation functions Cc: Borislav Petkov , "Peter Zijlstra (Intel)" , Marco Elver , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220113155357.4706-3-bp@alien8.de> References: <20220113155357.4706-3-bp@alien8.de> MIME-Version: 1.0 Message-ID: <164320382704.16921.650711607573571350.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the locking/core branch of tip: Commit-ID: 1dc01abad6544cb9d884071b626b706e37aa9601 Gitweb: https://git.kernel.org/tip/1dc01abad6544cb9d884071b626b706e37aa9601 Author: Borislav Petkov AuthorDate: Thu, 13 Jan 2022 16:53:57 +01:00 Committer: Peter Zijlstra CommitterDate: Tue, 25 Jan 2022 22:30:28 +01:00 cpumask: Always inline helpers which use bit manipulation functions Former are always inlined so do that for the latter too, for consistency. Size impact is a whopping 5 bytes increase! :-) text data bss dec hex filename 22350551 8213184 1917164 32480899 1ef9e83 vmlinux.x86-64.defconfig.before 22350556 8213152 1917164 32480872 1ef9e68 vmlinux.x86-64.defconfig.after Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Marco Elver Link: https://lore.kernel.org/r/20220113155357.4706-3-bp@alien8.de --- include/linux/cpumask.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 64dae70..6b06c69 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -341,12 +341,12 @@ extern int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool * @cpu: cpu number (< nr_cpu_ids) * @dstp: the cpumask pointer */ -static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +static __always_inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) { set_bit(cpumask_check(cpu), cpumask_bits(dstp)); } -static inline void __cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +static __always_inline void __cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) { __set_bit(cpumask_check(cpu), cpumask_bits(dstp)); } @@ -357,12 +357,12 @@ static inline void __cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) * @cpu: cpu number (< nr_cpu_ids) * @dstp: the cpumask pointer */ -static inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp) +static __always_inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp) { clear_bit(cpumask_check(cpu), cpumask_bits(dstp)); } -static inline void __cpumask_clear_cpu(int cpu, struct cpumask *dstp) +static __always_inline void __cpumask_clear_cpu(int cpu, struct cpumask *dstp) { __clear_bit(cpumask_check(cpu), cpumask_bits(dstp)); } @@ -374,7 +374,7 @@ static inline void __cpumask_clear_cpu(int cpu, struct cpumask *dstp) * * Returns 1 if @cpu is set in @cpumask, else returns 0 */ -static inline int cpumask_test_cpu(int cpu, const struct cpumask *cpumask) +static __always_inline int cpumask_test_cpu(int cpu, const struct cpumask *cpumask) { return test_bit(cpumask_check(cpu), cpumask_bits((cpumask))); } @@ -388,7 +388,7 @@ static inline int cpumask_test_cpu(int cpu, const struct cpumask *cpumask) * * test_and_set_bit wrapper for cpumasks. */ -static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) +static __always_inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) { return test_and_set_bit(cpumask_check(cpu), cpumask_bits(cpumask)); } @@ -402,7 +402,7 @@ static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) * * test_and_clear_bit wrapper for cpumasks. */ -static inline int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) +static __always_inline int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) { return test_and_clear_bit(cpumask_check(cpu), cpumask_bits(cpumask)); }