aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc
diff options
context:
space:
mode:
authorKumar Gala <galak@freescale.com>2005-04-16 18:24:21 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:21 -0400
commitb464fce5edc08a825907e9d48a2d2f1af0393fef (patch)
treee92083cc989a20d363bfb4de438098a30e8f3843 /include/asm-ppc
parenta85f6d4aca822acdb49d27c44519cd6514b06a1d (diff)
[PATCH] ppc32: Allow adjust of pfn offset in pte
Allow the pfn to be offset by more than just PAGE_SHIFT in the pte. Today, PAGE_SHIFT tends to allow us to have 12-bits of flags in the pte. In the future if we have a larger pte we can allocate more bits for flags by offsetting the pfn even further. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/pgtable.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 2e88cd9feffe..e135b4aba9fc 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -431,10 +431,15 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
431 * Conversions between PTE values and page frame numbers. 431 * Conversions between PTE values and page frame numbers.
432 */ 432 */
433 433
434#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT) 434/* in some case we want to additionaly adjust where the pfn is in the pte to
435 * allow room for more flags */
436#define PFN_SHIFT_OFFSET (PAGE_SHIFT)
437
438#define pte_pfn(x) (pte_val(x) >> PFN_SHIFT_OFFSET)
435#define pte_page(x) pfn_to_page(pte_pfn(x)) 439#define pte_page(x) pfn_to_page(pte_pfn(x))
436 440
437#define pfn_pte(pfn, prot) __pte(((pte_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot)) 441#define pfn_pte(pfn, prot) __pte(((pte_basic_t)(pfn) << PFN_SHIFT_OFFSET) |\
442 pgprot_val(prot))
438#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) 443#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
439 444
440/* 445/*