Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2457002rdb; Fri, 8 Dec 2023 08:37:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHI6QLfe5tVbITWPOth1ZDclq8g2pP4lRGUueMCFe6DTh7+tawom7o14BB6/U2DtmE+IFf7 X-Received: by 2002:a17:902:680a:b0:1d0:6ffd:6115 with SMTP id h10-20020a170902680a00b001d06ffd6115mr386776plk.55.1702053455982; Fri, 08 Dec 2023 08:37:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702053455; cv=none; d=google.com; s=arc-20160816; b=mI6HiXxfDMCdK8MG/QCcntPBL9Uq5goN9SYEReDxulLOiW6ITz/DKqSGvefqFBSzH+ Eb9aOWPJvT7eDi6gIDyec7HeTlINNYldCIs8oNF54jMQungRNpX4XSYih/Zc5vniEpod BkX7c3WFASZQQnIxhSFSWUBxzn6dhfS+skx+TXu4fT79Bp1Huxu8QN/tne/arVeWC7+R kLZZxDQlO0nlfuf4iVNG4nJ+IM9mTEVgFIUoVXPWYxdqqUpqNKLDhZnPv05A1bhMCUTi GbjVX50Q87TMz2lO3GT46+3uBbUI0IABQHsyoXAo/OKsqwFg7pmG7BeXergsRNrOnXhK JKeg== 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=esDUUUPnWesLhxT4CxjbNr/tfpzPcMxk1QzmF7xzFZs=; fh=hPWrg32dlFKNN5MdTsgIUJTVaEJ0Jhxi8OfbSIPXQ0A=; b=Xb63MDCgPopArw1MH4MvF1m4v0nQKU6/wvuAYRabykQLE9PzKIuFQDbntF4dGUjlDa kZiy5lF+3mOJYUFYH649VGc1xZPXglslCoGOD29Zou052YB4M/FQv1HzXmzV/6L1Jqf8 ixlKWlyFMHaF74xupm7O5X4NqRctSChHuKPOvrBwEnfkfdflA3/qlak9Foaq3eOENNVb LfxDQOzlPokz1y1vzEZ+bRgYqvhpiYjr4m+rA/fFbufZqdZ06JWNK4pPnma+Pqbe1n8I OSarOcEmienmkY523aQ0h0Bm6866TTuGuzciYq+gscVvzVA3NMGNR8Q0FGgYsS+xkuGO Q/zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kqw5cSnR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j15-20020a170902da8f00b001d01f49015esi1850749plx.442.2023.12.08.08.37.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 08:37:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kqw5cSnR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 49DEE809A826; Fri, 8 Dec 2023 08:37:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574273AbjLHQgX (ORCPT + 99 others); Fri, 8 Dec 2023 11:36:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574509AbjLHQfk (ORCPT ); Fri, 8 Dec 2023 11:35:40 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F5F1BE4 for ; Fri, 8 Dec 2023 08:35:42 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D02EC433C8; Fri, 8 Dec 2023 16:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702053341; bh=/Vr54DRtLZd4aKRU80jRMolyKRZJenT4nAxAfj9vNgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kqw5cSnRlXfjEbUQjs6WgIcysAOrhanmR902+VQbClMrPLkXY683HU5mJIYOzkTH3 Yyue4EEiHDrdVsjDxVESagqcPXSMMrn9ULPcPXs0DEBlcDzw1koo1hDb/ldwLf7+dA e4lSJPR3TjZWnnHX0GERGFLrWlb9svcRzxZYBGOShKnRhor2Tqf9WNmRQNeFlBOmT+ /mgGpK6XejchUuv4nmS/e8wkrrD+3+ViY72f1giw+hL5APgTaAmwVfen3vxcjdbjBs 2ELu3e14nWeWdIWRRznQnfFErm2+uXCMBhnQqsoRklEnJGMjFpu9JMgHdvpiT849pE sKPBxbOmYlk0g== From: Naveen N Rao To: , Cc: Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , Steven Rostedt , Mark Rutland , Florent Revest , Masami Hiramatsu Subject: [RFC PATCH 9/9] samples/ftrace: Add support for ftrace direct samples on powerpc Date: Fri, 8 Dec 2023 22:00:48 +0530 Message-ID: <4735fcdfb8977c6f437796590c0e3cbbf644d0de.1702045299.git.naveen@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 08:37:32 -0800 (PST) Add powerpc 32-bit and 64-bit samples for ftrace direct. This serves to show the sample instruction sequence to be used by ftrace direct calls to adhere to the ftrace ABI. On 64-bit powerpc, TOC setup requires some additional work. Signed-off-by: Naveen N Rao --- arch/powerpc/Kconfig | 2 + samples/ftrace/ftrace-direct-modify.c | 94 ++++++++++++++++- samples/ftrace/ftrace-direct-multi-modify.c | 110 +++++++++++++++++++- samples/ftrace/ftrace-direct-multi.c | 64 +++++++++++- samples/ftrace/ftrace-direct-too.c | 72 ++++++++++++- samples/ftrace/ftrace-direct.c | 61 ++++++++++- 6 files changed, 398 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4fe04fdca33a..28de3a5f3e98 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -274,6 +274,8 @@ config PPC select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RELIABLE_STACKTRACE select HAVE_RSEQ + select HAVE_SAMPLE_FTRACE_DIRECT if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS + select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS select HAVE_SETUP_PER_CPU_AREA if PPC64 select HAVE_SOFTIRQ_ON_OWN_STACK select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2) diff --git a/samples/ftrace/ftrace-direct-modify.c b/samples/ftrace/ftrace-direct-modify.c index e2a6a69352df..bd985035b937 100644 --- a/samples/ftrace/ftrace-direct-modify.c +++ b/samples/ftrace/ftrace-direct-modify.c @@ -2,7 +2,7 @@ #include #include #include -#ifndef CONFIG_ARM64 +#if !defined(CONFIG_ARM64) && !defined(CONFIG_PPC32) #include #endif @@ -164,6 +164,98 @@ asm ( #endif /* CONFIG_LOONGARCH */ +#ifdef CONFIG_PPC32 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp1, @function\n" +" .globl my_tramp1\n" +" my_tramp1:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" bl my_direct_func1\n" +" lwz 0, 20(1)\n" +" mtlr 0\n" +" addi 1, 1, 32\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp1, .-my_tramp1\n" + +" .type my_tramp2, @function\n" +" .globl my_tramp2\n" +" my_tramp2:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" bl my_direct_func2\n" +" lwz 0, 20(1)\n" +" mtlr 0\n" +" addi 1, 1, 32\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp2, .-my_tramp2\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC32 */ + +#ifdef CONFIG_PPC64 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp1, @function\n" +" .globl my_tramp1\n" +" my_tramp1:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" bl my_direct_func1\n" +" ld 2, 24(1)\n" +" ld 0, 48(1)\n" +" mtlr 0\n" +" addi 1, 1, 64\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp1, .-my_tramp1\n" + +" .type my_tramp2, @function\n" +" .globl my_tramp2\n" +" my_tramp2:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" bl my_direct_func2\n" +" ld 2, 24(1)\n" +" ld 0, 48(1)\n" +" mtlr 0\n" +" addi 1, 1, 64\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp2, .-my_tramp2\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC64 */ + static struct ftrace_ops direct; static unsigned long my_tramp = (unsigned long)my_tramp1; diff --git a/samples/ftrace/ftrace-direct-multi-modify.c b/samples/ftrace/ftrace-direct-multi-modify.c index 2e349834d63c..478e879a23af 100644 --- a/samples/ftrace/ftrace-direct-multi-modify.c +++ b/samples/ftrace/ftrace-direct-multi-modify.c @@ -2,7 +2,7 @@ #include #include #include -#ifndef CONFIG_ARM64 +#if !defined(CONFIG_ARM64) && !defined(CONFIG_PPC32) #include #endif @@ -184,6 +184,114 @@ asm ( #endif /* CONFIG_LOONGARCH */ +#ifdef CONFIG_PPC32 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp1, @function\n" +" .globl my_tramp1\n" +" my_tramp1:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -24(1)\n" +" stw 3, 16(1)\n" +" mr 3, 0\n" +" addi 3, 3, 16\n" +" bl my_direct_func1\n" +" lwz 3, 16(1)\n" +" lwz 0, 28(1)\n" +" mtlr 0\n" +" addi 1, 1, 40\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp1, .-my_tramp1\n" + +" .type my_tramp2, @function\n" +" .globl my_tramp2\n" +" my_tramp2:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -24(1)\n" +" stw 3, 16(1)\n" +" mr 3, 0\n" +" addi 3, 3, 16\n" +" bl my_direct_func2\n" +" lwz 3, 16(1)\n" +" lwz 0, 28(1)\n" +" mtlr 0\n" +" addi 1, 1, 40\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp2, .-my_tramp2\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC32 */ + +#ifdef CONFIG_PPC64 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp1, @function\n" +" .globl my_tramp1\n" +" my_tramp1:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -48(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" std 3, 32(1)\n" +" mr 3, 0\n" +" addi 3, 3, 20\n" +" bl my_direct_func1\n" +" ld 3, 32(1)\n" +" ld 2, 24(1)\n" +" ld 0, 64(1)\n" +" mtlr 0\n" +" addi 1, 1, 80\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp1, .-my_tramp1\n" + +" .type my_tramp2, @function\n" +" .globl my_tramp2\n" +" my_tramp2:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -48(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" std 3, 32(1)\n" +" mr 3, 0\n" +" addi 3, 3, 20\n" +" bl my_direct_func2\n" +" ld 3, 32(1)\n" +" ld 2, 24(1)\n" +" ld 0, 64(1)\n" +" mtlr 0\n" +" addi 1, 1, 80\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp2, .-my_tramp2\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC64 */ + static unsigned long my_tramp = (unsigned long)my_tramp1; static unsigned long tramps[2] = { (unsigned long)my_tramp1, diff --git a/samples/ftrace/ftrace-direct-multi.c b/samples/ftrace/ftrace-direct-multi.c index 9243dbfe4d0c..558f4ad8d84a 100644 --- a/samples/ftrace/ftrace-direct-multi.c +++ b/samples/ftrace/ftrace-direct-multi.c @@ -4,7 +4,7 @@ #include /* for handle_mm_fault() */ #include #include -#ifndef CONFIG_ARM64 +#if !defined(CONFIG_ARM64) && !defined(CONFIG_PPC32) #include #endif @@ -116,6 +116,68 @@ asm ( #endif /* CONFIG_LOONGARCH */ +#ifdef CONFIG_PPC32 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -24(1)\n" +" stw 3, 16(1)\n" +" mr 3, 0\n" +" addi 3, 3, 16\n" +" bl my_direct_func\n" +" lwz 3, 16(1)\n" +" lwz 0, 28(1)\n" +" mtlr 0\n" +" addi 1, 1, 40\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC32 */ + +#ifdef CONFIG_PPC64 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -48(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" std 3, 32(1)\n" +" mr 3, 0\n" +" addi 3, 3, 20\n" +" bl my_direct_func\n" +" ld 3, 32(1)\n" +" ld 2, 24(1)\n" +" ld 0, 64(1)\n" +" mtlr 0\n" +" addi 1, 1, 80\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC64 */ + static struct ftrace_ops direct; static int __init ftrace_direct_multi_init(void) diff --git a/samples/ftrace/ftrace-direct-too.c b/samples/ftrace/ftrace-direct-too.c index e39c3563ae4e..2a35b5d88304 100644 --- a/samples/ftrace/ftrace-direct-too.c +++ b/samples/ftrace/ftrace-direct-too.c @@ -3,7 +3,7 @@ #include /* for handle_mm_fault() */ #include -#ifndef CONFIG_ARM64 +#if !defined(CONFIG_ARM64) && !defined(CONFIG_PPC32) #include #endif @@ -125,6 +125,76 @@ asm ( #endif /* CONFIG_LOONGARCH */ +#ifdef CONFIG_PPC32 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -32(1)\n" +" stw 3, 16(1)\n" +" stw 4, 20(1)\n" +" stw 5, 24(1)\n" +" stw 6, 28(1)\n" +" bl my_direct_func\n" +" lwz 6, 28(1)\n" +" lwz 5, 24(1)\n" +" lwz 4, 20(1)\n" +" lwz 3, 16(1)\n" +" lwz 0, 36(1)\n" +" mtlr 0\n" +" addi 1, 1, 48\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC32 */ + +#ifdef CONFIG_PPC64 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -64(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" std 3, 32(1)\n" +" std 4, 40(1)\n" +" std 5, 48(1)\n" +" std 6, 56(1)\n" +" bl my_direct_func\n" +" ld 6, 56(1)\n" +" ld 5, 48(1)\n" +" ld 4, 40(1)\n" +" ld 3, 32(1)\n" +" ld 2, 24(1)\n" +" ld 0, 80(1)\n" +" mtlr 0\n" +" addi 1, 1, 96\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC64 */ + static struct ftrace_ops direct; static int __init ftrace_direct_init(void) diff --git a/samples/ftrace/ftrace-direct.c b/samples/ftrace/ftrace-direct.c index 32c477da1e9a..5585ffb6dd41 100644 --- a/samples/ftrace/ftrace-direct.c +++ b/samples/ftrace/ftrace-direct.c @@ -3,7 +3,7 @@ #include /* for wake_up_process() */ #include -#ifndef CONFIG_ARM64 +#if !defined(CONFIG_ARM64) && !defined(CONFIG_PPC32) #include #endif @@ -110,6 +110,65 @@ asm ( #endif /* CONFIG_LOONGARCH */ +#ifdef CONFIG_PPC32 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" stw 0, 4(1)\n" +" stwu 1, -16(1)\n" +" mflr 0\n" +" stw 0, 4(1)\n" +" stwu 1, -24(1)\n" +" stw 3, 16(1)\n" +" bl my_direct_func\n" +" lwz 3, 16(1)\n" +" lwz 0, 28(1)\n" +" mtlr 0\n" +" addi 1, 1, 40\n" +" lwz 0, 4(1)\n" +" blr\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC32 */ + +#ifdef CONFIG_PPC64 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" std 0, 16(1)\n" +" stdu 1, -32(1)\n" +" mflr 0\n" +" std 0, 16(1)\n" +" stdu 1, -48(1)\n" +" std 2, 24(1)\n" +" bcl 20, 31, 1f\n" +" 1: mflr 12\n" +" ld 2, (2f - 1b)(12)\n" +" std 3, 32(1)\n" +" bl my_direct_func\n" +" ld 3, 32(1)\n" +" ld 2, 24(1)\n" +" ld 0, 64(1)\n" +" mtlr 0\n" +" addi 1, 1, 80\n" +" ld 0, 16(1)\n" +" blr\n" +" 2: .quad .TOC.@tocbase\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_PPC64 */ + + static struct ftrace_ops direct; static int __init ftrace_direct_init(void) -- 2.43.0