Re: [PATCH v8 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-28 Thread Alex Ghiti
On 3/28/19 4:43 PM, Mike Kravetz wrote: On 3/26/19 11:36 PM, Alexandre Ghiti wrote: On systems without CONTIG_ALLOC activated but that support gigantic pages, boottime reserved gigantic pages can not be freed at all. This patch simply enables the possibility to hand back those pages to memory al

[PATCH v2] powerpc/vmlinux.lds: Drop binutils < 2.18 workarounds

2019-03-28 Thread Joel Stanley
Segher added some workarounds for binutils < 2.18 and GCC < 4.2. We now set GCC 4.6 and binutils 2.20 as the minimum, so the workarounds can be dropped. This is mostly a revert of c6995fe4 ("powerpc: Fix build bug with binutils < 2.18 and GCC < 4.2"), except we keep the kernel PHDRS statement

[PATCH kernel 2/2] powerpc/mm_iommu: Fix potential deadlock

2019-03-28 Thread Alexey Kardashevskiy
Currently mm_iommu_do_alloc() is called in 2 cases: - VFIO_IOMMU_SPAPR_REGISTER_MEMORY ioctl() for normal memory; - vfio_pci_nvgpu_regops::mmap() for GPU memory. One of the differences here is that the mmap() is called with mm::mmap_sem help and mm_iommu_do_alloc() locks mm::mmap_sem itself (when

[PATCH kernel 1/2] powerpc/mm_iommu: Prepare for less locking

2019-03-28 Thread Alexey Kardashevskiy
The next patch will reduce amount of time spent under locks. This adds mm_iommu_find() to see if the region is already registered. This removes a rather ugly union from the mm_iommu_table_group_mem_t struct and keeps the hack local in mm_iommu_do_alloc(). This makes pageshift and hpas local and

[PATCH kernel 0/2] powerpc/mm_iommu: Fix potential deadlock

2019-03-28 Thread Alexey Kardashevskiy
I was trying the kernel with DEBUG_LOCKDEP and saw warnings. 1/2 is preparing the fix to make 2/2 reviewable and 2/2 is the actual fix. This is based on sha1 a3ac7917b730 Linus Torvalds "Revert "parport: daisy: use new parport device model"". Please comment. Thanks. Alexey Kardashevskiy (2)

Re: [Qemu-ppc] pseries on qemu-system-ppc64le crashes in doorbell_core_ipi()

2019-03-28 Thread Suraj Jitindar Singh
On Wed, 2019-03-27 at 17:51 +0100, Cédric Le Goater wrote: > On 3/27/19 5:37 PM, Cédric Le Goater wrote: > > On 3/27/19 1:36 PM, Sebastian Andrzej Siewior wrote: > > > With qemu-system-ppc64le -machine pseries -smp 4 I get: > > > > > > > # chrt 1 hackbench > > > > Running in process mode with 10

Re: [PATCH] powerpc/xmon: add read-only mode

2019-03-28 Thread Andrew Donnellan
On 29/3/19 3:21 pm, cmr wrote: Operations which write to memory should be restricted on secure systems and optionally to avoid self-destructive behaviors. For reference: - https://github.com/linuxppc/issues/issues/219 - https://github.com/linuxppc/issues/issues/232 Perhaps clarify what is me

[PATCH] powerpc/xmon: add read-only mode

2019-03-28 Thread cmr
Operations which write to memory should be restricted on secure systems and optionally to avoid self-destructive behaviors. Add a config option, XMON_RO, to control default xmon behavior along with kernel cmdline options xmon=ro and xmon=rw for explicit control. The default is to enable read-only

[RFC][PATCH 4/4 v2] syscalls: Remove start and number from syscall_set_arguments() args

2019-03-28 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" After removing the start and count arguments of syscall_get_arguments() it seems reasonable to remove them from syscall_set_arguments(). Note, as of today, there are no users of syscall_set_arguments(). But we are told that there will be soon. But for now, at least

[RFC][PATCH 3/4 v2] syscalls: Remove start and number from syscall_get_arguments() args

2019-03-28 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" At Linux Plumbers, Andy Lutomirski approached me and pointed out that the function call syscall_get_arguments() implemented in x86 was horribly written and not optimized for the standard case of passing in 0 and 6 for the starting index and the number of system ca

Re: [RFC PATCH 3/3] powenv/mce: print additional information about mce error.

2019-03-28 Thread Michael Ellerman
Mahesh J Salgaonkar writes: > From: Mahesh Salgaonkar > > Print more information about mce error whether it is an hardware or > software error. > > Some of the mce errors can be easily categorized as hardware or software > errors e.g. UEs are due to hardware error, where as error triggered due to

Re: [RFC PATCH 2/3] powernv/mce: Print correct severity for mce error.

2019-03-28 Thread Michael Ellerman
Mahesh J Salgaonkar writes: > diff --git a/arch/powerpc/include/asm/mce.h b/arch/powerpc/include/asm/mce.h > index 8d0b1c24c636..314ed3f13d59 100644 > --- a/arch/powerpc/include/asm/mce.h > +++ b/arch/powerpc/include/asm/mce.h > @@ -110,17 +110,18 @@ enum MCE_LinkErrorType { > }; > > struct ma

Re: [RFC PATCH 1/3] powernv/mce: reduce mce console logs to lesser lines.

2019-03-28 Thread Michael Ellerman
Hi Mahesh, Thanks for doing this series. Mahesh J Salgaonkar writes: > From: Mahesh Salgaonkar > > Also add cpu number while displaying mce log. This will help cleaner logs > when mce hits on multiple cpus simultaneously. Can you include some examples of the output before and after, so it's ea

Re: [RFC PATCH] powerpc/book3e: KASAN Full support for 64bit

2019-03-28 Thread Daniel Axtens
Hi Christophe, > Daniel, > > This patch applies on top of my series. > > With this patch, I've managed to enable KASAN without the changes you > proposed on the KASAN core. This allows a full support of KASAN, ie not > limited to KASAN_MINIMAL. > > There is still some details to address, but it

Re: [PATCH v8 4/4] hugetlb: allow to free gigantic pages regardless of the configuration

2019-03-28 Thread Mike Kravetz
On 3/26/19 11:36 PM, Alexandre Ghiti wrote: > On systems without CONTIG_ALLOC activated but that support gigantic pages, > boottime reserved gigantic pages can not be freed at all. This patch > simply enables the possibility to hand back those pages to memory > allocator. > > Signed-off-by: Alexan

[PATCH V3 7/7] IB/mthca: Use the new FOLL_LONGTERM flag to get_user_pages_fast()

2019-03-28 Thread ira . weiny
From: Ira Weiny Use the new FOLL_LONGTERM to get_user_pages_fast() to protect against FS DAX pages being mapped. Signed-off-by: Ira Weiny --- Changes from V2: drivers/infiniband/hw/mthca/mthca_memfree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/in

[PATCH V3 6/7] IB/qib: Use the new FOLL_LONGTERM flag to get_user_pages_fast()

2019-03-28 Thread ira . weiny
From: Ira Weiny Use the new FOLL_LONGTERM to get_user_pages_fast() to protect against FS DAX pages being mapped. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny --- Changes from V2: added reviewed-by drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH V3 3/7] mm/gup: Change GUP fast to use flags rather than a write 'bool'

2019-03-28 Thread ira . weiny
From: Ira Weiny To facilitate additional options to get_user_pages_fast() change the singular write parameter to be gup_flags. This patch does not change any functionality. New functionality will follow in subsequent patches. Some of the get_user_pages_fast() call sites were unchanged because

[PATCH V3 5/7] IB/hfi1: Use the new FOLL_LONGTERM flag to get_user_pages_fast()

2019-03-28 Thread ira . weiny
From: Ira Weiny Use the new FOLL_LONGTERM to get_user_pages_fast() to protect against FS DAX pages being mapped. Signed-off-by: Ira Weiny --- Changes from V2 Per Dan Williams: set FOLL_LONGTERM on declaration line drivers/infiniband/hw/hfi1/user_pages.c | 4 ++-- 1 file changed, 2 in

[PATCH V3 4/7] mm/gup: Add FOLL_LONGTERM capability to GUP fast

2019-03-28 Thread ira . weiny
From: Ira Weiny DAX pages were previously unprotected from longterm pins when users called get_user_pages_fast(). Use the new FOLL_LONGTERM flag to check for DEVMAP pages and fall back to regular GUP processing if a DEVMAP page is encountered. Signed-off-by: Ira Weiny --- Changes from V2:

[PATCH V3 0/7] Add FOLL_LONGTERM to GUP fast and use it

2019-03-28 Thread ira . weiny
From: Ira Weiny Following discussion and review[1] here are the cleanups requested. The biggest change for V3 was the disabling of the ability to use FOLL_LONGTERM in get_user_pages[unlocked|locked|remote] Comments were also enhanced throughout to show potential users what FOLL_LONGTERM is all

[PATCH V3 2/7] mm/gup: Change write parameter to flags in fast walk

2019-03-28 Thread ira . weiny
From: Ira Weiny In order to support more options in the GUP fast walk, change the write parameter to flags throughout the call stack. This patch does not change functionality and passes FOLL_WRITE where write was previously used. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny --- Changes

[PATCH V3 1/7] mm/gup: Replace get_user_pages_longterm() with FOLL_LONGTERM

2019-03-28 Thread ira . weiny
From: Ira Weiny This patch 1 of 7, starts a series which aims to support FOLL_LONGTERM in get_user_pages_fast(). Some callers who would like to do a longterm (user controlled pin) of pages with the fast variant of GUP for performance purposes. Rather than have a separate get_user_pages_longterm

[PATCH v7 05/20] KVM: PPC: Book3S HV: Remove pmd_is_leaf()

2019-03-28 Thread Steven Price
Since pmd_large() is now always available, pmd_is_leaf() is redundant. Replace all uses with calls to pmd_large(). CC: Benjamin Herrenschmidt CC: Michael Ellerman CC: Paul Mackerras CC: kvm-...@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Steven Price --- arch/powerpc/kvm/

[PATCH v7 04/20] powerpc: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_large() functions/macros. For powerpc pmd_large() was already implemented, so hoist

Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds

2019-03-28 Thread Segher Boessenkool
On Thu, Mar 28, 2019 at 07:19:57AM +0100, Christophe Leroy wrote: > Le 27/03/2019 à 19:21, Segher Boessenkool a écrit : > >Yeah, okay, we should have some PHDRS statement here still. You can drop > >the dummy segment, and the notes segment as well, or you can keep the notes > >section in both the

[RFC PATCH v2 3/3] kasan: add interceptors for all string functions

2019-03-28 Thread Christophe Leroy
In the same spirit as commit 393f203f5fd5 ("x86_64: kasan: add interceptors for memset/memmove/memcpy functions"), this patch adds interceptors for string manipulation functions so that we can compile lib/string.o without kasan support hence allow the string functions to also be used from places wh

[RFC PATCH v2 2/3] lib/string: move sysfs string functions out of string.c

2019-03-28 Thread Christophe Leroy
In order to implement interceptors for string functions, move higher level sysfs related string functions out of string.c This patch creates a new file named string_sysfs.c Signed-off-by: Christophe Leroy --- v2: restored sysfs_streq() which had been lost in the move. lib/Makefile | 3

[RFC PATCH v2 1/3] kasan: move memset/memmove/memcpy interceptors in a dedicated file

2019-03-28 Thread Christophe Leroy
In preparation of the addition of interceptors for other string functions, this patch moves memset/memmove/memcpy interceptions in string.c Signed-off-by: Christophe Leroy --- v2: added missing includes mm/kasan/Makefile | 5 - mm/kasan/common.c | 26 -- mm/kasan/s

Re: [RFC PATCH] powerpc/book3e: KASAN Full support for 64bit

2019-03-28 Thread Christophe Leroy
Daniel, This patch applies on top of my series. With this patch, I've managed to enable KASAN without the changes you proposed on the KASAN core. This allows a full support of KASAN, ie not limited to KASAN_MINIMAL. There is still some details to address, but it boots OK on qemu-e500. Can y

[RFC PATCH] powerpc/book3e: KASAN Full support for 64bit

2019-03-28 Thread Christophe Leroy
The KASAN shadow area is mapped into vmemmap space: 0x8000 0400 to 0x8000 0600 . For this vmemmap has to be disabled. Cc: Daniel Axtens Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/Kconfig.debug| 3 +- arch/powe

[PATCH] soc/fsl/qe: Fix an error code in qe_pin_request()

2019-03-28 Thread Dan Carpenter
We forgot to set "err" on this error path. Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()") Signed-off-by: Dan Carpenter --- drivers/soc/fsl/qe/gpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/gpio.c b/drive

Re: [PATCH v2] kbuild: strip whitespace in cmd_record_mcount findstring

2019-03-28 Thread Joe Lawrence
On 3/28/19 8:57 AM, Masahiro Yamada wrote: Hi Joe, OK, confirmed. > > [ ... snip ] First, I was wondering why I could not reproduce this issue. Then, I found the reason was I was using the latest GNU Make compiled from the git source tree. I found the following commit: commit b90fabc8d

[PATCH] powerpc/nohash64: clean pgtable.h

2019-03-28 Thread Christophe Leroy
TRANSPARENT_HUGEPAGE is only supported by book3s VMEMMAP_REGION_ID is never used Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/64/pgtable.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/noha

[PATCH] powerpc/book3e: drop BUG_ON() in map_kernel_page()

2019-03-28 Thread Christophe Leroy
early_alloc_pgtable() never returns NULL as it panics on failure. This patch drops the three BUG_ON() which check the non nullity of early_alloc_pgtable() returned value. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable-book3e.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/a

Re: [PATCH v2] kbuild: strip whitespace in cmd_record_mcount findstring

2019-03-28 Thread Masahiro Yamada
Hi Joe, On Wed, Mar 27, 2019 at 2:33 AM Joe Lawrence wrote: > > On Tue, Mar 26, 2019 at 02:29:47PM +0900, Masahiro Yamada wrote: > > On Tue, Mar 26, 2019 at 1:05 AM Joe Lawrence > > wrote: > > > > > > CC_FLAGS_FTRACE may contain trailing whitespace that interferes with > > > findstring. > > >

Re: [PATCH v5 0/8] powerpc/powernv/pci: Make hotplug self-sufficient, independent of FW and DT

2019-03-28 Thread Oliver
On Thu, Mar 28, 2019 at 1:10 AM Bjorn Helgaas wrote: > > Hi Sergey, > > Since this doesn't touch drivers/pci, I assume powerpc folks will > handle this series. Let me know if otherwise. I've been looking at it and reviewed the last spin. I'll have another look next week. > On Mon, Mar 11, 2019

[PATCH] powerpc/pseries/mce: Improve array initialization.

2019-03-28 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar This is a follow up to the patch that fixed misleading print for TLB mutlihit due to wrongly populated mc_err_types[] array. Convert all the static array initialization to '[x] = val' style for better readability of array indexing and avoid any further confusion. Suggeste

Re: [PATCH v6 04/19] powerpc: mm: Add p?d_large() definitions

2019-03-28 Thread Steven Price
On 26/03/2019 16:58, Christophe Leroy wrote: > > > Le 26/03/2019 à 17:26, Steven Price a écrit : >> walk_page_range() is going to be allowed to walk page tables other than >> those of user space. For this it needs to know when it has reached a >> 'leaf' entry in the page tables. This information

Re: [PATCH][next] ASoC: fsl: fix spelling mistake: "missign" -> "missing"

2019-03-28 Thread Mukesh Ojha
On 3/28/2019 2:58 PM, Colin King wrote: From: Colin Ian King There is a spelling mistake in a dev_err message. Fix this. Signed-off-by: Colin Ian King Reviewed-by: Mukesh Ojha -Mukesh --- sound/soc/fsl/imx-audmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][next] ASoC: fsl: fix spelling mistake: "missign" -> "missing"

2019-03-28 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dev_err message. Fix this. Signed-off-by: Colin Ian King --- sound/soc/fsl/imx-audmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 72e37ca6cfbb..7983bd33