diff options
Diffstat (limited to 'include/asm-um')
-rw-r--r-- | include/asm-um/alternative.h | 6 | ||||
-rw-r--r-- | include/asm-um/page.h | 4 | ||||
-rw-r--r-- | include/asm-um/uaccess.h | 31 |
3 files changed, 17 insertions, 24 deletions
diff --git a/include/asm-um/alternative.h b/include/asm-um/alternative.h new file mode 100644 index 000000000000..b6434396bd42 --- /dev/null +++ b/include/asm-um/alternative.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __UM_ALTERNATIVE_H | ||
2 | #define __UM_ALTERNATIVE_H | ||
3 | |||
4 | #include "asm/arch/alternative.h" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 0229814af31e..41364330aff1 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -106,9 +106,6 @@ extern unsigned long uml_physmem; | |||
106 | #define __pa(virt) to_phys((void *) (unsigned long) (virt)) | 106 | #define __pa(virt) to_phys((void *) (unsigned long) (virt)) |
107 | #define __va(phys) to_virt((unsigned long) (phys)) | 107 | #define __va(phys) to_virt((unsigned long) (phys)) |
108 | 108 | ||
109 | #define page_to_pfn(page) ((page) - mem_map) | ||
110 | #define pfn_to_page(pfn) (mem_map + (pfn)) | ||
111 | |||
112 | #define phys_to_pfn(p) ((p) >> PAGE_SHIFT) | 109 | #define phys_to_pfn(p) ((p) >> PAGE_SHIFT) |
113 | #define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) | 110 | #define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) |
114 | 111 | ||
@@ -121,6 +118,7 @@ extern struct page *arch_validate(struct page *page, gfp_t mask, int order); | |||
121 | extern void arch_free_page(struct page *page, int order); | 118 | extern void arch_free_page(struct page *page, int order); |
122 | #define HAVE_ARCH_FREE_PAGE | 119 | #define HAVE_ARCH_FREE_PAGE |
123 | 120 | ||
121 | #include <asm-generic/memory_model.h> | ||
124 | #include <asm-generic/page.h> | 122 | #include <asm-generic/page.h> |
125 | 123 | ||
126 | #endif | 124 | #endif |
diff --git a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h index 2ee028b8de9d..4e460d6f5ac8 100644 --- a/include/asm-um/uaccess.h +++ b/include/asm-um/uaccess.h | |||
@@ -41,16 +41,16 @@ | |||
41 | 41 | ||
42 | #define __get_user(x, ptr) \ | 42 | #define __get_user(x, ptr) \ |
43 | ({ \ | 43 | ({ \ |
44 | const __typeof__(ptr) __private_ptr = ptr; \ | 44 | const __typeof__(ptr) __private_ptr = ptr; \ |
45 | __typeof__(*(__private_ptr)) __private_val; \ | 45 | __typeof__(x) __private_val; \ |
46 | int __private_ret = -EFAULT; \ | 46 | int __private_ret = -EFAULT; \ |
47 | (x) = (__typeof__(*(__private_ptr)))0; \ | 47 | (x) = (__typeof__(*(__private_ptr)))0; \ |
48 | if (__copy_from_user(&__private_val, (__private_ptr), \ | 48 | if (__copy_from_user((void *) &__private_val, (__private_ptr), \ |
49 | sizeof(*(__private_ptr))) == 0) {\ | 49 | sizeof(*(__private_ptr))) == 0) { \ |
50 | (x) = (__typeof__(*(__private_ptr))) __private_val; \ | 50 | (x) = (__typeof__(*(__private_ptr))) __private_val; \ |
51 | __private_ret = 0; \ | 51 | __private_ret = 0; \ |
52 | } \ | 52 | } \ |
53 | __private_ret; \ | 53 | __private_ret; \ |
54 | }) | 54 | }) |
55 | 55 | ||
56 | #define get_user(x, ptr) \ | 56 | #define get_user(x, ptr) \ |
@@ -89,14 +89,3 @@ struct exception_table_entry | |||
89 | }; | 89 | }; |
90 | 90 | ||
91 | #endif | 91 | #endif |
92 | |||
93 | /* | ||
94 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
95 | * Emacs will notice this stuff at the end of the file and automatically | ||
96 | * adjust the settings for this buffer only. This must remain at the end | ||
97 | * of the file. | ||
98 | * --------------------------------------------------------------------------- | ||
99 | * Local variables: | ||
100 | * c-file-style: "linux" | ||
101 | * End: | ||
102 | */ | ||