Re: [PATCH v2 5/5] powerpc: Remove -mno-sched-epilog

2018-09-14 Thread Segher Boessenkool
On Fri, Sep 14, 2018 at 03:20:18PM -0700, Nick Desaulniers wrote: > On Fri, Sep 14, 2018 at 2:56 PM Segher Boessenkool > wrote: > > On Sat, Sep 15, 2018 at 06:43:05AM +1000, Nicholas Piggin wrote: > > > On Fri, 14 Sep 2018 11:03:38 -0700 > > > Nick Desaulniers wrote: > > > > > > Sorry I forgot

[PATCH 3/3] powerpc: uapi header and system call table file generation

2018-09-14 Thread Firoz Khan
System call table generation script must be run to generate unistd_32/64.h and syscall_table_32/64/c32.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table_ 32/64/c32.h files by the syscall table generation script invoked

[PATCH 2/3] powerpc: Add system call table generation support

2018-09-14 Thread Firoz Khan
The system call tables are in different format in all architecture and it will be difficult to manually add or modify the system calls in the respective files. To make it easy by keeping a script and which'll generate the header file and syscall table file so this change will unify them across all

[PATCH 1/3] powerpc: Replace NR_syscalls macro from asm/unistd.h

2018-09-14 Thread Firoz Khan
__NR_syscalls macro holds the number of system call exist in POWERPC architecture. This macro is currently the part of asm/unistd.h file. We have to change the value of __NR_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi

[PATCH 0/3] System call table generation support

2018-09-14 Thread Firoz Khan
The purpose of this patch series is: 1. We can easily add/modify/delete system call by changing entry in syscall.tbl file. No need to manually edit many files. 2. It is easy to unify the system call implementation across all the architectures. The system call tables are in different format in

Re: [PATCH v2 5/5] powerpc: Remove -mno-sched-epilog

2018-09-14 Thread Segher Boessenkool
On Sat, Sep 15, 2018 at 06:43:05AM +1000, Nicholas Piggin wrote: > On Fri, 14 Sep 2018 11:03:38 -0700 > Nick Desaulniers wrote: > > > On Thu, Sep 13, 2018 at 9:07 PM Joel Stanley wrote: > > > Last time this was proposed there was an issue reported: > > > > > > > > >

Re: [PATCH 3/3] scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4

2018-09-14 Thread Frank Rowand
On 09/13/18 13:28, Rob Herring wrote: > Major changes are I2C and SPI bus checks, YAML output format (for > future validation), some new libfdt functions, and more libfdt > validation of dtbs. > > The YAML addition adds an optional dependency on libyaml. pkg-config is > used to test for it and

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread Al Viro
On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > Acked-by: Darren Hart (VMware) > > As for a longer term solution, would it be possible to init fops in such > a way that the compat_ioctl call defaults to generic_compat_ioctl_ptrarg > so we don't have to duplicate this boilerplate

Re: [PATCH v2 5/5] PCI/powerpc/eeh: Add pcibios hooks for preparing to rescan

2018-09-14 Thread Sergey Miroshnichenko
On 9/12/18 1:39 PM, wrote: > On Mon, 2018-09-10 at 19:00 +0300, Sergey Miroshnichenko wrote: >> >> Yes, missing a real EEH event is possible, unfortunately, and it is >> indeed worth mentioning. >> >> To reduce this probability the next patchset I'll post in a few days >> among other things

Re: [PATCH v2 2/5] powerpc/boot: Fix crt0.S syntax for clang

2018-09-14 Thread Segher Boessenkool
On Fri, Sep 14, 2018 at 10:47:08AM -0700, Nick Desaulniers wrote: > On Thu, Sep 13, 2018 at 9:07 PM Joel Stanley wrote: > > 10:addis r12,r12,(-RELACOUNT)@ha > > - cmpdi r12,RELACOUNT@l > > + cmpdi r12,(RELACOUNT)@l > > Yep, as we can see above, when RELACOUNT is negated,

