Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge third patch-bomb from Andrew Morton:
 "We're pretty much done over here - I'm still waiting for a nouveau
  merge so I can cleanly finish up Christoph's dma-mapping rework.

   - bunch of small misc stuff

   - fold abs64() into abs(), remove abs64()

   - new_valid_dev() cleanups

   - binfmt_elf_fdpic feature work"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (24 commits)
  fs/binfmt_elf_fdpic.c: provide NOMMU loader for regular ELF binaries
  fs/stat.c: remove unnecessary new_valid_dev() check
  fs/reiserfs/namei.c: remove unnecessary new_valid_dev() check
  fs/nilfs2/namei.c: remove unnecessary new_valid_dev() check
  fs/ncpfs/dir.c: remove unnecessary new_valid_dev() check
  fs/jfs: remove unnecessary new_valid_dev() checks
  fs/hpfs/namei.c: remove unnecessary new_valid_dev() check
  fs/f2fs/namei.c: remove unnecessary new_valid_dev() check
  fs/ext2/namei.c: remove unnecessary new_valid_dev() check
  fs/exofs/namei.c: remove unnecessary new_valid_dev() check
  fs/btrfs/inode.c: remove unnecessary new_valid_dev() check
  fs/9p: remove unnecessary new_valid_dev() checks
  include/linux/kdev_t.h: old/new_valid_dev() can return bool
  include/linux/kdev_t.h: remove unused huge_valid_dev()
  kmap_atomic_to_page() has no users, remove it
  drivers/scsi/cxgbi: fix build with EXTRA_CFLAGS
  dma: remove external references to dma_supported
  Documentation/sysctl/vm.txt: fix misleading code reference of overcommit_memory
  remove abs64()
  kernel.h: make abs() work with 64-bit types
  ...
  • Loading branch information
torvalds committed Nov 10, 2015
2 parents e6604ec + 1bde925 commit bd4f203
Show file tree
Hide file tree
Showing 61 changed files with 104 additions and 221 deletions.
13 changes: 0 additions & 13 deletions Documentation/DMA-API.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,6 @@ memory back to the pool before you destroy it.
Part Ic - DMA addressing limitations
------------------------------------

int
dma_supported(struct device *dev, u64 mask)

Checks to see if the device can support DMA to the memory described by
mask.

Returns: 1 if it can and 0 if it can't.

Notes: This routine merely tests to see if the mask is possible. It
won't change the current mask settings. It is more intended as an
internal API for use by the platform than an external API for use by
driver writers.

int
dma_set_mask_and_coherent(struct device *dev, u64 mask)

Expand Down
2 changes: 1 addition & 1 deletion Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ and don't use much of it.
The default value is 0.

See Documentation/vm/overcommit-accounting and
security/commoncap.c::cap_vm_enough_memory() for more information.
mm/mmap.c::__vm_enough_memory() for more information.

==============================================================

Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ extern void kunmap(struct page *page);
extern void *kmap_atomic(struct page *page);
extern void __kunmap_atomic(void *kvaddr);
extern void *kmap_atomic_pfn(unsigned long pfn);
extern struct page *kmap_atomic_to_page(const void *ptr);
#endif

#endif
10 changes: 0 additions & 10 deletions arch/arm/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,3 @@ void *kmap_atomic_pfn(unsigned long pfn)

return (void *)vaddr;
}

struct page *kmap_atomic_to_page(const void *ptr)
{
unsigned long vaddr = (unsigned long)ptr;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

return pte_page(get_fixmap_pte(vaddr));
}
2 changes: 0 additions & 2 deletions arch/frv/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ extern void kunmap_high(struct page *page);
extern void *kmap(struct page *page);
extern void kunmap(struct page *page);

extern struct page *kmap_atomic_to_page(void *ptr);

#endif /* !__ASSEMBLY__ */

/*
Expand Down
5 changes: 0 additions & 5 deletions arch/frv/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ void kunmap(struct page *page)

EXPORT_SYMBOL(kunmap);

struct page *kmap_atomic_to_page(void *ptr)
{
return virt_to_page(ptr);
}

void *kmap_atomic(struct page *page)
{
unsigned long paddr;
Expand Down
1 change: 0 additions & 1 deletion arch/metag/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ extern void kunmap(struct page *page);
extern void *kmap_atomic(struct page *page);
extern void __kunmap_atomic(void *kvaddr);
extern void *kmap_atomic_pfn(unsigned long pfn);
extern struct page *kmap_atomic_to_page(void *ptr);
#endif

#endif
14 changes: 0 additions & 14 deletions arch/metag/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,6 @@ void *kmap_atomic_pfn(unsigned long pfn)
return (void *)vaddr;
}

struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long vaddr = (unsigned long)ptr;
int idx;
pte_t *pte;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}

void __init kmap_init(void)
{
unsigned long kmap_vstart;
Expand Down
13 changes: 0 additions & 13 deletions arch/microblaze/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,6 @@ static inline void *kmap_atomic(struct page *page)
return kmap_atomic_prot(page, kmap_prot);
}

static inline struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long) ptr;
pte_t *pte;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}

#define flush_cache_kmaps() { flush_icache(); flush_dcache(); }

#endif /* __KERNEL__ */
Expand Down
1 change: 0 additions & 1 deletion arch/mips/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ extern void kunmap(struct page *page);
extern void *kmap_atomic(struct page *page);
extern void __kunmap_atomic(void *kvaddr);
extern void *kmap_atomic_pfn(unsigned long pfn);
extern struct page *kmap_atomic_to_page(void *ptr);

