Currently, with PAE enabled, we require the user:kernel split to occur on a PMD boundary, so it can only be done in 1GB increments. There are 2 reasons for this. First, kernel_physical_mapping_init() assumes, when it is initializing the kernel's PMD entries, that they start at offset 0 inside the PMD. This is fixed by starting them at __pmd_offset(PAGE_OFFSET) instead. Secondly, secondary SMP cpus require that the trampoline code be identity mapped (map virtual addresses to the same as physical ones). Right now, this is accomplished by setting the first PGD entry to be the same as the last. This is OK, as long as that PGD is eventually mapping to physical 0x00000000. My changes above break that. So, I allocate another PMD, and use it for the identity mapping. The current code is in place to allocate PTE if you're using PAE without PSE support, but there is nothing to free them. Any suggestions for a clean way to do this? Also, this gets the kernel's pagetables right, but neglects userspace's for now. pgd_alloc() needs to be fixed to allocate another PMD, if the split isn't PMD-alighed. -- Dave Hansen haveblue@us.ibm.com