Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33708
b: refs/heads/master
c: 01ebb77
h: refs/heads/master
v: v3
  • Loading branch information
Keith Owens authored and Linus Torvalds committed Aug 30, 2006
1 parent 8d6f41a commit aed2a87
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 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: 386dcafaacd212ef4a8aeed67a7db3ffbb44c7b2
refs/heads/master: 01ebb77b31149d847726a8847ad0d37631d7f049
5 changes: 5 additions & 0 deletions trunk/arch/x86_64/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ EXPORT_SYMBOL(init_task);
*/
DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS;

/* Copies of the original ist values from the tss are only accessed during
* debugging, no special alignment required.
*/
DEFINE_PER_CPU(struct orig_ist, orig_ist);

#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
3 changes: 2 additions & 1 deletion trunk/arch/x86_64/kernel/setup64.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void __cpuinit cpu_init (void)
{
int cpu = stack_smp_processor_id();
struct tss_struct *t = &per_cpu(init_tss, cpu);
struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu);
unsigned long v;
char *estacks = NULL;
struct task_struct *me;
Expand Down Expand Up @@ -256,7 +257,7 @@ void __cpuinit cpu_init (void)
estacks += EXCEPTION_STKSZ;
break;
}
t->ist[v] = (unsigned long)estacks;
orig_ist->ist[v] = t->ist[v] = (unsigned long)estacks;
}

t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86_64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
break;
#endif
default:
end = per_cpu(init_tss, cpu).ist[k];
end = per_cpu(orig_ist, cpu).ist[k];
break;
}
/*
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/asm-x86_64/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,14 @@ struct tss_struct {
unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
} __attribute__((packed)) ____cacheline_aligned;


extern struct cpuinfo_x86 boot_cpu_data;
DECLARE_PER_CPU(struct tss_struct,init_tss);
/* Save the original ist values for checking stack pointers during debugging */
struct orig_ist {
unsigned long ist[7];
};
DECLARE_PER_CPU(struct orig_ist, orig_ist);

#ifdef CONFIG_X86_VSMP
#define ARCH_MIN_TASKALIGN (1 << INTERNODE_CACHE_SHIFT)
Expand Down

0 comments on commit aed2a87

Please sign in to comment.