diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-18 17:29:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-18 17:29:21 -0500 |
commit | 404cbbd52f10d1d5719ad82ce8ba903890779255 (patch) | |
tree | b589594e2891f3dbdccdea87233c917d338001df /arch | |
parent | 5d7e8af3c5727626b9e7f909c778b9ac9b4a1809 (diff) | |
parent | 7b698ea377e10b074ceef0d79218e6622d618421 (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Clear irqstack thread_info
x86: Make relocatable kernel work with new binutils
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/irq_32.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 48ff6dcffa02..9974d21048fd 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -129,8 +129,7 @@ void __cpuinit irq_ctx_init(int cpu) | |||
129 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), | 129 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), |
130 | THREAD_FLAGS, | 130 | THREAD_FLAGS, |
131 | THREAD_ORDER)); | 131 | THREAD_ORDER)); |
132 | irqctx->tinfo.task = NULL; | 132 | memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); |
133 | irqctx->tinfo.exec_domain = NULL; | ||
134 | irqctx->tinfo.cpu = cpu; | 133 | irqctx->tinfo.cpu = cpu; |
135 | irqctx->tinfo.preempt_count = HARDIRQ_OFFSET; | 134 | irqctx->tinfo.preempt_count = HARDIRQ_OFFSET; |
136 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | 135 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); |
@@ -140,10 +139,8 @@ void __cpuinit irq_ctx_init(int cpu) | |||
140 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), | 139 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), |
141 | THREAD_FLAGS, | 140 | THREAD_FLAGS, |
142 | THREAD_ORDER)); | 141 | THREAD_ORDER)); |
143 | irqctx->tinfo.task = NULL; | 142 | memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); |
144 | irqctx->tinfo.exec_domain = NULL; | ||
145 | irqctx->tinfo.cpu = cpu; | 143 | irqctx->tinfo.cpu = cpu; |
146 | irqctx->tinfo.preempt_count = 0; | ||
147 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | 144 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); |
148 | 145 | ||
149 | per_cpu(softirq_ctx, cpu) = irqctx; | 146 | per_cpu(softirq_ctx, cpu) = irqctx; |
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index bf4700755184..b34ab80fddd5 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -34,11 +34,9 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) | |||
34 | #ifdef CONFIG_X86_32 | 34 | #ifdef CONFIG_X86_32 |
35 | OUTPUT_ARCH(i386) | 35 | OUTPUT_ARCH(i386) |
36 | ENTRY(phys_startup_32) | 36 | ENTRY(phys_startup_32) |
37 | jiffies = jiffies_64; | ||
38 | #else | 37 | #else |
39 | OUTPUT_ARCH(i386:x86-64) | 38 | OUTPUT_ARCH(i386:x86-64) |
40 | ENTRY(phys_startup_64) | 39 | ENTRY(phys_startup_64) |
41 | jiffies_64 = jiffies; | ||
42 | #endif | 40 | #endif |
43 | 41 | ||
44 | #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA) | 42 | #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA) |
@@ -142,6 +140,15 @@ SECTIONS | |||
142 | CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) | 140 | CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) |
143 | 141 | ||
144 | DATA_DATA | 142 | DATA_DATA |
143 | /* | ||
144 | * Workaround a binutils (2.20.51.0.12 to 2.21.51.0.3) bug. | ||
145 | * This makes jiffies relocatable in such binutils | ||
146 | */ | ||
147 | #ifdef CONFIG_X86_32 | ||
148 | jiffies = jiffies_64; | ||
149 | #else | ||
150 | jiffies_64 = jiffies; | ||
151 | #endif | ||
145 | CONSTRUCTORS | 152 | CONSTRUCTORS |
146 | 153 | ||
147 | /* rarely changed data like cpu maps */ | 154 | /* rarely changed data like cpu maps */ |