Re: [PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-21 Thread Thomas Gleixner
On Mon, 20 Nov 2017, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 2:01 PM, Thomas Gleixner wrote: > > On Mon, 20 Nov 2017, Andy Lutomirski wrote: > >> + * to avoid circular header dependencies. > > > > :( > > Hmm. I could probably fix this, but it involves (at least)

Re: [PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-21 Thread Thomas Gleixner
On Mon, 20 Nov 2017, Andy Lutomirski wrote: > On Mon, Nov 20, 2017 at 2:01 PM, Thomas Gleixner wrote: > > On Mon, 20 Nov 2017, Andy Lutomirski wrote: > >> + * to avoid circular header dependencies. > > > > :( > > Hmm. I could probably fix this, but it involves (at least) moving a > struct

Re: [PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 2:01 PM, Thomas Gleixner wrote: > On Mon, 20 Nov 2017, Andy Lutomirski wrote: > > Just a few nits. > >> /* Provide the fixmap address of the remapped GDT */ >> static inline struct desc_struct *get_cpu_gdt_ro(int cpu) >> { >> - unsigned int idx =

Re: [PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-20 Thread Andy Lutomirski
On Mon, Nov 20, 2017 at 2:01 PM, Thomas Gleixner wrote: > On Mon, 20 Nov 2017, Andy Lutomirski wrote: > > Just a few nits. > >> /* Provide the fixmap address of the remapped GDT */ >> static inline struct desc_struct *get_cpu_gdt_ro(int cpu) >> { >> - unsigned int idx =

Re: [PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-20 Thread Thomas Gleixner
On Mon, 20 Nov 2017, Andy Lutomirski wrote: Just a few nits. > /* Provide the fixmap address of the remapped GDT */ > static inline struct desc_struct *get_cpu_gdt_ro(int cpu) > { > - unsigned int idx = get_cpu_gdt_ro_index(cpu); > - return (struct desc_struct *)__fix_to_virt(idx); >

Re: [PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-20 Thread Thomas Gleixner
On Mon, 20 Nov 2017, Andy Lutomirski wrote: Just a few nits. > /* Provide the fixmap address of the remapped GDT */ > static inline struct desc_struct *get_cpu_gdt_ro(int cpu) > { > - unsigned int idx = get_cpu_gdt_ro_index(cpu); > - return (struct desc_struct *)__fix_to_virt(idx); >

[PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-20 Thread Andy Lutomirski
Currently, the GDT is an ad-hoc array of pages, one per CPU, in the fixmap. Generalize it to be an array of a new struct cpu_entry_area so that we can cleanly add new things to it. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/desc.h | 9 +

[PATCH 04/16] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-20 Thread Andy Lutomirski
Currently, the GDT is an ad-hoc array of pages, one per CPU, in the fixmap. Generalize it to be an array of a new struct cpu_entry_area so that we can cleanly add new things to it. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/desc.h | 9 + arch/x86/include/asm/fixmap.h |