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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3BAACED24E for ; Tue, 8 Oct 2024 00:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ufW+pqiRiwKYohit3c743Rium3oqOG8CoHMnNgbU68U=; b=JDAcyKwQdaYyEg yzA+j/Vd+apuvlW1yO5Vg3lpihODNoJ5Rae+JomcgB6iRNQQeZ7FI4MmoRm6kCcNdb8HUWk3TMg2B /4bXjt9t7xx7kfvvc/O9/WA3HMXLgROIxyiMK0aF8OM8mC8C98Mh7pjmqjwIHlbJNfQu8c91nGwNm hIkPuE6Dju7Fq9CKPwENtYCzUPCNJljgIRv0o3glSsduf1Z0kBJpJQeZSpzu44c5/rWimLHUpTLKy bUvT9AQLkqPZ4c2LPbXcmF9JH5rSP50iTsVSbjN5gZ7aRuNNGXHFiDqVTQThHw98FKnM+owAuzzUh Ushy/SKm+7qt2hLYc0Sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxyWV-000000049Jl-3Kqy; Tue, 08 Oct 2024 00:56:23 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxyVC-000000049CU-2ALP; Tue, 08 Oct 2024 00:55:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0C9975C5D9A; Tue, 8 Oct 2024 00:54:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36669C4CEC6; Tue, 8 Oct 2024 00:54:57 +0000 (UTC) Date: Mon, 7 Oct 2024 20:54:58 -0400 From: Steven Rostedt To: LKML , Linux Trace Kernel , linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, "linux-arch@vger.kernel.org" , "x86@kernel.org" Cc: Masami Hiramatsu , Mathieu Desnoyers , Mark Rutland , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: Re: [PATCH] ftrace: Make ftrace_regs abstract from direct use Message-ID: <20241007205458.2bbdf736@gandalf.local.home> In-Reply-To: <20241007204743.41314f1d@gandalf.local.home> References: <20241007204743.41314f1d@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_175502_840585_73480C6E X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, 7 Oct 2024 20:47:43 -0400 Steven Rostedt wrote: > +#ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS > +struct __arch_ftrace_regs { > + struct pt_regs regs; > +}; > + > +#define arch_ftrace_get_regs(fregs) \ > + ({ struct __arch_fregs_regs *__f = (struct __arch_ftrace_regs *)(fregs); \ > + &__f->regs; \ > + }) I wrote the arch_ftrace_get_regs() at the start of creating this patch. > + > +struct ftrace_regs; > +#define arch_ftrace_regs(fregs) ((struct __arch_ftrace_regs *)(fregs)) > + I just realized I can simplify it with: #define arch_ftrace_get_regs(fregs) ({ &arch_ftrace_regs(fregs)->regs; }) I may send a v2 (tomorrow). -- Steve _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv