Skip to contentSkip to conversation

4level page tables architecture porting

DISCUSSION Andi Kleen 2 participants 5 messages Oct 15, 2004

Subsystems (3)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

ftp://ftp.suse.com/pub/people/ak/4level/4level-2.6.9rc4-2.gz

now compiles and boots on x86-64, i386, ia64. alpha, ppc64, ppc compile too, but missing hardware I'm still waiting for testers for that.

If anybody could do the conversion for their port and send me the diff it would be very appreciated. It should be quite straight forward.

Thanks,

-Andi

#1 lore raw
Quoted 4 lines · Andi Kleen

ftp://ftp.suse.com/pub/people/ak/4level/4level-2.6.9rc4-2.gz

now compiles and boots on x86-64, i386, ia64. alpha, ppc64, ppc compile too, but missing hardware I'm still waiting for testers for that.

ppc64 fails thus. Sorry, I'd be more helpful but I'm a little busy trying to work out why some ppc64 machines also die on startup because some of the initrd pages seem to be marked PG_slab by the time they get freed.

kernel BUG in free_one_pml4 at mm/memory.c:155! cpu 0x0: Vector: 700 (Program Check) at [c0000000023074f0]

    pc: c0000000000994d8: .clear_page_range+0x90/0x264
    lr: c0000000000a0a78: .exit_mmap+0x11c/0x230
    sp: c000000002307770

msr: 800000000002b032
current = 0xc0000000023014e0
paca = 0xc0000000003c1c80
pid = 15, comm = hotplug
enter ? for help
0:mon> t
[c000000002307870] c0000000000a0a78 .exit_mmap+0x11c/0x230 [c000000002307920] c00000000005794c .mmput+0xb0/0x118 [c0000000023079b0] c0000000000c0b74 .flush_old_exec+0x684/0xb08 [c000000002307aa0] c00000000001b064 .load_elf_binary+0x494/0x182c [c000000002307c30] c0000000000c1498 .search_binary_handler+0x180/0x4b8 [c000000002307ce0] c0000000000ec5b4 .compat_do_execve+0x20c/0x378 [c000000002307d90] c00000000001f1bc .sys32_execve+0x7c/0xfc [c000000002307e30] c000000000010000 syscall_exit+0x0/0x18 --- Exception: c01 (System Call) at 000000001001a94c
SP (ffffec10) is in userspace
0:mon>

Signature · 1 line
dwmw2
author
#2 lore raw
Quoted 10 lines · David Woodhouse
Quoted 4 lines · Andi Kleen

ftp://ftp.suse.com/pub/people/ak/4level/4level-2.6.9rc4-2.gz

now compiles and boots on x86-64, i386, ia64. alpha, ppc64, ppc compile too, but missing hardware I'm still waiting for testers for that.

ppc64 fails thus. Sorry, I'd be more helpful but I'm a little busy trying to work out why some ppc64 machines also die on startup because some of the initrd pages seem to be marked PG_slab by the time they get freed.

Thanks. It looks like the TASK_SIZE there is not a multiple of PGDIR_MASK.

Does it work with this patch?

mm/mmap.c renamed from mm/mmap.c-Y +2 -1
diff -u linux-2.6.9rc4-4level/mm/mmap.c-Y linux-2.6.9rc4-4level/mm/mmap.c
@@ -1843,7 +1843,8 @@
 					~0UL, &nr_accounted, NULL);
 	vm_unacct_memory(nr_accounted);
 	BUG_ON(mm->map_count);	/* This is just debugging */
-	clear_page_range(tlb, FIRST_USER_PGD_NR * PGDIR_SIZE, TASK_SIZE);
+	clear_page_range(tlb, FIRST_USER_PGD_NR * PGDIR_SIZE, 
+			 (TASK_SIZE + PGDIR_SIZE - 1) & ~(PGDIR_SIZE - 1));
 	tlb_finish_mmu(tlb, 0, MM_VM_SIZE(mm));
 
 	vma = mm->mmap;

-Andi

#3 lore raw
Quoted 3 lines · Andi Kleen

Thanks. It looks like the TASK_SIZE there is not a multiple of PGDIR_MASK.

Does it work with this patch?

Will try as soon as I've finished making ppc64 actually reserve initrd pages :)

Signature · 1 line
dwmw2
#4 lore raw
In reply to Andi Kleen
Quoted 3 lines · Andi Kleen

Thanks. It looks like the TASK_SIZE there is not a multiple of PGDIR_MASK.

Does it work with this patch?

Yes, that fixes it.

Signature · 1 line
dwmw2