From patchwork Tue Aug 22 02:38:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 136448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp3381217vqi; Mon, 21 Aug 2023 20:14:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGik3w0tvpyWrgXotKdL2rfyt10iLmyVUQ8WfoxMcUC1bo7n79UmZaI8mez1kqiT/JgMnK4 X-Received: by 2002:a17:90a:7408:b0:26b:513a:30b0 with SMTP id a8-20020a17090a740800b0026b513a30b0mr12749263pjg.10.1692674076589; Mon, 21 Aug 2023 20:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692674076; cv=none; d=google.com; s=arc-20160816; b=M9U26Lvy9B05U9ZibpkG6qAqvRcAuLqH3khDEdJQH4g4BjQvYWjk48Zr2efhpbwfRz w8ELWUxKrfc0XotiQwMQzfl1FyTbQK+zSgJHlYucy3ymyTPqJy0tRkq6zuD5PGY3zzxI S6mAh0VSB36p26DpSbAjfqKDnbmqsfBItH0MdyA/Nz+fCafcNxo2rEKaubwvh4KaO+2R KdYgSC0pTvsiadh12MSQCGF9H5Wq087bu/NYMi6o45Po7/LZgSvnT6MuH3tXG9a4qmK3 DV+yjZ7YEsFBJivFF6kl1TQvo4stD0oi0AfPQwgcLhptxJFrU9cwr91g+xqueLc/4c85 sv+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=UmjTV0rv05Ng6tBPHcaYYmpuazjmIBETtD5m5bJnlvE=; fh=jcii05jqYLls1SGAqVghLyv17fOSAirJYgrCzo0pLDI=; b=iY317EOdgwojFwfAzxzm3PY4IjqcpYwm43nwzJOXnfSBSn2kHPVsDsDNHccovcyd80 MfmZqE74nqk8J6P09EyiPVNaFTXGCyi2DdwXV3n9FBodVMyCPMInDAqu7blseBY1U6aj 38z9Xi55G9N0Jkw02nSCd8jIJGBu1/aGfVb3VOv7F9ZwxfwoYcgRHWZ4FUa7LvzmB7Cj biPOnzNYeIW7SwBCzyEOK6sil5bVGVsq9HjCVyDXDmzLgbdE/7ehsboPfoaVQeo/VUo9 32KL1okyPKicPDqCRQF99Xgw+lZrxCgjenHmUAWKxAebwZVMUuxccj7jfR1NA9xKo3db 0x9A== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a170902bc4600b001bc463ead7asi8029678plz.247.2023.08.21.20.14.22; Mon, 21 Aug 2023 20:14:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232353AbjHVCi4 (ORCPT + 99 others); Mon, 21 Aug 2023 22:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbjHVCia (ORCPT ); Mon, 21 Aug 2023 22:38:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF1B4193 for ; Mon, 21 Aug 2023 19:38:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C68A64C32 for ; Tue, 22 Aug 2023 02:38:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE025C433CB; Tue, 22 Aug 2023 02:38:27 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.96) (envelope-from ) id 1qYHI2-001bd9-31; Mon, 21 Aug 2023 22:38:42 -0400 Message-ID: <20230822023842.747187890@goodmis.org> User-Agent: quilt/0.66 Date: Mon, 21 Aug 2023 22:38:11 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton , Florent Revest , "GONG, Ruiqi" Subject: [for-linus][PATCH 8/8] samples: ftrace: Replace bti assembly with hint for older compiler References: <20230822023803.605698724@goodmis.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no 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: 1774897412566558024 X-GMAIL-MSGID: 1774897412566558024 From: "GONG, Ruiqi" When cross-building the arm64 kernel with allmodconfig using GCC 9.4, the following error occurs on multiple files under samples/ftrace/: /tmp/ccPC1ODs.s: Assembler messages: /tmp/ccPC1ODs.s:8: Error: selected processor does not support `bti c' Fix this issue by replacing `bti c` with `hint 34`, which is compatible for the older compiler. Link: https://lore.kernel.org/linux-trace-kernel/20230820111509.1470826-1-gongruiqi@huaweicloud.com Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Florent Revest Fixes: 8c3526fb86060cb5 ("arm64: ftrace: Add direct call trampoline samples support") Acked-by: Mark Rutland Signed-off-by: GONG, Ruiqi Signed-off-by: Steven Rostedt (Google) --- samples/ftrace/ftrace-direct-modify.c | 4 ++-- samples/ftrace/ftrace-direct-multi-modify.c | 4 ++-- samples/ftrace/ftrace-direct-multi.c | 2 +- samples/ftrace/ftrace-direct-too.c | 2 +- samples/ftrace/ftrace-direct.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/ftrace/ftrace-direct-modify.c b/samples/ftrace/ftrace-direct-modify.c index e5ed08098ff3..e2a6a69352df 100644 --- a/samples/ftrace/ftrace-direct-modify.c +++ b/samples/ftrace/ftrace-direct-modify.c @@ -105,7 +105,7 @@ asm ( " .type my_tramp1, @function\n" " .globl my_tramp1\n" " my_tramp1:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #16\n" " stp x9, x30, [sp]\n" " bl my_direct_func1\n" @@ -117,7 +117,7 @@ asm ( " .type my_tramp2, @function\n" " .globl my_tramp2\n" " my_tramp2:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #16\n" " stp x9, x30, [sp]\n" " bl my_direct_func2\n" diff --git a/samples/ftrace/ftrace-direct-multi-modify.c b/samples/ftrace/ftrace-direct-multi-modify.c index 292cff2b3f5d..2e349834d63c 100644 --- a/samples/ftrace/ftrace-direct-multi-modify.c +++ b/samples/ftrace/ftrace-direct-multi-modify.c @@ -112,7 +112,7 @@ asm ( " .type my_tramp1, @function\n" " .globl my_tramp1\n" " my_tramp1:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #32\n" " stp x9, x30, [sp]\n" " str x0, [sp, #16]\n" @@ -127,7 +127,7 @@ asm ( " .type my_tramp2, @function\n" " .globl my_tramp2\n" " my_tramp2:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #32\n" " stp x9, x30, [sp]\n" " str x0, [sp, #16]\n" diff --git a/samples/ftrace/ftrace-direct-multi.c b/samples/ftrace/ftrace-direct-multi.c index b4391e08c913..9243dbfe4d0c 100644 --- a/samples/ftrace/ftrace-direct-multi.c +++ b/samples/ftrace/ftrace-direct-multi.c @@ -75,7 +75,7 @@ asm ( " .type my_tramp, @function\n" " .globl my_tramp\n" " my_tramp:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #32\n" " stp x9, x30, [sp]\n" " str x0, [sp, #16]\n" diff --git a/samples/ftrace/ftrace-direct-too.c b/samples/ftrace/ftrace-direct-too.c index e9804c5307c0..e39c3563ae4e 100644 --- a/samples/ftrace/ftrace-direct-too.c +++ b/samples/ftrace/ftrace-direct-too.c @@ -81,7 +81,7 @@ asm ( " .type my_tramp, @function\n" " .globl my_tramp\n" " my_tramp:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #48\n" " stp x9, x30, [sp]\n" " stp x0, x1, [sp, #16]\n" diff --git a/samples/ftrace/ftrace-direct.c b/samples/ftrace/ftrace-direct.c index 20f4a7caa810..32c477da1e9a 100644 --- a/samples/ftrace/ftrace-direct.c +++ b/samples/ftrace/ftrace-direct.c @@ -72,7 +72,7 @@ asm ( " .type my_tramp, @function\n" " .globl my_tramp\n" " my_tramp:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #32\n" " stp x9, x30, [sp]\n" " str x0, [sp, #16]\n"