#define flush_cache_kmaps() flush_cache_all()

Expand Down
15 changes: 9 additions & 6 deletions arch/mips/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,17 @@
#define __NR_execveat (__NR_Linux + 356)
#define __NR_userfaultfd (__NR_Linux + 357)
#define __NR_membarrier (__NR_Linux + 358)
#define __NR_mlock2 (__NR_Linux + 359)

/*
* Offset of the last Linux o32 flavoured syscall
*/
#define __NR_Linux_syscalls 358
#define __NR_Linux_syscalls 359

#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */

#define __NR_O32_Linux 4000
#define __NR_O32_Linux_syscalls 358
#define __NR_O32_Linux_syscalls 359

#if _MIPS_SIM == _MIPS_SIM_ABI64

Expand Down Expand Up @@ -715,16 +716,17 @@
#define __NR_execveat (__NR_Linux + 316)
#define __NR_userfaultfd (__NR_Linux + 317)
#define __NR_membarrier (__NR_Linux + 318)
#define __NR_mlock2 (__NR_Linux + 319)

/*
* Offset of the last Linux 64-bit flavoured syscall
*/
#define __NR_Linux_syscalls 318
#define __NR_Linux_syscalls 319

#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */

#define __NR_64_Linux 5000
#define __NR_64_Linux_syscalls 318
#define __NR_64_Linux_syscalls 319

#if _MIPS_SIM == _MIPS_SIM_NABI32

Expand Down Expand Up @@ -1055,15 +1057,16 @@
#define __NR_execveat (__NR_Linux + 320)
#define __NR_userfaultfd (__NR_Linux + 321)
#define __NR_membarrier (__NR_Linux + 322)
#define __NR_mlock2 (__NR_Linux + 323)

/*
* Offset of the last N32 flavoured syscall
*/
#define __NR_Linux_syscalls 322
#define __NR_Linux_syscalls 323

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux 6000
#define __NR_N32_Linux_syscalls 322
#define __NR_N32_Linux_syscalls 323

#endif /* _UAPI_ASM_UNISTD_H */
1 change: 1 addition & 0 deletions arch/mips/kernel/scall32-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -594,3 +594,4 @@ EXPORT(sys_call_table)
PTR sys_execveat
PTR sys_userfaultfd
PTR sys_membarrier
PTR sys_mlock2
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-64.S
Original file line number Diff line number Diff line change
Expand Up @@ -432,4 +432,5 @@ EXPORT(sys_call_table)
PTR sys_execveat
PTR sys_userfaultfd
PTR sys_membarrier
PTR sys_mlock2
.size sys_call_table,.-sys_call_table
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -422,4 +422,5 @@ EXPORT(sysn32_call_table)
PTR compat_sys_execveat /* 6320 */
PTR sys_userfaultfd
PTR sys_membarrier
PTR sys_mlock2
.size sysn32_call_table,.-sysn32_call_table
1 change: 1 addition & 0 deletions arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -577,4 +577,5 @@ EXPORT(sys32_call_table)
PTR compat_sys_execveat
PTR sys_userfaultfd
PTR sys_membarrier
PTR sys_mlock2
.size sys32_call_table,.-sys32_call_table
13 changes: 0 additions & 13 deletions arch/mips/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,6 @@ void *kmap_atomic_pfn(unsigned long pfn)
return (void*) vaddr;
}

struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long)ptr;
pte_t *pte;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}

void __init kmap_init(void)
{
unsigned long kmap_vstart;
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ static inline void __kunmap_atomic(void *addr)

#define kmap_atomic_prot(page, prot) kmap_atomic(page)
#define kmap_atomic_pfn(pfn) kmap_atomic(pfn_to_page(pfn))
#define kmap_atomic_to_page(ptr) virt_to_page(ptr)

#endif /* _PARISC_CACHEFLUSH_H */

13 changes: 0 additions & 13 deletions arch/powerpc/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,6 @@ static inline void *kmap_atomic(struct page *page)
return kmap_atomic_prot(page, kmap_prot);
}

static inline struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long) ptr;
pte_t *pte;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}


#define flush_cache_kmaps() flush_cache_all()

