diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 12:28:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 12:28:37 -0400 |
commit | 63580e51bb3e7ec459501165884e5f815a7a9322 (patch) | |
tree | 2130de984dda95996bc7922734feb465a13fca70 /arch | |
parent | 7747bd4bceb3079572695d3942294a6c7b265557 (diff) | |
parent | ac6614b76478e68173ccf7ad4e9e98035cc9c21d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS patches (part 1) from Al Viro:
"The major change in this pile is ->readdir() replacement with
->iterate(), dealing with ->f_pos races in ->readdir() instances for
good.
There's a lot more, but I'd prefer to split the pull request into
several stages and this is the first obvious cutoff point."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (67 commits)
[readdir] constify ->actor
[readdir] ->readdir() is gone
[readdir] convert ecryptfs
[readdir] convert coda
[readdir] convert ocfs2
[readdir] convert fatfs
[readdir] convert xfs
[readdir] convert btrfs
[readdir] convert hostfs
[readdir] convert afs
[readdir] convert ncpfs
[readdir] convert hfsplus
[readdir] convert hfs
[readdir] convert befs
[readdir] convert cifs
[readdir] convert freevxfs
[readdir] convert fuse
[readdir] convert hpfs
reiserfs: switch reiserfs_readdir_dentry to inode
reiserfs: is_privroot_deh() needs only directory inode, actually
...
Diffstat (limited to 'arch')
39 files changed, 21 insertions, 133 deletions
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h index 81a4342d5a3f..d8f9b7e89234 100644 --- a/arch/alpha/include/asm/pgtable.h +++ b/arch/alpha/include/asm/pgtable.h | |||
@@ -354,9 +354,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
354 | #define kern_addr_valid(addr) (1) | 354 | #define kern_addr_valid(addr) (1) |
355 | #endif | 355 | #endif |
356 | 356 | ||
357 | #define io_remap_pfn_range(vma, start, pfn, size, prot) \ | ||
358 | remap_pfn_range(vma, start, pfn, size, prot) | ||
359 | |||
360 | #define pte_ERROR(e) \ | 357 | #define pte_ERROR(e) \ |
361 | printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) | 358 | printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) |
362 | #define pmd_ERROR(e) \ | 359 | #define pmd_ERROR(e) \ |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index b9e37ad6fa19..1402fcc11c2c 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -96,6 +96,7 @@ struct osf_dirent { | |||
96 | }; | 96 | }; |
97 | 97 | ||
98 | struct osf_dirent_callback { | 98 | struct osf_dirent_callback { |
99 | struct dir_context ctx; | ||
99 | struct osf_dirent __user *dirent; | 100 | struct osf_dirent __user *dirent; |
100 | long __user *basep; | 101 | long __user *basep; |
101 | unsigned int count; | 102 | unsigned int count; |
@@ -146,17 +147,17 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, | |||
146 | { | 147 | { |
147 | int error; | 148 | int error; |
148 | struct fd arg = fdget(fd); | 149 | struct fd arg = fdget(fd); |
149 | struct osf_dirent_callback buf; | 150 | struct osf_dirent_callback buf = { |
151 | .ctx.actor = osf_filldir, | ||
152 | .dirent = dirent, | ||
153 | .basep = basep, | ||
154 | .count = count | ||
155 | }; | ||
150 | 156 | ||
151 | if (!arg.file) | 157 | if (!arg.file) |
152 | return -EBADF; | 158 | return -EBADF; |
153 | 159 | ||
154 | buf.dirent = dirent; | 160 | error = iterate_dir(arg.file, &buf.ctx); |
155 | buf.basep = basep; | ||
156 | buf.count = count; | ||
157 | buf.error = 0; | ||
158 | |||
159 | error = vfs_readdir(arg.file, osf_filldir, &buf); | ||
160 | if (error >= 0) | 161 | if (error >= 0) |
161 | error = buf.error; | 162 | error = buf.error; |
162 | if (count != buf.count) | 163 | if (count != buf.count) |
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c index b51f7b4818cd..2b183b0d3207 100644 --- a/arch/alpha/kernel/pci-sysfs.c +++ b/arch/alpha/kernel/pci-sysfs.c | |||
@@ -26,7 +26,6 @@ static int hose_mmap_page_range(struct pci_controller *hose, | |||
26 | base = sparse ? hose->sparse_io_base : hose->dense_io_base; | 26 | base = sparse ? hose->sparse_io_base : hose->dense_io_base; |
27 | 27 | ||
28 | vma->vm_pgoff += base >> PAGE_SHIFT; | 28 | vma->vm_pgoff += base >> PAGE_SHIFT; |
29 | vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; | ||
30 | 29 | ||
31 | return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | 30 | return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, |
32 | vma->vm_end - vma->vm_start, | 31 | vma->vm_end - vma->vm_start, |
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index 95b1522212a7..c110ac87d22b 100644 --- a/arch/arc/include/asm/pgtable.h +++ b/arch/arc/include/asm/pgtable.h | |||
@@ -394,9 +394,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
394 | * remap a physical page `pfn' of size `size' with page protection `prot' | 394 | * remap a physical page `pfn' of size `size' with page protection `prot' |
395 | * into virtual address `from' | 395 | * into virtual address `from' |
396 | */ | 396 | */ |
397 | #define io_remap_pfn_range(vma, from, pfn, size, prot) \ | ||
398 | remap_pfn_range(vma, from, pfn, size, prot) | ||
399 | |||
400 | #include <asm-generic/pgtable.h> | 397 | #include <asm-generic/pgtable.h> |
401 | 398 | ||
402 | /* to cope with aliasing VIPT cache */ | 399 | /* to cope with aliasing VIPT cache */ |
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h index 7ec60d6075bf..0642228ff785 100644 --- a/arch/arm/include/asm/pgtable-nommu.h +++ b/arch/arm/include/asm/pgtable-nommu.h | |||
@@ -79,8 +79,6 @@ extern unsigned int kobjsize(const void *objp); | |||
79 | * No page table caches to initialise. | 79 | * No page table caches to initialise. |
80 | */ | 80 | */ |
81 | #define pgtable_cache_init() do { } while (0) | 81 | #define pgtable_cache_init() do { } while (0) |
82 | #define io_remap_pfn_range remap_pfn_range | ||
83 | |||
84 | 82 | ||
85 | /* | 83 | /* |
86 | * All 32bit addresses are effectively valid for vmalloc... | 84 | * All 32bit addresses are effectively valid for vmalloc... |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 9bcd262a9008..229e0dde9c71 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -318,13 +318,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
318 | #define HAVE_ARCH_UNMAPPED_AREA | 318 | #define HAVE_ARCH_UNMAPPED_AREA |
319 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | 319 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN |
320 | 320 | ||
321 | /* | ||
322 | * remap a physical page `pfn' of size `size' with page protection `prot' | ||
323 | * into virtual address `from' | ||
324 | */ | ||
325 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | ||
326 | remap_pfn_range(vma, from, pfn, size, prot) | ||
327 | |||
328 | #define pgtable_cache_init() do { } while (0) | 321 | #define pgtable_cache_init() do { } while (0) |
329 | 322 | ||
330 | #endif /* !__ASSEMBLY__ */ | 323 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index e333a243bfcc..3a768e96cf0e 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -320,13 +320,6 @@ extern int kern_addr_valid(unsigned long addr); | |||
320 | 320 | ||
321 | #include <asm-generic/pgtable.h> | 321 | #include <asm-generic/pgtable.h> |
322 | 322 | ||
323 | /* | ||
324 | * remap a physical page `pfn' of size `size' with page protection `prot' | ||
325 | * into virtual address `from' | ||
326 | */ | ||
327 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | ||
328 | remap_pfn_range(vma, from, pfn, size, prot) | ||
329 | |||
330 | #define pgtable_cache_init() do { } while (0) | 323 | #define pgtable_cache_init() do { } while (0) |
331 | 324 | ||
332 | #endif /* !__ASSEMBLY__ */ | 325 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/avr32/include/asm/pgtable.h b/arch/avr32/include/asm/pgtable.h index 6fbfea61f7bb..4beff97e2033 100644 --- a/arch/avr32/include/asm/pgtable.h +++ b/arch/avr32/include/asm/pgtable.h | |||
@@ -362,9 +362,6 @@ typedef pte_t *pte_addr_t; | |||
362 | 362 | ||
363 | #define kern_addr_valid(addr) (1) | 363 | #define kern_addr_valid(addr) (1) |
364 | 364 | ||
365 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
366 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
367 | |||
368 | /* No page table caches to initialize (?) */ | 365 | /* No page table caches to initialize (?) */ |
369 | #define pgtable_cache_init() do { } while(0) | 366 | #define pgtable_cache_init() do { } while(0) |
370 | 367 | ||
diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h index b8663921d3c1..0b049019eba7 100644 --- a/arch/blackfin/include/asm/pgtable.h +++ b/arch/blackfin/include/asm/pgtable.h | |||
@@ -88,7 +88,6 @@ extern char empty_zero_page[]; | |||
88 | * No page table caches to initialise. | 88 | * No page table caches to initialise. |
89 | */ | 89 | */ |
90 | #define pgtable_cache_init() do { } while (0) | 90 | #define pgtable_cache_init() do { } while (0) |
91 | #define io_remap_pfn_range remap_pfn_range | ||
92 | 91 | ||
93 | /* | 92 | /* |
94 | * All 32bit addresses are effectively valid for vmalloc... | 93 | * All 32bit addresses are effectively valid for vmalloc... |
diff --git a/arch/c6x/include/asm/pgtable.h b/arch/c6x/include/asm/pgtable.h index 38a4312eb2cb..c0eed5b18860 100644 --- a/arch/c6x/include/asm/pgtable.h +++ b/arch/c6x/include/asm/pgtable.h | |||
@@ -71,7 +71,6 @@ extern unsigned long empty_zero_page; | |||
71 | * No page table caches to initialise | 71 | * No page table caches to initialise |
72 | */ | 72 | */ |
73 | #define pgtable_cache_init() do { } while (0) | 73 | #define pgtable_cache_init() do { } while (0) |
74 | #define io_remap_pfn_range remap_pfn_range | ||
75 | 74 | ||
76 | #include <asm-generic/pgtable.h> | 75 | #include <asm-generic/pgtable.h> |
77 | 76 | ||
diff --git a/arch/cris/include/asm/pgtable.h b/arch/cris/include/asm/pgtable.h index 7df430138355..8b8c86793225 100644 --- a/arch/cris/include/asm/pgtable.h +++ b/arch/cris/include/asm/pgtable.h | |||
@@ -258,9 +258,6 @@ static inline pgd_t * pgd_offset(const struct mm_struct *mm, unsigned long addre | |||
258 | #define pgd_ERROR(e) \ | 258 | #define pgd_ERROR(e) \ |
259 | printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) | 259 | printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) |
260 | 260 | ||
261 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
262 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
263 | |||
264 | 261 | ||
265 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */ | 262 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */ |
266 | 263 | ||
diff --git a/arch/frv/include/asm/pgtable.h b/arch/frv/include/asm/pgtable.h index 6bc241e4b4f8..eb0110acd19b 100644 --- a/arch/frv/include/asm/pgtable.h +++ b/arch/frv/include/asm/pgtable.h | |||
@@ -488,9 +488,6 @@ static inline int pte_file(pte_t pte) | |||
488 | #define PageSkip(page) (0) | 488 | #define PageSkip(page) (0) |
489 | #define kern_addr_valid(addr) (1) | 489 | #define kern_addr_valid(addr) (1) |
490 | 490 | ||
491 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
492 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
493 | |||
494 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 491 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
495 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 492 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
496 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT | 493 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
diff --git a/arch/h8300/include/asm/pgtable.h b/arch/h8300/include/asm/pgtable.h index 62ef17676b40..7ca20f894dd7 100644 --- a/arch/h8300/include/asm/pgtable.h +++ b/arch/h8300/include/asm/pgtable.h | |||
@@ -52,9 +52,6 @@ extern int is_in_rom(unsigned long); | |||
52 | */ | 52 | */ |
53 | #define pgtable_cache_init() do { } while (0) | 53 | #define pgtable_cache_init() do { } while (0) |
54 | 54 | ||
55 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
56 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
57 | |||
58 | /* | 55 | /* |
59 | * All 32bit addresses are effectively valid for vmalloc... | 56 | * All 32bit addresses are effectively valid for vmalloc... |
60 | * Sort of meaningless for non-VM targets. | 57 | * Sort of meaningless for non-VM targets. |
diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 20d55f69fe55..d8bd54fa431e 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h | |||
@@ -452,10 +452,6 @@ static inline int pte_exec(pte_t pte) | |||
452 | 452 | ||
453 | #define __pte_offset(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 453 | #define __pte_offset(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
454 | 454 | ||
455 | /* Nothing special about IO remapping at this point */ | ||
456 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
457 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
458 | |||
459 | /* I think this is in case we have page table caches; needed by init/main.c */ | 455 | /* I think this is in case we have page table caches; needed by init/main.c */ |
460 | #define pgtable_cache_init() do { } while (0) | 456 | #define pgtable_cache_init() do { } while (0) |
461 | 457 | ||
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h index 815810cbbedc..7935115398a6 100644 --- a/arch/ia64/include/asm/pgtable.h +++ b/arch/ia64/include/asm/pgtable.h | |||
@@ -493,9 +493,6 @@ extern void paging_init (void); | |||
493 | #define pte_to_pgoff(pte) ((pte_val(pte) << 1) >> 3) | 493 | #define pte_to_pgoff(pte) ((pte_val(pte) << 1) >> 3) |
494 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 2) | _PAGE_FILE }) | 494 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 2) | _PAGE_FILE }) |
495 | 495 | ||
496 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
497 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
498 | |||
499 | /* | 496 | /* |
500 | * ZERO_PAGE is a global shared page that is always zero: used | 497 | * ZERO_PAGE is a global shared page that is always zero: used |
501 | * for zero-mapped memory areas etc.. | 498 | * for zero-mapped memory areas etc.. |
diff --git a/arch/m32r/include/asm/pgtable.h b/arch/m32r/include/asm/pgtable.h index 8a28cfea2729..103ce6710f07 100644 --- a/arch/m32r/include/asm/pgtable.h +++ b/arch/m32r/include/asm/pgtable.h | |||
@@ -347,9 +347,6 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) | |||
347 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 347 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
348 | #define kern_addr_valid(addr) (1) | 348 | #define kern_addr_valid(addr) (1) |
349 | 349 | ||
350 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
351 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
352 | |||
353 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 350 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
354 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 351 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
355 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT | 352 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h index dc35e0e106e4..9f5abbda1ea7 100644 --- a/arch/m68k/include/asm/pgtable_mm.h +++ b/arch/m68k/include/asm/pgtable_mm.h | |||
@@ -135,9 +135,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
135 | 135 | ||
136 | #define kern_addr_valid(addr) (1) | 136 | #define kern_addr_valid(addr) (1) |
137 | 137 | ||
138 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
139 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
140 | |||
141 | /* MMU-specific headers */ | 138 | /* MMU-specific headers */ |
142 | 139 | ||
143 | #ifdef CONFIG_SUN3 | 140 | #ifdef CONFIG_SUN3 |
diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h index 037028f4ab70..c527fc2ecf82 100644 --- a/arch/m68k/include/asm/pgtable_no.h +++ b/arch/m68k/include/asm/pgtable_no.h | |||
@@ -55,9 +55,6 @@ extern unsigned int kobjsize(const void *objp); | |||
55 | */ | 55 | */ |
56 | #define pgtable_cache_init() do { } while (0) | 56 | #define pgtable_cache_init() do { } while (0) |
57 | 57 | ||
58 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
59 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
60 | |||
61 | /* | 58 | /* |
62 | * All 32bit addresses are effectively valid for vmalloc... | 59 | * All 32bit addresses are effectively valid for vmalloc... |
63 | * Sort of meaningless for non-VM targets. | 60 | * Sort of meaningless for non-VM targets. |
diff --git a/arch/metag/include/asm/pgtable.h b/arch/metag/include/asm/pgtable.h index 1cd13d595198..0d9dc5487296 100644 --- a/arch/metag/include/asm/pgtable.h +++ b/arch/metag/include/asm/pgtable.h | |||
@@ -333,9 +333,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
333 | 333 | ||
334 | #define kern_addr_valid(addr) (1) | 334 | #define kern_addr_valid(addr) (1) |
335 | 335 | ||
336 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
337 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
338 | |||
339 | /* | 336 | /* |
340 | * No page table caches to initialise | 337 | * No page table caches to initialise |
341 | */ | 338 | */ |
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index a7311cd9dee0..95cef0b5f836 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h | |||
@@ -13,9 +13,6 @@ | |||
13 | 13 | ||
14 | #include <asm/setup.h> | 14 | #include <asm/setup.h> |
15 | 15 | ||
16 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
17 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | extern int mem_init_done; | 17 | extern int mem_init_done; |
21 | #endif | 18 | #endif |
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index 8b8f6b393363..008324d1c261 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
@@ -394,9 +394,7 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
394 | phys_t phys_addr_high = fixup_bigphys_addr(pfn << PAGE_SHIFT, size); | 394 | phys_t phys_addr_high = fixup_bigphys_addr(pfn << PAGE_SHIFT, size); |
395 | return remap_pfn_range(vma, vaddr, phys_addr_high >> PAGE_SHIFT, size, prot); | 395 | return remap_pfn_range(vma, vaddr, phys_addr_high >> PAGE_SHIFT, size, prot); |
396 | } | 396 | } |
397 | #else | 397 | #define io_remap_pfn_range io_remap_pfn_range |
398 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
399 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
400 | #endif | 398 | #endif |
401 | 399 | ||
402 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 400 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
diff --git a/arch/mn10300/include/asm/pgtable.h b/arch/mn10300/include/asm/pgtable.h index a1e894b5f65b..2ddaa67e7983 100644 --- a/arch/mn10300/include/asm/pgtable.h +++ b/arch/mn10300/include/asm/pgtable.h | |||
@@ -486,9 +486,6 @@ extern void update_mmu_cache(struct vm_area_struct *vma, | |||
486 | 486 | ||
487 | #define kern_addr_valid(addr) (1) | 487 | #define kern_addr_valid(addr) (1) |
488 | 488 | ||
489 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
490 | remap_pfn_range((vma), (vaddr), (pfn), (size), (prot)) | ||
491 | |||
492 | #define MK_IOSPACE_PFN(space, pfn) (pfn) | 489 | #define MK_IOSPACE_PFN(space, pfn) (pfn) |
493 | #define GET_IOSPACE(pfn) 0 | 490 | #define GET_IOSPACE(pfn) 0 |
494 | #define GET_PFN(pfn) (pfn) | 491 | #define GET_PFN(pfn) (pfn) |
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.c b/arch/mn10300/unit-asb2305/pci-asb2305.c index c4e2e79281e8..febb9cd83177 100644 --- a/arch/mn10300/unit-asb2305/pci-asb2305.c +++ b/arch/mn10300/unit-asb2305/pci-asb2305.c | |||
@@ -221,7 +221,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
221 | /* Leave vm_pgoff as-is, the PCI space address is the physical | 221 | /* Leave vm_pgoff as-is, the PCI space address is the physical |
222 | * address on this platform. | 222 | * address on this platform. |
223 | */ | 223 | */ |
224 | vma->vm_flags |= VM_LOCKED | VM_IO; | 224 | vma->vm_flags |= VM_LOCKED; |
225 | 225 | ||
226 | prot = pgprot_val(vma->vm_page_prot); | 226 | prot = pgprot_val(vma->vm_page_prot); |
227 | prot &= ~_PAGE_CACHE; | 227 | prot &= ~_PAGE_CACHE; |
diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h index 14c900cfd30a..37bf6a3ef8f4 100644 --- a/arch/openrisc/include/asm/pgtable.h +++ b/arch/openrisc/include/asm/pgtable.h | |||
@@ -446,9 +446,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
446 | 446 | ||
447 | #define kern_addr_valid(addr) (1) | 447 | #define kern_addr_valid(addr) (1) |
448 | 448 | ||
449 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
450 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
451 | |||
452 | #include <asm-generic/pgtable.h> | 449 | #include <asm-generic/pgtable.h> |
453 | 450 | ||
454 | /* | 451 | /* |
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 838b479a42c4..88d0962de65a 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -60,6 +60,7 @@ struct hpux_dirent { | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct getdents_callback { | 62 | struct getdents_callback { |
63 | struct dir_context ctx; | ||
63 | struct hpux_dirent __user *current_dir; | 64 | struct hpux_dirent __user *current_dir; |
64 | struct hpux_dirent __user *previous; | 65 | struct hpux_dirent __user *previous; |
65 | int count; | 66 | int count; |
@@ -110,24 +111,23 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i | |||
110 | { | 111 | { |
111 | struct fd arg; | 112 | struct fd arg; |
112 | struct hpux_dirent __user * lastdirent; | 113 | struct hpux_dirent __user * lastdirent; |
113 | struct getdents_callback buf; | 114 | struct getdents_callback buf = { |
115 | .ctx.actor = filldir, | ||
116 | .current_dir = dirent, | ||
117 | .count = count | ||
118 | }; | ||
114 | int error; | 119 | int error; |
115 | 120 | ||
116 | arg = fdget(fd); | 121 | arg = fdget(fd); |
117 | if (!arg.file) | 122 | if (!arg.file) |
118 | return -EBADF; | 123 | return -EBADF; |
119 | 124 | ||
120 | buf.current_dir = dirent; | 125 | error = iterate_dir(arg.file, &buf.ctx); |
121 | buf.previous = NULL; | ||
122 | buf.count = count; | ||
123 | buf.error = 0; | ||
124 | |||
125 | error = vfs_readdir(arg.file, filldir, &buf); | ||
126 | if (error >= 0) | 126 | if (error >= 0) |
127 | error = buf.error; | 127 | error = buf.error; |
128 | lastdirent = buf.previous; | 128 | lastdirent = buf.previous; |
129 | if (lastdirent) { | 129 | if (lastdirent) { |
130 | if (put_user(arg.file->f_pos, &lastdirent->d_off)) | 130 | if (put_user(buf.ctx.pos, &lastdirent->d_off)) |
131 | error = -EFAULT; | 131 | error = -EFAULT; |
132 | else | 132 | else |
133 | error = count - buf.count; | 133 | error = count - buf.count; |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 1e40d7f86be3..34899b5d959a 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -506,9 +506,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
506 | #endif | 506 | #endif |
507 | 507 | ||
508 | 508 | ||
509 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
510 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
511 | |||
512 | #define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_NO_CACHE) | 509 | #define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_NO_CACHE) |
513 | 510 | ||
514 | /* We provide our own get_unmapped_area to provide cache coherency */ | 511 | /* We provide our own get_unmapped_area to provide cache coherency */ |
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 7aeb9555f6ea..b6293d26bd39 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
@@ -198,9 +198,6 @@ extern void paging_init(void); | |||
198 | */ | 198 | */ |
199 | #define kern_addr_valid(addr) (1) | 199 | #define kern_addr_valid(addr) (1) |
200 | 200 | ||
201 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
202 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
203 | |||
204 | #include <asm-generic/pgtable.h> | 201 | #include <asm-generic/pgtable.h> |
205 | 202 | ||
206 | 203 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 35f77a42bedf..f3900427ffab 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -238,7 +238,7 @@ const struct file_operations spufs_context_fops = { | |||
238 | .release = spufs_dir_close, | 238 | .release = spufs_dir_close, |
239 | .llseek = dcache_dir_lseek, | 239 | .llseek = dcache_dir_lseek, |
240 | .read = generic_read_dir, | 240 | .read = generic_read_dir, |
241 | .readdir = dcache_readdir, | 241 | .iterate = dcache_readdir, |
242 | .fsync = noop_fsync, | 242 | .fsync = noop_fsync, |
243 | }; | 243 | }; |
244 | EXPORT_SYMBOL_GPL(spufs_context_fops); | 244 | EXPORT_SYMBOL_GPL(spufs_context_fops); |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index e8b6e5b8932c..9aefa3c64eb2 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -58,9 +58,6 @@ extern unsigned long zero_page_mask; | |||
58 | #define __HAVE_COLOR_ZERO_PAGE | 58 | #define __HAVE_COLOR_ZERO_PAGE |
59 | 59 | ||
60 | /* TODO: s390 cannot support io_remap_pfn_range... */ | 60 | /* TODO: s390 cannot support io_remap_pfn_range... */ |
61 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
62 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
63 | |||
64 | #endif /* !__ASSEMBLY__ */ | 61 | #endif /* !__ASSEMBLY__ */ |
65 | 62 | ||
66 | /* | 63 | /* |
diff --git a/arch/score/include/asm/pgtable.h b/arch/score/include/asm/pgtable.h index 2fd469807683..db96ad9afc03 100644 --- a/arch/score/include/asm/pgtable.h +++ b/arch/score/include/asm/pgtable.h | |||
@@ -113,9 +113,6 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | |||
113 | #define pte_clear(mm, addr, xp) \ | 113 | #define pte_clear(mm, addr, xp) \ |
114 | do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) | 114 | do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) |
115 | 115 | ||
116 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
117 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
118 | |||
119 | /* | 116 | /* |
120 | * The "pgd_xxx()" functions here are trivial for a folded two-level | 117 | * The "pgd_xxx()" functions here are trivial for a folded two-level |
121 | * setup: the pgd is never bad, and a pmd always exists (as it's folded | 118 | * setup: the pgd is never bad, and a pmd always exists (as it's folded |
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 9210e93a92c3..cf434c64408d 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -124,9 +124,6 @@ typedef pte_t *pte_addr_t; | |||
124 | 124 | ||
125 | #define kern_addr_valid(addr) (1) | 125 | #define kern_addr_valid(addr) (1) |
126 | 126 | ||
127 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
128 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
129 | |||
130 | #define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT))) | 127 | #define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT))) |
131 | 128 | ||
132 | /* | 129 | /* |
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 6fc13483f702..502f632f6cc7 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h | |||
@@ -443,6 +443,7 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
443 | 443 | ||
444 | return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot); | 444 | return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot); |
445 | } | 445 | } |
446 | #define io_remap_pfn_range io_remap_pfn_range | ||
446 | 447 | ||
447 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 448 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
448 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 449 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 7619f2f792af..79c214efa3fe 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -914,6 +914,7 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
914 | 914 | ||
915 | return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot); | 915 | return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot); |
916 | } | 916 | } |
917 | #define io_remap_pfn_range io_remap_pfn_range | ||
917 | 918 | ||
918 | #include <asm/tlbflush.h> | 919 | #include <asm/tlbflush.h> |
919 | #include <asm-generic/pgtable.h> | 920 | #include <asm-generic/pgtable.h> |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index baf4366e2d6a..2031c65fd4ea 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -773,15 +773,6 @@ static int __pci_mmap_make_offset(struct pci_dev *pdev, | |||
773 | return 0; | 773 | return 0; |
774 | } | 774 | } |
775 | 775 | ||
776 | /* Set vm_flags of VMA, as appropriate for this architecture, for a pci device | ||
777 | * mapping. | ||
778 | */ | ||
779 | static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, | ||
780 | enum pci_mmap_state mmap_state) | ||
781 | { | ||
782 | vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; | ||
783 | } | ||
784 | |||
785 | /* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci | 776 | /* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci |
786 | * device mapping. | 777 | * device mapping. |
787 | */ | 778 | */ |
@@ -809,7 +800,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
809 | if (ret < 0) | 800 | if (ret < 0) |
810 | return ret; | 801 | return ret; |
811 | 802 | ||
812 | __pci_mmap_set_flags(dev, vma, mmap_state); | ||
813 | __pci_mmap_set_pgprot(dev, vma, mmap_state); | 803 | __pci_mmap_set_pgprot(dev, vma, mmap_state); |
814 | 804 | ||
815 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 805 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
diff --git a/arch/tile/include/asm/pgtable.h b/arch/tile/include/asm/pgtable.h index 73b1a4c9ad03..33587f16c152 100644 --- a/arch/tile/include/asm/pgtable.h +++ b/arch/tile/include/asm/pgtable.h | |||
@@ -362,9 +362,6 @@ do { \ | |||
362 | #define kern_addr_valid(addr) (1) | 362 | #define kern_addr_valid(addr) (1) |
363 | #endif /* CONFIG_FLATMEM */ | 363 | #endif /* CONFIG_FLATMEM */ |
364 | 364 | ||
365 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
366 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
367 | |||
368 | extern void vmalloc_sync_all(void); | 365 | extern void vmalloc_sync_all(void); |
369 | 366 | ||
370 | #endif /* !__ASSEMBLY__ */ | 367 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index ae02909a1875..bf974f712af7 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h | |||
@@ -69,8 +69,6 @@ extern unsigned long end_iomem; | |||
69 | #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) | 69 | #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) |
70 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) | 70 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) |
71 | 71 | ||
72 | #define io_remap_pfn_range remap_pfn_range | ||
73 | |||
74 | /* | 72 | /* |
75 | * The i386 can't do page protection for execute, and considers that the same | 73 | * The i386 can't do page protection for execute, and considers that the same |
76 | * are read. | 74 | * are read. |
diff --git a/arch/unicore32/include/asm/pgtable.h b/arch/unicore32/include/asm/pgtable.h index 68b2f297ac97..233c25880df4 100644 --- a/arch/unicore32/include/asm/pgtable.h +++ b/arch/unicore32/include/asm/pgtable.h | |||
@@ -303,13 +303,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
303 | 303 | ||
304 | #include <asm-generic/pgtable.h> | 304 | #include <asm-generic/pgtable.h> |
305 | 305 | ||
306 | /* | ||
307 | * remap a physical page `pfn' of size `size' with page protection `prot' | ||
308 | * into virtual address `from' | ||
309 | */ | ||
310 | #define io_remap_pfn_range(vma, from, pfn, size, prot) \ | ||
311 | remap_pfn_range(vma, from, pfn, size, prot) | ||
312 | |||
313 | #define pgtable_cache_init() do { } while (0) | 306 | #define pgtable_cache_init() do { } while (0) |
314 | 307 | ||
315 | #endif /* !__ASSEMBLY__ */ | 308 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 1e672234c4ff..5b0818bc8963 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -506,9 +506,6 @@ static inline unsigned long pages_to_mb(unsigned long npg) | |||
506 | return npg >> (20 - PAGE_SHIFT); | 506 | return npg >> (20 - PAGE_SHIFT); |
507 | } | 507 | } |
508 | 508 | ||
509 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
510 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
511 | |||
512 | #if PAGETABLE_LEVELS > 2 | 509 | #if PAGETABLE_LEVELS > 2 |
513 | static inline int pud_none(pud_t pud) | 510 | static inline int pud_none(pud_t pud) |
514 | { | 511 | { |
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h index d7546c94da52..8f017eb309bd 100644 --- a/arch/xtensa/include/asm/pgtable.h +++ b/arch/xtensa/include/asm/pgtable.h | |||
@@ -393,14 +393,6 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | |||
393 | extern void update_mmu_cache(struct vm_area_struct * vma, | 393 | extern void update_mmu_cache(struct vm_area_struct * vma, |
394 | unsigned long address, pte_t *ptep); | 394 | unsigned long address, pte_t *ptep); |
395 | 395 | ||
396 | /* | ||
397 | * remap a physical page `pfn' of size `size' with page protection `prot' | ||
398 | * into virtual address `from' | ||
399 | */ | ||
400 | |||
401 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | ||
402 | remap_pfn_range(vma, from, pfn, size, prot) | ||
403 | |||
404 | typedef pte_t *pte_addr_t; | 396 | typedef pte_t *pte_addr_t; |
405 | 397 | ||
406 | #endif /* !defined (__ASSEMBLY__) */ | 398 | #endif /* !defined (__ASSEMBLY__) */ |