Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79966
b: refs/heads/master
c: f6dc247
h: refs/heads/master
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent 3f1e16b commit 628d69e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b68f01baa810e9f63fbf39e9d5c3ef1d94a966f
refs/heads/master: f6dc247cac1a8ee64e59019c3b948d23f3b1a36f
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/setup64.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void __cpuinit cpu_init (void)
* and set up the GDT descriptor:
*/
if (cpu)
memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
memcpy(get_cpu_gdt_table(cpu), cpu_gdt_table, GDT_SIZE);

cpu_gdt_descr[cpu].size = GDT_SIZE;
load_gdt((const struct desc_ptr *)&cpu_gdt_descr[cpu]);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/suspend_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void fix_processor_context(void)

set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */

cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9;
get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9;

syscall_init(); /* This sets MSR_*STAR and related */
load_TR_desc(); /* This does ltr */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/vsyscall_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static void __cpuinit vsyscall_set_cpu(int cpu)
/* Store cpu number in limit so that it can be loaded quickly
in user space in vgetcpu.
12 bits for the CPU and 8 bits for the node. */
d = (unsigned long *)(cpu_gdt(cpu) + GDT_ENTRY_PER_CPU);
d = (unsigned long *)(get_cpu_gdt_table(cpu) + GDT_ENTRY_PER_CPU);
*d = 0x0f40000000000ULL;
*d |= cpu;
*d |= (node & 0xf) << 12;
Expand Down
10 changes: 5 additions & 5 deletions trunk/include/asm-x86/desc_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static inline void write_ldt_entry(struct desc_struct *ldt,
}

/* the cpu gdt accessor */
#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
#define get_cpu_gdt_table(x) ((struct desc_struct *)cpu_gdt_descr[x].address)

static inline void load_gdt(const struct desc_ptr *ptr)
{
Expand Down Expand Up @@ -141,15 +141,15 @@ static inline void set_tss_desc(unsigned cpu, void *addr)
* -1? seg base+limit should be pointing to the address of the
* last valid byte
*/
set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_TSS],
set_tssldt_descriptor(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS],
(unsigned long)addr, DESC_TSS,
IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1);
}

static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
{
set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_LDT], (unsigned long)addr,
DESC_LDT, size * 8 - 1);
set_tssldt_descriptor(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT],
(unsigned long)addr, DESC_LDT, size * 8 - 1);
}

#define LDT_entry_a(info) \
Expand Down Expand Up @@ -183,7 +183,7 @@ static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
{
unsigned int i;
u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN);
u64 *gdt = (u64 *)(get_cpu_gdt_table(cpu) + GDT_ENTRY_TLS_MIN);

for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++)
gdt[i] = t->tls_array[i];
Expand Down

0 comments on commit 628d69e

Please sign in to comment.