The patch titled
powerpc: invalid size for swapper_pg_dir with CONFIG_PTE_64BIT=y
has been removed from the -mm tree. Its filename was
powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y.patch
This patch was dropped because it is obsolete
------------------------------------------------------
Subject: powerpc: invalid size for swapper_pg_dir with CONFIG_PTE_64BIT=y
From: Cedric Hombourger <[EMAIL PROTECTED]>
The size of swapper_pg_dir depends on the size of the basic type of a PTE.
Added a #define for the size of pte_basic_t as a power of two which is now
used to define PTE_SHIFT unconditionally as well as swapper_pg_dir in the
assembly head file. Before this change, a kernel configured with
CONFIG_PTE_64BIT=y would very likely crash on a MPC8548CDS as the global
variable swapper_pg_dir (=init_mm.pgd) was 4k instead of 8k.
Signed-off-by: Cedric Hombourger <[EMAIL PROTECTED]>
Cc: Kumar Gala <[EMAIL PROTECTED]>
Cc: Paul Mackerras <[EMAIL PROTECTED]>
Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
arch/powerpc/kernel/head_fsl_booke.S | 2 +-
include/asm-powerpc/page_32.h | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff -puN
arch/powerpc/kernel/head_fsl_booke.S~powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y
arch/powerpc/kernel/head_fsl_booke.S
---
a/arch/powerpc/kernel/head_fsl_booke.S~powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y
+++ a/arch/powerpc/kernel/head_fsl_booke.S
@@ -1035,7 +1035,7 @@ empty_zero_page:
.space 4096
.globl swapper_pg_dir
swapper_pg_dir:
- .space 4096
+ .space (1024 << PTE_BASIC_SIZE)
/* Reserved 4k for the critical exception stack & 4k for the machine
* check stack per CPU for kernel mode exceptions */
diff -puN
include/asm-powerpc/page_32.h~powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y
include/asm-powerpc/page_32.h
---
a/include/asm-powerpc/page_32.h~powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y
+++ a/include/asm-powerpc/page_32.h
@@ -10,17 +10,29 @@
#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
#endif
+/*
+ * The size, as a power of two, of the basic type of a PTE.
+ * Used in the assembly head file to get the size of the
+ * swapper_pg_dir table right.
+ */
+#ifdef CONFIG_PTE_64BIT
+#define PTE_BASIC_SIZE 3
+#else
+#define PTE_BASIC_SIZE 2
+#endif
+
+#define PTE_SHIFT (PAGE_SHIFT - PTE_BASIC_SIZE)
+
#ifndef __ASSEMBLY__
/*
* The basic type of a PTE - 64 bits for those CPUs with > 32 bit
- * physical addressing. For now this just the IBM PPC440.
+ * physical addressing. This feature is available on the IBM PPC440
+ * as well as Freescale boards with an e500v2 core.
*/
#ifdef CONFIG_PTE_64BIT
typedef unsigned long long pte_basic_t;
-#define PTE_SHIFT (PAGE_SHIFT - 3) /* 512 ptes per page */
#else
typedef unsigned long pte_basic_t;
-#define PTE_SHIFT (PAGE_SHIFT - 2) /* 1024 ptes per page */
#endif
struct page;
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html