Re: [PATCH] powerpc: Mark variable `cpumsr` as unused

2018-11-07 Thread Mathieu Malaterre
On Thu, Nov 8, 2018 at 7:09 AM Christophe Leroy wrote: > > > > On 11/07/2018 08:26 PM, Mathieu Malaterre wrote: > > Add gcc attribute unused for `cpumsr` variable. > > > > Fix warnings treated as errors with W=1: > > > >arch/powerpc/kernel/process.c:231:16: error: variable ‘cpumsr’ set but >

Re: [PATCH kernel 2/3] vfio_pci: Allow regions to add own capabilities

2018-11-07 Thread Alexey Kardashevskiy
On 08/11/2018 17:21, David Gibson wrote: > On Mon, Oct 15, 2018 at 08:42:32PM +1100, Alexey Kardashevskiy wrote: >> VFIO regions already support region capabilities with a limited set of >> fields. However the subdriver might have to report to the userspace >> additional bits. >> >> This adds an

Re: [PATCH kernel 2/3] vfio_pci: Allow regions to add own capabilities

2018-11-07 Thread David Gibson
On Mon, Oct 15, 2018 at 08:42:32PM +1100, Alexey Kardashevskiy wrote: > VFIO regions already support region capabilities with a limited set of > fields. However the subdriver might have to report to the userspace > additional bits. > > This adds an add_capability() hook to vfio_pci_regops. > > Th

Re: [PATCH] net/wan/fsl_ucc_hdlc: add BQL support

2018-11-07 Thread David Miller
From: Mathias Thore Date: Wed, 7 Nov 2018 09:09:45 +0100 > Add byte queue limits support in the fsl_ucc_hdlc driver. > > Signed-off-by: Mathias Thore Applied to net-next.

Re: [PATCH kernel 1/2] powerpc/pseries: Remove IOMMU API support for non-LPAR systems

2018-11-07 Thread David Gibson
On Thu, Oct 18, 2018 at 06:52:42PM +1100, Alexey Kardashevskiy wrote: > The pci_dma_bus_setup_pSeries and pci_dma_dev_setup_pSeries hooks are > registered for the pseries platform which does not have FW_FEATURE_LPAR; > these would be pre-powernv platforms which we never supported PCI pass > through

Re: [PATCH kernel 2/2] powerpc/powernv/pseries: Rework device adding to IOMMU groups

2018-11-07 Thread David Gibson
On Thu, Oct 18, 2018 at 06:52:43PM +1100, Alexey Kardashevskiy wrote: > The powernv platform registers IOMMU groups and adds devices to them > from the pci_controller_ops::setup_bridge() hook except one case when > virtual functions (SRIOV VFs) are added from a bus notifier. > > The pseries platfo

Re: [PATCH kernel 4/5] powerpc/powernv/npu: Factor out OPAL calls from context manipulation

2018-11-07 Thread David Gibson
On Mon, Oct 15, 2018 at 08:33:00PM +1100, Alexey Kardashevskiy wrote: > At the moment the NPU context init/destroy code calls OPAL. The init > handler in OPAL configures the NPU to pass ATS requests to nested MMU, > the destroy handler does nothing besides sanity checks. > > Since the init handler

Re: [PATCH kernel 1/3] vfio_pci: Allow mapping extra regions

2018-11-07 Thread David Gibson
On Mon, Oct 15, 2018 at 08:42:31PM +1100, Alexey Kardashevskiy wrote: 65;5402;1c> So far we only allowed mapping of MMIO BARs to the userspace. However > there there are GPUs with on-board coherent RAM accessible via side > channels which we also want to map to the userspace. The first client > fo

Re: [PATCH] powerpc: Mark variable `cpumsr` as unused

2018-11-07 Thread Christophe Leroy
On 11/07/2018 08:26 PM, Mathieu Malaterre wrote: Add gcc attribute unused for `cpumsr` variable. Fix warnings treated as errors with W=1: arch/powerpc/kernel/process.c:231:16: error: variable ‘cpumsr’ set but not used [-Werror=unused-but-set-variable] arch/powerpc/kernel/process.c:296

