diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 12:52:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 12:52:05 -0400 |
commit | 47a469421d792dcb91a1e73319d26134241953d2 (patch) | |
tree | 6a388381a434ebe87fed2fbb10a53ced7a7ce8b5 /arch | |
parent | c13c81006314ad76c2b31824960a900385601b8b (diff) | |
parent | 51229b495340bd7a02ce3622d1966829b67054ea (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge second patchbomb from Andrew Morton:
- most of the rest of MM
- lots of misc things
- procfs updates
- printk feature work
- updates to get_maintainer, MAINTAINERS, checkpatch
- lib/ updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (96 commits)
exit,stats: /* obey this comment */
coredump: add __printf attribute to cn_*printf functions
coredump: use from_kuid/kgid when formatting corename
fs/reiserfs: remove unneeded cast
NILFS2: support NFSv2 export
fs/befs/btree.c: remove unneeded initializations
fs/minix: remove unneeded cast
init/do_mounts.c: add create_dev() failure log
kasan: remove duplicate definition of the macro KASAN_FREE_PAGE
fs/efs: femove unneeded cast
checkpatch: emit "NOTE: <types>" message only once after multiple files
checkpatch: emit an error when there's a diff in a changelog
checkpatch: validate MODULE_LICENSE content
checkpatch: add multi-line handling for PREFER_ETHER_ADDR_COPY
checkpatch: suggest using eth_zero_addr() and eth_broadcast_addr()
checkpatch: fix processing of MEMSET issues
checkpatch: suggest using ether_addr_equal*()
checkpatch: avoid NOT_UNIFIED_DIFF errors on cover-letter.patch files
checkpatch: remove local from codespell path
checkpatch: add --showfile to allow input via pipe to show filenames
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/arm64/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/avr32/include/asm/dma-mapping.h | 19 | ||||
-rw-r--r-- | arch/frv/include/asm/sections.h | 6 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-dma-nommu.c | 10 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-dma.c | 7 | ||||
-rw-r--r-- | arch/ia64/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/metag/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/mips/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/s390/include/asm/hugetlb.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/page.h | 8 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/hugetlbpage.c | 65 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/sparc/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/tile/include/asm/hugetlb.h | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/hugetlb.h | 9 |
21 files changed, 40 insertions, 181 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index a65eafb24997..bec6666a3cc4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -499,6 +499,13 @@ config ARCH_HAS_ELF_RANDOMIZE | |||
499 | - arch_mmap_rnd() | 499 | - arch_mmap_rnd() |
500 | - arch_randomize_brk() | 500 | - arch_randomize_brk() |
501 | 501 | ||
502 | config HAVE_COPY_THREAD_TLS | ||
503 | bool | ||
504 | help | ||
505 | Architecture provides copy_thread_tls to accept tls argument via | ||
506 | normal C parameter passing, rather than extracting the syscall | ||
507 | argument from pt_regs. | ||
508 | |||
502 | # | 509 | # |
503 | # ABI hall of shame | 510 | # ABI hall of shame |
504 | # | 511 | # |
diff --git a/arch/arm/include/asm/hugetlb.h b/arch/arm/include/asm/hugetlb.h index 31bb7dccb971..7d26f6c4f0f5 100644 --- a/arch/arm/include/asm/hugetlb.h +++ b/arch/arm/include/asm/hugetlb.h | |||
@@ -63,15 +63,6 @@ static inline pte_t huge_pte_wrprotect(pte_t pte) | |||
63 | return pte_wrprotect(pte); | 63 | return pte_wrprotect(pte); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline int arch_prepare_hugepage(struct page *page) | ||
67 | { | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static inline void arch_release_hugepage(struct page *page) | ||
72 | { | ||
73 | } | ||
74 | |||
75 | static inline void arch_clear_hugepage_flags(struct page *page) | 66 | static inline void arch_clear_hugepage_flags(struct page *page) |
76 | { | 67 | { |
77 | clear_bit(PG_dcache_clean, &page->flags); | 68 | clear_bit(PG_dcache_clean, &page->flags); |
diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h index 734c17e89e94..2fd9b14ca295 100644 --- a/arch/arm64/include/asm/hugetlb.h +++ b/arch/arm64/include/asm/hugetlb.h | |||
@@ -96,15 +96,6 @@ static inline pte_t huge_pte_wrprotect(pte_t pte) | |||
96 | return pte_wrprotect(pte); | 96 | return pte_wrprotect(pte); |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline int arch_prepare_hugepage(struct page *page) | ||
100 | { | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | static inline void arch_release_hugepage(struct page *page) | ||
105 | { | ||
106 | } | ||
107 | |||
108 | static inline void arch_clear_hugepage_flags(struct page *page) | 99 | static inline void arch_clear_hugepage_flags(struct page *page) |
109 | { | 100 | { |
110 | clear_bit(PG_dcache_clean, &page->flags); | 101 | clear_bit(PG_dcache_clean, &page->flags); |
diff --git a/arch/avr32/include/asm/dma-mapping.h b/arch/avr32/include/asm/dma-mapping.h index b3d18f9f3e8d..ae7ac9205d20 100644 --- a/arch/avr32/include/asm/dma-mapping.h +++ b/arch/avr32/include/asm/dma-mapping.h | |||
@@ -209,17 +209,18 @@ dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | |||
209 | * the same here. | 209 | * the same here. |
210 | */ | 210 | */ |
211 | static inline int | 211 | static inline int |
212 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 212 | dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, |
213 | enum dma_data_direction direction) | 213 | enum dma_data_direction direction) |
214 | { | 214 | { |
215 | int i; | 215 | int i; |
216 | struct scatterlist *sg; | ||
216 | 217 | ||
217 | for (i = 0; i < nents; i++) { | 218 | for_each_sg(sglist, sg, nents, i) { |
218 | char *virt; | 219 | char *virt; |
219 | 220 | ||
220 | sg[i].dma_address = page_to_bus(sg_page(&sg[i])) + sg[i].offset; | 221 | sg->dma_address = page_to_bus(sg_page(sg)) + sg->offset; |
221 | virt = sg_virt(&sg[i]); | 222 | virt = sg_virt(sg); |
222 | dma_cache_sync(dev, virt, sg[i].length, direction); | 223 | dma_cache_sync(dev, virt, sg->length, direction); |
223 | } | 224 | } |
224 | 225 | ||
225 | return nents; | 226 | return nents; |
@@ -321,14 +322,14 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
321 | } | 322 | } |
322 | 323 | ||
323 | static inline void | 324 | static inline void |
324 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | 325 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sglist, |
325 | int nents, enum dma_data_direction direction) | 326 | int nents, enum dma_data_direction direction) |
326 | { | 327 | { |
327 | int i; | 328 | int i; |
329 | struct scatterlist *sg; | ||
328 | 330 | ||
329 | for (i = 0; i < nents; i++) { | 331 | for_each_sg(sglist, sg, nents, i) |
330 | dma_cache_sync(dev, sg_virt(&sg[i]), sg[i].length, direction); | 332 | dma_cache_sync(dev, sg_virt(sg), sg->length, direction); |
331 | } | ||
332 | } | 333 | } |
333 | 334 | ||
334 | /* Now for the API extensions over the pci_ one */ | 335 | /* Now for the API extensions over the pci_ one */ |
diff --git a/arch/frv/include/asm/sections.h b/arch/frv/include/asm/sections.h index 17d0fb171bba..d03fb64e93e9 100644 --- a/arch/frv/include/asm/sections.h +++ b/arch/frv/include/asm/sections.h | |||
@@ -35,12 +35,6 @@ extern unsigned long __nongprelbss memory_start; | |||
35 | extern unsigned long __nongprelbss memory_end; | 35 | extern unsigned long __nongprelbss memory_end; |
36 | extern unsigned long __nongprelbss rom_length; | 36 | extern unsigned long __nongprelbss rom_length; |
37 | 37 | ||
38 | /* determine if we're running from ROM */ | ||
39 | static inline int is_in_rom(unsigned long addr) | ||
40 | { | ||
41 | return 0; /* default case: not in ROM */ | ||
42 | } | ||
43 | |||
44 | #endif | 38 | #endif |
45 | #endif | 39 | #endif |
46 | #endif /* _ASM_SECTIONS_H */ | 40 | #endif /* _ASM_SECTIONS_H */ |
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c index b99c2a7cc7a4..8eeea0d77aad 100644 --- a/arch/frv/mb93090-mb00/pci-dma-nommu.c +++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c | |||
@@ -119,14 +119,16 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
119 | 119 | ||
120 | EXPORT_SYMBOL(dma_map_single); | 120 | EXPORT_SYMBOL(dma_map_single); |
121 | 121 | ||
122 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 122 | int dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, |
123 | enum dma_data_direction direction) | 123 | enum dma_data_direction direction) |
124 | { | 124 | { |
125 | int i; | 125 | int i; |
126 | struct scatterlist *sg; | ||
126 | 127 | ||
127 | for (i=0; i<nents; i++) | 128 | for_each_sg(sglist, sg, nents, i) { |
128 | frv_cache_wback_inv(sg_dma_address(&sg[i]), | 129 | frv_cache_wback_inv(sg_dma_address(sg), |
129 | sg_dma_address(&sg[i]) + sg_dma_len(&sg[i])); | 130 | sg_dma_address(sg) + sg_dma_len(sg)); |
131 | } | ||
130 | 132 | ||
131 | BUG_ON(direction == DMA_NONE); | 133 | BUG_ON(direction == DMA_NONE); |
132 | 134 | ||
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c index 82478979ac9a..4d1f01dc46e5 100644 --- a/arch/frv/mb93090-mb00/pci-dma.c +++ b/arch/frv/mb93090-mb00/pci-dma.c | |||
@@ -50,19 +50,20 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
50 | 50 | ||
51 | EXPORT_SYMBOL(dma_map_single); | 51 | EXPORT_SYMBOL(dma_map_single); |
52 | 52 | ||
53 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 53 | int dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, |
54 | enum dma_data_direction direction) | 54 | enum dma_data_direction direction) |
55 | { | 55 | { |
56 | unsigned long dampr2; | 56 | unsigned long dampr2; |
57 | void *vaddr; | 57 | void *vaddr; |
58 | int i; | 58 | int i; |
59 | struct scatterlist *sg; | ||
59 | 60 | ||
60 | BUG_ON(direction == DMA_NONE); | 61 | BUG_ON(direction == DMA_NONE); |
61 | 62 | ||
62 | dampr2 = __get_DAMPR(2); | 63 | dampr2 = __get_DAMPR(2); |
63 | 64 | ||
64 | for (i = 0; i < nents; i++) { | 65 | for_each_sg(sglist, sg, nents, i) { |
65 | vaddr = kmap_atomic_primary(sg_page(&sg[i])); | 66 | vaddr = kmap_atomic_primary(sg_page(sg)); |
66 | 67 | ||
67 | frv_dcache_writeback((unsigned long) vaddr, | 68 | frv_dcache_writeback((unsigned long) vaddr, |
68 | (unsigned long) vaddr + PAGE_SIZE); | 69 | (unsigned long) vaddr + PAGE_SIZE); |
diff --git a/arch/ia64/include/asm/hugetlb.h b/arch/ia64/include/asm/hugetlb.h index ff1377bc02a6..ef65f026b11e 100644 --- a/arch/ia64/include/asm/hugetlb.h +++ b/arch/ia64/include/asm/hugetlb.h | |||
@@ -65,15 +65,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
65 | return *ptep; | 65 | return *ptep; |
66 | } | 66 | } |
67 | 67 | ||
68 | static inline int arch_prepare_hugepage(struct page *page) | ||
69 | { | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static inline void arch_release_hugepage(struct page *page) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | static inline void arch_clear_hugepage_flags(struct page *page) | 68 | static inline void arch_clear_hugepage_flags(struct page *page) |
78 | { | 69 | { |
79 | } | 70 | } |
diff --git a/arch/metag/include/asm/hugetlb.h b/arch/metag/include/asm/hugetlb.h index f730b396d79b..905ed422dbeb 100644 --- a/arch/metag/include/asm/hugetlb.h +++ b/arch/metag/include/asm/hugetlb.h | |||
@@ -67,15 +67,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
67 | return *ptep; | 67 | return *ptep; |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline int arch_prepare_hugepage(struct page *page) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static inline void arch_release_hugepage(struct page *page) | ||
76 | { | ||
77 | } | ||
78 | |||
79 | static inline void arch_clear_hugepage_flags(struct page *page) | 70 | static inline void arch_clear_hugepage_flags(struct page *page) |
80 | { | 71 | { |
81 | } | 72 | } |
diff --git a/arch/mips/include/asm/hugetlb.h b/arch/mips/include/asm/hugetlb.h index 4a5bb5453408..982bc0685330 100644 --- a/arch/mips/include/asm/hugetlb.h +++ b/arch/mips/include/asm/hugetlb.h | |||
@@ -110,15 +110,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
110 | return *ptep; | 110 | return *ptep; |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline int arch_prepare_hugepage(struct page *page) | ||
114 | { | ||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static inline void arch_release_hugepage(struct page *page) | ||
119 | { | ||
120 | } | ||
121 | |||
122 | static inline void arch_clear_hugepage_flags(struct page *page) | 113 | static inline void arch_clear_hugepage_flags(struct page *page) |
123 | { | 114 | { |
124 | } | 115 | } |
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index 4bbd3c8c2888..7eac89b9f02e 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -168,15 +168,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
168 | return *ptep; | 168 | return *ptep; |
169 | } | 169 | } |
170 | 170 | ||
171 | static inline int arch_prepare_hugepage(struct page *page) | ||
172 | { | ||
173 | return 0; | ||
174 | } | ||
175 | |||
176 | static inline void arch_release_hugepage(struct page *page) | ||
177 | { | ||
178 | } | ||
179 | |||
180 | static inline void arch_clear_hugepage_flags(struct page *page) | 171 | static inline void arch_clear_hugepage_flags(struct page *page) |
181 | { | 172 | { |
182 | } | 173 | } |
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h index dfb542ade6b1..0130d0379edd 100644 --- a/arch/s390/include/asm/hugetlb.h +++ b/arch/s390/include/asm/hugetlb.h | |||
@@ -37,9 +37,6 @@ static inline int prepare_hugepage_range(struct file *file, | |||
37 | 37 | ||
38 | #define arch_clear_hugepage_flags(page) do { } while (0) | 38 | #define arch_clear_hugepage_flags(page) do { } while (0) |
39 | 39 | ||
40 | int arch_prepare_hugepage(struct page *page); | ||
41 | void arch_release_hugepage(struct page *page); | ||
42 | |||
43 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, | 40 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, |
44 | pte_t *ptep) | 41 | pte_t *ptep) |
45 | { | 42 | { |
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 53eacbd4f09b..dd345238d9a7 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
@@ -17,7 +17,10 @@ | |||
17 | #define PAGE_DEFAULT_ACC 0 | 17 | #define PAGE_DEFAULT_ACC 0 |
18 | #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) | 18 | #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) |
19 | 19 | ||
20 | #define HPAGE_SHIFT 20 | 20 | #include <asm/setup.h> |
21 | #ifndef __ASSEMBLY__ | ||
22 | |||
23 | extern int HPAGE_SHIFT; | ||
21 | #define HPAGE_SIZE (1UL << HPAGE_SHIFT) | 24 | #define HPAGE_SIZE (1UL << HPAGE_SHIFT) |
22 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 25 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
23 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 26 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
@@ -27,9 +30,6 @@ | |||
27 | #define ARCH_HAS_PREPARE_HUGEPAGE | 30 | #define ARCH_HAS_PREPARE_HUGEPAGE |
28 | #define ARCH_HAS_HUGEPAGE_CLEAR_FLUSH | 31 | #define ARCH_HAS_HUGEPAGE_CLEAR_FLUSH |
29 | 32 | ||
30 | #include <asm/setup.h> | ||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | static inline void storage_key_init_range(unsigned long start, unsigned long end) | 33 | static inline void storage_key_init_range(unsigned long start, unsigned long end) |
34 | { | 34 | { |
35 | #if PAGE_DEFAULT_KEY | 35 | #if PAGE_DEFAULT_KEY |
diff --git a/arch/s390/kernel/compat_wrapper.c b/arch/s390/kernel/compat_wrapper.c index d7fa2f0f1425..f8498dde67b1 100644 --- a/arch/s390/kernel/compat_wrapper.c +++ b/arch/s390/kernel/compat_wrapper.c | |||
@@ -202,7 +202,7 @@ COMPAT_SYSCALL_WRAP1(epoll_create1, int, flags); | |||
202 | COMPAT_SYSCALL_WRAP2(tkill, int, pid, int, sig); | 202 | COMPAT_SYSCALL_WRAP2(tkill, int, pid, int, sig); |
203 | COMPAT_SYSCALL_WRAP3(tgkill, int, tgid, int, pid, int, sig); | 203 | COMPAT_SYSCALL_WRAP3(tgkill, int, tgid, int, pid, int, sig); |
204 | COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); | 204 | COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); |
205 | COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, int, tls_val); | 205 | COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, unsigned long, tls); |
206 | COMPAT_SYSCALL_WRAP2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags); | 206 | COMPAT_SYSCALL_WRAP2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags); |
207 | COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); | 207 | COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); |
208 | COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); | 208 | COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index af4f41d52cde..73941bf42350 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -880,6 +880,8 @@ void __init setup_arch(char **cmdline_p) | |||
880 | */ | 880 | */ |
881 | setup_hwcaps(); | 881 | setup_hwcaps(); |
882 | 882 | ||
883 | HPAGE_SHIFT = MACHINE_HAS_HPAGE ? 20 : 0; | ||
884 | |||
883 | /* | 885 | /* |
884 | * Create kernel page tables and switch to virtual addressing. | 886 | * Create kernel page tables and switch to virtual addressing. |
885 | */ | 887 | */ |
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c index c3f8e3df92ff..fb4bf2c4379e 100644 --- a/arch/s390/mm/hugetlbpage.c +++ b/arch/s390/mm/hugetlbpage.c | |||
@@ -86,31 +86,16 @@ static inline pte_t __pmd_to_pte(pmd_t pmd) | |||
86 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | 86 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
87 | pte_t *ptep, pte_t pte) | 87 | pte_t *ptep, pte_t pte) |
88 | { | 88 | { |
89 | pmd_t pmd; | 89 | pmd_t pmd = __pte_to_pmd(pte); |
90 | 90 | ||
91 | pmd = __pte_to_pmd(pte); | 91 | pmd_val(pmd) |= _SEGMENT_ENTRY_LARGE; |
92 | if (!MACHINE_HAS_HPAGE) { | ||
93 | /* Emulated huge ptes loose the dirty and young bit */ | ||
94 | pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN; | ||
95 | pmd_val(pmd) |= pte_page(pte)[1].index; | ||
96 | } else | ||
97 | pmd_val(pmd) |= _SEGMENT_ENTRY_LARGE; | ||
98 | *(pmd_t *) ptep = pmd; | 92 | *(pmd_t *) ptep = pmd; |
99 | } | 93 | } |
100 | 94 | ||
101 | pte_t huge_ptep_get(pte_t *ptep) | 95 | pte_t huge_ptep_get(pte_t *ptep) |
102 | { | 96 | { |
103 | unsigned long origin; | 97 | pmd_t pmd = *(pmd_t *) ptep; |
104 | pmd_t pmd; | ||
105 | 98 | ||
106 | pmd = *(pmd_t *) ptep; | ||
107 | if (!MACHINE_HAS_HPAGE && pmd_present(pmd)) { | ||
108 | origin = pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN; | ||
109 | pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN; | ||
110 | pmd_val(pmd) |= *(unsigned long *) origin; | ||
111 | /* Emulated huge ptes are young and dirty by definition */ | ||
112 | pmd_val(pmd) |= _SEGMENT_ENTRY_YOUNG | _SEGMENT_ENTRY_DIRTY; | ||
113 | } | ||
114 | return __pmd_to_pte(pmd); | 99 | return __pmd_to_pte(pmd); |
115 | } | 100 | } |
116 | 101 | ||
@@ -125,45 +110,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, | |||
125 | return pte; | 110 | return pte; |
126 | } | 111 | } |
127 | 112 | ||
128 | int arch_prepare_hugepage(struct page *page) | ||
129 | { | ||
130 | unsigned long addr = page_to_phys(page); | ||
131 | pte_t pte; | ||
132 | pte_t *ptep; | ||
133 | int i; | ||
134 | |||
135 | if (MACHINE_HAS_HPAGE) | ||
136 | return 0; | ||
137 | |||
138 | ptep = (pte_t *) pte_alloc_one(&init_mm, addr); | ||
139 | if (!ptep) | ||
140 | return -ENOMEM; | ||
141 | |||
142 | pte_val(pte) = addr; | ||
143 | for (i = 0; i < PTRS_PER_PTE; i++) { | ||
144 | set_pte_at(&init_mm, addr + i * PAGE_SIZE, ptep + i, pte); | ||
145 | pte_val(pte) += PAGE_SIZE; | ||
146 | } | ||
147 | page[1].index = (unsigned long) ptep; | ||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | void arch_release_hugepage(struct page *page) | ||
152 | { | ||
153 | pte_t *ptep; | ||
154 | |||
155 | if (MACHINE_HAS_HPAGE) | ||
156 | return; | ||
157 | |||
158 | ptep = (pte_t *) page[1].index; | ||
159 | if (!ptep) | ||
160 | return; | ||
161 | clear_table((unsigned long *) ptep, _PAGE_INVALID, | ||
162 | PTRS_PER_PTE * sizeof(pte_t)); | ||
163 | page_table_free(&init_mm, (unsigned long *) ptep); | ||
164 | page[1].index = 0; | ||
165 | } | ||
166 | |||
167 | pte_t *huge_pte_alloc(struct mm_struct *mm, | 113 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
168 | unsigned long addr, unsigned long sz) | 114 | unsigned long addr, unsigned long sz) |
169 | { | 115 | { |
@@ -195,10 +141,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
195 | 141 | ||
196 | int pmd_huge(pmd_t pmd) | 142 | int pmd_huge(pmd_t pmd) |
197 | { | 143 | { |
198 | if (!MACHINE_HAS_HPAGE) | 144 | return pmd_large(pmd); |
199 | return 0; | ||
200 | |||
201 | return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); | ||
202 | } | 145 | } |
203 | 146 | ||
204 | int pud_huge(pud_t pud) | 147 | int pud_huge(pud_t pud) |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index b33f66110ca9..33082d0d101b 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #define ALLOC_ORDER 2 | 31 | #define ALLOC_ORDER 2 |
32 | #define FRAG_MASK 0x03 | 32 | #define FRAG_MASK 0x03 |
33 | 33 | ||
34 | int HPAGE_SHIFT; | ||
35 | |||
34 | unsigned long *crst_table_alloc(struct mm_struct *mm) | 36 | unsigned long *crst_table_alloc(struct mm_struct *mm) |
35 | { | 37 | { |
36 | struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER); | 38 | struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER); |
diff --git a/arch/sh/include/asm/hugetlb.h b/arch/sh/include/asm/hugetlb.h index b788a9bc8918..ef489a56fcce 100644 --- a/arch/sh/include/asm/hugetlb.h +++ b/arch/sh/include/asm/hugetlb.h | |||
@@ -79,15 +79,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
79 | return *ptep; | 79 | return *ptep; |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline int arch_prepare_hugepage(struct page *page) | ||
83 | { | ||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | static inline void arch_release_hugepage(struct page *page) | ||
88 | { | ||
89 | } | ||
90 | |||
91 | static inline void arch_clear_hugepage_flags(struct page *page) | 82 | static inline void arch_clear_hugepage_flags(struct page *page) |
92 | { | 83 | { |
93 | clear_bit(PG_dcache_clean, &page->flags); | 84 | clear_bit(PG_dcache_clean, &page->flags); |
diff --git a/arch/sparc/include/asm/hugetlb.h b/arch/sparc/include/asm/hugetlb.h index 3130d7636312..139e711ff80c 100644 --- a/arch/sparc/include/asm/hugetlb.h +++ b/arch/sparc/include/asm/hugetlb.h | |||
@@ -78,15 +78,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
78 | return *ptep; | 78 | return *ptep; |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline int arch_prepare_hugepage(struct page *page) | ||
82 | { | ||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | static inline void arch_release_hugepage(struct page *page) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | static inline void arch_clear_hugepage_flags(struct page *page) | 81 | static inline void arch_clear_hugepage_flags(struct page *page) |
91 | { | 82 | { |
92 | } | 83 | } |
diff --git a/arch/tile/include/asm/hugetlb.h b/arch/tile/include/asm/hugetlb.h index 1abd00c55236..2fac5be4de26 100644 --- a/arch/tile/include/asm/hugetlb.h +++ b/arch/tile/include/asm/hugetlb.h | |||
@@ -94,15 +94,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
94 | return *ptep; | 94 | return *ptep; |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline int arch_prepare_hugepage(struct page *page) | ||
98 | { | ||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | static inline void arch_release_hugepage(struct page *page) | ||
103 | { | ||
104 | } | ||
105 | |||
106 | static inline void arch_clear_hugepage_flags(struct page *page) | 97 | static inline void arch_clear_hugepage_flags(struct page *page) |
107 | { | 98 | { |
108 | } | 99 | } |
diff --git a/arch/x86/include/asm/hugetlb.h b/arch/x86/include/asm/hugetlb.h index dab7a3a750bf..f8a29d2c97b0 100644 --- a/arch/x86/include/asm/hugetlb.h +++ b/arch/x86/include/asm/hugetlb.h | |||
@@ -80,15 +80,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) | |||
80 | return *ptep; | 80 | return *ptep; |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int arch_prepare_hugepage(struct page *page) | ||
84 | { | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | static inline void arch_release_hugepage(struct page *page) | ||
89 | { | ||
90 | } | ||
91 | |||
92 | static inline void arch_clear_hugepage_flags(struct page *page) | 83 | static inline void arch_clear_hugepage_flags(struct page *page) |
93 | { | 84 | { |
94 | } | 85 | } |