[parisc-linux-cvs] linux-2.6 jejb
James Bottomley
James.Bottomley at steeleye.com
Wed May 5 14:50:43 MDT 2004
On Wed, 2004-05-05 at 15:48, James Bottomley wrote:
> CVSROOT: /var/cvs
> Module name: linux-2.6
> Changes by: jejb 04/05/05 14:48:11
>
> Modified files:
> . : Makefile
> include/asm-parisc: page.h pgtable.h
>
> Log message:
> Move to 8 byte Page Table Entries for 32 bit kernels. This allows us
> to recover sixteen flag bits (the sixteen bits at the top of the pte for
> 64 bit - 48 address bits is pretty unlikely to be hit soon) on both 32
> and 64 bits.
===== include/asm-parisc/page.h 1.10 vs edited =====
--- 1.10/include/asm-parisc/page.h Mon May 3 14:40:20 2004
+++ edited/include/asm-parisc/page.h Wed May 5 10:12:19 2004
@@ -40,7 +40,14 @@
/*
* These are used to make use of C type-checking..
*/
+#ifdef __LP64__
typedef struct { unsigned long pte; } pte_t;
+#else
+typedef struct {
+ unsigned long pte;
+ unsigned long flags;
+} pte_t;
+#endif
/* NOTE: even on 64 bits, these entries are __u32 because we allocate
* the pmd and pgd in ZONE_DMA (i.e. under 4GB) */
typedef struct { __u32 pmd; } pmd_t;
@@ -48,6 +55,11 @@
typedef struct { unsigned long pgprot; } pgprot_t;
#define pte_val(x) ((x).pte)
+#ifdef __LP64__
+#define pte_flags(x) #error
+#else
+#define pte_flags(x) ((x).flags)
+#endif
#define pmd_val(x) ((x).pmd)
#define pgd_val(x) ((x).pgd)
#define pgprot_val(x) ((x).pgprot)
@@ -95,7 +107,7 @@
#define BITS_PER_PMD_ENTRY 2
#define BITS_PER_PGD_ENTRY 2
#else
-#define BITS_PER_PTE_ENTRY 2
+#define BITS_PER_PTE_ENTRY 3
#define BITS_PER_PMD_ENTRY 2
#define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY
#endif
===== include/asm-parisc/pgtable.h 1.21 vs edited =====
--- 1.21/include/asm-parisc/pgtable.h Sun May 2 05:20:20 2004
+++ edited/include/asm-parisc/pgtable.h Wed May 5 12:13:18 2004
@@ -70,8 +70,8 @@
#define PGD_ALLOC_ORDER 2 /* first pgd contains pmd */
#else
#define PT_NLEVELS 2
-#define PT_INITIAL 2 /* Number of initial page tables */
-#define PGD_ORDER 0 /* Number of pages per pgd */
+#define PT_INITIAL 4 /* Number of initial page tables */
+#define PGD_ORDER 1 /* Number of pages per pgd */
#define PGD_ALLOC_ORDER PGD_ORDER
#endif
More information about the parisc-linux-cvs
mailing list