Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5563136rwl; Tue, 21 Mar 2023 21:59:01 -0700 (PDT) X-Google-Smtp-Source: AK7set/pVS9mIyfaynrrT5d40YiCpgA4tzKg3cNw1zEZTGvhkvUfNgoO0BiunnDSznYpGNlCU3Rp X-Received: by 2002:a17:906:11cd:b0:8b1:264f:3776 with SMTP id o13-20020a17090611cd00b008b1264f3776mr5663142eja.23.1679461141205; Tue, 21 Mar 2023 21:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679461141; cv=none; d=google.com; s=arc-20160816; b=yNxwl2wOyUfO3GUtvtrDBcR1BXO+db4QImE6+nuB5XFlCEFwfaaXkShax+Cc+Xps06 GW9kmWFSMIRe6Hd7fJ6YVSD/Om6U9ikXbPgPC9zg8QxNLJAt4jnnUphYC700XJCsIZuK 6ukGlg2qFzzLFm4fZNxvs9ySg8Xj8xXU3cmwjlZawklCvZQofcd1WjBZi4e7B8iYPp+Z /rimuYaBmYMhB3BOmYx1hvQANPZqgXF+6CuZEv7vZdkkc9QOg3S8jGkf4UDbtyvgPjjs Qrv1FoYWU5u58aPJagcaud2VNumvUqUWJNyC3LtLeOUakYkwvOuLsQtnmCeGwir2H5x6 rdzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pk8z7jQl2C7BNnudFNZDICZNbeVlZzxWtOvAoiXUWAg=; b=A5N9UwAXFcnVGWzZnrM1/NxTD3t3Ao5M7pO2RUgxmYeyN7Jdu2mWRnRYMKfFcfslma d08UMFvGhVcMB6uIwJvpum8w/Ooz2JhEH9XQ8mAEtPPKy8t2gMz8lwAaN4FVW++RBG8m RPye36D+wDwx1p7QzK3SMdnkCUnaJTubPPFA/IW6zP3RVnoKemt7ut3RkKAjLbdv9pJK sk+Z8AmVfZvotAP1I5klLqhxSO3sjansd1sJ/lZ6TUDxN2nE1h11D+TrZxB0KeusJpGv FIb7j9mpwpcRbqkb2mIYCgs/T9tRDiQT7uxOb/W4nSQS2lvJDcXHGAKG/3hzJvGwl0IR 3kIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=beKRsCbd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz4-20020a17090775e400b0092351b1acdcsi7636766ejc.347.2023.03.21.21.58.34; Tue, 21 Mar 2023 21:59:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=beKRsCbd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229664AbjCVEx2 (ORCPT + 99 others); Wed, 22 Mar 2023 00:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjCVEx1 (ORCPT ); Wed, 22 Mar 2023 00:53:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5F501F5F0 for ; Tue, 21 Mar 2023 21:53:26 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 3F92461E67 for ; 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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