Skip to content

Commit

Permalink
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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 74838b7 "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 8f9c011 (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()
  • Loading branch information
torvalds committed Oct 8, 2012
2 parents 3c5af8d + 6916fd0 commit b5356a1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
1 change: 1 addition & 0 deletions arch/arm64/include/asm/unistd32.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,3 +752,4 @@ __SYSCALL(__NR_syncfs, sys_syncfs)
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_COMPAT_SYS_SENDFILE
1 change: 1 addition & 0 deletions arch/arm64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ work_pending:
mov x0, sp // 'regs'
tst x2, #PSR_MODE_MASK // user mode regs?
b.ne no_work_pending // returning to kernel
enable_irq // enable interrupts for do_notify_resume()
bl do_notify_resume
b ret_to_user
work_resched:
Expand Down
20 changes: 0 additions & 20 deletions arch/arm64/kernel/sys_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,6 @@ asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid,
return ret;
}

asmlinkage int compat_sys_sendfile(int out_fd, int in_fd,
compat_off_t __user *offset, s32 count)
{
mm_segment_t old_fs = get_fs();
int ret;
off_t of;

if (offset && get_user(of, offset))
return -EFAULT;

set_fs(KERNEL_DS);
ret = sys_sendfile(out_fd, in_fd, offset ? (off_t __user *)&of : NULL,
count);
set_fs(old_fs);

if (offset && put_user(of, offset))
return -EFAULT;
return ret;
}

static inline void
do_compat_cache_op(unsigned long start, unsigned long end, int flags)
{
Expand Down
6 changes: 2 additions & 4 deletions arch/arm64/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = {
.mapping_error = swiotlb_dma_mapping_error,
};

void __init swiotlb_init_with_default_size(size_t default_size, int verbose);

void __init arm64_swiotlb_init(size_t max_size)
void __init arm64_swiotlb_init(void)
{
dma_ops = &arm64_swiotlb_dma_ops;
swiotlb_init_with_default_size(min((size_t)SZ_64M, max_size), 1);
swiotlb_init(1);
}

#define PREALLOC_DMA_DEBUG_ENTRIES 4096
Expand Down
5 changes: 1 addition & 4 deletions arch/arm64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,7 @@ void __init mem_init(void)
unsigned long reserved_pages, free_pages;
struct memblock_region *reg;

#if CONFIG_SWIOTLB
extern void __init arm64_swiotlb_init(size_t max_size);
arm64_swiotlb_init(max_pfn << (PAGE_SHIFT - 1));
#endif
arm64_swiotlb_init();

max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;

Expand Down
1 change: 1 addition & 0 deletions arch/arm64/mm/mm.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
extern void __flush_dcache_page(struct page *page);
extern void __init bootmem_init(void);
extern void __init arm64_swiotlb_init(void);

0 comments on commit b5356a1

Please sign in to comment.