[RFC] mm: Generalize notify_page_fault()

2019-05-29 Thread Anshuman Khandual
Similar notify_page_fault() definitions are being used by architectures duplicating much of the same code. This attempts to unify them into a single implementation, generalize it and then move it to a common place. kprobes_built_in() can detect CONFIG_KPROBES, hence notify_page_fault() must not be

[PATCH v8 7/7] ia64: hide build option IOMMU_DEFAULT_PASSTHROUGH

2019-05-29 Thread Zhen Lei
The DMA mode PASSTHROUGH is not used on ia64. Signed-off-by: Zhen Lei --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index f6c030433d38048..f7400e35628dce4 100644 --- a/drivers/iommu/Kconfig +++

[PATCH v8 6/7] iommu/amd: add support for IOMMU default DMA mode build options

2019-05-29 Thread Zhen Lei
The default DMA mode of AMD IOMMU is LAZY, this patch make it can be set to STRICT at build time. It can be overridden by boot option. There is no functional change. Signed-off-by: Zhen Lei --- drivers/iommu/Kconfig | 2 +- drivers/iommu/amd_iommu_init.c | 3 ++- 2 files changed, 3

[PATCH v8 5/7] iommu/vt-d: add support for IOMMU default DMA mode build options

2019-05-29 Thread Zhen Lei
The default DMA mode of INTEL IOMMU is LAZY, this patch make it can be set to STRICT at build time. It can be overridden by boot option. There is no functional change. Signed-off-by: Zhen Lei --- drivers/iommu/Kconfig | 2 +- drivers/iommu/intel-iommu.c | 2 +- 2 files changed, 2

[PATCH v8 4/7] powernv/iommu: add support for IOMMU default DMA mode build options

2019-05-29 Thread Zhen Lei
The default DMA mode is PASSTHROUGH on powernv, this patch make it can be set to STRICT at build time. It can be overridden by boot option. There is no functional change. Signed-off-by: Zhen Lei --- arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++- drivers/iommu/Kconfig |

[PATCH v8 1/7] iommu: enhance IOMMU default DMA mode build options

2019-05-29 Thread Zhen Lei
First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the opportunity to set {lazy|strict} mode as default at build time. Then put the three config options in an choice, make people can only choose one of the three at a time. Signed-off-by: Zhen Lei --- drivers/iommu/Kconfig | 42

[PATCH v8 2/7] x86/dma: use IS_ENABLED() to simplify the code

2019-05-29 Thread Zhen Lei
This patch removes the ifdefs around CONFIG_IOMMU_DEFAULT_PASSTHROUGH to improve readablity. Signed-off-by: Zhen Lei --- arch/x86/kernel/pci-dma.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index

[PATCH v8 3/7] s390/pci: add support for IOMMU default DMA mode build options

2019-05-29 Thread Zhen Lei
The default DMA mode is LAZY on s390, this patch make it can be set to STRICT at build time. It can be overridden by boot option. There is no functional change. Signed-off-by: Zhen Lei --- arch/s390/pci/pci_dma.c | 2 +- drivers/iommu/Kconfig | 2 ++ 2 files changed, 3 insertions(+), 1

[PATCH v8 0/7] iommu: enhance IOMMU default DMA mode build options

2019-05-29 Thread Zhen Lei
v7--> v8 1. Split into multiple small patches base on ARCHs or IOMMU drivers. 2. Hide the unsupported build options on the related ARCH or IOMMU. v6 --> v7: 1. Fix some text editing errors v5 --> v6: 1. give up adding boot option iommu.dma_mode v4 --> v5: As Hanjun and Thomas Gleixner's

Re: [PATCH v3 1/3] PCI: Introduce pcibios_ignore_alignment_request

2019-05-29 Thread Alexey Kardashevskiy
On 28/05/2019 17:39, Shawn Anastasio wrote: > > > On 5/28/19 1:27 AM, Alexey Kardashevskiy wrote: >> >> >> On 28/05/2019 15:36, Oliver wrote: >>> On Tue, May 28, 2019 at 2:03 PM Shawn Anastasio >>> wrote: Introduce a new pcibios function pcibios_ignore_alignment_request which

[PATCH 4.9 087/128] cpufreq: pmac32: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 4.9 086/128] cpufreq/pasemi: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7:

[PATCH 4.9 107/128] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR:

[PATCH 4.14 159/193] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR:

[PATCH 4.14 132/193] cpufreq: pmac32: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 4.14 131/193] cpufreq/pasemi: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7:

[PATCH 4.19 181/276] cpufreq: pmac32: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 4.19 180/276] cpufreq/pasemi: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7:

[PATCH 4.19 215/276] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR:

[PATCH 5.0 249/346] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR:

