Skip to content
  1. Nov 18, 2017
    • Stephen Bates's avatar
      lib/genalloc.c: make the avail variable an atomic_long_t · 36a3d1dd
      Stephen Bates authored
      
      
      If the amount of resources allocated to a gen_pool exceeds 2^32 then the
      avail atomic overflows and this causes problems when clients try and
      borrow resources from the pool.  This is only expected to be an issue on
      64 bit systems.
      
      Add the <linux/atomic.h> header to pull in atomic_long* operations.  So
      that 32 bit systems continue to use atomic32_t but 64 bit systems can
      use atomic64_t.
      
      Link: http://lkml.kernel.org/r/1509033843-25667-1-git-send-email-sbates@raithlin.com
      Signed-off-by: default avatarStephen Bates <sbates@raithlin.com>
      Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
      Reviewed-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Reviewed-by: default avatarDaniel Mentz <danielmentz@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      36a3d1dd
    • Peter Zijlstra's avatar
      lib/int_sqrt: adjust comments · e813a614
      Peter Zijlstra authored
      
      
      Our current int_sqrt() is not rough nor any approximation; it calculates
      the exact value of: floor(sqrt()).  Document this.
      
      Link: http://lkml.kernel.org/r/20171020164645.001652117@infradead.org
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Anshul Garg <aksgarg1989@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: David Miller <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Joe Perches <joe@perches.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Michael Davidson <md@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e813a614
    • Peter Zijlstra's avatar
      lib/int_sqrt: optimize initial value compute · f8ae107e
      Peter Zijlstra authored
      
      
      The initial value (@m) compute is:
      
      	m = 1UL << (BITS_PER_LONG - 2);
      	while (m > x)
      		m >>= 2;
      
      Which is a linear search for the highest even bit smaller or equal to @x
      We can implement this using a binary search using __fls() (or better when
      its hardware implemented).
      
      	m = 1UL << (__fls(x) & ~1UL);
      
      Especially for small values of @x; which are the more common arguments
      when doing a CDF on idle times; the linear search is near to worst case,
      while the binary search of __fls() is a constant 6 (or 5 on 32bit)
      branches.
      
            cycles:                 branches:              branch-misses:
      
      PRE:
      
      hot:   43.633557 +- 0.034373  45.333132 +- 0.002277  0.023529 +- 0.000681
      cold: 207.438411 +- 0.125840  45.333132 +- 0.002277  6.976486 +- 0.004219
      
      SOFTWARE FLS:
      
      hot:   29.576176 +- 0.028850  26.666730 +- 0.004511  0.019463 +- 0.000663
      cold: 165.947136 +- 0.188406  26.666746 +- 0.004511  6.133897 +- 0.004386
      
      HARDWARE FLS:
      
      hot:   24.720922 +- 0.025161  20.666784 +- 0.004509  0.020836 +- 0.000677
      cold: 132.777197 +- 0.127471  20.666776 +- 0.004509  5.080285 +- 0.003874
      
      Averages computed over all values <128k using a LFSR to generate order.
      Cold numbers have a LFSR based branch trace buffer 'confuser' ran between
      each int_sqrt() invocation.
      
      Link: http://lkml.kernel.org/r/20171020164644.936577234@infradead.org
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Suggested-by: default avatarJoe Perches <joe@perches.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Anshul Garg <aksgarg1989@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: David Miller <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Michael Davidson <md@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f8ae107e
    • Peter Zijlstra's avatar
      lib/int_sqrt: optimize small argument · 3f329570
      Peter Zijlstra authored
      The current int_sqrt() computation is sub-optimal for the case of small
      @x.  Which is the interesting case when we're going to do cumulative
      distribution functions on idle times, which we assume to be a random
      variable, where the target residency of the deepest idle state gives an
      upper bound on the variable (5e6ns on recent Intel chips).
      
      In the case of small @x, the compute loop:
      
      	while (m != 0) {
      		b = y + m;
      		y >>= 1;
      
      		if (x >= b) {
      			x -= b;
      			y += m;
      		}
      		m >>= 2;
      	}
      
      can be reduced to:
      
      	while (m > x)
      		m >>= 2;
      
      Because y==0, b==m and until x>=m y will remain 0.
      
      And while this is computationally equivalent, it runs much faster
      because there's less code, in particular less branches.
      
            cycles:                 branches:              branch-misses:
      
      OLD:
      
      hot:   45.109444 +- 0.044117  44.333392 +- 0.002254  0.018723 +- 0.000593
      cold: 187.737379 +- 0.156678  44.333407 +- 0.002254  6.272844 +- 0.004305
      
      PRE:
      
      hot:   67.937492 +- 0.064124  66.999535 +- 0.000488  0.066720 +- 0.001113
      cold: 232.004379 +- 0.332811  66.999527 +- 0.000488  6.914634 +- 0.006568
      
      POST:
      
      hot:   43.633557 +- 0.034373  45.333132 +- 0.002277  0.023529 +- 0.000681
      cold: 207.438411 +- 0.125840  45.333132 +- 0.002277  6.976486 +- 0.004219
      
      Averages computed over all values <128k using a LFSR to generate order.
      Cold numbers have a LFSR based branch trace buffer 'confuser' ran between
      each int_sqrt() invocation.
      
      Link: http://lkml.kernel.org/r/20171020164644.876503355@infradead.org
      Fixes: 30493cc9
      
       ("lib/int_sqrt.c: optimize square root algorithm")
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Suggested-by: default avatarAnshul Garg <aksgarg1989@gmail.com>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Michael Davidson <md@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f329570
    • Markus Elfring's avatar
      lib/test: delete five error messages for failed memory allocations · dc2bf000
      Markus Elfring authored
      
      
      Omit extra messages for a memory allocation failure in these functions.
      
      This issue was detected by using the Coccinelle software.
      
      Link: http://lkml.kernel.org/r/410a4c5a-4ee0-6fcc-969c-103d8e496b78@users.sourceforge.net
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dc2bf000
    • Geert Uytterhoeven's avatar
      lib: add module support to string tests · d6b28e09
      Geert Uytterhoeven authored
      Extract the string test code into its own source file, to allow
      compiling it either to a loadable module, or built into the kernel.
      
      Fixes: 03270c13
      
       ("lib/string.c: add testcases for memset16/32/64")
      Link: http://lkml.kernel.org/r/1505397744-3387-1-git-send-email-geert@linux-m68k.org
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d6b28e09
    • Masahiro Yamada's avatar
      include/linux/radix-tree.h: remove unneeded #include <linux/bug.h> · f5bba9d1
      Masahiro Yamada authored
      This include was added by commit 187f1882 ("BUG: headers with
      BUG/BUG_ON etc. need linux/bug.h") because BUG_ON() was used in this
      header at that time.
      
      Some time later, commit 6d75f366
      
       ("lib: radix-tree: check accounting
      of existing slot replacement users") removed the use of BUG_ON() from
      this header.
      
      Since then, there is no reason to include <linux/bug.h>.
      
      Link: http://lkml.kernel.org/r/1505660151-4383-1-git-send-email-yamada.masahiro@socionext.com
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Chris Mi <chrism@mellanox.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f5bba9d1
    • Masahiro Yamada's avatar
      include/linux/bitfield.h: include <linux/build_bug.h> instead of <linux/bug.h> · 8001541c
      Masahiro Yamada authored
      Since commit bc6245e5
      
       ("bug: split BUILD_BUG stuff out into
      <linux/build_bug.h>"), #include <linux/build_bug.h> is better to pull
      minimal headers needed for BUILG_BUG() family.
      
      Link: http://lkml.kernel.org/r/1505700775-19826-1-git-send-email-yamada.masahiro@socionext.com
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Cc: Dinan Gunawardena <dinan.gunawardena@netronome.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: Ian Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8001541c
    • Joe Perches's avatar
      get_maintainer: add more --self-test options · 083bf9c5
      Joe Perches authored
      
      
      Add tests for duplicate section headers, missing section content, link and
      scm reachability.
      
      Miscellanea:
      
      o Add --self-test=<foo> options
        (a comma separated list of any of sections, patterns, links or scm)
        where the default without options is all tests
      o Rename check_maintainers_patterns to self_test
      o Rename self_test_pattern_info to self_test_info
      
      [tom.saeger@oracle.com: improvements]
      Link: http://lkml.kernel.org/r/13e3986c374902fcf08ae947e36c5c608bbe3b79.1510075301.git.joe@perches.com
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Reviewed-by: default avatarTom Saeger <tom.saeger@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      083bf9c5
    • Tom Saeger's avatar
      get_maintainer: add --self-test for internal consistency tests · e1f75904
      Tom Saeger authored
      
      
      Add "--self-test" option to get_maintainer.pl to show potential
      issues in MAINTAINERS file(s) content.
      
      Pattern check warnings are shown for "F" and "X" patterns found in
      MAINTAINERS file(s) which do not match any files known by git.
      
      Link: http://lkml.kernel.org/r/64994f911b3510d0f4c8ac2e113501dfcec1f3c9.1509559540.git.tom.saeger@oracle.com
      Signed-off-by: default avatarTom Saeger <tom.saeger@oracle.com>
      Acked-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e1f75904
    • Randy Dunlap's avatar
      dynamic_debug documentation: minor fixes · 8c188759
      Randy Dunlap authored
      
      
      Fix minor typo.
      
      Fix missing words in explaining parsing of last line number.
      
      Link: http://lkml.kernel.org/r/ebb7ff42-4945-103f-d5b4-f07a6f3343a7@infradead.org
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Jason Baron <jbaron@akamai.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8c188759
    • Randy Dunlap's avatar
      dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0 · 1f3c790b
      Randy Dunlap authored
      
      
      line-range is supposed to treat "1-" as "1-endoffile", so
      handle the special case by setting last_lineno to UINT_MAX.
      
      Fixes this error:
      
        dynamic_debug:ddebug_parse_query: last-line:0 < 1st-line:1
        dynamic_debug:ddebug_exec_query: query parse failed
      
      Link: http://lkml.kernel.org/r/10a6a101-e2be-209f-1f41-54637824788e@infradead.org
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarJason Baron <jbaron@akamai.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1f3c790b
    • Christophe JAILLET's avatar
      kernel/umh.c: optimize 'proc_cap_handler()' · 8c703d66
      Christophe JAILLET authored
      
      
      If 'write' is 0, we can avoid a call to spin_lock/spin_unlock.
      
      Link: http://lkml.kernel.org/r/20171020193331.7233-1-christophe.jaillet@wanadoo.fr
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Acked-by: default avatarLuis R. Rodriguez <mcgrof@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8c703d66
    • Sandipan Das's avatar
      include/linux/compiler-clang.h: handle randomizable anonymous structs · 4ca59b14
      Sandipan Das authored
      
      
      The GCC randomize layout plugin can randomize the member offsets of
      sensitive kernel data structures.  To use this feature, certain
      annotations and members are added to the structures which affect the
      member offsets even if this plugin is not used.
      
      All of these structures are completely randomized, except for task_struct
      which leaves out some of its members.  All the other members are wrapped
      within an anonymous struct with the __randomize_layout attribute.  This is
      done using the randomized_struct_fields_start and
      randomized_struct_fields_end defines.
      
      When the plugin is disabled, the behaviour of this attribute can vary
      based on the GCC version.  For GCC 5.1+, this attribute maps to
      __designated_init otherwise it is just an empty define but the anonymous
      structure is still present.  For other compilers, both
      randomized_struct_fields_start and randomized_struct_fields_end default
      to empty defines meaning the anonymous structure is not introduced at
      all.
      
      So, if a module compiled with Clang, such as a BPF program, needs to
      access task_struct fields such as pid and comm, the offsets of these
      members as recognized by Clang are different from those recognized by
      modules compiled with GCC.  If GCC 4.6+ is used to build the kernel,
      this can be solved by introducing appropriate defines for Clang so that
      the anonymous structure is seen when determining the offsets for the
      members.
      
      Link: http://lkml.kernel.org/r/20171109064645.25581-1-sandipan@linux.vnet.ibm.com
      Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Alexei Starovoitov <ast@fb.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4ca59b14
    • Kees Cook's avatar
      bug: fix "cut here" location for __WARN_TAINT architectures · a7bed27a
      Kees Cook authored
      Prior to v4.11, x86 used warn_slowpath_fmt() for handling WARN()s.
      After WARN() was moved to using UD0 on x86, the warning text started
      appearing _before_ the "cut here" line.  This appears to have been a
      long-standing bug on architectures that used __WARN_TAINT, but it didn't
      get fixed.
      
      v4.11 and earlier on x86:
      
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 2956 at drivers/misc/lkdtm_bugs.c:65 lkdtm_WARNING+0x21/0x30
        This is a warning message
        Modules linked in:
      
      v4.12 and later on x86:
      
        This is a warning message
        ------------[ cut here ]------------
        WARNING: CPU: 1 PID: 2982 at drivers/misc/lkdtm_bugs.c:68 lkdtm_WARNING+0x15/0x20
        Modules linked in:
      
      With this fix:
      
        ------------[ cut here ]------------
        This is a warning message
        WARNING: CPU: 3 PID: 3009 at drivers/misc/lkdtm_bugs.c:67 lkdtm_WARNING+0x15/0x20
      
      Since the __FILE__ reporting happens as part of the UD0 handler, it
      isn't trivial to move the message to after the WARNING line, but at
      least we can fix the position of the "cut here" line so all the various
      logging tools will start including the actual runtime warning message
      again, when they follow the instruction and "cut here".
      
      Link: http://lkml.kernel.org/r/1510100869-73751-4-git-send-email-keescook@chromium.org
      Fixes: 9a93848f
      
       ("x86/debug: Implement __WARN() using UD0")
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a7bed27a
    • Kees Cook's avatar
      bug: define the "cut here" string in a single place · 2a8358d8
      Kees Cook authored
      
      
      The "cut here" string is used in a few paths.  Define it in a single
      place.
      
      Link: http://lkml.kernel.org/r/1510100869-73751-3-git-send-email-keescook@chromium.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2a8358d8
    • Kees Cook's avatar
      lkdtm: include WARN format string · d32f11ba
      Kees Cook authored
      
      
      In order to test the ordering of WARN format strings, actually include
      one in LKDTM.
      
      Link: http://lkml.kernel.org/r/1510100869-73751-2-git-send-email-keescook@chromium.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d32f11ba
    • Arnd Bergmann's avatar
      iopoll: avoid -Wint-in-bool-context warning · d15809f3
      Arnd Bergmann authored
      
      
      When we pass the result of a multiplication as the timeout or the delay,
      we can get a warning from gcc-7:
      
        drivers/mmc/host/bcm2835.c:596:149: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
        drivers/mfd/arizona-core.c:247:195: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
        drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:49:27: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      
      The warning is a bit questionable inside of a macro, but this is
      intentional on the side of the gcc developers.  It is also an indication
      of another problem: we evaluate the timeout and sleep arguments multiple
      times, which can have undesired side-effects when those are complex
      expressions.
      
      This changes the two iopoll variants to use local variables for storing
      copies of the timeouts.  This adds some more type safety, and avoids
      both the double-evaluation and the gcc warning.
      
      Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81484
      Link: http://lkml.kernel.org/r/20170726133756.2161367-1-arnd@arndb.de
      Link: http://lkml.kernel.org/r/20171102114048.1526955-1-arnd@arndb.de
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d15809f3
    • Joe Perches's avatar
      parse-maintainers: add ability to specify filenames · 1e6270d0
      Joe Perches authored
      
      
      parse-maintainers.pl is convenient, but currently hard-codes the
      filenames that are used.
      
      Allow user-specified filenames to simplify the use of the script.
      
      Link: http://lkml.kernel.org/r/48703c068b3235223ffa3b2eb268fa0a125b25e0.1502251549.git.joe@perches.com
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1e6270d0
    • Andi Kleen's avatar
      kernel debug: support resetting WARN_ONCE for all architectures · aaf5dcfb
      Andi Kleen authored
      
      
      Some architectures store the WARN_ONCE state in the flags field of the
      bug_entry.  Clear that one too when resetting once state through
      /sys/kernel/debug/clear_warn_once
      
      Pointed out by Michael Ellerman
      
      Improves the earlier patch that add clear_warn_once.
      
      [ak@linux.intel.com: add a missing ifdef CONFIG_MODULES]
        Link: http://lkml.kernel.org/r/20171020170633.9593-1-andi@firstfloor.org
      [akpm@linux-foundation.org: fix unused var warning]
      [akpm@linux-foundation.org: Use 0200 for clear_warn_once file, per mpe]
      [akpm@linux-foundation.org: clear BUGFLAG_DONE in clear_once_table(), per mpe]
      Link: http://lkml.kernel.org/r/20171019204642.7404-1-andi@firstfloor.org
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aaf5dcfb
    • Andi Kleen's avatar
      kernel debug: support resetting WARN*_ONCE · b1fca27d
      Andi Kleen authored
      
      
      I like _ONCE warnings because it's guaranteed that they don't flood the
      log.
      
      During testing I find it useful to reset the state of the once warnings,
      so that I can rerun tests and see if they trigger again, or can
      guarantee that a test run always hits the same warnings.
      
      This patch adds a debugfs interface to reset all the _ONCE warnings so
      that they appear again:
      
        echo 1 > /sys/kernel/debug/clear_warn_once
      
      This is implemented by putting all the warning booleans into a special
      section, and clearing it.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Link: http://lkml.kernel.org/r/20171017221455.6740-1-andi@firstfloor.org
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b1fca27d
    • Kees Cook's avatar
      sh/boot: add static stack-protector to pre-kernel · fb6cc4ac
      Kees Cook authored
      
      
      The sh decompressor code triggers stack-protector code generation when
      using CONFIG_CC_STACKPROTECTOR_STRONG.  As done for arm and mips, add a
      simple static stack-protector canary.  As this wasn't protected before,
      the risk of using a weak canary is minimized.  Once the kernel is
      actually up, a better canary is chosen.
      
      Link: http://lkml.kernel.org/r/1506972007-80614-2-git-send-email-keescook@chromium.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fb6cc4ac
    • Joe Perches's avatar
      spelling.txt: add "unnecessary" typo variants · 868038be
      Joe Perches authored
      
      
      Add unnecessary typos by copying the necessary typos.
      
      Link: http://lkml.kernel.org/r/1505074722.22023.6.camel@perches.com
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      868038be
    • Alexey Dobriyan's avatar
      proc: use do-while in name_to_int() · 0746a0bc
      Alexey Dobriyan authored
      
      
      Gcc doesn't know that "len" is guaranteed to be >=1 by dcache and
      generates standard while-loop prologue duplicating loop condition.
      
      	add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-27 (-27)
      	function                                     old     new   delta
      	name_to_int                                  104      77     -27
      
      Link: http://lkml.kernel.org/r/20170912195213.GB17730@avx2
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0746a0bc
    • Alexey Dobriyan's avatar
      proc: : uninline name_to_int() · 3ee2a199
      Alexey Dobriyan authored
      
      
      Save ~360 bytes.
      
      	add/remove: 1/0 grow/shrink: 0/4 up/down: 104/-463 (-359)
      	function                                     old     new   delta
      	name_to_int                                    -     104    +104
      	proc_pid_lookup                              217     126     -91
      	proc_lookupfd_common                         212     121     -91
      	proc_task_lookup                             289     194     -95
      	__proc_create                                588     402    -186
      
      Link: http://lkml.kernel.org/r/20170912194850.GA17730@avx2
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ee2a199
    • Roman Gushchin's avatar
      proc, coredump: add CoreDumping flag to /proc/pid/status · c6434012
      Roman Gushchin authored
      
      
      Right now there is no convenient way to check if a process is being
      coredumped at the moment.
      
      It might be necessary to recognize such state to prevent killing the
      process and getting a broken coredump.  Writing a large core might take
      significant time, and the process is unresponsive during it, so it might
      be killed by timeout, if another process is monitoring and
      killing/restarting hanging tasks.
      
      We're getting a significant number of corrupted coredump files on
      machines in our fleet, just because processes are being killed by
      timeout in the middle of the core writing process.
      
      We do have a process health check, and some agent is responsible for
      restarting processes which are not responding for health check requests.
      Writing a large coredump to the disk can easily exceed the reasonable
      timeout (especially on an overloaded machine).
      
      This flag will allow the agent to distinguish processes which are being
      coredumped, extend the timeout for them, and let them produce a full
      coredump file.
      
      To provide an ability to detect if a process is in the state of being
      coredumped, we can expose a boolean CoreDumping flag in
      /proc/pid/status.
      
      Example:
      $ cat core.sh
        #!/bin/sh
      
        echo "|/usr/bin/sleep 10" > /proc/sys/kernel/core_pattern
        sleep 1000 &
        PID=$!
      
        cat /proc/$PID/status | grep CoreDumping
        kill -ABRT $PID
        sleep 1
        cat /proc/$PID/status | grep CoreDumping
      
      $ ./core.sh
        CoreDumping:	0
        CoreDumping:	1
      
      [guro@fb.com: document CoreDumping flag in /proc/<pid>/status]
        Link: http://lkml.kernel.org/r/20170928135357.GA8470@castle.DHCP.thefacebook.com
      Link: http://lkml.kernel.org/r/20170920230634.31572-1-guro@fb.com
      Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c6434012
    • Vlastimil Babka's avatar
      mm, compaction: remove unneeded pageblock_skip_persistent() checks · d3c85bad
      Vlastimil Babka authored
      
      
      Commit f3c931633a59 ("mm, compaction: persistently skip hugetlbfs
      pageblocks") has introduced pageblock_skip_persistent() checks into
      migration and free scanners, to make sure pageblocks that should be
      persistently skipped are marked as such, regardless of the
      ignore_skip_hint flag.
      
      Since the previous patch introduced a new no_set_skip_hint flag, the
      ignore flag no longer prevents marking pageblocks as skipped.  Therefore
      we can remove the special cases.  The relevant pageblocks will be marked
      as skipped by the common logic which marks each pageblock where no page
      could be isolated.  This makes the code simpler.
      
      Link: http://lkml.kernel.org/r/20171102121706.21504-3-vbabka@suse.cz
      Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d3c85bad
    • Vlastimil Babka's avatar
      mm, compaction: split off flag for not updating skip hints · 2583d671
      Vlastimil Babka authored
      Pageblock skip hints were added as a heuristic for compaction, which
      shares core code with CMA.  Since CMA reliability would suffer from the
      heuristics, compact_control flag ignore_skip_hint was added for the CMA
      use case.  Since 6815bf3f
      
       ("mm/compaction: respect ignore_skip_hint
      in update_pageblock_skip") the flag also means that CMA won't *update*
      the skip hints in addition to ignoring them.
      
      Today, direct compaction can also ignore the skip hints in the last
      resort attempt, but there's no reason not to set them when isolation
      fails in such case.  Thus, this patch splits off a new no_set_skip_hint
      flag to avoid the updating, which only CMA sets.  This should improve
      the heuristics a bit, and allow us to simplify the persistent skip bit
      handling as the next step.
      
      Link: http://lkml.kernel.org/r/20171102121706.21504-2-vbabka@suse.cz
      Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2583d671
    • Vlastimil Babka's avatar
      mm, compaction: extend pageblock_skip_persistent() to all compound pages · b527cfe5
      Vlastimil Babka authored
      
      
      pageblock_skip_persistent() checks for HugeTLB pages of pageblock order.
      When clearing pageblock skip bits for compaction, the bits are not
      cleared for such pageblocks, because they cannot contain base pages
      suitable for migration, nor free pages to use as migration targets.
      
      This optimization can be simply extended to all compound pages of order
      equal or larger than pageblock order, because migrating such pages (if
      they support it) cannot help sub-pageblock fragmentation.  This includes
      THP's and also gigantic HugeTLB pages, which the current implementation
      doesn't persistently skip due to a strict pageblock_order equality check
      and not recognizing tail pages.
      
      While THP pages are generally less "persistent" than HugeTLB, we can
      still expect that if a THP exists at the point of
      __reset_isolation_suitable(), it will exist also during the subsequent
      compaction run.  The time difference here could be actually smaller than
      between a compaction run that sets a (non-persistent) skip bit on a THP,
      and the next compaction run that observes it.
      
      Link: http://lkml.kernel.org/r/20171102121706.21504-1-vbabka@suse.cz
      Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b527cfe5
    • David Rientjes's avatar
      mm, compaction: persistently skip hugetlbfs pageblocks · 21dc7e02
      David Rientjes authored
      
      
      It is pointless to migrate hugetlb memory as part of memory compaction
      if the hugetlb size is equal to the pageblock order.  No defragmentation
      is occurring in this condition.
      
      It is also pointless to for the freeing scanner to scan a pageblock
      where a hugetlb page is pinned.  Unconditionally skip these pageblocks,
      and do so peristently so that they are not rescanned until it is
      observed that these hugepages are no longer pinned.
      
      It would also be possible to do this by involving the hugetlb subsystem
      in marking pageblocks to no longer be skipped when they hugetlb pages
      are freed.  This is a simple solution that doesn't involve any
      additional subsystems in pageblock skip manipulation.
      
      [rientjes@google.com: fix build]
        Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708201734390.117182@chino.kir.corp.google.com
      Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708151639130.106658@chino.kir.corp.google.com
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Tested-by: default avatarMichal Hocko <mhocko@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      21dc7e02
    • David Rientjes's avatar
      mm, compaction: kcompactd should not ignore pageblock skip · a0647dc9
      David Rientjes authored
      
      
      Kcompactd is needlessly ignoring pageblock skip information.  It is
      doing MIGRATE_SYNC_LIGHT compaction, which is no more powerful than
      MIGRATE_SYNC compaction.
      
      If compaction recently failed to isolate memory from a set of
      pageblocks, there is nothing to indicate that kcompactd will be able to
      do so, or that it is beneficial from attempting to isolate memory.
      
      Use the pageblock skip hint to avoid rescanning pageblocks needlessly
      until that information is reset.
      
      Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708151638550.106658@chino.kir.corp.google.com
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a0647dc9
    • Corentin Labbe's avatar
      mm: shmem: remove unused info variable · 09af5cce
      Corentin Labbe authored
      
      
      Fix the following warning by removing the unused variable:
      
        mm/shmem.c:3205:27: warning: variable 'info' set but not used [-Wunused-but-set-variable]
      
      Link: http://lkml.kernel.org/r/1510774029-30652-1-git-send-email-clabbe@baylibre.com
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Hugh Dickins <hughd@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      09af5cce
    • Miles Chen's avatar
      lib/dma-debug.c: fix incorrect pfn calculation · 3aaabbf1
      Miles Chen authored
      
      
      dma-debug reports the following warning:
      
        WARNING: CPU: 3 PID: 298 at kernel-4.4/lib/dma-debug.c:604
        debug _dma_assert_idle+0x1a8/0x230()
        DMA-API: cpu touching an active dma mapped cacheline [cln=0x00000882300]
        CPU: 3 PID: 298 Comm: vold Tainted: G        W  O    4.4.22+ #1
        Hardware name: MT6739 (DT)
        Call trace:
          debug_dma_assert_idle+0x1a8/0x230
          wp_page_copy.isra.96+0x118/0x520
          do_wp_page+0x4fc/0x534
          handle_mm_fault+0xd4c/0x1310
          do_page_fault+0x1c8/0x394
          do_mem_abort+0x50/0xec
      
      I found that debug_dma_alloc_coherent() and debug_dma_free_coherent()
      assume that dma_alloc_coherent() always returns a linear address.
      
      However it's possible that dma_alloc_coherent() returns a non-linear
      address.  In this case, page_to_pfn(virt_to_page(virt)) will return an
      incorrect pfn.  If the pfn is valid and mapped as a COW page, we will
      hit the warning when doing wp_page_copy().
      
      Fix this by calculating pfn for linear and non-linear addresses.
      
      [miles.chen@mediatek.com: v4]
        Link: http://lkml.kernel.org/r/1510872972-23919-1-git-send-email-miles.chen@mediatek.com
      Link: http://lkml.kernel.org/r/1506484087-1177-1-git-send-email-miles.chen@mediatek.com
      Signed-off-by: default avatarMiles Chen <miles.chen@mediatek.com>
      Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3aaabbf1
    • Vitaly Wool's avatar
      mm/z3fold.c: use kref to prevent page free/compact race · 5d03a661
      Vitaly Wool authored
      
      
      There is a race in the current z3fold implementation between
      do_compact() called in a work queue context and the page release
      procedure when page's kref goes to 0.
      
      do_compact() may be waiting for page lock, which is released by
      release_z3fold_page_locked right before putting the page onto the
      "stale" list, and then the page may be freed as do_compact() modifies
      its contents.
      
      The mechanism currently implemented to handle that (checking the
      PAGE_STALE flag) is not reliable enough.  Instead, we'll use page's kref
      counter to guarantee that the page is not released if its compaction is
      scheduled.  It then becomes compaction function's responsibility to
      decrease the counter and quit immediately if the page was actually
      freed.
      
      Link: http://lkml.kernel.org/r/20171117092032.00ea56f42affbed19f4fcc6c@gmail.com
      Signed-off-by: default avatarVitaly Wool <vitaly.wool@sonymobile.com>
      Cc: <Oleksiy.Avramchenko@sony.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5d03a661
    • Arnd Bergmann's avatar
      mm: fix nodemask printing · 1334be36
      Arnd Bergmann authored
      The cleanup caused build warnings for constant mask pointers:
      
        mm/mempolicy.c: In function `mpol_to_str':
        ./include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as `true' for the address of `nodes' will never be NULL [-Waddress]
      
      An earlier workaround I suggested was incorporated in the version that
      got merged, but that only solved the problem for gcc-7 and higher, while
      gcc-4.6 through gcc-6.x still warn.
      
      This changes the printing again to use inline functions that make it
      clear to the compiler that the line that does the NULL check has no idea
      whether the argument is a constant NULL.
      
      Link: http://lkml.kernel.org/r/20171117101545.119689-1-arnd@arndb.de
      Fixes: 0205f755
      
       ("mm: simplify nodemask printing")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Zhangshaokun <zhangshaokun@hisilicon.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1334be36
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · a3841f94
      Linus Torvalds authored
      Pull libnvdimm and dax updates from Dan Williams:
       "Save for a few late fixes, all of these commits have shipped in -next
        releases since before the merge window opened, and 0day has given a
        build success notification.
      
        The ext4 touches came from Jan, and the xfs touches have Darrick's
        reviewed-by. An xfstest for the MAP_SYNC feature has been through
        a few round of reviews and is on track to be merged.
      
         - Introduce MAP_SYNC and MAP_SHARED_VALIDATE, a mechanism to enable
           'userspace flush' of persistent memory updates via filesystem-dax
           mappings. It arranges for any filesystem metadata updates that may
           be required to satisfy a write fault to also be flushed ("on disk")
           before the kernel returns to userspace from the fault handler.
           Effectively every write-fault that dirties metadata completes an
           fsync() before returning from the fault handler. The new
           MAP_SHARED_VALIDAT...
      a3841f94
    • Linus Torvalds's avatar
      Merge tag 'for-4.15/dm-changes-2' of... · adeba81a
      Linus Torvalds authored
      Merge tag 'for-4.15/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull  more device mapper updates from Mike Snitzer:
       "Given your expected travel I figured I'd get these fixes to you sooner
        rather than later.
      
         - a DM multipath stable@ fix to silence an annoying error message
           that isn't _really_ an error
      
         - a DM core @stable fix for discard support that was enabled for an
           entire DM device despite only having partial support for discards
           due to a mix of discard capabilities across the underlying devices.
      
         - a couple other DM core discard fixes.
      
         - a DM bufio @stable fix that resolves a 32-bit overflow"
      
      * tag 'for-4.15/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm bufio: fix integer overflow when limiting maximum cache size
        dm: clear all discard attributes in queue_limits when discards are disabled
        dm: do not set 'discards_supported' in targets that do not need it
        dm: discard support requires all targets in a table support discards
        dm mpath: remove annoying message of 'blk_get_request() returned -11'
      adeba81a
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 854ac870
      Linus Torvalds authored
      Pull rdma maintainership update from Doug Ledford:
       "Add Jason Gunthorpe as co-maintainer of the RDMA stack.
      
        The change is simply to add Jason Gunthorpe to the MAINTAINERS file
        for the RDMA stack (and update him in the .mailmap). Jason and I have
        talked offline, and Jason will be filing a ticket with the k.o
        helpdesk to get an account on k.o, and then we will likely move the
        rdma tree to an area where we can both access it and use a shared repo
        + individual topic branches + merged up for-next branch as the staging
        basis for each release.
      
        Timing here is nice because in the US we are headed into a holiday
        period whereas Jason will be around to keep the patch flow progressing
        (I guess Canadians do their equivalent to Thanksgiving in October, so
        he doesn't have an excuse to ignore email for the next week ;-))"
      
      [ .. and Konstantin already got Jason his kernel.org account between the
        pull request and this actual pull    - Linus ]
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        RDMA: Add Jason Gunthorpe as a co-maintainer
      854ac870
  2. Nov 17, 2017
    • Linus Torvalds's avatar
      Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · cf9b0772
      Linus Torvalds authored
      Pull ARM SoC driver updates from Arnd Bergmann:
       "This branch contains platform-related driver updates for ARM and
        ARM64, these are the areas that bring the changes:
      
        New drivers:
      
         - driver support for Renesas R-Car V3M (R8A77970)
      
         - power management support for Amlogic GX
      
         - a new driver for the Tegra BPMP thermal sensor
      
         - a new bus driver for Technologic Systems NBUS
      
        Changes for subsystems that prefer to merge through arm-soc:
      
         - the usual updates for reset controller drivers from Philipp Zabel,
           with five added drivers for SoCs in the arc, meson, socfpa,
           uniphier and mediatek families
      
         - updates to the ARM SCPI and PSCI frameworks, from Sudeep Holla,
           Heiner Kallweit and Lorenzo Pieralisi
      
        Changes specific to some ARM-based SoC
      
         - the Freescale/NXP DPAA QBMan drivers from PowerPC can now work on
           ARM as well
      
         - several changes for power management on Broadcom SoCs
      
         - various improvements on Qualcomm, Broadcom, Amlogic, Atmel,
           Mediatek
      
         - minor Cleanups for Samsung, TI OMAP SoCs"
      
      [ NOTE! This doesn't work without the previous ARM SoC device-tree pull,
        because the R8A77970 driver is missing a header file that came from
        that pull.
      
        The fact that this got merged afterwards only fixes it at this point,
        and bisection of that driver will fail if/when you walk into the
        history of that driver.           - Linus ]
      
      * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (96 commits)
        soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader
        bus: add driver for the Technologic Systems NBUS
        memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
        soc: qcom: remove unused label
        soc: amlogic: gx pm domain: add PM and OF dependencies
        drivers/firmware: psci_checker: Add missing destroy_timer_on_stack()
        dt-bindings: power: add amlogic meson power domain bindings
        soc: amlogic: add Meson GX VPU Domains driver
        soc: qcom: Remote filesystem memory driver
        dt-binding: soc: qcom: Add binding for rmtfs memory
        of: reserved_mem: Accessor for acquiring reserved_mem
        of/platform: Generalize /reserved-memory handling
        soc: mediatek: pwrap: fix fatal compiler error
        soc: mediatek: pwrap: fix compiler errors
        arm64: mediatek: cleanup message for platform selection
        soc: Allow test-building of MediaTek drivers
        soc: mediatek: place Kconfig for all SoC drivers under menu
        soc: mediatek: pwrap: add support for MT7622 SoC
        soc: mediatek: pwrap: add common way for setup CS timing extenstion
        soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap
        ..
      cf9b0772
    • Linus Torvalds's avatar
      Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 527d1470
      Linus Torvalds authored
      Pull ARM device-tree updates from Arnd Bergmann:
       "We add device tree files for a couple of additional SoCs in various
        areas:
      
        Allwinner R40/V40 for entertainment, Broadcom Hurricane 2 for
        networking, Amlogic A113D for audio, and Renesas R-Car V3M for
        automotive.
      
        As usual, lots of new boards get added based on those and other SoCs:
      
         - Actions S500 based CubieBoard6 single-board computer
      
         - Amlogic Meson-AXG A113D based development board
         - Amlogic S912 based Khadas VIM2 single-board computer
         - Amlogic S912 based Tronsmart Vega S96 set-top-box
      
         - Allwinner H5 based NanoPi NEO Plus2 single-board computer
         - Allwinner R40 based Banana Pi M2 Ultra and Berry single-board computers
         - Allwinner A83T based TBS A711 Tablet
      
         - Broadcom Hurricane 2 based Ubiquiti UniFi Switch 8
         - Broadcom bcm47xx based Luxul XAP-1440/XAP-810/ABR-4500/XBR-4500
           wireless access points and routers
      
         - NXP i.MX51 based Zodiac Inflight Innovations RDU1 board
         - NXP i.MX53 based GE Healthcare PPD biometric monitor
         - NXP i.MX6 based Pistachio single-board computer
         - NXP i.MX6 based Vining-2000 automotive diagnostic interface
         - NXP i.MX6 based Ka-Ro TX6 Computer-on-Module in additional variants
      
         - Qualcomm MSM8974 (Snapdragon 800) based Fairphone 2 phone
         - Qualcomm MSM8974pro (Snapdragon 801) based Sony Xperia Z2 Tablet
      
         - Realtek RTD1295 based set-top-boxes MeLE V9 and PROBOX2 AVA
      
         - Renesas R-Car V3M (R8A77970) SoC and "Eagle" reference board
         - Renesas H3ULCB and M3ULCB "Kingfisher" extension infotainment boards
         - Renasas r8a7745 based iWave G22D-SODIMM SoM
      
         - Rockchip rk3288 based Amarula Vyasa single-board computer
      
         - Samsung Exynos5800 based Odroid HC1 single-board computer
      
        For existing SoC support, there was a lot of ongoing work, as usual
        most of that concentrated on the Renesas, Rockchip, OMAP, i.MX,
        Amlogic and Allwinner platforms, but others were also active.
      
        Rob Herring and many others worked on reducing the number of issues
        that the latest version of 'dtc' now warns about. Unfortunately there
        is still a lot left to do.
      
        A rework of the ARM foundation model introduced several new files for
        common variations of the model"
      
      * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (599 commits)
        arm64: dts: uniphier: route on-board device IRQ to GPIO controller for PXs3
        dt-bindings: bus: Add documentation for the Technologic Systems NBUS
        arm64: dts: actions: s900-bubblegum-96: Add fake uart5 clock
        ARM: dts: owl-s500: Add CubieBoard6
        dt-bindings: arm: actions: Add CubieBoard6
        ARM: dts: owl-s500-guitar-bb-rev-b: Add fake uart3 clock
        ARM: dts: owl-s500: Set power domains for CPU2 and CPU3
        arm: dts: mt7623: remove unused compatible string for pio node
        arm: dts: mt7623: update usb related nodes
        arm: dts: mt7623: update crypto node
        ARM: dts: sun8i: a711: Enable USB OTG
        ARM: dts: sun8i: a711: Add regulator support
        ARM: dts: sun8i: a83t: bananapi-m3: Enable AP6212 WiFi on mmc1
        ARM: dts: sun8i: a83t: cubietruck-plus: Enable AP6330 WiFi on mmc1
        ARM: dts: sun8i: a83t: Move mmc1 pinctrl setting to dtsi file
        ARM: dts: sun8i: a83t: allwinner-h8homlet-v2: Add AXP818 regulator nodes
        ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes
        ARM: dts: sun8i: a83t: cubietruck-plus: Add AXP818 regulator nodes
        ARM: dts: sunxi: Add dtsi for AXP81x PMIC
        arm64: dts: allwinner: H5: Restore EMAC changes
        ...
      527d1470