aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/pgtable_64.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index b049abf9902..0ff92fa2206 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -726,11 +726,17 @@ extern unsigned long pte_file(pte_t);
726extern pte_t pgoff_to_pte(unsigned long); 726extern pte_t pgoff_to_pte(unsigned long);
727#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) 727#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL)
728 728
729extern unsigned long *sparc64_valid_addr_bitmap; 729extern unsigned long sparc64_valid_addr_bitmap[];
730 730
731/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ 731/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
732#define kern_addr_valid(addr) \ 732static inline bool kern_addr_valid(unsigned long addr)
733 (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) 733{
734 unsigned long paddr = __pa(addr);
735
736 if ((paddr >> 41UL) != 0UL)
737 return false;
738 return test_bit(paddr >> 22, sparc64_valid_addr_bitmap);
739}
734 740
735extern int page_in_phys_avail(unsigned long paddr); 741extern int page_in_phys_avail(unsigned long paddr);
736 742