[PATCH 5.0 208/346] cpufreq: pmac32: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 5.0 207/346] cpufreq/pasemi: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7:

[PATCH 5.1 275/405] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR:

[PATCH 5.1 226/405] cpufreq/pasemi: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ] The call to of_get_cpu_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7:

[PATCH 5.1 227/405] cpufreq: pmac32: fix possible object reference leak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ] The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

Re: [PATCH] powerpc/mm: Move some of the boot time info print to generic file

2019-05-29 Thread Aneesh Kumar K.V
On 5/29/19 9:25 PM, Christophe Leroy wrote: "Aneesh Kumar K.V" a écrit : With radix translation enabled we find in dmesg  hash-mmu: ppc64_pft_size    = 0x0  hash-mmu: kernel vmalloc start   = 0xc008  hash-mmu: kernel IO start    = 0xc00a  hash-mmu: kernel vmemmap

Re: [PATCH] powerpc/powernv: Show checkstop reason for NPU2 HMIs

2019-05-29 Thread Andrew Donnellan
On 23/5/19 10:28 pm, Frederic Barrat wrote: If the kernel is notified of an HMI caused by the NPU2, it's currently not being recognized and it logs the default message: Unknown Malfunction Alert of type 3 The NPU on Power 9 has 3 Fault Isolation Registers, so that's a lot of possible

Re: [PATCH v2 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-29 Thread Martin K. Petersen
Tyrel, > Wire up the host_reset function in our driver_template to allow a user > requested adpater reset via the host_reset sysfs attribute. Series applied to 5.3/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH] dlpar: Fix a missing-check bug in dlpar_parse_cc_property()

2019-05-29 Thread Gen Zhang
In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang Acked-by: Nathan Lynch --- diff --git a/arch/powerpc/platforms/pseries/dlpar.c

[PATCH 22/22] docs: fix broken documentation links

2019-05-29 Thread Mauro Carvalho Chehab
Mostly due to x86 and acpi conversion, several documentation links are still pointing to the old file. Fix them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/acpi/dsd/leds.txt | 2 +- Documentation/admin-guide/kernel-parameters.rst | 6 +++---

Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage

2019-05-29 Thread Mike Kravetz
On 5/28/19 2:49 AM, Wanpeng Li wrote: > Cc Paolo, > Hi all, > On Wed, 14 Feb 2018 at 06:34, Mike Kravetz wrote: >> >> On 02/12/2018 06:48 PM, Michael Ellerman wrote: >>> Andrew Morton writes: >>> On Thu, 08 Feb 2018 12:30:45 + Punit Agrawal wrote: >> >> So I don't

[PATCH 00/22] Some documentation fixes

2019-05-29 Thread Mauro Carvalho Chehab
Fix several warnings and broken links. This series was generated against linux-next, but was rebased to be applied at docs-next. It should apply cleanly on either tree. There's a git tree with all of them applied on the top of docs/docs-next at:

[PATCH 09/22] docs: mark orphan documents as such

2019-05-29 Thread Mauro Carvalho Chehab
Sphinx doesn't like orphan documents: Documentation/accelerators/ocxl.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32f429-overview.rst: WARNING: document isn't

[PATCH v2] KVM: PPC: Report single stepping capability

2019-05-29 Thread Fabiano Rosas
When calling the KVM_SET_GUEST_DEBUG ioctl, userspace might request the next instruction to be single stepped via the KVM_GUESTDBG_SINGLESTEP control bit of the kvm_guest_debug structure. We currently don't have support for guest single stepping implemented in Book3S HV. This patch adds the

Re: [PATCH][next] soc: fsl: fix spelling mistake "Firmaware" -> "Firmware"

2019-05-29 Thread Li Yang
On Tue, May 21, 2019 at 3:57 AM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in a pr_err message. Fix it. > > Signed-off-by: Colin Ian King Applied. Thanks! Regards, Leo > --- > drivers/soc/fsl/dpaa2-console.c | 2 +- > 1 file changed, 1 insertion(+), 1

[PATCH v3] mm: add account_locked_vm utility function

2019-05-29 Thread Daniel Jordan
locked_vm accounting is done roughly the same way in five places, so unify them in a helper. Include the helper's caller in the debug print to distinguish between callsites. Error codes stay the same, so user-visible behavior does too. The one exception is that the -EPERM case in

Re: [PATCH v2] mm: add account_locked_vm utility function

2019-05-29 Thread Alex Williamson
On Tue, 28 May 2019 11:04:24 -0400 Daniel Jordan wrote: > On Sat, May 25, 2019 at 02:51:18PM -0700, Andrew Morton wrote: > > On Fri, 24 May 2019 13:50:45 -0400 Daniel Jordan > > wrote: > > > > > locked_vm accounting is done roughly the same way in five places, so > > > unify them in a

