From: Russell King Date: Thu, 7 Aug 2008 21:36:59 +0000 (+0100) Subject: [ARM] Fix SMP booting with non-zero PHYS_OFFSET X-Git-Tag: v2.6.27-rc3~67^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=058ddee5625ade9e9e011b9ae155ac3b8d4eda3a;p=pandora-kernel.git [ARM] Fix SMP booting with non-zero PHYS_OFFSET The existing code tries to get the pmd for the temporary page table by doing: pgd = pgd_alloc(&init_mm); pmd = pmd_offset(pgd, PHYS_OFFSET); Since we have a two level page table, pmd_offset() is a no-op, so this just has a casting effect from a pgd to a pmd - the address argument is unused. So this can't work. Normally, we'd do: pgd = pgd_offset(&init_mm, PHYS_OFFSET); ... pmd = pmd_offset(pgd, PHYS_OFFSET); to get the pmd you want. However, pgd_offset() takes the mm_struct, not the (unattached) pgd we just allocated. So, instead use: pgd = pgd_alloc(&init_mm); pmd = pmd_offset(pgd + pgd_index(PHYS_OFFSET), PHYS_OFFSET); Reported-by: Antti P Miettinen Signed-off-by: Russell King --- Reading git-diff-tree failed