|
@@ -76,6 +76,16 @@
|
|
*/
|
|
*/
|
|
#ifndef __ASSEMBLY__
|
|
#ifndef __ASSEMBLY__
|
|
extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
|
|
extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Don't just check for any non zero bits in __PAGE_USER, since for book3e
|
|
|
|
+ * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in
|
|
|
|
+ * _PAGE_USER. Need to explicitly match _PAGE_BAP_UR bit in that case too.
|
|
|
|
+ */
|
|
|
|
+static inline bool pte_user(pte_t pte)
|
|
|
|
+{
|
|
|
|
+ return (pte_val(pte) & _PAGE_USER) == _PAGE_USER;
|
|
|
|
+}
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
|
/* Location of the PFN in the PTE. Most 32-bit platforms use the same
|
|
/* Location of the PFN in the PTE. Most 32-bit platforms use the same
|
|
@@ -184,13 +194,6 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
|
|
/* Make modules code happy. We don't set RO yet */
|
|
/* Make modules code happy. We don't set RO yet */
|
|
#define PAGE_KERNEL_EXEC PAGE_KERNEL_X
|
|
#define PAGE_KERNEL_EXEC PAGE_KERNEL_X
|
|
|
|
|
|
-/*
|
|
|
|
- * Don't just check for any non zero bits in __PAGE_USER, since for book3e
|
|
|
|
- * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in
|
|
|
|
- * _PAGE_USER. Need to explicitly match _PAGE_BAP_UR bit in that case too.
|
|
|
|
- */
|
|
|
|
-#define pte_user(val) ((val & _PAGE_USER) == _PAGE_USER)
|
|
|
|
-
|
|
|
|
/* Advertise special mapping type for AGP */
|
|
/* Advertise special mapping type for AGP */
|
|
#define PAGE_AGP (PAGE_KERNEL_NC)
|
|
#define PAGE_AGP (PAGE_KERNEL_NC)
|
|
#define HAVE_PAGE_AGP
|
|
#define HAVE_PAGE_AGP
|