Re: [PATCH 4/5] powerpc/powernv/pci: Enable reassigning the bus numbers

2018-09-14 Thread Sergey Miroshnichenko
Hello Ben, On 9/12/18 1:35 PM, Benjamin Herrenschmidt wrote: > On Wed, 2018-09-05 at 18:40 +0300, Sergey Miroshnichenko wrote: >> PowerNV doesn't depend on PCIe topology info from DT anymore, and now >> it is able to enumerate the fabric and assign the bus numbers. > > No it's not, at least

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread Darren Hart
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390

Re: [PATCH v2 5/5] powerpc: Remove -mno-sched-epilog

2018-09-14 Thread Nicholas Piggin
On Fri, 14 Sep 2018 11:03:38 -0700 Nick Desaulniers wrote: > On Thu, Sep 13, 2018 at 9:07 PM Joel Stanley wrote: > > Last time this was proposed there was an issue reported: > > > > https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-September/121214.html > > > > Heh, did PASemi sell

Re: [PATCH v3 0/6] powerpc/powernv/pci: Discover surprise-hotplugged PCIe devices during rescan

2018-09-14 Thread Sergey Miroshnichenko
Hello Oliver, On 9/12/18 12:49 PM, Oliver wrote: > On Tue, Sep 11, 2018 at 9:56 PM, Sergey Miroshnichenko > wrote: >> This patchset allows hotplugged PCIe devices to be enumerated during a bus >> rescan being issued via sysfs on PowerNV platforms, when the "Presence >> Detect Changed" interrupt

[GIT PULL] Devicetree fix for 4.19-rc

2018-09-14 Thread Rob Herring
Linus, Please pull. One regression for a 20 year old PowerMac. Rob The following changes since commit 0413bedabc886c3a56804d1c80a58e99077b1d91: of: Add device_type access helper functions (2018-08-31 08:30:42 -0400) are available in the Git repository at:

Re: [PATCH v2 1/5] powerpc/Makefiles: Fix clang/llvm build

2018-09-14 Thread Nick Desaulniers
On Thu, Sep 13, 2018 at 9:07 PM Joel Stanley wrote: > > From: Anton Blanchard > > Commit 15a3204d24a3 ("powerpc/64s: Set assembler machine type to POWER4") > passes -mpower4 to the assembler. We have more recent instructions in our > assembly files, but gas permits them. The clang/llvm

Re: [PATCH v2 2/3] watchdog: mpc8xxx: provide boot status

2018-09-14 Thread Guenter Roeck
On Fri, Sep 14, 2018 at 01:32:01PM +, Christophe Leroy wrote: > mpc8xxx watchdog driver supports the following platforms: > - mpc8xx > - mpc83xx > - mpc86xx > > Those three platforms have a 32 bits register which provides the > reason of the last boot, including whether it was caused by the >

Re: [PATCH v2 3/3] dt-bindings: watchdog: add mpc8xxx-wdt support

2018-09-14 Thread Guenter Roeck
On Fri, Sep 14, 2018 at 01:32:03PM +, Christophe Leroy wrote: > Add description of DT bindings for mpc8xxx-wdt driver which > handles the CPU watchdog timer on the mpc83xx, mpc86xx and mpc8xx. > > Signed-off-by: Christophe Leroy > --- > .../devicetree/bindings/watchdog/mpc8xxx-wdt.txt |

Re: [PATCH v2 1/3] watchdog: mpc8xxx: use dev_xxxx() instead of pr_xxxx()

2018-09-14 Thread Guenter Roeck
On Fri, Sep 14, 2018 at 01:31:59PM +, Christophe Leroy wrote: > mpc8xxx watchdog driver is a platform device drivers, it is > therefore possible to use dev_xxx() messaging rather than pr_xxx() > > Signed-off-by: Christophe Leroy Reviewed-by: Guenter Roeck > --- >

Re: KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds

