From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8208C6FD1C for ; Wed, 22 Mar 2023 04:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NX977FeK2pniGVKSJPZZ/+Vsu0efGf8ybJIHSmxLCRQ=; b=JkHMbrPr9TvFhN ewetMUfriGYVM5KqR+zJ108FBh6cjgY4YMuFxyhClLAZWqSW8CB0adjpRnJdF4USQzQsIouZUUpge LmfCnjgMwWDHr44pTbJzAF5NFI+8N7KTx/6T1o45FmAkRl/5q68FcfXtr53HOG9g+w8azRWu52ffl 0s7uLKTiiRH3oNVYlf1ew4lhkZ+HdgxHL9CBzak4yzURIxRQgfWnKGm/c4Or994YbpM4wNFDprSe4 oSWRhcllXwmCUHKEOVtcEenX6O8MDb4FPKmLFctWdsR7XHmuzO0AcQKu6WqOBAueVMVZHz+7A0zuU 1G9cdJFRWuCysSW0TpwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peqTb-00Ec8S-2J; Wed, 22 Mar 2023 04:53:31 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peqTY-00Ec7F-15 for linux-arm-kernel@lists.infradead.org; Wed, 22 Mar 2023 04:53:30 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DA95BB81A34; Wed, 22 Mar 2023 04:53:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11341C433EF; Wed, 22 Mar 2023 04:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679460805; bh=Wo6x+GkPPT8Pl8Uu3LpccWeB7CQyzGI5HckGtYH3xU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=beKRsCbdUXU4yxrYpN8JnvAKOQ1QBcoOj76fxlYLdbRTr6nZSrU/gFB+LQPDHEpsO YdowDgoyyFHM8UiZZ8ZCmt8itFvmonu6cbG6L4soE0iYZ5HXDOJQ0rURjK74TSPcwP hyo3ORuiWArkyTEB4Bag8ajbBlIG8XG9tJ+rHsWGetw7Cewshg2nQlRNm69w/4WTrv 0hGAXLIt3VO3CpV3Qke/WAJwbjsDn/b8DOavfMz9iZlCJrilpxdqoI6f5l9PuBnWSO CYi44mzDwaT0b5UecXn4/tCm8I6fAXtFa+/8cTCZOtBeUm1N3JdKjNLPKUXhym5zrP qNc2vjbQQ5B3g== Date: Tue, 21 Mar 2023 21:53:23 -0700 From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Mark Rutland , Jason Baron , Steven Rostedt , Ard Biesheuvel , Christophe Leroy , Paolo Bonzini , Sean Christopherson , Sami Tolvanen , Nick Desaulniers , Will McVicker , Kees Cook , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 01/11] static_call: Improve key type abstraction Message-ID: <20230322045323.zxlf5wuhizabvvlc@treble> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230321_215329_084365_CA0ECD1D X-CRM114-Status: GOOD ( 14.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 21, 2023 at 09:00:07PM -0700, Josh Poimboeuf wrote: > diff --git a/kernel/static_call_inline.c b/kernel/static_call_inline.c > index 639397b5491c..41f6bda6773a 100644 > --- a/kernel/static_call_inline.c > +++ b/kernel/static_call_inline.c > @@ -112,15 +112,21 @@ static inline void static_call_sort_entries(struct static_call_site *start, > > static inline bool static_call_key_has_mods(struct static_call_key *key) > { > - return !(key->type & 1); > + return !!(key->type & 1); > } > > -static inline struct static_call_mod *static_call_key_next(struct static_call_key *key) > +static inline struct static_call_mod *static_call_key_mods(struct static_call_key *key) > { > if (!static_call_key_has_mods(key)) > return NULL; > > - return key->mods; > + return (struct static_call_mod *)(key->type & ~1); > +} > + Oops, these parts belonged in the next patch. -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel