linux
5 years agomemblock: drop memblock_alloc_*_nopanic() variants
Mike Rapoport [Thu, 7 Feb 2019 00:58:40 +0000 (11:58 +1100)]
memblock: drop memblock_alloc_*_nopanic() variants

As all the memblock allocation functions return NULL in case of error
rather than panic(), the duplicates with _nopanic suffix can be removed.

Link: http://lkml.kernel.org/r/1548057848-15136-22-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Petr Mladek <pmladek@suse.com> [printk]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: memblock_alloc_try_nid: don't panic
Mike Rapoport [Thu, 7 Feb 2019 00:58:39 +0000 (11:58 +1100)]
memblock: memblock_alloc_try_nid: don't panic

As all the memblock_alloc*() users are now checking the return value and
panic() in case of error, the panic() call can be removed from the core
memblock allocator, namely memblock_alloc_try_nid().

Link: http://lkml.kernel.org/r/1548057848-15136-21-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomm/sparse: don't panic if the allocation in sparse_buffer_init fails
Mike Rapoport [Thu, 7 Feb 2019 00:58:39 +0000 (11:58 +1100)]
mm/sparse: don't panic if the allocation in sparse_buffer_init fails

Addition of panic if memblock_alloc_try_nid_raw() call in
sparse_buffer_init() fails was over enthusiastic as the system is
perfectly capable to deal with that allocation failure.  Remove the
panic().

Link: http://lkml.kernel.org/r/20190131074018.GD28876@rapoport-lnx
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: fix format strings for panics after memblock_alloc
Mike Rapoport [Thu, 7 Feb 2019 00:58:38 +0000 (11:58 +1100)]
memblock: fix format strings for panics after memblock_alloc

Using "%lu" to print size_t variables causes build warnings on i386 and
probably other architectures:

kernel/dma/swiotlb.c:210:35: warning: format '%lu' expects argument of type
'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'}
[-Wformat=]
      panic("%s: Failed to allocate %lu bytes align=0x%lx
",
                                    ~~^
                                    %u
            __func__, alloc_size, PAGE_SIZE);
                      ~~~~~~~~~~

Replace "%lu" with "%zu".

Link: http://lkml.kernel.org/r/1548950940-15145-1-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomm: sparse: Use '%pa' with 'phys_addr_t' type
Anders Roxell [Thu, 7 Feb 2019 00:58:38 +0000 (11:58 +1100)]
mm: sparse: Use '%pa' with 'phys_addr_t' type

Fix the following build warning:

mm/sparse.c: In function `sparse_buffer_init':
mm/sparse.c:438:69: warning: format `%lx' expects argument of type `long
  unsigned int', but argument 6 has type `phys_addr_t' {aka `long long
  unsigned int'} [-Wformat=]
   panic("%s: Failed to allocate %lu bytes align=0x%lx nid=%d from=%lx
",
                                                                   ~~^

Rework to use '%pa' and not '%lx'. Use a local variable of phys_addr_t
to print the reference with '%pa'.

Link: http://lkml.kernel.org/r/20190131161046.21886-1-anders.roxell@linaro.org
Fixes: 1c3c9328cde0 ("treewide: add checks for the return value of memblock_alloc*()")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agotreewide: add checks for the return value of memblock_alloc*()
Mike Rapoport [Thu, 7 Feb 2019 00:58:38 +0000 (11:58 +1100)]
treewide: add checks for the return value of memblock_alloc*()

Add check for the return value of memblock_alloc*() functions and call
panic() in case of error.  The panic message repeats the one used by
panicing memblock allocators with adjustment of parameters to include only
relevant ones.

The replacement was mostly automated with semantic patches like the one
below with manual massaging of format strings.

@@
expression ptr, size, align;
@@
ptr = memblock_alloc(size, align);
+ if (!ptr)
+  panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__,
size, align);

Link: http://lkml.kernel.org/r/1548057848-15136-20-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Guo Ren <ren_guo@c-sky.com> [c-sky]
Acked-by: Paul Burton <paul.burton@mips.com> [MIPS]
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> [s390]
Reviewed-by: Juergen Gross <jgross@suse.com> [Xen]
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoswiotlb: add checks for the return value of memblock_alloc*()
Mike Rapoport [Thu, 7 Feb 2019 00:58:37 +0000 (11:58 +1100)]
swiotlb: add checks for the return value of memblock_alloc*()

Add panic() calls if memblock_alloc() returns NULL.

The panic() format duplicates the one used by memblock itself and in order
to avoid explosion with long parameters list replace open coded allocation
size calculations with a local variable.

Link: http://lkml.kernel.org/r/1548057848-15136-19-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoinit/main: add checks for the return value of memblock_alloc*()
Mike Rapoport [Thu, 7 Feb 2019 00:58:37 +0000 (11:58 +1100)]
init/main: add checks for the return value of memblock_alloc*()

Add panic() calls if memblock_alloc() returns NULL.

The panic() format duplicates the one used by memblock itself and in order
to avoid explosion with long parameters list replace open coded allocation
size calculations with a local variable.

Link: http://lkml.kernel.org/r/1548057848-15136-18-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomm/percpu: add checks for the return value of memblock_alloc*()
Mike Rapoport [Thu, 7 Feb 2019 00:58:36 +0000 (11:58 +1100)]
mm/percpu: add checks for the return value of memblock_alloc*()

Add panic() calls if memblock_alloc() returns NULL.

The panic() format duplicates the one used by memblock itself and in order
to avoid explosion with long parameters list replace open coded allocation
size calculations with a local variable.

Link: http://lkml.kernel.org/r/1548057848-15136-17-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agosparc: add checks for the return value of memblock_alloc*()
Mike Rapoport [Thu, 7 Feb 2019 00:58:36 +0000 (11:58 +1100)]
sparc: add checks for the return value of memblock_alloc*()

Add panic() calls if memblock_alloc*() returns NULL.

Most of the changes are simply addition of

        if(!ptr)
                panic();

statements after the calls to memblock_alloc*() variants.

Exceptions are pcpu_populate_pte() and kernel_map_range() that were
slightly refactored to accommodate the change.

Link: http://lkml.kernel.org/r/1548057848-15136-16-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoia64: add checks for the return value of memblock_alloc*()
Mike Rapoport [Thu, 7 Feb 2019 00:58:36 +0000 (11:58 +1100)]
ia64: add checks for the return value of memblock_alloc*()

Add panic() calls if memblock_alloc*() returns NULL.

Most of the changes are simply addition of

if(!ptr)
panic();

statements after the calls to memblock_alloc*() variants.

Exceptions are create_mem_map_page_table() and ia64_log_init() that were
slightly refactored to accommodate the change.

Link: http://lkml.kernel.org/r/1548057848-15136-15-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoarch: don't memset(0) memory returned by memblock_alloc()
Mike Rapoport [Thu, 7 Feb 2019 00:58:35 +0000 (11:58 +1100)]
arch: don't memset(0) memory returned by memblock_alloc()

memblock_alloc() already clears the allocated memory, no point in doing it
twice.

Link: http://lkml.kernel.org/r/1548057848-15136-14-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoarch: use memblock_alloc() instead of memblock_alloc_from(size, align, 0)
Mike Rapoport [Thu, 7 Feb 2019 00:58:35 +0000 (11:58 +1100)]
arch: use memblock_alloc() instead of memblock_alloc_from(size, align, 0)

The last parameter of memblock_alloc_from() is the lower limit for the
memory allocation.  When it is 0, the call is equivalent to
memblock_alloc().

Link: http://lkml.kernel.org/r/1548057848-15136-13-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Paul Burton <paul.burton@mips.com> # MIPS part
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: make memblock_find_in_range_node() and choose_memblock_flags() static
Mike Rapoport [Thu, 7 Feb 2019 00:58:34 +0000 (11:58 +1100)]
memblock: make memblock_find_in_range_node() and choose_memblock_flags() static

These functions are not used outside memblock. Make them static.

Link: http://lkml.kernel.org/r/1548057848-15136-12-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: fix parameter order in memblock_phys_alloc_try_nid()
Mike Rapoport [Thu, 7 Feb 2019 00:58:34 +0000 (11:58 +1100)]
memblock: fix parameter order in memblock_phys_alloc_try_nid()

The refactoring of internal memblock allocation functions used wrong order
of parameters in memblock_alloc_range_nid() call from
memblock_phys_alloc_try_nid().  Fix it.

Link: http://lkml.kernel.org/r/20190203113915.GC8620@rapoport-lnx
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: refactor internal allocation functions
Mike Rapoport [Thu, 7 Feb 2019 00:58:33 +0000 (11:58 +1100)]
memblock: refactor internal allocation functions

Currently, memblock has several internal functions with overlapping
functionality.  They all call memblock_find_in_range_node() to find free
memory and then reserve the allocated range and mark it with kmemleak.
However, there is difference in the allocation constraints and in fallback
strategies.

The allocations returning physical address first attempt to find free
memory on the specified node within mirrored memory regions, then retry on
the same node without the requirement for memory mirroring and finally
fall back to all available memory.

The allocations returning virtual address start with clamping the allowed
range to memblock.current_limit, attempt to allocate from the specified
node from regions with mirroring and with user defined minimal address.
If such allocation fails, next attempt is done with node restriction
lifted.  Next, the allocation is retried with minimal address reset to
zero and at last without the requirement for mirrored regions.

Let's consolidate various fallbacks handling and make them more consistent
for physical and virtual variants.  Most of the fallback handling is moved
to memblock_alloc_range_nid() and it now handles node and mirror
fallbacks.

The memblock_alloc_internal() uses memblock_alloc_range_nid() to get a
physical address of the allocated range and converts it to virtual
address.

The fallback for allocation below the specified minimal address remains in
memblock_alloc_internal() because memblock_alloc_range_nid() is used by
CMA with exact requirement for lower bounds.

The memblock_phys_alloc_nid() function is completely dropped as it is not
used anywhere outside memblock and its only usage can be replaced by a
call to memblock_alloc_range_nid().

Link: http://lkml.kernel.org/r/1548057848-15136-11-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: drop memblock_alloc_base()
Mike Rapoport [Thu, 7 Feb 2019 00:58:33 +0000 (11:58 +1100)]
memblock: drop memblock_alloc_base()

The memblock_alloc_base() function tries to allocate a memory up to the
limit specified by its max_addr parameter and panics if the allocation
fails.  Replace its usage with memblock_phys_alloc_range() and make the
callers check the return value and panic in case of error.

Link: http://lkml.kernel.org/r/1548057848-15136-10-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> [powerpc]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: drop __memblock_alloc_base()
Mike Rapoport [Thu, 7 Feb 2019 00:58:33 +0000 (11:58 +1100)]
memblock: drop __memblock_alloc_base()

The __memblock_alloc_base() function tries to allocate a memory up to the
limit specified by its max_addr parameter.  Depending on the value of this
parameter, the __memblock_alloc_base() can is replaced with the
appropriate memblock_phys_alloc*() variant.

Link: http://lkml.kernel.org/r/1548057848-15136-9-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: memblock_phys_alloc(): don't panic
Mike Rapoport [Thu, 7 Feb 2019 00:58:32 +0000 (11:58 +1100)]
memblock: memblock_phys_alloc(): don't panic

Make the memblock_phys_alloc() function an inline wrapper for
memblock_phys_alloc_range() and update the memblock_phys_alloc() callers
to check the returned value and panic in case of error.

Link: http://lkml.kernel.org/r/1548057848-15136-8-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: memblock_phys_alloc_try_nid(): don't panic
Mike Rapoport [Thu, 7 Feb 2019 00:58:32 +0000 (11:58 +1100)]
memblock: memblock_phys_alloc_try_nid(): don't panic

The memblock_phys_alloc_try_nid() function tries to allocate memory from
the requested node and then falls back to allocation from any node in the
system.  The memblock_alloc_base() fallback used by this function panics
if the allocation fails.

Replace the memblock_alloc_base() fallback with the direct call to
memblock_alloc_range_nid() and update the memblock_phys_alloc_try_nid()
callers to check the returned value and panic in case of error.

Link: http://lkml.kernel.org/r/1548057848-15136-7-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> [powerpc]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: emphasize that memblock_alloc_range() returns a physical address
Mike Rapoport [Thu, 7 Feb 2019 00:58:31 +0000 (11:58 +1100)]
memblock: emphasize that memblock_alloc_range() returns a physical address

Rename memblock_alloc_range() to memblock_phys_alloc_range() to emphasize
that it returns a physical address.  While on it, remove the 'enum
memblock_flags' parameter from this function as its only user anyway sets
it to MEMBLOCK_NONE, which is the default for the most of memblock
allocations.

Link: http://lkml.kernel.org/r/1548057848-15136-6-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: drop memblock_alloc_base_nid()
Mike Rapoport [Thu, 7 Feb 2019 00:58:31 +0000 (11:58 +1100)]
memblock: drop memblock_alloc_base_nid()

memblock_alloc_base_nid() is a oneliner wrapper for
memblock_alloc_range_nid() without any side effect.  Replace it's usage by
the direct calls to memblock_alloc_range_nid().

Link: http://lkml.kernel.org/r/1548057848-15136-5-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agomemblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc
Mike Rapoport [Thu, 7 Feb 2019 00:58:30 +0000 (11:58 +1100)]
memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc

The calls to memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE) and
memblock_phys_alloc(size, align) are equivalent as both try to allocate
'size' bytes with 'align' alignment anywhere in the memory and panic if
hte allocation fails.

The conversion is done using the following semantic patch:

@@
expression size, align;
@@
- memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE)
+ memblock_phys_alloc(size, align)

Link: http://lkml.kernel.org/r/1548057848-15136-4-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agopowerpc: use memblock functions returning virtual address
Christophe Leroy [Thu, 7 Feb 2019 00:58:30 +0000 (11:58 +1100)]
powerpc: use memblock functions returning virtual address

Since only the virtual address of allocated blocks is used, lets use
functions returning directly virtual address.

Those functions have the advantage of also zeroing the block.

[rppt@linux.ibm.com: updated error message in alloc_stack() to be more verbose]
[rppt@linux.ibm.com: convereted several additional call sites ]
Link: http://lkml.kernel.org/r/1548057848-15136-3-git-send-email-rppt@linux.ibm.com
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoopenrisc: prefer memblock APIs returning virtual address
Mike Rapoport [Thu, 7 Feb 2019 00:58:30 +0000 (11:58 +1100)]
openrisc: prefer memblock APIs returning virtual address

Patch series "Refine memblock API", v2.

Current memblock API is quite extensive and, which is more annoying,
duplicated. Except the low-level functions that allow searching for a free
memory region and marking it as reserved, memblock provides three (well,
two and a half) sets of functions to allocate memory. There are several
overlapping functions that return a physical address and there are
functions that return virtual address. Those that return the virtual
address may also clear the allocated memory. And, on top of all that, some
allocators panic and some return NULL in case of error.

This set tries to reduce the mess, and trim down the amount of memblock
allocation methods.

Patches 1-10 consolidate the functions that return physical address of
the allocated memory

Patches 11-13 are some trivial cleanups

Patches 14-19 add checks for the return value of memblock_alloc*() and
panics in case of errors. The patches 14-18 include some minor refactoring
to have better readability of the resulting code and patch 19 is a
mechanical addition of

if (!ptr)
panic();

after memblock_alloc*() calls.

And, finally, patches 20 and 21 remove panic() calls memblock and _nopanic
variants from memblock.

This patch (of 21):

The allocation of the page tables memory in openrics uses
memblock_phys_alloc() and then converts the returned physical address to
virtual one.  Use memblock_alloc_raw() and add a panic() if the allocation
fails.

Link: http://lkml.kernel.org/r/1548057848-15136-2-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Stafford Horne <shorne@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Guo Ren <ren_guo@c-sky.com> [c-sky]
Cc: Juergen Gross <jgross@suse.com> [Xen]
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoinclude/linux/sched/signal.h: replace `tsk' with `task'
Andrei Vagin [Thu, 7 Feb 2019 00:58:29 +0000 (11:58 +1100)]
include/linux/sched/signal.h: replace `tsk' with `task'

This file uses "task" 85 times and "tsk" 25 times.  It is better to be
consistent.

Link: http://lkml.kernel.org/r/20181129180547.15976-1-avagin@gmail.com
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoarch/nios2/mm/fault.c: remove duplicate include
Sabyasachi Gupta [Thu, 7 Feb 2019 00:58:29 +0000 (11:58 +1100)]
arch/nios2/mm/fault.c: remove duplicate include

Remove linux/ptrace.h which is included more than once

Link: http://lkml.kernel.org/r/5c45d345.1c69fb81.d90ed.8e05@mx.google.com
Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Cc: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agounicore32: stop printing the virtual memory layout
Geert Uytterhoeven [Thu, 7 Feb 2019 00:58:28 +0000 (11:58 +1100)]
unicore32: stop printing the virtual memory layout

Since ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), the
virtual memory layout printed during boot up contains "ptrval" instead of
actual addresses.