2018-09-14 Thread sathnaga
On 2018-09-14 22:26, sathn...@linux.vnet.ibm.com wrote: Date: Thu, 13 Sep 2018 15:33:47 +1000 From: Michael Neuling To: m...@ellerman.id.au Cc: linuxppc-dev@lists.ozlabs.org, kvm-...@vger.kernel.org, pau...@ozlabs.org, sjitindarsi...@gmail.com, mi...@neuling.org Subject: KVM: PPC: Book3S HV:

Re: [PATCH] powerpc/fadump: re-register firmware-assisted dump if already registered

2018-09-14 Thread Hari Bathini
On Friday 14 September 2018 07:58 PM, Petr Tesarik wrote: On Fri, 14 Sep 2018 19:36:02 +0530 Hari Bathini wrote: Firmware-Assisted Dump (FADump) needs to be registered again after any memory hot add/remove operation to update the crash memory ranges. But currently, the kernel returns

[PATCH 12/12] powerpc/64s/hash: Add a SLB preload cache

2018-09-14 Thread Nicholas Piggin
When switching processes, currently all user SLBEs are cleared, and a few (exec_base, pc, and stack) are preloaded. In trivial testing with small apps, this tends to miss the heap and low 256MB segments, and it will also miss commonly accessed segments on large memory workloads. Add a simple

[PATCH 11/12] powerpc/64s/hash: provide arch_setup_exec hooks for hash slice setup

2018-09-14 Thread Nicholas Piggin
This will be used by the SLB code in the next patch, but for now this sets the slb_addr_limit to the correct size for 32-bit tasks. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 2 ++ arch/powerpc/include/asm/slice.h | 1 +

[PATCH 10/12] powerpc/64s: xmon do not dump hash fields when using radix mode

2018-09-14 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/xmon/xmon.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 323aac8321fa..5dec84aba59e 100644 --- a/arch/powerpc/xmon/xmon.c

[PATCH 09/12] powerpc/64s/hash: SLB allocation status bitmaps

2018-09-14 Thread Nicholas Piggin
Add 32-entry bitmaps to track the allocation status of the first 32 SLB entries, and whether they are user or kernel entries. These are used to allocate free SLB entries first, before resorting to the round robin allocator. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paca.h |

[PATCH 08/12] powerpc/64s/hash: remove user SLB data from the paca

2018-09-14 Thread Nicholas Piggin
User SLB mappig data is copied into the PACA from the mm->context so it can be accessed by the SLB miss handlers. After the C conversion, SLB miss handlers now run with relocation on, and user SLB misses are able to take recursive kernel SLB misses, so the user SLB mapping data can be removed

[PATCH 07/12] powerpc/64s/hash: convert SLB miss handlers to C

2018-09-14 Thread Nicholas Piggin
This patch moves SLB miss handlers completely to C, using the standard exception handler macros to set up the stack and branch to C. This can be done because the segment containing the kernel stack is always bolted, so accessing it with relocation on will not cause an SLB exception. Arbitrary

[PATCH 06/12] powerpc/64s/hash: Use POWER9 SLBIA IH=3 variant in switch_slb

2018-09-14 Thread Nicholas Piggin
POWER9 introduces SLBIA IH=3, which invalidates all SLB entries and associated lookaside information that have a class value of 1, which Linux assigns to user addresses. This matches what switch_slb wants, and allows a simple fast implementation that avoids the slb_cache complexity. As a

[PATCH 05/12] powerpc/64s/hash: Use POWER6 SLBIA IH=1 variant in switch_slb

2018-09-14 Thread Nicholas Piggin
The SLBIA IH=1 hint will remove all non-zero SLBEs, but only invalidate ERAT entries associated with a class value of 1, for processors that support the hint (e.g., POWER6 and newer), which Linux assigns to user addresses. This prevents kernel ERAT entries from being invalidated when context

[PATCH 04/12] powerpc/64s/hash: remove the vmalloc segment from the bolted SLB