Expand Down
3 changes: 2 additions & 1 deletion arch/sparc/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@
#define __NR_memfd_create 348
#define __NR_bpf 349
#define __NR_execveat 350
#define __NR_membarrier 351

#define NR_syscalls 351
#define NR_syscalls 352

/* Bitmask values returned from kern_features system call. */
#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/systbls_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ sys_call_table:
/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
/*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
/*345*/ .long sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
/*350*/ .long sys_execveat
/*350*/ .long sys_execveat, sys_membarrier
4 changes: 2 additions & 2 deletions arch/sparc/kernel/systbls_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ sys_call_table32:
.word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
.word sys32_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
/*350*/ .word sys32_execveat
/*350*/ .word sys32_execveat, sys_membarrier

#endif /* CONFIG_COMPAT */

Expand Down Expand Up @@ -168,4 +168,4 @@ sys_call_table:
.word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
.word sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
/*350*/ .word sys64_execveat
/*350*/ .word sys64_execveat, sys_membarrier
1 change: 0 additions & 1 deletion arch/tile/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ void *kmap_atomic(struct page *page);
void __kunmap_atomic(void *kvaddr);
void *kmap_atomic_pfn(unsigned long pfn);
void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot);
struct page *kmap_atomic_to_page(void *ptr);
void *kmap_atomic_prot(struct page *page, pgprot_t prot);
void kmap_atomic_fix_kpte(struct page *page, int finished);

Expand Down
12 changes: 0 additions & 12 deletions arch/tile/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,3 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
{
return kmap_atomic_prot(pfn_to_page(pfn), prot);
}

struct page *kmap_atomic_to_page(void *ptr)
{
pte_t *pte;
unsigned long vaddr = (unsigned long)ptr;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

pte = kmap_get_pte(vaddr);
return pte_page(*pte);
}
1 change: 0 additions & 1 deletion arch/x86/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ void *kmap_atomic(struct page *page);
void __kunmap_atomic(void *kvaddr);
void *kmap_atomic_pfn(unsigned long pfn);
void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot);
struct page *kmap_atomic_to_page(void *ptr);

#define flush_cache_kmaps() do { } while (0)

Expand Down
14 changes: 0 additions & 14 deletions arch/x86/mm/highmem_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,6 @@ void __kunmap_atomic(void *kvaddr)
}
EXPORT_SYMBOL(__kunmap_atomic);

struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long)ptr;
pte_t *pte;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}
EXPORT_SYMBOL(kmap_atomic_to_page);

void __init set_highmem_pages_init(void)
{
struct zone *zone;
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void vblank_disable_and_save(struct drm_device *dev, unsigned int pipe)
* available. In that case we can't account for this and just
* hope for the best.
*/
if (vblrc && (abs64(diff_ns) > 1000000))
if (vblrc && (abs(diff_ns) > 1000000))
store_vblank(dev, pipe, 1, &tvblank);

spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
Expand Down Expand Up @@ -1772,7 +1772,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
* e.g., due to spurious vblank interrupts. We need to
* ignore those for accounting.
*/
if (abs64(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS)
if (abs(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS)
store_vblank(dev, pipe, 1, &tvblank);
else
DRM_DEBUG("crtc %u: Redundant vblirq ignored. diff_ns = %d\n",
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/tegra/sor.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,11 @@ static int tegra_sor_compute_params(struct tegra_sor *sor,
error = div_s64(active_sym - approx, tu_size);
error *= params->num_clocks;

if (error <= 0 && abs64(error) < params->error) {
if (error <= 0 && abs(error) < params->error) {
params->active_count = div_u64(active_count, f);
params->active_polarity = active_polarity;
params->active_frac = active_frac;
params->error = abs64(error);
params->error = abs(error);
params->tu_size = tu_size;

if (error == 0)
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/joystick/walkera0701.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void walkera0701_irq_handler(void *handler_data)
if (w->counter == 24) { /* full frame */
walkera0701_parse_frame(w);
w->counter = NO_SYNC;
if (abs64(pulse_time - SYNC_PULSE) < RESERVE) /* new frame sync */
if (abs(pulse_time - SYNC_PULSE) < RESERVE) /* new frame sync */
w->counter = 0;
} else {
if ((pulse_time > (ANALOG_MIN_PULSE - RESERVE)
Expand All @@ -161,7 +161,7 @@ static void walkera0701_irq_handler(void *handler_data)
} else
w->counter = NO_SYNC;
}
} else if (abs64(pulse_time - SYNC_PULSE - BIN0_PULSE) <
} else if (abs(pulse_time - SYNC_PULSE - BIN0_PULSE) <
RESERVE + BIN1_PULSE - BIN0_PULSE) /* frame sync .. */
w->counter = 0;

Expand Down
Loading

0 comments on commit bd4f203

Please sign in to comment.