From patchwork Mon Jul 17 23:16:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 121701 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1426449vqt; Mon, 17 Jul 2023 17:33:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlETf7zeg1/rfOpUNQKB1bGeuiYZMuddoDK1OLcLT2WcnXJl7V+zAhDCSEkS/xQrZaSjJOQ+ X-Received: by 2002:a17:90a:c7:b0:25b:d4bc:28d4 with SMTP id v7-20020a17090a00c700b0025bd4bc28d4mr11999425pjd.40.1689640403819; Mon, 17 Jul 2023 17:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689640403; cv=none; d=google.com; s=arc-20160816; b=Q4DN2TGgPUQLNofRbU3SWeqBiywhwQOwuEKzJyjni8c9UtvDD+VfR8FuCpCGg+UJYZ LsrjdNpC0D3wHR/q9B1q/I3DY649b9s1nzXNdiTUpXNtPHET92PXD3z5fxb9no8+sIX8 rsrYO0i7qwypbtii0Xl3P+cIkOsbVzBsoN5vImXtZTQJJBT7R00ketyV5AeZTblNqozU kWEo85UVzn00oQJTtCI66iE7qsjvKd1ubbxUKYhhkcV3GXSiAHVzG4eLi4fNZBm9rTzF Ca+NukuJzTHqg2NcGGSKUMGbyeiERf2TpZe2Fxh3/OM98NCgcRAYQGsUHhmikYX2wjIx ccgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=uX/kplLo5CTyEGcDpdLq/uLjlYQ837jWRls5Fa0d2bQ=; fh=MJzvnywV9/WrN/ASipmGkNx/7jKFHnq83nsgXe/obdc=; b=AykVC3j5iqBqNwpsj10Cyc8RVp9fx5qR6R4tC3aT820QFcfqfPnD3b3ma/79HyiDrw mTmJajKVQFHqxG0KCT7gcJgyckhFqQYQkxk6R1MtRQcZRd6fJqaqj7Fi9Zg+O54FdMhE vjRINSpdhodT4IsCONQMeSeLw7BMHUpZOAI7YH9u9ktQSPOsGfUsGyEsGJlEwa6XWcpf ej/Cn3qyXLt7laBm2WKrWJAKOgOmIqN9sbVLvLbzKX8NDfrXnOwpG7KI930QY8QPZWoh zZlAOPRbuIXgqNt7RfUy0wxSmD6gHMZnDOGrZgUDaureLa7T+1XEmHtMkeOnhZ0b3rpn z4kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="V2g8TK5/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gd16-20020a17090b0fd000b0025c0784b6f4si671642pjb.144.2023.07.17.17.33.11; Mon, 17 Jul 2023 17:33:23 -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=@linutronix.de header.s=2020 header.b="V2g8TK5/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbjGQXhB (ORCPT + 99 others); Mon, 17 Jul 2023 19:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231691AbjGQXgx (ORCPT ); Mon, 17 Jul 2023 19:36:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5047171B for ; Mon, 17 Jul 2023 16:36:07 -0700 (PDT) Message-ID: <20230717223226.358014177@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1689635760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=uX/kplLo5CTyEGcDpdLq/uLjlYQ837jWRls5Fa0d2bQ=; b=V2g8TK5/irCDXKjbQaXb1r7SKbrw79jOasZOrc22otmaawYm41oZ4SIYN0FoOb0YNp7rBT GBHawf+UV+/eGE0x/Ibnd426wPBM8PnMKgmDkWPpU1u0xd1pPNJJnmAFjJWudkI07Z1qBN AwfO+tH823Q4kD89cPbCZG3yWVHLDW8taIfeioZdloikGhfK9EaWh0KkpoHpqXVup82ZJT aSDoHi3jbBIsOeJt/WSyaMcX++jfPTHLJlXgfgJlcYk4kK8epMcgNwfT75FLfiSdDdTU5Z AipS3khCPFaeLx+j0Cd4sch+8CN00fp3FFf2ALcvZTEw6Zncv9Q3j43krlN9hg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1689635760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=uX/kplLo5CTyEGcDpdLq/uLjlYQ837jWRls5Fa0d2bQ=; b=n7YW14HMPXk/VX1uLMyjlSyd8+xVN0NXKSd1Rst1vDJXz9Qo+q06d7afU296MK6NMy4Wu/ WedSjnxQNdt/fPDw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Linus Torvalds , Andrew Cooper , Tom Lendacky , Paolo Bonzini , Wei Liu , Arjan van de Ven , Juergen Gross Subject: [patch 55/58] x86/apic: Mark all hotpath APIC callback wrappers __always_inline References: <20230717223049.327865981@linutronix.de> MIME-Version: 1.0 Date: Tue, 18 Jul 2023 01:16:00 +0200 (CEST) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771716375965642466 X-GMAIL-MSGID: 1771716375965642466 There is no value for instrumentation to look at those wrappers and with the upcoming conversion to static calls even less so. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/apic.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -370,62 +370,62 @@ void __init apic_install_driver(struct a pr_info("APIC::%s() replaced with %ps()\n", #_callback, _fn); \ } -static inline u32 apic_read(u32 reg) +static __always_inline u32 apic_read(u32 reg) { return apic->read(reg); } -static inline void apic_write(u32 reg, u32 val) +static __always_inline void apic_write(u32 reg, u32 val) { apic->write(reg, val); } -static inline void apic_eoi(void) +static __always_inline void apic_eoi(void) { apic->eoi(); } -static inline void apic_native_eoi(void) +static __always_inline void apic_native_eoi(void) { apic->native_eoi(); } -static inline u64 apic_icr_read(void) +static __always_inline u64 apic_icr_read(void) { return apic->icr_read(); } -static inline void apic_icr_write(u32 low, u32 high) +static __always_inline void apic_icr_write(u32 low, u32 high) { apic->icr_write(low, high); } -static inline void apic_wait_icr_idle(void) +static __always_inline void apic_wait_icr_idle(void) { if (apic->wait_icr_idle) apic->wait_icr_idle(); } -static inline u32 safe_apic_wait_icr_idle(void) +static __always_inline u32 safe_apic_wait_icr_idle(void) { return apic->safe_wait_icr_idle ? apic->safe_wait_icr_idle() : 0; } -static inline bool apic_id_valid(u32 apic_id) +static __always_inline bool apic_id_valid(u32 apic_id) { return apic_id <= apic->max_apic_id; } #else /* CONFIG_X86_LOCAL_APIC */ -static inline u32 apic_read(u32 reg) { return 0; } -static inline void apic_write(u32 reg, u32 val) { } -static inline void apic_eoi(void) { } -static inline u64 apic_icr_read(void) { return 0; } -static inline void apic_icr_write(u32 low, u32 high) { } -static inline void apic_wait_icr_idle(void) { } -static inline u32 safe_apic_wait_icr_idle(void) { return 0; } -static inline void apic_set_eoi(void (*eoi)(void)) {} +static __always_inline u32 apic_read(u32 reg) { return 0; } +static __always_inline void apic_write(u32 reg, u32 val) { } +static __always_inline void apic_eoi(void) { } +static __always_inline u64 apic_icr_read(void) { return 0; } +static __always_inline void apic_icr_write(u32 low, u32 high) { } +static __always_inline void apic_wait_icr_idle(void) { } +static __always_inline u32 safe_apic_wait_icr_idle(void) { return 0; } +static __always_inline void apic_set_eoi(void (*eoi)(void)) {} #endif /* CONFIG_X86_LOCAL_APIC */