[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241007205458.2bbdf736@gandalf.local.home>
Date: Mon, 7 Oct 2024 20:54:58 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, linux-arm-kernel@...ts.infradead.org,
loongarch@...ts.linux.dev, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>, "x86@...nel.org"
<x86@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Mark Rutland <mark.rutland@....com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, Naveen N Rao
<naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>, Paul
Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, Alexander Gordeev
<agordeev@...ux.ibm.com>, Christian Borntraeger
<borntraeger@...ux.ibm.com>, Sven Schnelle <svens@...ux.ibm.com>, Thomas
Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...nel.org>, Borislav
Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] ftrace: Make ftrace_regs abstract from direct use
On Mon, 7 Oct 2024 20:47:43 -0400
Steven Rostedt <rostedt@...dmis.org> 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
Powered by blists - more mailing lists