Re: 2.6.4-mm1 - 4g patch breaks when X86_4G not selected

Andrew Morton
2004-03-16T04:52:19Z

Neil Brown <neilb@cse.unsw.edu.au> wrote:
>
> Thanks for the pointer. I now have something useful to report.
>
> start_kernel calls setup_arch
> which calls paging_init
> which calls pagetable_init
> which calls setup_identity_mappings
> which calls page_address
>
> If I put
> asm("push %eax; movb $0x3,%al; outb %al,$0x61; popl %eax\n");
> before the call to page_address, and
> asm("push %eax; movb $0x0,%al; outb %al,$0x61; popl %eax\n");
> afterwards, then I get a tone after boot, suggesting that page_address
> isn't returning.
>
> I'm guessing that the problem is:
>
> page_address calls
> spin_lock_irqsave(&pas->lock, flags);
>
> but the spinlock isn't initialised by page_address_init
> until much later in start_kernel.

That is useful, thanks. Sorry about the hassle.

Calling page_address_init() earlier isn't the fix though - pmd pages aren't
in highmem so we should never have got that far. Looks like the pgd or the
pmd page contains garbage. Did you try it without CONFIG_DEBUG_SLAB?

Nick was seeing slab 0x6b patterns on the NUMAQ, inside the pmd, so there's
some consistency there. We do have one early setup fix from Manfred, but
it's unlikely to cure this.

I'll have a play with your .config, see if I can reproduce it. If not I'll
squeeze off -mm3 and would ask you to retest on that if poss.