Re: [PATCH kernel] powerpc/powernv/ioda1: Remove dead code for a single device PE

2018-11-07 Thread Alexey Kardashevskiy
Ping? On 16/10/2018 13:30, Alexey Kardashevskiy wrote: > At the moment PNV_IODA_PE_DEV is only used for NPU PEs which are not > present on IODA1 machines (i.e. POWER7) so let's remove a piece of > dead code. > > Signed-off-by: Alexey Kardashevskiy > --- > > We might actually want to get rid of

[linuxppc-dev][PATCH] powerpc: mm: numa: Suppress "VPHN is not supported. Disabling polling" prints

2018-11-07 Thread sathnaga
From: Satheesh Rajendran When VPHN function is not supported and during cpu hotplug event, kernel prints message 'VPHN function not supported. Disabling polling...'. Currently it prints on every hotplug event, it floods dmesg when a KVM guest tries to hotplug huge number of vcpus, let's just prin

[PATCH] powerpc: Add KVM guest defconfig

2018-11-07 Thread sathnaga
From: Satheesh Rajendran This patch adds new defconfig options for powerpc KVM guest and guest.config with additional config symbols enabled, which is to build kernel to boot without initramfs and can be used as place holder for guest specific additional config symbols in future. Signed-off-by:

Re: [PATCH] Documentation: fix spelling mistake, EACCESS -> EACCES

2018-11-07 Thread Jeremy Kerr
Hi Jon, Signed-off-by: Colin Ian King --- Documentation/filesystems/spufs.txt | 2 +- Documentation/gpu/drm-uapi.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Applied, thanks. This is the first patch to spufs.txt since 2006...I wonder if that stuff is being used by

Re: [PATCH v6 07/18] of: dynamic: change type of of_{at, de}tach_node() to void

2018-11-07 Thread Michael Ellerman
Frank Rowand writes: > On 11/7/18 4:08 AM, Michael Ellerman wrote: >> frowand.l...@gmail.com writes: >> >>> From: Frank Rowand >>> >>> of_attach_node() and of_detach_node() always return zero, so >>> their return value is meaningless. >> >> But should they always return zero? >> >> At least __

Re: [PATCH] Documentation: fix spelling mistake, EACCESS -> EACCES

2018-11-07 Thread Jonathan Corbet
On Fri, 26 Oct 2018 18:25:49 +0100 Colin King wrote: > Trivial fix to a spelling mistake of the error access name EACCESS, > rename to EACCES > > Signed-off-by: Colin Ian King > --- > Documentation/filesystems/spufs.txt | 2 +- > Documentation/gpu/drm-uapi.rst | 4 ++-- > 2 files changed,

Re: KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE

2018-11-07 Thread Michael Ellerman
On Wed, 2018-11-07 at 01:49:34 UTC, Scott Wood wrote: > TRACE_INCLUDE_PATH and TRACE_INCLUDE_FILE are used by > , so like that #include, they should > be outside #ifdef protection. > > They also need to be #undefed before defining, in case multiple trace > headers are included by the same C file.

Re: [1/3] powerpc/mm/64s: Consolidate SLB assertions

2018-11-07 Thread Michael Ellerman
On Tue, 2018-11-06 at 12:37:07 UTC, Michael Ellerman wrote: > The code for assert_slb_exists() and assert_slb_notexists() is almost > identical, except for the polarity of the WARN_ON(). In a future patch > we'll need to modify this code, so consolidate it now into a single > function. > > Signed-

Re: powerpc/npu-dma: Remove NPU DMA ops

2018-11-07 Thread Michael Ellerman
On Tue, 2018-10-30 at 11:02:03 UTC, Alistair Popple wrote: > The NPU IOMMU is setup to mirror the parent PCIe device IOMMU > setup. Therefore it does not make sense to call dma operations such as > dma_map_page, etc. directly on these devices. The existing dma-ops > simply print a warning if they a