Instead of changing the printing to "%px", and leaking virtual memory
layout information again, just remove the printing completely, cfr.  e.g.
071929dbdd865f77 ("arm64: Stop printing the virtual memory layout") and
31833332f7987636 ("m68k/mm: Stop printing the virtual memory layout").

All interesting information (actual section sizes) is already printed by
mem_init_print_info() just above anyway.

Link: http://lkml.kernel.org/r/20190121152254.29079-1-geert+renesas@glider.be
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoproc: merge fix for proc_pident_lookup() API change
Stephen Rothwell [Thu, 7 Feb 2019 00:58:28 +0000 (11:58 +1100)]
proc: merge fix for proc_pident_lookup() API change

Link: http://lkml.kernel.org/r/20190131160135.4a8ae70b@canb.auug.org.au
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: James Morris <jmorris@namei.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoproc: calculate end pointer for /proc/*/* lookup at compile time
Alexey Dobriyan [Thu, 7 Feb 2019 00:58:28 +0000 (11:58 +1100)]
proc: calculate end pointer for /proc/*/* lookup at compile time

Compilers like to transform loops like

for (i = 0; i < n; i++) {
[use p[i]]
}

into
for (p = p0; p < end; p++) {
...
}

Do it by hand, so that it results in overall simpler loop
and smaller code.

