aboutsummaryrefslogtreecommitdiff
path: root/include/asm-um
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-um')
-rw-r--r--include/asm-um/page.h4
-rw-r--r--include/asm-um/uaccess.h31
2 files changed, 11 insertions, 24 deletions
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 0229814af31..41364330aff 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -106,9 +106,6 @@ extern unsigned long uml_physmem;
#define __pa(virt) to_phys((void *) (unsigned long) (virt))
#define __va(phys) to_virt((unsigned long) (phys))
-#define page_to_pfn(page) ((page) - mem_map)
-#define pfn_to_page(pfn) (mem_map + (pfn))
-
#define phys_to_pfn(p) ((p) >> PAGE_SHIFT)
#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
@@ -121,6 +118,7 @@ extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
extern void arch_free_page(struct page *page, int order);
#define HAVE_ARCH_FREE_PAGE
+#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif
diff --git a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h
index 2ee028b8de9..4e460d6f5ac 100644
--- a/include/asm-um/uaccess.h
+++ b/include/asm-um/uaccess.h
@@ -41,16 +41,16 @@
#define __get_user(x, ptr) \
({ \
- const __typeof__(ptr) __private_ptr = ptr; \
- __typeof__(*(__private_ptr)) __private_val; \
- int __private_ret = -EFAULT; \
- (x) = (__typeof__(*(__private_ptr)))0; \
- if (__copy_from_user(&__private_val, (__private_ptr), \
- sizeof(*(__private_ptr))) == 0) {\
- (x) = (__typeof__(*(__private_ptr))) __private_val; \
- __private_ret = 0; \
- } \
- __private_ret; \
+ const __typeof__(ptr) __private_ptr = ptr; \
+ __typeof__(x) __private_val; \
+ int __private_ret = -EFAULT; \
+ (x) = (__typeof__(*(__private_ptr)))0; \
+ if (__copy_from_user((void *) &__private_val, (__private_ptr), \
+ sizeof(*(__private_ptr))) == 0) { \
+ (x) = (__typeof__(*(__private_ptr))) __private_val; \
+ __private_ret = 0; \
+ } \
+ __private_ret; \
})
#define get_user(x, ptr) \
@@ -89,14 +89,3 @@ struct exception_table_entry
};
#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only. This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */