Commit cc12071f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge more updates from Andrew Morton:
 "The rest of MM and the rest of everything else: hotfixes, ipc, misc,
  procfs, lib, cleanups, arm"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (67 commits)
  ARM: dma-api: fix max_pfn off-by-one error in __dma_supported()
  treewide: remove redundant IS_ERR() before error code check
  include/linux/cpumask.h: don't calculate length of the input string
  lib: new testcases for bitmap_parse{_user}
  lib: rework bitmap_parse()
  lib: make bitmap_parse_user a wrapper on bitmap_parse
  lib: add test for bitmap_parse()
  bitops: more BITS_TO_* macros
  lib/string: add strnchrnul()
  proc: convert everything to "struct proc_ops"
  proc: decouple proc from VFS with "struct proc_ops"
  asm-generic/tlb: provide MMU_GATHER_TABLE_FREE
  asm-generic/tlb: rename HAVE_MMU_GATHER_NO_GATHER
  asm-generic/tlb: rename HAVE_MMU_GATHER_PAGE_SIZE
  asm-generic/tlb: rename HAVE_RCU_TABLE_FREE
  asm-generic/tlb: add missing CONFIG symbol
  asm-gemeric/tlb: remove stray function declarations
  asm-generic/tlb: avoid potential double flush
  mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush
  powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case
  ...
parents 9717c1ce f3cc4e1d
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -1868,12 +1868,16 @@ There are some more advanced barrier functions:
 (*) smp_mb__before_atomic();
 (*) smp_mb__after_atomic();

     These are for use with atomic (such as add, subtract, increment and
     decrement) functions that don't return a value, especially when used for
     reference counting.  These functions do not imply memory barriers.

     These are also used for atomic bitop functions that do not return a
     value (such as set_bit and clear_bit).
     These are for use with atomic RMW functions that do not imply memory
     barriers, but where the code needs a memory barrier. Examples for atomic
     RMW functions that do not imply are memory barrier are e.g. add,
     subtract, (failed) conditional operations, _relaxed functions,
     but not atomic_read or atomic_set. A common example where a memory
     barrier may be required is when atomic ops are used for reference
     counting.

     These are also used for atomic RMW bitop functions that do not imply a
     memory barrier (such as set_bit and clear_bit).

     As an example, consider a piece of code that marks an object as being dead
     and then decrements the object's reference count:
+9 −4
Original line number Diff line number Diff line
@@ -393,18 +393,23 @@ config HAVE_ARCH_JUMP_LABEL
config HAVE_ARCH_JUMP_LABEL_RELATIVE
	bool

config HAVE_RCU_TABLE_FREE
config MMU_GATHER_TABLE_FREE
	bool

config HAVE_RCU_TABLE_NO_INVALIDATE
config MMU_GATHER_RCU_TABLE_FREE
	bool
	select MMU_GATHER_TABLE_FREE

config HAVE_MMU_GATHER_PAGE_SIZE
config MMU_GATHER_PAGE_SIZE
	bool

config HAVE_MMU_GATHER_NO_GATHER
config MMU_GATHER_NO_RANGE
	bool

config MMU_GATHER_NO_GATHER
	bool
	depends on MMU_GATHER_TABLE_FREE

config ARCH_HAVE_NMI_SAFE_CMPXCHG
	bool

+8 −9
Original line number Diff line number Diff line
@@ -119,13 +119,12 @@ static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
	return res;
}

static const struct file_operations srm_env_proc_fops = {
	.owner		= THIS_MODULE,
	.open		= srm_env_proc_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= single_release,
	.write		= srm_env_proc_write,
static const struct proc_ops srm_env_proc_ops = {
	.proc_open	= srm_env_proc_open,
	.proc_read	= seq_read,
	.proc_lseek	= seq_lseek,
	.proc_release	= single_release,
	.proc_write	= srm_env_proc_write,
};

static int __init
@@ -182,7 +181,7 @@ srm_env_init(void)
	entry = srm_named_entries;
	while (entry->name && entry->id) {
		if (!proc_create_data(entry->name, 0644, named_dir,
			     &srm_env_proc_fops, (void *)entry->id))
			     &srm_env_proc_ops, (void *)entry->id))
			goto cleanup;
		entry++;
	}
@@ -194,7 +193,7 @@ srm_env_init(void)
		char name[4];
		sprintf(name, "%ld", var_num);
		if (!proc_create_data(name, 0644, numbered_dir,
			     &srm_env_proc_fops, (void *)var_num))
			     &srm_env_proc_ops, (void *)var_num))
			goto cleanup;
	}

+1 −0
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
#define pmd_none(x)			(!pmd_val(x))
#define	pmd_bad(x)			((pmd_val(x) & ~PAGE_MASK))
#define pmd_present(x)			(pmd_val(x))
#define pmd_leaf(x)			(pmd_val(x) & _PAGE_HW_SZ)
#define pmd_clear(xp)			do { pmd_val(*(xp)) = 0; } while (0)

#define pte_page(pte)		pfn_to_page(pte_pfn(pte))
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ config ARM
	select HAVE_PERF_EVENTS
	select HAVE_PERF_REGS
	select HAVE_PERF_USER_STACK_DUMP
	select HAVE_RCU_TABLE_FREE if SMP && ARM_LPAE
	select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RSEQ
	select HAVE_STACKPROTECTOR
Loading