aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-18 17:29:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-18 17:29:21 -0500
commit404cbbd52f10d1d5719ad82ce8ba903890779255 (patch)
treeb589594e2891f3dbdccdea87233c917d338001df /arch
parent5d7e8af3c5727626b9e7f909c778b9ac9b4a1809 (diff)
parent7b698ea377e10b074ceef0d79218e6622d618421 (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.c7
-rw-r--r--arch/x86/kernel/vmlinux.lds.S11
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
35OUTPUT_ARCH(i386) 35OUTPUT_ARCH(i386)
36ENTRY(phys_startup_32) 36ENTRY(phys_startup_32)
37jiffies = jiffies_64;
38#else 37#else
39OUTPUT_ARCH(i386:x86-64) 38OUTPUT_ARCH(i386:x86-64)
40ENTRY(phys_startup_64) 39ENTRY(phys_startup_64)
41jiffies_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 */