diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-18 10:38:58 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-18 10:38:58 -0500 |
commit | 26f80bd6a9ab17bc8a60b6092e7c0d05c5927ce5 (patch) | |
tree | 7456ba479397c986337b2bb9574a74710fddbdee /arch/x86/kernel/entry_64.S | |
parent | 9eb912d1aa6b8106e06a73ea6702ec3dab0d6a1a (diff) |
x86-64: Convert irqstacks to per-cpu
Move the irqstackptr variable from the PDA to per-cpu. Make the
stacks themselves per-cpu, removing some specific allocation code.
Add a seperate flag (is_boot_cpu) to simplify the per-cpu boot
adjustments.
tj: * sprinkle some underbars around.
* irq_stack_ptr is not used till traps_init(), no reason to
initialize it early. On SMP, just leaving it NULL till proper
initialization in setup_per_cpu_areas() works. Dropped
is_boot_cpu and early irq_stack_ptr initialization.
* do DECLARE/DEFINE_PER_CPU(char[IRQ_STACK_SIZE], irq_stack)
instead of (char, irq_stack[IRQ_STACK_SIZE]).
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 4833f3a19650..d22677a66438 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -345,7 +345,7 @@ ENTRY(save_args) | |||
345 | 1: incl %gs:pda_irqcount | 345 | 1: incl %gs:pda_irqcount |
346 | jne 2f | 346 | jne 2f |
347 | popq_cfi %rax /* move return address... */ | 347 | popq_cfi %rax /* move return address... */ |
348 | mov %gs:pda_irqstackptr,%rsp | 348 | mov PER_CPU_VAR(irq_stack_ptr),%rsp |
349 | EMPTY_FRAME 0 | 349 | EMPTY_FRAME 0 |
350 | pushq_cfi %rax /* ... to the new stack */ | 350 | pushq_cfi %rax /* ... to the new stack */ |
351 | /* | 351 | /* |
@@ -1261,7 +1261,7 @@ ENTRY(call_softirq) | |||
1261 | mov %rsp,%rbp | 1261 | mov %rsp,%rbp |
1262 | CFI_DEF_CFA_REGISTER rbp | 1262 | CFI_DEF_CFA_REGISTER rbp |
1263 | incl %gs:pda_irqcount | 1263 | incl %gs:pda_irqcount |
1264 | cmove %gs:pda_irqstackptr,%rsp | 1264 | cmove PER_CPU_VAR(irq_stack_ptr),%rsp |
1265 | push %rbp # backlink for old unwinder | 1265 | push %rbp # backlink for old unwinder |
1266 | call __do_softirq | 1266 | call __do_softirq |
1267 | leaveq | 1267 | leaveq |
@@ -1300,7 +1300,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) | |||
1300 | 11: incl %gs:pda_irqcount | 1300 | 11: incl %gs:pda_irqcount |
1301 | movq %rsp,%rbp | 1301 | movq %rsp,%rbp |
1302 | CFI_DEF_CFA_REGISTER rbp | 1302 | CFI_DEF_CFA_REGISTER rbp |
1303 | cmovzq %gs:pda_irqstackptr,%rsp | 1303 | cmovzq PER_CPU_VAR(irq_stack_ptr),%rsp |
1304 | pushq %rbp # backlink for old unwinder | 1304 | pushq %rbp # backlink for old unwinder |
1305 | call xen_evtchn_do_upcall | 1305 | call xen_evtchn_do_upcall |
1306 | popq %rsp | 1306 | popq %rsp |