Space savings:

$ ./scripts/bloat-o-meter ../vmlinux-001 ../obj/vmlinux
add/remove: 0/0 grow/shrink: 2/1 up/down: 4/-9 (-5)
Function                                     old     new   delta
proc_tid_base_lookup                          17      19      +2
proc_tgid_base_lookup                         17      19      +2
proc_pident_lookup                           179     170      -9

The same could be done to proc_pident_readdir(), but the code becomes
bigger for some reason.

Link: http://lkml.kernel.org/r/20190114200422.GB9680@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoscripts/atomic/check-atomics.sh: don't assume that scripts are executable
Andrew Morton [Thu, 7 Feb 2019 00:58:27 +0000 (11:58 +1100)]
scripts/atomic/check-atomics.sh: don't assume that scripts are executable

patch(1) doesn't set the x bit on files.  So if someone downloads and
applies patch-4.21.xz, their kernel won't build.  Fix that by executing
/bin/sh.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
5 years agoMerge branch 'akpm-current/current'
Stephen Rothwell [Fri, 8 Feb 2019 09:18:45 +0000 (20:18 +1100)]
Merge branch 'akpm-current/current'

5 years agoRevert "apparmor: Initial implementation of raw policy blob compression"
Stephen Rothwell [Fri, 8 Feb 2019 07:24:41 +0000 (18:24 +1100)]
Revert "apparmor: Initial implementation of raw policy blob compression"

