Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp1686435qtg; Tue, 21 Mar 2023 21:01:11 -0700 (PDT) X-Google-Smtp-Source: AK7set+44vBrKepfw+i1H1a/a1Q5rS5/Ffq3zv4aaG5lVLJZhQKR9pP7ISFp9ALhByhpVF6JcfWJ X-Received: by 2002:a05:6a20:1b10:b0:db:6237:e76 with SMTP id ch16-20020a056a201b1000b000db62370e76mr607945pzb.15.1679457671309; Tue, 21 Mar 2023 21:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679457671; cv=none; d=google.com; s=arc-20160816; b=oGF37fbgXW1dUNtw9dZ6xTPeJfSsQzuyAek90dDeLe8dTvOfEZQIJQqL6eZEhZP5KJ HyRqCeXDryp61SRn1NrPybSbFl3HPW+iMSllIRMeP+NW8gsY2Y7addaZe8sDTcIPHgoi u1o27LxtpUYZqGrjwg0GVH+Ji6O25/Ere4YiuJ6VkNeFBc9UxIipCLKXzTi0Esquo12W 0D6/KNgstoNP2VS4IPUHElvfyHmJOjrUegxsXKIHTWqtUazbwC2y0b+Rf8xtzJ9Aro9l K5eo259FDnIXtgad4avHL6A+qzufs9/L/rC9MVukBicfYeYeY4JY22tE3W3nhTqsPjSs DkbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mF+L6rNCsqPnrw6hbBGOnm0FrOQ+aPm9HOjmW4cE8Ms=; b=XzVLlelN5VzItep+Oh7HJbzFspAS4X0sv7iLCoTxkQVLJcjYOL/VunOXLf+7JgRwaK 7Rx+uTExHpum+I5rynrZHktk9CMyKg5knCyiFc7ZYHgp+sSVvwYAN5FtNrjMKXZPXtP4 NZbvX9FZzQbZ8hoytKsl3A4i9opZ3iNXcoQNi43K82tuM6+mKyGyOhc8nhjhvlqcvu0s C1IN/JH6yDzAdVf5E6Ldw9MUDJH7gVu182pmuZOlLYynYgF/u8RbujgfOqGThpmQ3P9P x1C+q6NefpCT0fX9T9E+IbWEyYB+sTbDGwpmh+2G24GbB3vgE24j3yt95oB65Yip0nVt ZISQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LhGzl+6t; 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 a21-20020a63e855000000b0050bdca1b6eesi15226585pgk.861.2023.03.21.21.00.59; Tue, 21 Mar 2023 21:01:11 -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=LhGzl+6t; 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 S230310AbjCVEAe (ORCPT + 99 others); Wed, 22 Mar 2023 00:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230016AbjCVEAZ (ORCPT ); Wed, 22 Mar 2023 00:00:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7839047816 for ; Tue, 21 Mar 2023 21:00:24 -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 0E2FD61F34 for ; Wed, 22 Mar 2023 04:00:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2833C433D2; Wed, 22 Mar 2023 04:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679457623; bh=/ZLm+wrxs/+a1i9Qeb7J2lVK+Z8NtDgtRnyNWD9EKik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LhGzl+6tp6p2aIHnYK6VuYlsZHXLK2dZkWI2BXJoYnVP75G2Z+CueGy7ydubG4iMP bS7L3DdGct2/BXryFCIUDHFL3OGlhwMmLKZ69nBm8kN45PBzmphOSExrZyxVQ4ReXL GhG1BnZlHj312ZUYnEQ29g+5rwOuJkSTUmvt4Z0vfKNpgSMPMjMCP9FLAxjfqZJKE+ 5od/w9oWaqkegqfv6h6kQRTcyMljerNSWk989DL2pQ2vWR0gS+WUzQOZcU5tmJZ+Lv tlxGFsu4Ci7j8vQLQpjiOND2gMaJaL2gF0q/LbUGrY9ydPWvk66IW+lVICtmxyPixb 91wRAm4clwOtQ== 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: [PATCH v2 02/11] static_call: Flip key type union bit Date: Tue, 21 Mar 2023 21:00:08 -0700 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit 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 Flip the meaning of the key->type union field. This will make it easier to converge some of the DECLARE_STATIC_CALL() macros. Signed-off-by: Josh Poimboeuf --- include/linux/static_call.h | 3 --- include/linux/static_call_types.h | 4 ++-- tools/include/linux/static_call_types.h | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/linux/static_call.h b/include/linux/static_call.h index 141e6b176a1b..f984b8f6d974 100644 --- a/include/linux/static_call.h +++ b/include/linux/static_call.h @@ -186,7 +186,6 @@ extern long __static_call_return0(void); DECLARE_STATIC_CALL(name, _func); \ struct static_call_key STATIC_CALL_KEY(name) = { \ .func = _func, \ - .type = 1, \ }; \ ARCH_DEFINE_STATIC_CALL_TRAMP(name, _func) @@ -194,7 +193,6 @@ extern long __static_call_return0(void); DECLARE_STATIC_CALL(name, _func); \ struct static_call_key STATIC_CALL_KEY(name) = { \ .func = NULL, \ - .type = 1, \ }; \ ARCH_DEFINE_STATIC_CALL_NULL_TRAMP(name) @@ -202,7 +200,6 @@ extern long __static_call_return0(void); DECLARE_STATIC_CALL(name, _func); \ struct static_call_key STATIC_CALL_KEY(name) = { \ .func = __static_call_return0, \ - .type = 1, \ }; \ ARCH_DEFINE_STATIC_CALL_RET0_TRAMP(name) diff --git a/include/linux/static_call_types.h b/include/linux/static_call_types.h index 87c3598609e8..c4c4efb6f6fa 100644 --- a/include/linux/static_call_types.h +++ b/include/linux/static_call_types.h @@ -61,10 +61,10 @@ struct static_call_site { struct static_call_key { void *func; union { - /* bit 0: 0 = mods, 1 = sites */ + /* bit 0: 0 = sites, 1 = mods */ unsigned long type; - struct static_call_mod *_mods; struct static_call_site *_sites; + struct static_call_mod *_mods; }; }; diff --git a/tools/include/linux/static_call_types.h b/tools/include/linux/static_call_types.h index 87c3598609e8..c4c4efb6f6fa 100644 --- a/tools/include/linux/static_call_types.h +++ b/tools/include/linux/static_call_types.h @@ -61,10 +61,10 @@ struct static_call_site { struct static_call_key { void *func; union { - /* bit 0: 0 = mods, 1 = sites */ + /* bit 0: 0 = sites, 1 = mods */ unsigned long type; - struct static_call_mod *_mods; struct static_call_site *_sites; + struct static_call_mod *_mods; }; }; -- 2.39.2