From patchwork Fri Apr 28 11:43:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 88612 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp870602vqo; Fri, 28 Apr 2023 04:52:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6A8dQ6EVeJySxLnRLUZsscCqbyJGrdgwqfT7yjluQeTrdWofNwCcoAbZRRj5pBcFxaeEw9 X-Received: by 2002:a05:6a20:7f9c:b0:ec:6882:f04b with SMTP id d28-20020a056a207f9c00b000ec6882f04bmr6376067pzj.8.1682682739903; Fri, 28 Apr 2023 04:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682682739; cv=none; d=google.com; s=arc-20160816; b=UNLANJodk5sX2bQ0Z+1bH7QJsd7sf6ii1SvWb8otOOiFIQgjNGIBYJm0wouJQ16aAs Kd9iJEu4vdM+yKLdGm9Ti3K7lGIpXt4G9B/YTasEat3y2jVPGk5qYye1cpaTtEXV4w9n wH9DVrpHNJhBwi1AB/XJBYu138feERMloOHxhK8+w12/r+/inchvCkEXTmQWssWJOhTc KnUfN8SqY0AGtQcY+PrZpehXxVpkDGdSDi7fsbB1XpsKgjVSRpyUdFR6aqS8SplKRULx nb/zG6LTfIm1YDp5kfKnPZBcfuSvDlfV3CGmnquR2I54utuJSXepGEVfcbQGRshMuzve fjaw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8mnjduKtKEphO0Ql7xxzBEifpfAbnT5RJDfoyQgl78A=; b=nabgjLA2B5cUkLLbW92XChUwZcTh3jsns63vfVsKFPzvA912qz+rmRrcjvfKB/9hTu 5DbRnKQ9rLIMiujtxArBh0fAtk+ij3DBYk+sbBtdKr43kzKNZ0bMepcmtZyiPU9q5DLt ZHA2yeXwOvONCdmkbIPE3O+JbykAVBpEYk/wTOk3/8AmrisX/75ViMti72WYuJfMuP+S qb8iK2bF9I8KBSYbIi0a49aRhjOkl0bsMIEy1VeHRxTABLyeIcgqaDgaN8SIjjnRIeza NStmw2hjTp7qecO3sGNi+fKAsai6uZ+mVs11Iq9kRbxCX36Ukq9ALTA4fQfecdVdUSQD hBGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KE5VOs9k; 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 s17-20020a632c11000000b00528b2a25b1fsi2298946pgs.258.2023.04.28.04.52.07; Fri, 28 Apr 2023 04:52:19 -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=KE5VOs9k; 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 S240307AbjD1Lnk (ORCPT + 99 others); Fri, 28 Apr 2023 07:43:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbjD1Lni (ORCPT ); Fri, 28 Apr 2023 07:43:38 -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 7D634527E; Fri, 28 Apr 2023 04:43:37 -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 1B08C6164B; Fri, 28 Apr 2023 11:43:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9643BC433D2; Fri, 28 Apr 2023 11:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682682216; bh=TVVIq4lzr9bsO6ulKf/8nLSnB2gElMuLQd5D9aQ0yBQ=; h=From:To:Cc:Subject:Date:From; b=KE5VOs9kq3isj4iX5gVsWs7/Iw1HPAdfDdmWdEIjC8iIwDiv7B5Bg6pjYfRia/DAy SRbUafjNdUJCVjgXAi2iKRIzpVWdHFoscN4otY5Yv/EZJ5E/who2E8JQEdH1qqXwdM 27x3wlarLFDj2yFeLhJRhAOIOLFwveCxvWexCMg9WQR9d2xDXp7byPbRhvV6BsegO2 6tNuGZ/eXuucqo9jQqIMoN9TmQG2RrSY+VOGN+nhJ7Ns+nluujxUeklTZ89Xc+Iprm Yryu04l4Pyy78YqiWKvB9TF9pFL0Ax7yzQa2HIDsAKCjdJrZIoNgwK5gUaxrZVs8wH OZewdKq375WVw== From: broonie@kernel.org To: Huacai Chen Cc: Florent Revest , Huacai Chen , Linux Kernel Mailing List , Linux Next Mailing List , Qing Zhang , Steven Rostedt , Youling Tang Subject: linux-next: manual merge of the loongarch tree with the origin tree Date: Fri, 28 Apr 2023 12:43:31 +0100 Message-Id: <20230428114331.41923-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764420736861592142?= X-GMAIL-MSGID: =?utf-8?q?1764420736861592142?= Hi all, Today's linux-next merge of the loongarch tree got conflicts in: samples/ftrace/ftrace-direct-modify.c samples/ftrace/ftrace-direct-too.c samples/ftrace/ftrace-direct.c between commits: 23edf48309b14 ("ftrace: Replace uses of _ftrace_direct APIs with _ftrace_direct_multi") da8bdfbd42233 ("ftrace: Rename _ftrace_direct_multi APIs to _ftrace_direct APIs") from the origin tree and commit: 89451e0111632 ("LoongArch: ftrace: Add direct call trampoline samples support") from the loongarch tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. +++ b/samples/ftrace/ftrace-direct-modify.c @@@ -96,8 -96,40 +96,42 @@@ asm #endif /* CONFIG_S390 */ + #ifdef CONFIG_LOONGARCH + + asm ( + " .pushsection .text, \"ax\", @progbits\n" + " .type my_tramp1, @function\n" + " .globl my_tramp1\n" + " my_tramp1:\n" + " addi.d $sp, $sp, -16\n" + " st.d $t0, $sp, 0\n" + " st.d $ra, $sp, 8\n" + " bl my_direct_func1\n" + " ld.d $t0, $sp, 0\n" + " ld.d $ra, $sp, 8\n" + " addi.d $sp, $sp, 16\n" + " jr $t0\n" + " .size my_tramp1, .-my_tramp1\n" + + " .type my_tramp2, @function\n" + " .globl my_tramp2\n" + " my_tramp2:\n" + " addi.d $sp, $sp, -16\n" + " st.d $t0, $sp, 0\n" + " st.d $ra, $sp, 8\n" + " bl my_direct_func2\n" + " ld.d $t0, $sp, 0\n" + " ld.d $ra, $sp, 8\n" + " addi.d $sp, $sp, 16\n" + " jr $t0\n" + " .size my_tramp2, .-my_tramp2\n" + " .popsection\n" + ); + + #endif /* CONFIG_LOONGARCH */ + +static struct ftrace_ops direct; + static unsigned long my_tramp = (unsigned long)my_tramp1; static unsigned long tramps[2] = { (unsigned long)my_tramp1, +++ b/samples/ftrace/ftrace-direct-too.c @@@ -70,13 -70,37 +70,40 @@@ asm #endif /* CONFIG_S390 */ + #ifdef CONFIG_LOONGARCH + + asm ( + " .pushsection .text, \"ax\", @progbits\n" + " .type my_tramp, @function\n" + " .globl my_tramp\n" + " my_tramp:\n" + " addi.d $sp, $sp, -48\n" + " st.d $a0, $sp, 0\n" + " st.d $a1, $sp, 8\n" + " st.d $a2, $sp, 16\n" + " st.d $t0, $sp, 24\n" + " st.d $ra, $sp, 32\n" + " bl my_direct_func\n" + " ld.d $a0, $sp, 0\n" + " ld.d $a1, $sp, 8\n" + " ld.d $a2, $sp, 16\n" + " ld.d $t0, $sp, 24\n" + " ld.d $ra, $sp, 32\n" + " addi.d $sp, $sp, 48\n" + " jr $t0\n" + " .size my_tramp, .-my_tramp\n" + " .popsection\n" + ); + + #endif /* CONFIG_LOONGARCH */ + +static struct ftrace_ops direct; + static int __init ftrace_direct_init(void) { - return register_ftrace_direct((unsigned long)handle_mm_fault, - (unsigned long)my_tramp); + ftrace_set_filter_ip(&direct, (unsigned long) handle_mm_fault, 0, 0); + + return register_ftrace_direct(&direct, (unsigned long) my_tramp); } static void __exit ftrace_direct_exit(void) +++ b/samples/ftrace/ftrace-direct.c @@@ -63,13 -63,33 +63,36 @@@ asm #endif /* CONFIG_S390 */ + #ifdef CONFIG_LOONGARCH + + asm ( + " .pushsection .text, \"ax\", @progbits\n" + " .type my_tramp, @function\n" + " .globl my_tramp\n" + " my_tramp:\n" + " addi.d $sp, $sp, -32\n" + " st.d $a0, $sp, 0\n" + " st.d $t0, $sp, 8\n" + " st.d $ra, $sp, 16\n" + " bl my_direct_func\n" + " ld.d $a0, $sp, 0\n" + " ld.d $t0, $sp, 8\n" + " ld.d $ra, $sp, 16\n" + " addi.d $sp, $sp, 32\n" + " jr $t0\n" + " .size my_tramp, .-my_tramp\n" + " .popsection\n" + ); + + #endif /* CONFIG_LOONGARCH */ + +static struct ftrace_ops direct; + static int __init ftrace_direct_init(void) { - return register_ftrace_direct((unsigned long)wake_up_process, - (unsigned long)my_tramp); + ftrace_set_filter_ip(&direct, (unsigned long) wake_up_process, 0, 0); + + return register_ftrace_direct(&direct, (unsigned long) my_tramp); } static void __exit ftrace_direct_exit(void) diff --cc samples/ftrace/ftrace-direct-modify.c index 25fba66f61c05,ca72c3b710eb5..0000000000000 --- a/samples/ftrace/ftrace-direct-modify.c diff --cc samples/ftrace/ftrace-direct-too.c index f28e7b99840f0,ef64d75097737..0000000000000 --- a/samples/ftrace/ftrace-direct-too.c diff --cc samples/ftrace/ftrace-direct.c index d81a9473b5851,9be720957bf8d..0000000000000 --- a/samples/ftrace/ftrace-direct.c