Re: [PATCH v4 14/39] perf/x86: Rename get_segment_base() and make it global

Steven Rostedt <[email protected]>
Newsgroups org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-trace-kernel
Message-ID <[email protected]>
On Tue, 21 Jan 2025 18:31:06 -0800
Josh Poimboeuf <[email protected]> wrote:

> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> index c75c482d4c52..23ac6343cf86 100644
> --- a/arch/x86/events/core.c
> +++ b/arch/x86/events/core.c
> @@ -2790,7 +2790,7 @@ valid_user_frame(const void __user *fp, unsigned long size)
>  	return __access_ok(fp, size);
>  }
>  
> -static unsigned long get_segment_base(unsigned int segment)
> +unsigned long segment_base_address(unsigned int segment)
>  {
>  	struct desc_struct *desc;
>  	unsigned int idx = segment >> 3;

As this requires interrupts disabled, and if you do move this out of this
file, you probably should add:

	lockdep_assert_irqs_disabled();

-- Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.