This reverts commit 876dd866c0845672edd0cac8e0551b173cc1a2d3.

5 years agoMerge remote-tracking branch 'kspp-gustavo/for-next/kspp'
Stephen Rothwell [Fri, 8 Feb 2019 06:27:26 +0000 (17:27 +1100)]
Merge remote-tracking branch 'kspp-gustavo/for-next/kspp'

5 years agoMerge remote-tracking branch 'pidfd/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:18:13 +0000 (17:18 +1100)]
Merge remote-tracking branch 'pidfd/for-next'

5 years agoMerge remote-tracking branch 'kgdb-dt/kgdb/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:18:08 +0000 (17:18 +1100)]
Merge remote-tracking branch 'kgdb-dt/kgdb/for-next'

5 years agoMerge remote-tracking branch 'hyperv/hyperv-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:15:55 +0000 (17:15 +1100)]
Merge remote-tracking branch 'hyperv/hyperv-next'

5 years agoMerge remote-tracking branch 'xarray/xarray'
Stephen Rothwell [Fri, 8 Feb 2019 06:04:22 +0000 (17:04 +1100)]
Merge remote-tracking branch 'xarray/xarray'

5 years agoMerge remote-tracking branch 'nvmem/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:04:18 +0000 (17:04 +1100)]
Merge remote-tracking branch 'nvmem/for-next'