2018-09-14 Thread Nicholas Piggin
Remove the vmalloc segment from bolted SLBEs. This is not required to be bolted, and seems like it was added to help pre-load the SLB on context switch. However there are now other segments like the vmemmap segment and non-zero node memory that often take misses after a context switch, so it is

[PATCH 03/12] powerpc/64s/hash: move POWER5 < DD2.1 slbie workaround where it is needed

2018-09-14 Thread Nicholas Piggin
The POWER5 < DD2.1 issue is that slbie needs to be issued more than once. It came in with this change: ChangeSet@1.1608, 2004-04-29 07:12:31-07:00, da...@gibson.dropbear.id.au [PATCH] POWER5 erratum workaround Early POWER5 revisions ( --- arch/powerpc/mm/slb.c | 14 +++--- 1 file

[PATCH 02/12] powerpc/64s/hash: avoid the POWER5 < DD2.1 slb invalidate workaround on POWER8/9

2018-09-14 Thread Nicholas Piggin
I only have POWER8/9 to test, so just remove it for those. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/entry_64.S | 2 ++ arch/powerpc/mm/slb.c | 8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/entry_64.S

[PATCH 01/12] powerpc/64s/hash: Fix stab_rr off by one initialization

2018-09-14 Thread Nicholas Piggin
This causes SLB alloation to start 1 beyond the start of the SLB. There is no real problem because after it wraps it stats behaving properly, it's just surprisig to see when looking at SLB traces. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/slb.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 00/12] SLB miss conversion to C, and SLB optimisations

2018-09-14 Thread Nicholas Piggin
This is a repost of the SLB conversion to C, no real change since last post. But given that slows down the SLB miss handler, I promised some optimisations could be made to mitigate that. The two main optimisations after the C conversion are the SLB alloation bitmaps, and the preload cache.

Re: [PATCH] powerpc/fadump: re-register firmware-assisted dump if already registered

2018-09-14 Thread Petr Tesarik
On Fri, 14 Sep 2018 19:36:02 +0530 Hari Bathini wrote: > Firmware-Assisted Dump (FADump) needs to be registered again after any > memory hot add/remove operation to update the crash memory ranges. But > currently, the kernel returns '-EEXIST' if we try to register without > uregistering it

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread David Sterba
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390

[PATCH] powerpc/fadump: re-register firmware-assisted dump if already registered

2018-09-14 Thread Hari Bathini
Firmware-Assisted Dump (FADump) needs to be registered again after any memory hot add/remove operation to update the crash memory ranges. But currently, the kernel returns '-EEXIST' if we try to register without uregistering it first. This could expose the system to racing issues while

Re: [PATCH] watchdog: mpc8xxx: provide boot status

2018-09-14 Thread Christophe LEROY
Le 13/09/2018 à 22:25, Guenter Roeck a écrit : On Thu, Sep 13, 2018 at 08:07:21AM +, Christophe Leroy wrote: mpc8xxx watchdog driver supports the following platforms: - mpc8xx - mpc83xx - mpc86xx Those three platforms have a 32 bits register which provides the reason of the last boot,

[PATCH v2 3/3] dt-bindings: watchdog: add mpc8xxx-wdt support

2018-09-14 Thread Christophe Leroy
Add description of DT bindings for mpc8xxx-wdt driver which handles the CPU watchdog timer on the mpc83xx, mpc86xx and mpc8xx. Signed-off-by: Christophe Leroy --- .../devicetree/bindings/watchdog/mpc8xxx-wdt.txt | 25 ++ 1 file changed, 25 insertions(+) create mode 100644

[PATCH v2 2/3] watchdog: mpc8xxx: provide boot status

2018-09-14 Thread Christophe Leroy
mpc8xxx watchdog driver supports the following platforms: - mpc8xx - mpc83xx - mpc86xx Those three platforms have a 32 bits register which provides the reason of the last boot, including whether it was caused by the watchdog. mpc8xx: Register RSR, bit SWRS (bit 3) mpc83xx: Register RSR, bit SWRS

[PATCH v2 1/3] watchdog: mpc8xxx: use dev_xxxx() instead of pr_xxxx()

2018-09-14 Thread Christophe Leroy
mpc8xxx watchdog driver is a platform device drivers, it is therefore possible to use dev_xxx() messaging rather than pr_xxx() Signed-off-by: Christophe Leroy --- drivers/watchdog/mpc8xxx_wdt.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH] kdb: use correct pointer when 'btc' calls 'btt'

