#define _PAGE_RES1_4U _AC(0x0002000000000000,UL) /* Reserved */
#define _PAGE_SZ32MB_4U _AC(0x0001000000000000,UL) /* (Panther) 32MB page */
#define _PAGE_SZ256MB_4U _AC(0x2001000000000000,UL) /* (Panther) 256MB page */
+#define _PAGE_SZALL_4U _AC(0x6001000000000000,UL) /* All pgsz bits */
#define _PAGE_SN_4U _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */
#define _PAGE_RES2_4U _AC(0x0000780000000000,UL) /* Reserved */
#define _PAGE_PADDR_4U _AC(0x000007FFFFFFE000,UL) /* (Cheetah) pa[42:13] */
#define _PAGE_SZ512K_4V _AC(0x0000000000000002,UL) /* 512K Page */
#define _PAGE_SZ64K_4V _AC(0x0000000000000001,UL) /* 64K Page */
#define _PAGE_SZ8K_4V _AC(0x0000000000000000,UL) /* 8K Page */
+#define _PAGE_SZALL_4V _AC(0x0000000000000007,UL) /* All pgsz bits */
#if PAGE_SHIFT == 13
#define _PAGE_SZBITS_4U _PAGE_SZ8K_4U
extern pgprot_t PAGE_KERNEL;
extern pgprot_t PAGE_KERNEL_LOCKED;
extern pgprot_t PAGE_COPY;
+extern pgprot_t PAGE_SHARED;
/* XXX This uglyness is for the atyfb driver's sparc mmap() support. XXX */
extern unsigned long _PAGE_IE;
extern unsigned long _PAGE_ALL_SZ_BITS;
extern unsigned long _PAGE_SZBITS;
-extern unsigned long phys_base;
-extern unsigned long pfn_base;
-
extern struct page *mem_map_zero;
#define ZERO_PAGE(vaddr) (mem_map_zero)
*/
#define pgprot_noncached pgprot_noncached
+#ifdef CONFIG_HUGETLB_PAGE
static inline pte_t pte_mkhuge(pte_t pte)
{
unsigned long mask;
return __pte(pte_val(pte) | mask);
}
+#endif
static inline pte_t pte_mkdirty(pte_t pte)
{
/* Same in both SUN4V and SUN4U. */
#define pte_none(pte) (!pte_val(pte))
-extern unsigned long pte_present(pte_t);
-
-/* The following only work if pte_present() is true.
- * Undefined behaviour if not..
- */
-extern unsigned long pte_read(pte_t);
-extern unsigned long pte_exec(pte_t);
-extern unsigned long pte_write(pte_t);
-extern unsigned long pte_dirty(pte_t);
-extern unsigned long pte_young(pte_t);
-extern pte_t pte_wrprotect(pte_t);
-extern pte_t pte_rdprotect(pte_t);
-extern pte_t pte_mkclean(pte_t);
-extern pte_t pte_mkold(pte_t);
-
-/* Be very careful when you change these three, they are delicate. */
-extern pte_t pte_mkyoung(pte_t);
-extern pte_t pte_mkwrite(pte_t);
-extern pte_t pte_mkdirty(pte_t);
-extern pte_t pte_mkhuge(pte_t);
-
/* to find an entry in a page-table-directory. */
#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
unsigned long pfn,
unsigned long size, pgprot_t prot);
-/* Clear virtual and physical cachability, set side-effect bit. */
-extern pgprot_t pgprot_noncached(pgprot_t);
-
/*
* For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in
* its high 4 bits. These macros/functions put it there or get it from there.
#include <asm-generic/pgtable.h>
-/* We provide our own get_unmapped_area to cope with VA holes for userland */
+/* We provide our own get_unmapped_area to cope with VA holes and
+ * SHM area cache aliasing for userland.
+ */
#define HAVE_ARCH_UNMAPPED_AREA
+#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
/* We provide a special get_unmapped_area for framebuffer mmaps to try and use
* the largest alignment possible such that larget PTEs can be used.