Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99e480d81ca98c25918c460fdb5ca876d7df6178 Commit: 99e480d81ca98c25918c460fdb5ca876d7df6178 Parent: 03b8b8e7c9c36e2d7c4bc9c63eeed872e6f01ad0 Author: Ralf Baechle <[EMAIL PROTECTED]> AuthorDate: Wed Aug 1 15:46:18 2007 +0100 Committer: Ralf Baechle <[EMAIL PROTECTED]> CommitDate: Mon Aug 27 02:16:49 2007 +0100
[MIPS] Compute PGD_ORDER from the select page size. Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]> --- include/asm-mips/pgtable-32.h | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index ff29485..59c865d 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h @@ -51,17 +51,11 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, * Entries per page directory level: we use two-level, so * we don't really have any PUD/PMD directory physically. */ -#ifdef CONFIG_64BIT_PHYS_ADDR -#define PGD_ORDER 1 -#define PUD_ORDER aieeee_attempt_to_allocate_pud -#define PMD_ORDER 1 -#define PTE_ORDER 0 -#else -#define PGD_ORDER 0 +#define __PGD_ORDER (32 - 3 * PAGE_SHIFT + PGD_T_LOG2 + PTE_T_LOG2) +#define PGD_ORDER (__PGD_ORDER >= 0 ? __PGD_ORDER : 0) #define PUD_ORDER aieeee_attempt_to_allocate_pud #define PMD_ORDER 1 #define PTE_ORDER 0 -#endif #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html