Message ID | 20221114114344.18650-7-jirislaby@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2097414wru; Mon, 14 Nov 2022 03:47:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf7MxYt0lndaoUE70CFfG0EC6aWcx82KJ6JLhqhuok0BmSe9YIEAB0zbxmwuc+AN/iqA79ah X-Received: by 2002:a17:902:c651:b0:187:3bc8:fc56 with SMTP id s17-20020a170902c65100b001873bc8fc56mr13004738pls.83.1668426420554; Mon, 14 Nov 2022 03:47:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668426420; cv=none; d=google.com; s=arc-20160816; b=EqEFd3VIt8j8Lx1zjwdDFb8tV706gTyUMMH9Ft4Uk3xr7LViL6RY3dh2P1xB/ZzCjl 6GOeHG8a0xIl9cWUlf0VkOZqCsO+KA+RLhhoPaW31MfQBdOiRctXmUui9hxckAZnQZeA UnRC8NWYs98nUVCNcCQa4pnzG60Byy+npUNAH7zEA2F3a1mCqaBAPcHWNlaUmqsJ4mYQ wYrB7qUT05TqASYFN6LdSzpuesZb56Ud6W40CZZq+R6T51BGpFCPdNydAuLNNFYLQSvp RB3qND6QTJm+YWgvj8rctTbYkbnqV6h25F/HwaS66A2SO7AKGEtVicckPtk+xGOv+Z08 F7Ag== 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=0sl3DtyrwtbE2n1SlanHpQ8r6NCycAWWitRpjr2y/TY=; b=phi1tEkoHPAX2UTpha8+H1r6X5qOhpp1eDy4XMJJ6VOjW+gJY+yda+OVX/IKyxTocv /XS0DGi03+0na7N4wUcj9atz1wI3E0yL0NfZsoPn4bb5qBs6MNcB+7B0s2MIlojRHBTP EJiGGD6SRswHsJ6thgJh/V3Adgp+xiTaakYBWtTq2ANIjV5s9gCDkrmcSqswncf3jff/ 3T5nZvKQjUPUObG9XG82an0ucUkJ1wJ4JBtlbNxpZt/1U5C/reZCvFXDPATYVAy+c9H0 K/izksEyuOBgMxKS261kgBnXCQ3o2gNAPsEIBysHOrF3+qoR3H8rbimavuNRD9FHYYyK bUsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H8yVQASE; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t33-20020a056a0013a100b00571ae24c5a0si9499654pfg.146.2022.11.14.03.46.47; Mon, 14 Nov 2022 03:47:00 -0800 (PST) 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=H8yVQASE; 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 S236579AbiKNLob (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Mon, 14 Nov 2022 06:44:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236546AbiKNLoU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 14 Nov 2022 06:44:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A58E20BF6 for <linux-kernel@vger.kernel.org>; Mon, 14 Nov 2022 03:44:11 -0800 (PST) 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 C1DF7B80E71 for <linux-kernel@vger.kernel.org>; Mon, 14 Nov 2022 11:44:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65B2DC433D6; Mon, 14 Nov 2022 11:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426248; bh=Rea/9roCehb335b4DrtNyO/qn+jvaXcltDXAFPr/hzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H8yVQASEluCLaERJpcSWhON6r9oiDC8MsZ+Rt7B3r1AKkiAJ3QxkRhuNixXl+qo0v QdA7o5Dm2km8G9OuVEm3SVR12K62zYowYqplqlcgLLH0BRsvtpYFhmcIYioXbnfmdi waVVX09VuL1vSaewNv7dDS5csLa6iw7QztUYz3r6h5luKI9BtowSILSaeeJPBvDyIY KBlxDouQRMK0aqRAHNIwGTQZfSB5yoMgWhZzFpDoU4Ixv8CiyihQA8dcge//f+vPY9 /gtFJVPKbIyLp/SXFtg4S4/aiw/m0IXY2FdhsmilqJT+Js5owP+EX/IGNrCVtheuRF UJwMzbFhUsfQw== From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> To: linux-kernel@vger.kernel.org Cc: Andi Kleen <ak@linux.intel.com>, Martin Liska <mliska@suse.cz>, Jiri Slaby <jslaby@suse.cz> Subject: [PATCH 06/46] Compiler Attributes, lto: introduce __noreorder Date: Mon, 14 Nov 2022 12:43:04 +0100 Message-Id: <20221114114344.18650-7-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221114114344.18650-1-jirislaby@kernel.org> References: <20221114114344.18650-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749471902045342747?= X-GMAIL-MSGID: =?utf-8?q?1749471902045342747?= |
Series |
gcc-LTO support for the kernel
|
|
Commit Message
Jiri Slaby
Nov. 14, 2022, 11:43 a.m. UTC
From: Andi Kleen <ak@linux.intel.com> gcc 5 has a new no_reorder attribute that prevents top level reordering only for that symbol. So add a new __noreorder wrapper for the no_reorder attribute. This will be used in the next patches to support gcc LTO. [js] split this to introduction & use Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Martin Liska <mliska@suse.cz> Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- include/linux/compiler_attributes.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index 898b3458b24a..be6c71fd5ebb 100644 --- a/include/linux/compiler_attributes.h +++ b/include/linux/compiler_attributes.h @@ -379,4 +379,14 @@ */ #define __fix_address noinline __noclone +/* + * https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes + */ + +#if __has_attribute(__no_reorder__) +#define __noreorder __attribute__((no_reorder)) +#else +#define __noreorder +#endif + #endif /* __LINUX_COMPILER_ATTRIBUTES_H */