linux-next: manual merge of the arm-lpae tree with the arm tree

From: Stephen Rothwell
Date: Wed Dec 07 2011 - 19:01:20 EST


Hi Catalin,

Today's linux-next merge of the arm-lpae tree got a conflict in
arch/arm/mm/idmap.c between commits 8903826d0cd9 ("ARM: idmap: populate
identity map pgd at init time using .init.text") and 4e8ee7de227e ("ARM:
SMP: use idmap_pgd for mapping MMU enable during secondary booting") from
the arm tree and commit 1932aa1edc86 ("ARM: LPAE: Add identity mapping
support for the 3-level page table format") from the arm-lpae tree.

I tried to fix it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc arch/arm/mm/idmap.c
index 660f1bc,267db72..0000000
--- a/arch/arm/mm/idmap.c
+++ b/arch/arm/mm/idmap.c
@@@ -1,13 -1,34 +1,38 @@@
#include <linux/kernel.h>

#include <asm/cputype.h>
+#include <asm/idmap.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
+#include <asm/sections.h>
+
+pgd_t *idmap_pgd;

+ #ifdef CONFIG_ARM_LPAE
+ static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,
+ unsigned long prot)
+ {
+ pmd_t *pmd;
+ unsigned long next;
+
+ if (pud_none_or_clear_bad(pud) || (pud_val(*pud) & L_PGD_SWAPPER)) {
+ pmd = pmd_alloc_one(&init_mm, addr);
+ if (!pmd) {
+ pr_warning("Failed to allocate identity pmd.\n");
+ return;
+ }
+ pud_populate(&init_mm, pud, pmd);
+ pmd += pmd_index(addr);
+ } else
+ pmd = pmd_offset(pud, addr);
+
+ do {
+ next = pmd_addr_end(addr, end);
+ *pmd = __pmd((addr & PMD_MASK) | prot);
+ flush_pmd_entry(pmd);
+ } while (pmd++, addr = next, addr != end);
+ }
+ #else /* !CONFIG_ARM_LPAE */
static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,
unsigned long prot)
{

Attachment: pgp00000.pgp
Description: PGP signature