2018-09-14 Thread Christophe Leroy
On a powerpc 8xx, 'btc' fails as follows: Entering kdb (current=0x(ptrval), pid 282) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0x0 when booting the kernel with 'debug_boot_weak_hash', it fails as well Entering kdb

[PATCH 30/30] docs/boot-time-mm: remove bootmem documentation

2018-09-14 Thread Mike Rapoport
Signed-off-by: Mike Rapoport --- Documentation/core-api/boot-time-mm.rst | 71 + 1 file changed, 10 insertions(+), 61 deletions(-) diff --git a/Documentation/core-api/boot-time-mm.rst b/Documentation/core-api/boot-time-mm.rst index 03cb164..e5ec9f1 100644 ---

[PATCH 29/30] mm: remove include/linux/bootmem.h

2018-09-14 Thread Mike Rapoport
Move remaining definitions and declarations from include/linux/bootmem.h into include/linux/memblock.h and remove the redundant header. The includes were replaced with the semantic patch below and then semi-automated removal of duplicated '#include @@ @@ - #include + #include Signed-off-by:

[PATCH 28/30] memblock: replace BOOTMEM_ALLOC_* with MEMBLOCK variants

2018-09-14 Thread Mike Rapoport
Drop BOOTMEM_ALLOC_ACCESSIBLE and BOOTMEM_ALLOC_ANYWHERE in favor of identical MEMBLOCK definitions. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/ia64/mm/discontig.c | 2 +- arch/powerpc/kernel/setup_64.c | 2 +- arch/sparc/kernel/smp_64.c | 2 +-

[PATCH 27/30] mm: remove nobootmem

2018-09-14 Thread Mike Rapoport
Move a few remaining functions from nobootmem.c to memblock.c and remove nobootmem Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- mm/Makefile| 1 - mm/memblock.c | 104 ++ mm/nobootmem.c | 128

[PATCH 26/30] memblock: rename __free_pages_bootmem to memblock_free_pages

2018-09-14 Thread Mike Rapoport
The conversion is done using sed -i 's@__free_pages_bootmem@memblock_free_pages@' \ $(git grep -l __free_pages_bootmem) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- mm/internal.h | 2 +- mm/memblock.c | 2 +- mm/nobootmem.c | 2 +- mm/page_alloc.c | 2 +- 4 files changed,

[PATCH 25/30] memblock: rename free_all_bootmem to memblock_free_all

2018-09-14 Thread Mike Rapoport
The conversion is done using sed -i 's@free_all_bootmem@memblock_free_all@' \ $(git grep -l free_all_bootmem) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/alpha/mm/init.c | 2 +- arch/arc/mm/init.c | 2 +- arch/arm/mm/init.c

[PATCH 24/30] memblock: replace free_bootmem_late with memblock_free_late

2018-09-14 Thread Mike Rapoport
The free_bootmem_late and memblock_free_late do exactly the same thing: they iterate over a range and give pages to the page allocator. Replace calls to free_bootmem_late with calls to memblock_free_late and remove the bootmem variant. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko ---

[PATCH 23/30] memblock: replace free_bootmem{_node} with memblock_free