Re: [PATCH v2] mm: add account_locked_vm utility function

2019-05-29 Thread Daniel Jordan
On Wed, May 29, 2019 at 11:05:48AM -0700, Ira Weiny wrote: > On Fri, May 24, 2019 at 01:50:45PM -0400, Daniel Jordan wrote: > > +static inline int account_locked_vm(struct mm_struct *mm, unsigned long > > pages, > > + bool inc) > > +{ > > + int ret; > > + > > +

Re: [PATCH v2] mm: add account_locked_vm utility function

2019-05-29 Thread Ira Weiny
On Fri, May 24, 2019 at 01:50:45PM -0400, Daniel Jordan wrote: [snip] > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 0e8834ac32b7..72c1034d2ec7 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1564,6 +1564,25 @@ long get_user_pages_unlocked(unsigned long start,

Re: kmemleak: 1157 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

2019-05-29 Thread Catalin Marinas
On Tue, May 28, 2019 at 09:14:12PM +0200, Mathieu Malaterre wrote: > On Tue, May 28, 2019 at 7:21 AM Michael Ellerman wrote: > > Mathieu Malaterre writes: > > > Is there a way to dump more context (somewhere in of tree > > > flattening?). I cannot make sense of the following: > > > > Hmm. Not

Re: [PATCH] powerpc/mm: Move some of the boot time info print to generic file

2019-05-29 Thread Christophe Leroy
"Aneesh Kumar K.V" a écrit : With radix translation enabled we find in dmesg hash-mmu: ppc64_pft_size= 0x0 hash-mmu: kernel vmalloc start = 0xc008 hash-mmu: kernel IO start= 0xc00a hash-mmu: kernel vmemmap start = 0xc00c This is because

Re: [PATCH v3 3/3] powerpc/pseries: Allow user-specified PCI resource alignment after init

2019-05-29 Thread Bjorn Helgaas
On Mon, May 27, 2019 at 11:03:13PM -0500, Shawn Anastasio wrote: > On pseries, custom PCI resource alignment specified with the commandline > argument pci=resource_alignment is disabled due to PCI resources being > managed by the firmware. However, in the case of PCI hotplug the > resources are

Re: [PATCH v3 1/3] PCI: Introduce pcibios_ignore_alignment_request

2019-05-29 Thread Bjorn Helgaas
On Tue, May 28, 2019 at 03:36:34PM +1000, Oliver wrote: > On Tue, May 28, 2019 at 2:03 PM Shawn Anastasio wrote: > > > > Introduce a new pcibios function pcibios_ignore_alignment_request > > which allows the PCI core to defer to platform-specific code to > > determine whether or not to ignore

Re: [PATCH] powerpc/configs: Rename foo_basic_defconfig to foo_base.config

2019-05-29 Thread Michael Ellerman
Masahiro Yamada writes: > On Tue, May 28, 2019 at 9:10 PM Christoph Hellwig wrote: >> >> On Tue, May 28, 2019 at 06:16:14PM +1000, Michael Ellerman wrote: >> > We have several "defconfigs" that are not actually full defconfigs >> > they are just a base set of options which are then merged with

[PATCH] powerpc/64s: Fix misleading SPR and timebase information

2019-05-29 Thread Shaokun Zhang
pr_info shows SPR and timebase as a decimal value with a '0x' prefix, which is somewhat misleading. Fix it to print hexadecimal, as was intended. Fixes: 10d91611f426 ("powerpc/64s: Reimplement book3s idle code in C") Cc: Michael Ellerman Cc: Nicholas Piggin Signed-off-by: Shaokun Zhang ---

Re: [PATCH v3 1/3] powerpc: Fix vDSO clock_getres()

2019-05-29 Thread Sasha Levin
Hi, [This is an automated email] This commit has been processed because it contains a "Fixes:" tag, fixing commit: a7f290dad32ee [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel. The bot has tested the following trees: v5.1.4, v5.0.18, v4.19.45, v4.14.121, v4.9.178,

Re: [PATCH v4 1/3] powerpc: Fix vDSO clock_getres()

2019-05-29 Thread Sasha Levin
Hi, [This is an automated email] This commit has been processed because it contains a "Fixes:" tag, fixing commit: a7f290dad32ee [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel. The bot has tested the following trees: v5.1.4, v5.0.18, v4.19.45, v4.14.121, v4.9.178,

Re: [PATCH v4 2/2] powerpc: Fix compile issue with force DAWR

2019-05-29 Thread Christoph Hellwig
> +config PPC_DAWR > + bool > + default n "default n" is the default default. No need to write this line. > +++ b/arch/powerpc/kernel/dawr.c > @@ -0,0 +1,100 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +// > +// DAWR infrastructure > +// > +// Copyright 2019, Michael Neuling, IBM