5 years agoMerge remote-tracking branch 'slimbus/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:04:15 +0000 (17:04 +1100)]
Merge remote-tracking branch 'slimbus/for-next'

5 years agoMerge remote-tracking branch 'gnss/gnss-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:02:38 +0000 (17:02 +1100)]
Merge remote-tracking branch 'gnss/gnss-next'

5 years agoMerge remote-tracking branch 'cisco/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 06:00:28 +0000 (17:00 +1100)]
Merge remote-tracking branch 'cisco/for-next'

5 years agoMerge remote-tracking branch 'kspp/for-next/kspp'
Stephen Rothwell [Fri, 8 Feb 2019 06:00:19 +0000 (17:00 +1100)]
Merge remote-tracking branch 'kspp/for-next/kspp'

5 years agoMerge remote-tracking branch 'ntb/ntb-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:58:10 +0000 (16:58 +1100)]
Merge remote-tracking branch 'ntb/ntb-next'

5 years agoMerge remote-tracking branch 'at24/at24/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:56:40 +0000 (16:56 +1100)]
Merge remote-tracking branch 'at24/at24/for-next'

5 years agoMerge remote-tracking branch 'nvdimm/libnvdimm-for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:56:26 +0000 (16:56 +1100)]
Merge remote-tracking branch 'nvdimm/libnvdimm-for-next'

5 years agonext-20190207/rtc
Stephen Rothwell [Fri, 8 Feb 2019 05:54:40 +0000 (16:54 +1100)]
next-20190207/rtc

5 years agoMerge remote-tracking branch 'coresight/next'
Stephen Rothwell [Fri, 8 Feb 2019 05:45:25 +0000 (16:45 +1100)]
Merge remote-tracking branch 'coresight/next'

5 years agoMerge remote-tracking branch 'livepatching/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:43:10 +0000 (16:43 +1100)]
Merge remote-tracking branch 'livepatching/for-next'

5 years agoMerge remote-tracking branch 'y2038/y2038'
Stephen Rothwell [Fri, 8 Feb 2019 05:31:34 +0000 (16:31 +1100)]
Merge remote-tracking branch 'y2038/y2038'

5 years agoMerge remote-tracking branch 'random/dev'
Stephen Rothwell [Fri, 8 Feb 2019 05:29:21 +0000 (16:29 +1100)]
Merge remote-tracking branch 'random/dev'

5 years agoMerge remote-tracking branch 'userns/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:22:30 +0000 (16:22 +1100)]
Merge remote-tracking branch 'userns/for-next'

5 years agoMerge remote-tracking branch 'pwm/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:20:19 +0000 (16:20 +1100)]
Merge remote-tracking branch 'pwm/for-next'

5 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:18:07 +0000 (16:18 +1100)]
Merge remote-tracking branch 'pinctrl/for-next'