[PATCH] lkdtm: print real addresses

2018-11-07 Thread Christophe Leroy
Today, when doing a lkdtm test before the readiness of the random generator, (ptrval) is printed instead of the address at which it perform the fault: [ 1597.337030] lkdtm: Performing direct entry EXEC_USERSPACE [ 1597.337142] lkdtm: attempting ok execution at (ptrval) [ 1597.337398] lkdtm: attemp

[PATCH] powerpc: Mark variable `cpumsr` as unused

2018-11-07 Thread Mathieu Malaterre
Add gcc attribute unused for `cpumsr` variable. Fix warnings treated as errors with W=1: arch/powerpc/kernel/process.c:231:16: error: variable ‘cpumsr’ set but not used [-Werror=unused-but-set-variable] arch/powerpc/kernel/process.c:296:16: error: variable ‘cpumsr’ set but not used [-Werror

Re: [alsa-devel] [PATCH] ASoC: fsl_ssi: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-07 Thread Fabio Estevam
On Wed, Nov 7, 2018 at 4:57 PM Yangtao Li wrote: > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li Reviewed-by: Fabio Estevam

Re: [PATCH] selftests/powerpc: Fix wild_bctr test to work on BE

2018-11-07 Thread Segher Boessenkool
Hi! On Wed, Nov 07, 2018 at 09:17:23PM +1100, Michael Ellerman wrote: > The selftest I recently added to test branching to an out-of-bounds > NIP doesn't work on big endian. It does fail but not in the right way. > That is it SEGVs trying to load from the opd at BAD_NIP, but it never > gets as far

Re: [RFC PATCH v1 5/6] powerpc/mm: Add a framework for Kernel Userspace Access Protection

2018-11-07 Thread Christophe LEROY
Le 07/11/2018 à 17:56, Christophe Leroy a écrit : This patch implements a framework for Kernel Userspace Access Protection. Then subarches will have to possibility to provide their own implementation by providing setup_kuap(), and lock/unlock_user_rd/wr_access We separate read and write acce

[RFC PATCH v1 6/6] powerpc/8xx: Add Kernel Userspace Access Protection

2018-11-07 Thread Christophe Leroy
This patch adds Kernel Userspace Access Protection on the 8xx. When a page is RO or RW, it is set RO or RW for Key 0 and NA for Key 1. Up to now, the User group is defined with Key 0 for both User and Supervisor. By changing the group to Key 0 for User and Key 1 for Supervisor, this patch preven

[RFC PATCH v1 5/6] powerpc/mm: Add a framework for Kernel Userspace Access Protection

2018-11-07 Thread Christophe Leroy
This patch implements a framework for Kernel Userspace Access Protection. Then subarches will have to possibility to provide their own implementation by providing setup_kuap(), and lock/unlock_user_rd/wr_access We separate read and write accesses because some subarches like book3s32 might only su

[RFC PATCH v1 4/6] powerpc/8xx: Add Kernel Userspace Execution Prevention

2018-11-07 Thread Christophe Leroy
This patch adds Kernel Userspace Execution Prevention on the 8xx. When a page is Executable, it is set Executable for Key 0 and NX for Key 1. Up to now, the User group is defined with Key 0 for both User and Supervisor. By changing the group to Key 0 for User and Key 1 for Supervisor, this patch

[RFC PATCH v1 3/6] powerpc: Add skeleton for Kernel Userspace Execution Prevention

2018-11-07 Thread Christophe Leroy
This patch adds a skeleton for Kernel Userspace Execution Prevention. Then subarches implementing it have to define CONFIG_PPC_HAVE_KUEP and provide setup_kuep() function. Signed-off-by: Christophe Leroy --- Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/powerpc/include/asm/mmu.h

[PATCH v1 1/6] powerpc/mm: Fix reporting of kernel execute faults on the 8xx

2018-11-07 Thread Christophe Leroy
On the 8xx, no-execute is set via PPP bits in the PTE. Therefore a no-exec fault generates DSISR_PROTFAULT error bits, not DSISR_NOEXEC_OR_G. This patch adds DSISR_PROTFAULT in the test mask. Fixes: d3ca587404b3 ("powerpc/mm: Fix reporting of kernel execute faults") Signed-off-by: Christophe Lero

[RFC PATCH v1 2/6] powerpc: Add framework for Kernel Userspace Protection

2018-11-07 Thread Christophe Leroy
This patch adds a skeleton for Kernel Userspace Protection functionnalities like Kernel Userspace Access Protection and Kernel Userspace Execution Prevention Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mmu.h | 2 ++ arch/powerpc/kernel/setup_64.c | 1 + arch/powerpc/mm/init-comm

Re: [PATCH v6 00/18] of: overlay: validation checks, subsequent fixes

2018-11-07 Thread Frank Rowand
On 11/7/18 4:09 AM, Michael Ellerman wrote: > Frank Rowand writes: > >> Hi Michael, Ben, Paul, >> >> Do you know if anyone has tried this series on PowerPC? > > I have. No obvious breakage. > > My test does a loop of adding and removing multiple CPUs multiple times, > and in the past that has u

Re: [PATCH v6 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2018-11-07 Thread Frank Rowand
On 11/7/18 4:23 AM, Michael Ellerman wrote: > frowand.l...@gmail.com writes: > >> From: Frank Rowand >> >> "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" > > It would be clearer if you said 'The previous commit "of: overlay ..." Will fix. >> added a missing of_node_get() t

Re: [PATCH v6 03/18] of: overlay: add missing of_node_get() in __of_attach_node_sysfs

2018-11-07 Thread Frank Rowand
On 11/7/18 4:14 AM, Michael Ellerman wrote: > frowand.l...@gmail.com writes: > >> From: Frank Rowand >> >> There is a matching of_node_put() in __of_detach_node_sysfs() >> >> Remove misleading comment from function header comment for >> of_detach_node(). >> >> This patch may result in memory leak

Re: [PATCH v6 07/18] of: dynamic: change type of of_{at,de}tach_node() to void

2018-11-07 Thread Frank Rowand
On 11/7/18 4:08 AM, Michael Ellerman wrote: > frowand.l...@gmail.com writes: > >> From: Frank Rowand >> >> of_attach_node() and of_detach_node() always return zero, so >> their return value is meaningless. > > But should they always return zero? > > At least __of_attach_node_sysfs() can fail in

Re: [PATCH] KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE

2018-11-07 Thread Naveen N. Rao
Scott Wood wrote: TRACE_INCLUDE_PATH and TRACE_INCLUDE_FILE are used by , so like that #include, they should be outside #ifdef protection. They also need to be #undefed before defining, in case multiple trace headers are included by the same C file. This became the case on book3e after commit c

[PATCH trivial] powerpc: Typo s/use use/use/

2018-11-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- arch/powerpc/include/asm/nohash/32/pte-40x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/nohash/32/pte-40x.h b/arch/powerpc/include/asm/nohash/32/pte-40x.h index 661f4599f2fc54a7..12c6811e344bc5ea 100644 --- a

Re: [PATCH v6 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2018-11-07 Thread Michael Ellerman
frowand.l...@gmail.com writes: > From: Frank Rowand > > "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" It would be clearer if you said 'The previous commit "of: overlay ..." > added a missing of_node_get() to __of_attach_node_sysfs(). This > results in a refcount imbalance

Re: [PATCH v6 03/18] of: overlay: add missing of_node_get() in __of_attach_node_sysfs

2018-11-07 Thread Michael Ellerman
frowand.l...@gmail.com writes: > From: Frank Rowand > > There is a matching of_node_put() in __of_detach_node_sysfs() > > Remove misleading comment from function header comment for > of_detach_node(). > > This patch may result in memory leaks from code that directly calls > the dynamic node add a

Re: [PATCH v6 00/18] of: overlay: validation checks, subsequent fixes

2018-11-07 Thread Michael Ellerman
Frank Rowand writes: > Hi Michael, Ben, Paul, > > Do you know if anyone has tried this series on PowerPC? I have. No obvious breakage. My test does a loop of adding and removing multiple CPUs multiple times, and in the past that has uncovered refcounting bugs. So I don't think we're leaking any

Re: [PATCH v6 07/18] of: dynamic: change type of of_{at, de}tach_node() to void

2018-11-07 Thread Michael Ellerman
frowand.l...@gmail.com writes: > From: Frank Rowand > > of_attach_node() and of_detach_node() always return zero, so > their return value is meaningless. But should they always return zero? At least __of_attach_node_sysfs() can fail in several ways. And there's also this in __of_detach_node()

Re: [PATCH 12/24] powerpc/mm: Fix reporting of kernel execute faults

2018-11-07 Thread Benjamin Herrenschmidt
On Wed, 2018-11-07 at 09:35 +0100, Christophe LEROY wrote: > Hi Ben, > > I have an issue on the 8xx with this change Ah ouch... .../... > > +/* Is this a bad kernel fault ? */ > > +static bool bad_kernel_fault(bool is_exec, unsigned long error_code, > > +unsigned long

[PATCH] selftests/powerpc: Fix wild_bctr test to work on BE

2018-11-07 Thread Michael Ellerman
The selftest I recently added to test branching to an out-of-bounds NIP doesn't work on big endian. It does fail but not in the right way. That is it SEGVs trying to load from the opd at BAD_NIP, but it never gets as far as branching to BAD_NIP. To fix it we need to create an opd which is reachabl

Re: [alsa-devel] Build regressions/improvements in v4.20-rc1 (sound/pci/hda/patch_ca0132.c)

2018-11-07 Thread Takashi Iwai
On Wed, 07 Nov 2018 09:44:25 +0100, Geert Uytterhoeven wrote: > > Hi Iwai-san, > > On Tue, Nov 6, 2018 at 5:18 PM Takashi Iwai wrote: > > On Tue, 06 Nov 2018 02:04:47 +0100, > > Randy Dunlap wrote: > > > > > > On 11/5/18 2:12 PM, Geert Uytterhoeven wrote: > > > > On Mon, Nov 5, 2018 at 11:07 PM

Re: [alsa-devel] Build regressions/improvements in v4.20-rc1 (sound/pci/hda/patch_ca0132.c)

2018-11-07 Thread Geert Uytterhoeven
Hi Iwai-san, On Tue, Nov 6, 2018 at 5:18 PM Takashi Iwai wrote: > On Tue, 06 Nov 2018 02:04:47 +0100, > Randy Dunlap wrote: > > > > On 11/5/18 2:12 PM, Geert Uytterhoeven wrote: > > > On Mon, Nov 5, 2018 at 11:07 PM Geert Uytterhoeven > > > wrote: > > >> Below is the list of build error/warning

Re: [PATCH 12/24] powerpc/mm: Fix reporting of kernel execute faults

2018-11-07 Thread Christophe LEROY
Hi Ben, I have an issue on the 8xx with this change Le 19/07/2017 à 06:49, Benjamin Herrenschmidt a écrit : We currently test for is_exec and DSISR_PROTFAULT but that doesn't make sense as this is the wrong error bit to test for an execute permission failure. On the 8xx, on an exec permission

[PATCH] net/wan/fsl_ucc_hdlc: add BQL support

2018-11-07 Thread Mathias Thore
Add byte queue limits support in the fsl_ucc_hdlc driver. Signed-off-by: Mathias Thore --- drivers/net/wan/fsl_ucc_hdlc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 4d6409605207..7a42336c8af8 100644 --- a/driv