[lkml]   [2011]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: bug: kernel 3.0-rc3 not relocatable on i386?
Hi Petr,

Op 15-06-11 10:12, Petr Tesarik schreef:
> Hi all,
> it seems that the 3.0-rc3 kernel is not relocatable on i386. I get
> warnings about jiffies being an absolute symbol, and indeed, when GRUB
> loads the kernel at a non-default address, jiffies is not relocated.
> In my example the kernel is configured with
> and loaded at 0x200000 by GRUB.
> Booting fails when checking whether the timer works, because do_timer()
> increments jiffies_64, but timer_irq_works() checks jiffies. The code
> looks like this:
> c13daab7: 8b 3d 40 7a 39 c1 mov 0xc1397a40,%edi
> but arch/x86/boot/compressed/vmlinux.relocs does not contain c13daaba.
> Consequently, timer_irq_works() reads the wrong memory location and
> fails, causing a panic:
> kernel panic: IO-APIC + timer doesn't work! Boot with apic=debug and
> send a report. Then try booting with the 'noapic' option.
> Needless to say, the kernel freezes a few initcalls later when booted
> with noapic, because IO-APIC worked fine, in fact. I verified that by
> inserting a debugging printk() in do_timer(), and I also verified with
> that printk() that the address of jiffies_64 and the address of jiffies
> differ at run time.

Can you try this patch?

diff --git a/arch/x86/kernel/ b/arch/x86/kernel/
index 89aed99..49e666e 100644
--- a/arch/x86/kernel/
+++ b/arch/x86/kernel/
#ifdef CONFIG_X86_32
-jiffies = jiffies_64;
-jiffies_64 = jiffies;
+jiffies_64 = jiffies;

#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)

 \ /
  Last update: 2011-06-15 11:39    [W:0.040 / U:2.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site