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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 223CBC433E0 for ; Thu, 25 Feb 2021 12:43:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF80764F0F for ; Thu, 25 Feb 2021 12:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233375AbhBYMnN (ORCPT ); Thu, 25 Feb 2021 07:43:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232791AbhBYMnJ (ORCPT ); Thu, 25 Feb 2021 07:43:09 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3600CC061574 for ; Thu, 25 Feb 2021 04:42:29 -0800 (PST) Received: from zn.tnic (p200300ec2f03dc0076eb88cbea77f6b1.dip0.t-ipconnect.de [IPv6:2003:ec:2f03:dc00:76eb:88cb:ea77:f6b1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id ECDBD1EC05A0; Thu, 25 Feb 2021 13:42:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1614256941; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=uQk8xhtzVFS07eeQjgYRuM2udUqMvNN0jpzN2VvT1To=; b=KtI5TcoOVVvInFzBTsRTjmN+1g56Wu94xRvGINZrn1ls87BEEA++89OCdDuBbK1kN99xlg uLO/syvyIpSqvmCdqvxY8m/cq5OeB+Ee8+6upFfgVUNKCTzaGhQB/odGkuGQUdo4sNkh6J dbwqmr0tmJIE2qOoFx7jr3B8/OGTf10= Date: Thu, 25 Feb 2021 13:42:18 +0100 From: Borislav Petkov To: Arnd Bergmann Cc: Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , clang-built-linux Subject: Re: [PATCH] x86: mark some mpspec inline functions as __init Message-ID: <20210225124218.GC380@zn.tnic> References: <20210225112247.2240389-1-arnd@kernel.org> <20210225114533.GA380@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 01:18:21PM +0100, Arnd Bergmann wrote: > Either way works correctly, I don't care much, but picked the __init > annotation as it seemed more intuitive. If the compiler decides to > make it out-of-line for whatever reason, Well, frankly, I see no good reason for not inlining a function body which is a single call. And gcc does it just fine. And previous clangs did too, so why does clang-13 do it differently? IOW, could it be that you're fixing something that ain't broke? > I see no point in telling it otherwise, even though I agree it is a > bit silly. > > Should I send the patch with __always_inline? I guess. Although from where I'm standing, it looks like clang-13 needs fixing. But I surely don't know the whole story and "inline" is not forcing the inlining so I guess a compiler is free to do what it wants here. Apparently. And I guess telling it that those should be always inlined makes it perfectly clear then. But WTH do I know... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette