diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-08 17:41:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-08 17:41:12 -0400 |
commit | b5356a19ced273ef8a941be226f4dfdb95c23073 (patch) | |
tree | 65ff365e800c178655557eb1ea62a78a7601ff76 | |
parent | 3c5af8d1aad6f193c0a89702c87292a0ed81add0 (diff) | |
parent | 6916fd086f0c5d7871ad3986300ba30d63616925 (diff) |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64
Pull arm64 changes from Catalin Marinas:
"arm64 fixes:
- Use swiotlb_init() instead of swiotlb_init_with_default_size().
The latter is now a static function (commit 74838b75379a "swiotlb:
add the late swiotlb initialization function with iotlb memory").
- Enable interrupts before calling do_notify_resume().
arm64 clean-up:
- Use the generic implementation of compat_sys_sendfile() on arm64 as
commit 8f9c0119d7ba (introducing the function) has been merged."
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
arm64: Enable interrupts before calling do_notify_resume()
arm64: Use the generic compat_sys_sendfile() implementation
arm64: Call swiotlb_init() instead of swiotlb_init_with_default_size()
-rw-r--r-- | arch/arm64/include/asm/unistd32.h | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/entry.S | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/sys_compat.c | 20 | ||||
-rw-r--r-- | arch/arm64/mm/dma-mapping.c | 6 | ||||
-rw-r--r-- | arch/arm64/mm/init.c | 5 | ||||
-rw-r--r-- | arch/arm64/mm/mm.h | 1 |
6 files changed, 6 insertions, 28 deletions
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 3ba1f1a90629..ba42d41fc5c2 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
@@ -752,3 +752,4 @@ __SYSCALL(__NR_syncfs, sys_syncfs) | |||
752 | #define __ARCH_WANT_SYS_SIGPENDING | 752 | #define __ARCH_WANT_SYS_SIGPENDING |
753 | #define __ARCH_WANT_SYS_SIGPROCMASK | 753 | #define __ARCH_WANT_SYS_SIGPROCMASK |
754 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 754 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
755 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE | ||
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 38cf853a3667..6538928ff1ab 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S | |||
@@ -583,6 +583,7 @@ work_pending: | |||
583 | mov x0, sp // 'regs' | 583 | mov x0, sp // 'regs' |
584 | tst x2, #PSR_MODE_MASK // user mode regs? | 584 | tst x2, #PSR_MODE_MASK // user mode regs? |
585 | b.ne no_work_pending // returning to kernel | 585 | b.ne no_work_pending // returning to kernel |
586 | enable_irq // enable interrupts for do_notify_resume() | ||
586 | bl do_notify_resume | 587 | bl do_notify_resume |
587 | b ret_to_user | 588 | b ret_to_user |
588 | work_resched: | 589 | work_resched: |
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c index 967e92fdff01..93f10e27dc79 100644 --- a/arch/arm64/kernel/sys_compat.c +++ b/arch/arm64/kernel/sys_compat.c | |||
@@ -84,26 +84,6 @@ asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid, | |||
84 | return ret; | 84 | return ret; |
85 | } | 85 | } |
86 | 86 | ||
87 | asmlinkage int compat_sys_sendfile(int out_fd, int in_fd, | ||
88 | compat_off_t __user *offset, s32 count) | ||
89 | { | ||
90 | mm_segment_t old_fs = get_fs(); | ||
91 | int ret; | ||
92 | off_t of; | ||
93 | |||
94 | if (offset && get_user(of, offset)) | ||
95 | return -EFAULT; | ||
96 | |||
97 | set_fs(KERNEL_DS); | ||
98 | ret = sys_sendfile(out_fd, in_fd, offset ? (off_t __user *)&of : NULL, | ||
99 | count); | ||
100 | set_fs(old_fs); | ||
101 | |||
102 | if (offset && put_user(of, offset)) | ||
103 | return -EFAULT; | ||
104 | return ret; | ||
105 | } | ||
106 | |||
107 | static inline void | 87 | static inline void |
108 | do_compat_cache_op(unsigned long start, unsigned long end, int flags) | 88 | do_compat_cache_op(unsigned long start, unsigned long end, int flags) |
109 | { | 89 | { |
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 5eb244453a5b..4bd7579ec9e6 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c | |||
@@ -61,12 +61,10 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = { | |||
61 | .mapping_error = swiotlb_dma_mapping_error, | 61 | .mapping_error = swiotlb_dma_mapping_error, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | void __init swiotlb_init_with_default_size(size_t default_size, int verbose); | 64 | void __init arm64_swiotlb_init(void) |
65 | |||
66 | void __init arm64_swiotlb_init(size_t max_size) | ||
67 | { | 65 | { |
68 | dma_ops = &arm64_swiotlb_dma_ops; | 66 | dma_ops = &arm64_swiotlb_dma_ops; |
69 | swiotlb_init_with_default_size(min((size_t)SZ_64M, max_size), 1); | 67 | swiotlb_init(1); |
70 | } | 68 | } |
71 | 69 | ||
72 | #define PREALLOC_DMA_DEBUG_ENTRIES 4096 | 70 | #define PREALLOC_DMA_DEBUG_ENTRIES 4096 |
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 5f719ba949bc..efbf7df05d3f 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
@@ -301,10 +301,7 @@ void __init mem_init(void) | |||
301 | unsigned long reserved_pages, free_pages; | 301 | unsigned long reserved_pages, free_pages; |
302 | struct memblock_region *reg; | 302 | struct memblock_region *reg; |
303 | 303 | ||
304 | #if CONFIG_SWIOTLB | 304 | arm64_swiotlb_init(); |
305 | extern void __init arm64_swiotlb_init(size_t max_size); | ||
306 | arm64_swiotlb_init(max_pfn << (PAGE_SHIFT - 1)); | ||
307 | #endif | ||
308 | 305 | ||
309 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; | 306 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; |
310 | 307 | ||
diff --git a/arch/arm64/mm/mm.h b/arch/arm64/mm/mm.h index d8d6e7851c14..916701e6d040 100644 --- a/arch/arm64/mm/mm.h +++ b/arch/arm64/mm/mm.h | |||
@@ -1,2 +1,3 @@ | |||
1 | extern void __flush_dcache_page(struct page *page); | 1 | extern void __flush_dcache_page(struct page *page); |
2 | extern void __init bootmem_init(void); | 2 | extern void __init bootmem_init(void); |
3 | extern void __init arm64_swiotlb_init(void); | ||