5 years agoMerge remote-tracking branch 'gpio-brgl/gpio/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:16:37 +0000 (16:16 +1100)]
Merge remote-tracking branch 'gpio-brgl/gpio/for-next'

5 years agoMerge remote-tracking branch 'gpio/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:14:09 +0000 (16:14 +1100)]
Merge remote-tracking branch 'gpio/for-next'

5 years agoMerge remote-tracking branch 'rpmsg/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:12:39 +0000 (16:12 +1100)]
Merge remote-tracking branch 'rpmsg/for-next'

5 years agoMerge remote-tracking branch 'vhost/linux-next'
Stephen Rothwell [Fri, 8 Feb 2019 05:01:05 +0000 (16:01 +1100)]
Merge remote-tracking branch 'vhost/linux-next'

5 years agoMerge remote-tracking branch 'scsi-mkp/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:57:26 +0000 (15:57 +1100)]
Merge remote-tracking branch 'scsi-mkp/for-next'

5 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:54:51 +0000 (15:54 +1100)]
Merge remote-tracking branch 'scsi/for-next'

5 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:46:52 +0000 (15:46 +1100)]
Merge remote-tracking branch 'cgroup/for-next'

5 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Fri, 8 Feb 2019 04:44:40 +0000 (15:44 +1100)]
Merge remote-tracking branch 'slave-dma/next'

5 years agoMerge remote-tracking branch 'icc/icc-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:43:08 +0000 (15:43 +1100)]
Merge remote-tracking branch 'icc/icc-next'

5 years agoMerge remote-tracking branch 'mux/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:43:02 +0000 (15:43 +1100)]
Merge remote-tracking branch 'mux/for-next'

5 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:40:39 +0000 (15:40 +1100)]
Merge remote-tracking branch 'staging/staging-next'

5 years agoMerge remote-tracking branch 'extcon/extcon-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:39:04 +0000 (15:39 +1100)]
Merge remote-tracking branch 'extcon/extcon-next'

5 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:28:22 +0000 (15:28 +1100)]
Merge remote-tracking branch 'char-misc/char-misc-next'

5 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:26:11 +0000 (15:26 +1100)]
Merge remote-tracking branch 'tty/tty-next'

5 years agoMerge remote-tracking branch 'phy-next/next'
Stephen Rothwell [Fri, 8 Feb 2019 04:23:57 +0000 (15:23 +1100)]
Merge remote-tracking branch 'phy-next/next'

5 years agoMerge remote-tracking branch 'usb-serial/usb-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:22:25 +0000 (15:22 +1100)]
Merge remote-tracking branch 'usb-serial/usb-next'

5 years agoMerge remote-tracking branch 'usb-gadget/next'
Stephen Rothwell [Fri, 8 Feb 2019 04:20:54 +0000 (15:20 +1100)]
Merge remote-tracking branch 'usb-gadget/next'

5 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:19:22 +0000 (15:19 +1100)]
Merge remote-tracking branch 'usb/usb-next'

5 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:07:47 +0000 (15:07 +1100)]
Merge remote-tracking branch 'driver-core/driver-core-next'

5 years agoMerge remote-tracking branch 'ipmi/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:06:17 +0000 (15:06 +1100)]
Merge remote-tracking branch 'ipmi/for-next'

5 years agoMerge remote-tracking branch 'leds/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:03:24 +0000 (15:03 +1100)]
Merge remote-tracking branch 'leds/for-next'

5 years agoMerge remote-tracking branch 'chrome-platform/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 04:01:13 +0000 (15:01 +1100)]
Merge remote-tracking branch 'chrome-platform/for-next'

5 years agoMerge remote-tracking branch 'drivers-x86/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:59:06 +0000 (14:59 +1100)]
Merge remote-tracking branch 'drivers-x86/for-next'

5 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:56:58 +0000 (14:56 +1100)]
Merge remote-tracking branch 'workqueues/for-next'

5 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:56:54 +0000 (14:56 +1100)]
Merge remote-tracking branch 'percpu/for-next'

