X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-sparc64%2Fpgtable.h;h=1ae00c5087f10d6eb3a0c2ea8c6ade9ff304774b;hb=8066eff0a1a0703ad901dbe5646a47dbfc089ef2;hp=ca04ac105b6947e8d395a55f003688857ead60fe;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=powerpc.git diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index ca04ac105b..1ae00c5087 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -78,7 +78,7 @@ #define PTRS_PER_PGD (1UL << PGDIR_BITS) /* Kernel has a separate 44bit address space. */ -#define FIRST_USER_PGD_NR 0 +#define FIRST_USER_ADDRESS 0 #define pte_ERROR(e) __builtin_trap() #define pmd_ERROR(e) __builtin_trap() @@ -286,6 +286,7 @@ static inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot) #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_ACCESSED | _PAGE_R)) #define pte_mkwrite(pte) (__pte(pte_val(pte) | _PAGE_WRITE)) #define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_MODIFIED | _PAGE_W)) +#define pte_mkhuge(pte) (__pte(pte_val(pte) | _PAGE_SZHUGE)) /* to find an entry in a page-table-directory. */ #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) @@ -416,6 +417,11 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); +/* Clear virtual and physical cachability, set side-effect bit. */ +#define pgprot_noncached(prot) \ + (__pgprot((pgprot_val(prot) & ~(_PAGE_CP | _PAGE_CV)) | \ + _PAGE_E)) + /* * For sparc32&64, the pfn in io_remap_pfn_range() carries in * its high 4 bits. These macros/functions put it there or get it from there. @@ -424,21 +430,6 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) #define GET_PFN(pfn) (pfn & 0x0fffffffffffffffUL) -/* Override for {pgd,pmd}_addr_end() to deal with the virtual address - * space hole. We simply sign extend bit 43. - */ -#define pgd_addr_end(addr, end) \ -({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; \ - __boundary = ((long) (__boundary << 20)) >> 20; \ - (__boundary - 1 < (end) - 1)? __boundary: (end); \ -}) - -#define pmd_addr_end(addr, end) \ -({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; \ - __boundary = ((long) (__boundary << 20)) >> 20; \ - (__boundary - 1 < (end) - 1)? __boundary: (end); \ -}) - #include /* We provide our own get_unmapped_area to cope with VA holes for userland */