Commit 6950ee0a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] INIT_TASK/INIT_TSS cleanup

Ingo added saved_fs, saved_gs to thread_struct and didn't add
corresponding initializers to INIT_THREAD.  We assign NULL to an
unsigned int and the compiler warns.

The patch converts it to use designated initialisers and fixes the
io_bitmap initializer in the process.
parent 0e92f10b
......@@ -395,31 +395,17 @@ struct thread_struct {
unsigned long *ts_io_bitmap;
};
#define INIT_THREAD { \
{ { 0, 0 } , }, \
0, \
0, 0, 0, 0, \
{ [0 ... 7] = 0 }, /* debugging registers */ \
0, 0, 0, \
{ { 0, }, }, /* 387 state */ \
0,0,0,0,0, \
NULL, /* io permissions */ \
#define INIT_THREAD { \
.vm86_info = NULL, \
.ts_io_bitmap = NULL, \
}
#define INIT_TSS { \
0,0, /* back_link, __blh */ \
sizeof(init_stack) + (long) &init_stack, /* esp0 */ \
__KERNEL_DS, 0, /* ss0 */ \
0,0,0,0,0,0, /* stack1, stack2 */ \
0, /* cr3 */ \
0,0, /* eip,eflags */ \
0,0,0,0, /* eax,ecx,edx,ebx */ \
0,0,0,0, /* esp,ebp,esi,edi */ \
0,0,0,0,0,0, /* es,cs,ss */ \
0,0,0,0,0,0, /* ds,fs,gs */ \
GDT_ENTRY_LDT,0, /* ldt */ \
0, INVALID_IO_BITMAP_OFFSET, /* tace, bitmap */ \
{~0, } /* ioperm */ \
#define INIT_TSS { \
.esp0 = sizeof(init_stack) + (long)&init_stack, \
.ss0 = __KERNEL_DS, \
.ldt = GDT_ENTRY_LDT, \
.bitmap = INVALID_IO_BITMAP_OFFSET, \
.io_bitmap = { [ 0 ... IO_BITMAP_SIZE ] = ~0 }, \
}
static inline void load_esp0(struct tss_struct *tss, unsigned long esp0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment