From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF0B6215003; Tue, 8 Oct 2024 22:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728428332; cv=none; b=Zg5sC/ld6Nnch7LQbJVSDc4L2AvxVxoZ0zX1cVL102u75fmpYkt/8KTJ4jBRZ90fEaEPK/ysGpDZsCF5hmNgvzAbhRuXYE+To/xqeeCFgYTsVUsnrfZZHU9tzC6q/E5qoZX2kzKt74Pg88+kEAVlx3oRPOUVqsjMfcXeOTnz6xY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728428332; c=relaxed/simple; bh=q3QHIirZM9sbs+qj//brUeZOmkTUKQEfSH/pXtSm+zA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YOByeF0BEFPo/a/+0I2TMADuaAdrlE/8v9PqRrTOPidzpmTKYGgx7cRT2wCvPQUNClywNhW6l+r59VF/tqx7PH+BdKblqUH52DUZTaIi9nv1+H+z6gKBDe0uKRuq4N462A3qRdzXDMzhFoRqtcuqTTcKt8XR49seQSSNsch2T+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB329C4CEC7; Tue, 8 Oct 2024 22:58:47 +0000 (UTC) Date: Tue, 8 Oct 2024 18:58:51 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: 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" , 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: <20241008185851.274887ca@gandalf.local.home> In-Reply-To: <20241009074140.b163eceb2f973227b400c962@kernel.org> References: <20241007204743.41314f1d@gandalf.local.home> <20241009074140.b163eceb2f973227b400c962@kernel.org> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 9 Oct 2024 07:41:40 +0900 Masami Hiramatsu (Google) wrote: > Hi Steve, > > > diff --git a/include/asm-generic/ftrace.h b/include/asm-generic/ftrace.h > > index 3a23028d69d2..ba7b7d6e55d6 100644 > > --- a/include/asm-generic/ftrace.h > > +++ b/include/asm-generic/ftrace.h > > @@ -10,4 +10,17 @@ > > * common definitions are already in linux/ftrace.h. > > */ > > > > +#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; \ > > + }) > > + > > +struct ftrace_regs; > > +#define arch_ftrace_regs(fregs) ((struct __arch_ftrace_regs *)(fregs)) > > + > > #endif /* __ASM_GENERIC_FTRACE_H__ */ > > There seems no #endif for CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS. > I wonder how it passed the build. (#ifdef block does not affect over > the file boundary? > Yeah I caught that. That's one way I found out that this file is not compiled by most architectures. I'll be sending a v2 very shortly. -- Steve