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()
Unified · Split
| @@ -752,3 +752,4 @@ __SYSCALL(__NR_syncfs, sys_syncfs) · 751 unmodified lines | ||
| 752 | 752 | #define __ARCH_WANT_SYS_SIGPENDING |
| 753 | 753 | #define __ARCH_WANT_SYS_SIGPROCMASK |
| 754 | 754 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
| 755 | +#define __ARCH_WANT_COMPAT_SYS_SENDFILE | |
| @@ -583,6 +583,7 @@ work_pending: · 582 unmodified lines | ||
| 583 | 583 | mov x0, sp // 'regs' |
| 584 | 584 | tst x2, #PSR_MODE_MASK // user mode regs? |
| 585 | 585 | b.ne no_work_pending // returning to kernel |
| 586 | + enable_irq // enable interrupts for do_notify_resume() | |
| 586 | 587 | bl do_notify_resume |
| 587 | 588 | b ret_to_user |
| 588 | 589 | work_resched: |
| @@ -84,26 +84,6 @@ asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid, · 83 unmodified lines | ||
| 84 | 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 | 87 | static inline void |
| 108 | 88 | do_compat_cache_op(unsigned long start, unsigned long end, int flags) |
| 109 | 89 | { |
| @@ -61,12 +61,10 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = { · 60 unmodified lines | ||
| 61 | 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); | |
| 65 | − | |
| 66 | −void __init arm64_swiotlb_init(size_t max_size) | |
| 64 | +void __init arm64_swiotlb_init(void) | |
| 67 | 65 | { |
| 68 | 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 | 70 | #define PREALLOC_DMA_DEBUG_ENTRIES 4096 |
| @@ -301,10 +301,7 @@ void __init mem_init(void) · 300 unmodified lines | ||
| 301 | 301 | unsigned long reserved_pages, free_pages; |
| 302 | 302 | struct memblock_region *reg; |
| 303 | 303 | |
| 304 | −#if CONFIG_SWIOTLB | |
| 305 | − extern void __init arm64_swiotlb_init(size_t max_size); | |
| 306 | − arm64_swiotlb_init(max_pfn << (PAGE_SHIFT - 1)); | |
| 307 | −#endif | |
| 304 | + arm64_swiotlb_init(); | |
| 308 | 305 | |
| 309 | 306 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; |
| 310 | 307 | |
| @@ -1,2 +1,3 @@ | ||
| 1 | 1 | extern void __flush_dcache_page(struct page *page); |
| 2 | 2 | extern void __init bootmem_init(void); |
| 3 | +extern void __init arm64_swiotlb_init(void); | |