5 years agoMerge remote-tracking branch 'xen-tip/linux-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:55:24 +0000 (14:55 +1100)]
Merge remote-tracking branch 'xen-tip/linux-next'

5 years agoMerge remote-tracking branch 'kvms390/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:53:54 +0000 (14:53 +1100)]
Merge remote-tracking branch 'kvms390/next'

5 years agoMerge remote-tracking branch 'kvm-arm/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:52:21 +0000 (14:52 +1100)]
Merge remote-tracking branch 'kvm-arm/next'

5 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:40:45 +0000 (14:40 +1100)]
Merge remote-tracking branch 'rcu/rcu/next'

5 years agoMerge remote-tracking branch 'irqchip/irq/irqchip-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:39:12 +0000 (14:39 +1100)]
Merge remote-tracking branch 'irqchip/irq/irqchip-next'

5 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:37:41 +0000 (14:37 +1100)]
Merge remote-tracking branch 'edac-amd/for-next'

5 years agoMerge remote-tracking branch 'clockevents/clockevents/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:35:33 +0000 (14:35 +1100)]
Merge remote-tracking branch 'clockevents/clockevents/next'

5 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Fri, 8 Feb 2019 03:23:54 +0000 (14:23 +1100)]
Merge remote-tracking branch 'tip/auto-latest'

5 years agoMerge remote-tracking branch 'spi/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:21:15 +0000 (14:21 +1100)]
Merge remote-tracking branch 'spi/for-next'

5 years agoMerge remote-tracking branch 'devicetree/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 03:19:43 +0000 (14:19 +1100)]
Merge remote-tracking branch 'devicetree/for-next'

5 years agoMerge remote-tracking branch 'audit/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:09:03 +0000 (14:09 +1100)]
Merge remote-tracking branch 'audit/next'

5 years agoMerge remote-tracking branch 'vfio/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:07:33 +0000 (14:07 +1100)]
Merge remote-tracking branch 'vfio/next'

5 years agoMerge remote-tracking branch 'iommu/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:04:52 +0000 (14:04 +1100)]
Merge remote-tracking branch 'iommu/next'

5 years agoMerge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Fri, 8 Feb 2019 03:03:25 +0000 (14:03 +1100)]
Merge remote-tracking branch 'watchdog/master'

5 years agoMerge remote-tracking branch 'tpmdd/next'
Stephen Rothwell [Fri, 8 Feb 2019 03:01:18 +0000 (14:01 +1100)]
Merge remote-tracking branch 'tpmdd/next'

5 years agoMerge remote-tracking branch 'selinux/next'
Stephen Rothwell [Fri, 8 Feb 2019 02:59:12 +0000 (13:59 +1100)]
Merge remote-tracking branch 'selinux/next'

5 years agoMerge remote-tracking branch 'integrity/next-integrity'
Stephen Rothwell [Fri, 8 Feb 2019 02:57:05 +0000 (13:57 +1100)]
Merge remote-tracking branch 'integrity/next-integrity'

5 years agoMerge remote-tracking branch 'apparmor/apparmor-next'
Stephen Rothwell [Fri, 8 Feb 2019 02:54:58 +0000 (13:54 +1100)]
Merge remote-tracking branch 'apparmor/apparmor-next'

5 years agoMerge remote-tracking branch 'security/next-testing'
Stephen Rothwell [Fri, 8 Feb 2019 02:44:44 +0000 (13:44 +1100)]
Merge remote-tracking branch 'security/next-testing'

5 years agoaudit: hide auditsc_get_stamp and audit_serial prototypes
Richard Guy Briggs [Tue, 5 Feb 2019 21:06:30 +0000 (16:06 -0500)]
audit: hide auditsc_get_stamp and audit_serial prototypes

auditsc_get_stamp() and audit_serial() are internal audit functions so
move their prototypes from include/linux/audit.h to kernel/audit.h
so they are not visible to the rest of the kernel.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
5 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Fri, 8 Feb 2019 02:42:31 +0000 (13:42 +1100)]
Merge remote-tracking branch 'regulator/for-next'