[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whm81-JmJ_ej8wPuifTOD7rF35MXjwJeGDKCR7h99Eyaw@mail.gmail.com>
Date: Wed, 18 Oct 2023 11:11:24 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Uros Bizjak <ubizjak@...il.com>
Cc: Nadav Amit <namit@...are.com>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...nel.org>,
Brian Gerst <brgerst@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()
On Wed, 18 Oct 2023 at 10:23, Uros Bizjak <ubizjak@...il.com> wrote:
>
> In processor.h, we have:
>
> static __always_inline unsigned long current_top_of_stack(void)
Yeah, but that is never used multiple times afaik. I think it's purely
for things like
WARN_ON_ONCE(!on_thread_stack());
in the entry code, for example.
So I guess it can use the same infrastructure, but I doubt it matters
in any practical way.
Grepping around for it, it looks like the 32-bit code has some stale commentary:
* Reload esp0 and pcpu_hot.top_of_stack. This changes
* current_thread_info().
but that seems entirely bogus. We historically picked up
current_thread_info() from %esp, but that hasn't been true in ages,
afaik. Now it's all based on 'current'.
Linus
Powered by blists - more mailing lists