Skip to content

Commit

Permalink
[PARISC] Add some defines for HugeTLB pages
Browse files Browse the repository at this point in the history
Define some constants for HugeTLB pages, not that parisc-linux supports
it yet.

Signed-off-by: Helge Deller <[email protected]>
Signed-off-by: Kyle McMartin <[email protected]>
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Jan 11, 2006
1 parent 4d64c9f commit e8b736c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/asm-parisc/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ extern int npmem_ranges;
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#endif /* CONFIG_DISCONTIGMEM */

#ifdef CONFIG_HUGETLB_PAGE
#define HPAGE_SHIFT 22 /* 4MB (is this fixed?) */
#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#endif

#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)

#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
Expand Down

0 comments on commit e8b736c

Please sign in to comment.