lkml.org 
[lkml]   [2015]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 1/3] x86: Add this_cpu_sp0() to read sp0 for the current cpu

* Andy Lutomirski <luto@amacapital.net> wrote:

> On Wed, Mar 4, 2015 at 12:02 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Andy Lutomirski <luto@amacapital.net> wrote:
> >
> >> We currently store references to the top of the kernel stack in
> >> multiple places: kernel_stack (with an offset) and
> >> init_tss.x86_tss.sp0 (no offset). The latter is defined by hardware
> >> and is a clean canonical way to find the top of the stack. Add an
> >
> > Btw., 'per_cpu(init_tss)' is a somewhat misleading name these days, as
> > there's nothing 'init' about it anymore - we load it during CPU init
> > and then manually maintain its contents. A better name would be
> > 'current_tss' - referring to both the current CPU and the current
> > task?
>
> Hmm. That seems a little odd to me, since we never change the TSS
> pointer. It's certainly better than init_tss, though. I'll add a
> followup to rename it.

Alternatively we could use 'cpu_tss': the CPU's current TSS.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-03-04 22:01    [W:0.071 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site