2018-09-14 Thread Mike Rapoport
The free_bootmem and free_bootmem_node are merely wrappers for memblock_free. Replace their usage with a call to memblock_free using the following semantic patch: @@ expression e1, e2, e3; @@ ( - free_bootmem(e1, e2) + memblock_free(e1, e2) | - free_bootmem_node(e1, e2, e3) + memblock_free(e2,

[PATCH 22/30] mm: nobootmem: remove bootmem allocation APIs

2018-09-14 Thread Mike Rapoport
The bootmem compatibility APIs are not used and can be removed. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- include/linux/bootmem.h | 47 -- mm/nobootmem.c | 224 2 files changed, 271 deletions(-) diff --git

[PATCH 21/30] memblock: replace alloc_bootmem with memblock_alloc

2018-09-14 Thread Mike Rapoport
The alloc_bootmem(size) is a shortcut for allocation of SMP_CACHE_BYTES aligned memory. When the align parameter of memblock_alloc() is 0, the alignment is implicitly set to SMP_CACHE_BYTES and thus alloc_bootmem(size) and memblock_alloc(size, 0) are equivalent. The conversion is done using the

[PATCH 20/30] memblock: replace __alloc_bootmem with memblock_alloc_from

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. The conversion is done using the following semantic patch: @@ expression size, align, goal; @@ - __alloc_bootmem(size, align, goal) + memblock_alloc_from(size, align, goal) Signed-off-by: Mike Rapoport

[PATCH 19/30] memblock: replace alloc_bootmem_pages with memblock_alloc

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_pages() function allocates PAGE_SIZE aligned memory. memblock_alloc() with alignment set to PAGE_SIZE does exactly the same thing. The conversion is done using the following semantic patch: @@ expression e; @@ - alloc_bootmem_pages(e) + memblock_alloc(e, PAGE_SIZE)

[PATCH 18/30] memblock: replace alloc_bootmem_low_pages with memblock_alloc_low

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_low_pages() function allocates PAGE_SIZE aligned regions from low memory. memblock_alloc_low() with alignment set to PAGE_SIZE does exactly the same thing. The conversion is done using the following semantic patch: @@ expression e; @@ - alloc_bootmem_low_pages(e) +

[PATCH 17/30] memblock: replace alloc_bootmem_node with memblock_alloc_node

2018-09-14 Thread Mike Rapoport
Both functions attempt to allocate memory with specified alignment from a particular node. If the allocation from that node fails, they both fall back to allocating from any node in the system. Usage of native memblock API eliminates the nobootmem translation layer. Signed-off-by: Mike Rapoport

[PATCH 16/30] memblock: replace __alloc_bootmem_node with appropriate memblock_ API

2018-09-14 Thread Mike Rapoport
Use memblock_alloc_try_nid whenever goal (i.e. minimal address is specified) and memblock_alloc_node otherwise. Signed-off-by: Mike Rapoport --- arch/ia64/mm/discontig.c | 6 -- arch/powerpc/kernel/setup_64.c | 6 -- arch/sparc/kernel/setup_64.c | 10 --

[PATCH 15/30] memblock: replace alloc_bootmem_pages_node with memblock_alloc_node

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/ia64/mm/init.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index

[PATCH 14/30] memblock: add align parameter to memblock_alloc_node()

2018-09-14 Thread Mike Rapoport
With the align parameter memblock_alloc_node() can be used as drop in replacement for alloc_bootmem_pages_node() and __alloc_bootmem_node(), which is done in the following patches. Signed-off-by: Mike Rapoport --- include/linux/bootmem.h | 4 ++-- mm/sparse.c | 2 +- 2 files

[PATCH 13/30] memblock: replace __alloc_bootmem_nopanic with memblock_alloc_from_nopanic

2018-09-14 Thread Mike Rapoport
When __alloc_bootmem_nopanic() is used with explicit lower limit for the allocation it attempts to allocate memory at or above that limit and falls back to allocation with no limit set. The memblock_alloc_from_nopanic() does exactly the same thing and can be used as a replacement for

[PATCH 12/30] memblock: replace alloc_bootmem_low with memblock_alloc_low

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_low(size) allocates low memory with default alignement and can be replcaed by memblock_alloc_low(size, 0) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/arm64/kernel/setup.c | 2 +- arch/unicore32/kernel/setup.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 11/30] memblock: replace alloc_bootmem_pages_nopanic with memblock_alloc_nopanic

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_pages_nopanic(size) is a shortcut for __alloc_bootmem_nopanic(size, PAGE_SIZE, BOOTMEM_LOW_LIMIT) which allocates PAGE_SIZE aligned memory. Since BOOTMEM_LOW_LIMIT is hardwired to 0 there is no restrictions on where the allocated memory should reside. The

[PATCH 10/30] memblock: replace __alloc_bootmem_node_nopanic with memblock_alloc_try_nid_nopanic

2018-09-14 Thread Mike Rapoport
The __alloc_bootmem_node_nopanic() attempts to allocate memory for a specified node. If the allocation fails it then retries to allocate memory from any node. Upon success, the allocated memory is set to 0. The memblock_alloc_try_nid_nopanic() does exactly the same thing and can be used instead.

[PATCH 08/30] memblock: replace alloc_bootmem_align with memblock_alloc

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index

[PATCH 09/30] memblock: replace alloc_bootmem_low with memblock_alloc_low

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/x86/kernel/tce_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/tce_64.c b/arch/x86/kernel/tce_64.c

[PATCH 07/30] memblock: remove _virt from APIs returning virtual address

2018-09-14 Thread Mike Rapoport
The conversion is done using sed -i 's@memblock_virt_alloc@memblock_alloc@g' \ $(git grep -l memblock_virt_alloc) Signed-off-by: Mike Rapoport --- arch/arm/kernel/setup.c | 4 ++-- arch/arm/mach-omap2/omap_hwmod.c | 6 ++--- arch/arm64/mm/kasan_init.c

[PATCH 06/30] memblock: rename memblock_alloc{_nid, _try_nid} to memblock_phys_alloc*

2018-09-14 Thread Mike Rapoport
Make it explicit that the caller gets a physical address rather than a virtual one. This will also allow using meblock_alloc prefix for memblock allocations returning virtual address, which is done in the following patches. The conversion is done using the following semantic patch: @@

[PATCH 05/30] mm: nobootmem: remove dead code

2018-09-14 Thread Mike Rapoport
Several bootmem functions and macros are not used. Remove them. Signed-off-by: Mike Rapoport --- include/linux/bootmem.h | 26 -- mm/nobootmem.c | 35 --- 2 files changed, 61 deletions(-) diff --git a/include/linux/bootmem.h

[PATCH 04/30] mm: remove bootmem allocator implementation.

2018-09-14 Thread Mike Rapoport
All architectures have been converted to use MEMBLOCK + NO_BOOTMEM. The bootmem allocator implementation can be removed. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- include/linux/bootmem.h | 16 - mm/bootmem.c| 811 2

[PATCH 03/30] mm: remove CONFIG_HAVE_MEMBLOCK

2018-09-14 Thread Mike Rapoport
All architecures use memblock for early memory management. There is no need for the CONFIG_HAVE_MEMBLOCK configuration option. Signed-off-by: Mike Rapoport --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1 - arch/arm/Kconfig| 1 -

[PATCH 02/30] mm: remove CONFIG_NO_BOOTMEM

2018-09-14 Thread Mike Rapoport
All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any kernel configuration and therefore it can be removed. Signed-off-by: Mike Rapoport --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1 - arch/arm/Kconfig| 1 - arch/arm64/Kconfig | 1 -

[PATCH 01/30] mips: switch to NO_BOOTMEM

2018-09-14 Thread Mike Rapoport
MIPS already has memblock support and all the memory is already registered with it. This patch replaces bootmem memory reservations with memblock ones and removes the bootmem initialization. Since memblock allocates memory in top-down mode, we ensure that memblock limit is max_low_pfn to prevent

[PATCH 00/30] mm: remove bootmem allocator

2018-09-14 Thread Mike Rapoport
Hi, These patches switch early memory management to use memblock directly without any bootmem compatibility wrappers. As the result both bootmem and nobootmem are removed. The patchset survived allyesconfig builds on arm, arm64, i386, mips, nds32, parisc, powerpc, riscv, s390 and x86 and most of

[PATCH] serial: cpm_uart: return immediately from console poll

2018-09-14 Thread Christophe Leroy
kgdb expects poll function to return immediately and returning NO_POLL_CHAR when no character is available. Fixes: f5316b4aea024 ("kgdb,8250,pl011: Return immediately from console poll") Cc: Jason Wessel Cc: Signed-off-by: Christophe Leroy --- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 10

Re: [PATCH 2/3] powerpc: Add system call table generation support

2018-09-14 Thread Arnd Bergmann
On Fri, Sep 14, 2018 at 10:33 AM Firoz Khan wrote: > --- > arch/powerpc/kernel/syscalls/Makefile | 51 > arch/powerpc/kernel/syscalls/syscall_32.tbl | 378 > > arch/powerpc/kernel/syscalls/syscall_64.tbl | 372 +++ >

[PATCH v2 5/5] arm64: dts: add LX2160ARDB board support

2018-09-14 Thread Vabhav Sharma
LX2160A reference design board (RDB) is a high-performance computing, evaluation, and development platform with LX2160A SoC. Signed-off-by: Priyanka Jain Signed-off-by: Sriram Dash Signed-off-by: Vabhav Sharma --- arch/arm64/boot/dts/freescale/Makefile| 1 +

[PATCH v2 4/5] arm64: dts: add QorIQ LX2160A SoC support

2018-09-14 Thread Vabhav Sharma
LX2160A SoC is based on Layerscape Chassis Generation 3.2 Architecture. LX2160A features an advanced 16 64-bit ARM v8 CortexA72 processor cores in 8 cluster, CCN508, GICv3,two 64-bit DDR4 memory controller, 8 I2C controllers, 3 dspi, 2 esdhc,2 USB 3.0, mmu 500, 3 SATA, 4 PL011 SBSA UARTs etc.

[PATCH v2 3/5] drivers: clk-qoriq: Add clockgen support for lx2160a

2018-09-14 Thread Vabhav Sharma
From: Yogesh Gaur Add clockgen support for lx2160a. Added entry for compat 'fsl,lx2160a-clockgen'. Signed-off-by: Tang Yuantian Signed-off-by: Yogesh Gaur Signed-off-by: Vabhav Sharma Acked-by: Stephen Boyd --- drivers/clk/clk-qoriq.c | 14 +-

[PATCH v2 2/5] soc/fsl/guts: Add compatible string for LX2160A

2018-09-14 Thread Vabhav Sharma
Adding compatible string "lx2160a-dcfg" to initialize guts driver for lx2160 Signed-off-by: Vabhav Sharma --- drivers/soc/fsl/guts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index 302e0c8..5e1e633 100644 --- a/drivers/soc/fsl/guts.c +++

[PATCH v2 1/5] dt-bindings: arm64: add compatible for LX2160A

2018-09-14 Thread Vabhav Sharma
Add compatible for LX2160A SoC,QDS and RDB board Signed-off-by: Vabhav Sharma --- Documentation/devicetree/bindings/arm/fsl.txt | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index

[PATCH v2 0/5] arm64: dts: NXP: add basic dts file for LX2160A SoC

2018-09-14 Thread Vabhav Sharma
Changes for v2: - Modified cmux_to_group array to include -1 terminator - Revert NUM_CMUX to original value 8 from 16 - Remove “As LX2160A is 16 core, so modified value for NUM_CMUX” in patch "[PATCH 3/5] drivers: clk-qoriq: Add clockgen support for lx2160a" description - Populated cache