Re: [PATCH 2/2] powerpc/cpu: post the event cpux add/remove instead of online/offline during hotplug

2018-08-03 Thread Michael Ellerman
Hi Pingfan, Pingfan Liu writes: > Technically speaking, echo 1/0 > cpuX/online is only a subset of cpu > hotplug/unplug, i.e. add/remove. The latter one includes the physical > adding/removing of a cpu device. Some user space tools such as kexec-tools > resort to the event add/remove to automatic

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 22:08 +0300, Michael S. Tsirkin wrote: > > > > Please go through these patches and review whether this approach broadly > > > > makes sense. I will appreciate suggestions, inputs, comments regarding > > > > the patches or the approach in general. Thank you. > > > > > > Jason

Re: [PATCH] powerpc/powernv/opal: Use standard interrupts property when available

2018-08-03 Thread Michael Ellerman
Benjamin Herrenschmidt writes: ... > diff --git a/arch/powerpc/platforms/powernv/opal-irqchip.c > b/arch/powerpc/platforms/powernv/opal-irqchip.c > index 9d1b8c0aaf93..46785eaf625d 100644 > --- a/arch/powerpc/platforms/powernv/opal-irqchip.c > +++ b/arch/powerpc/platforms/powernv/opal-irqchip.c >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 22:07 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > > 2- Make virtio use the DMA API with our custom platform-provided > > > > swiotlb callbacks

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 22:07 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > > 2- Make virtio use the DMA API with our custom platform-provided > > > > swiotlb callbacks

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 22:07 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > > 2- Make virtio use the DMA API with our custom platform-provided > > > > swiotlb callbacks

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 22:07 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > > 2- Make virtio use the DMA API with our custom platform-provided > > > > swiotlb callbacks

MPC83xx reset status register (RSR, offset 0x910)

2018-08-03 Thread Radu Rendec
Hi Everyone, Is there any kernel code that handles the "reset status register" (RSR) on MPC83xx? I looked at arch/powerpc/platforms/83xx/misc.c, but it seems to only map the reset register area and it's static. The watchdog driver (drivers/watchdog/mpc8xxx_wdt.c) doesn't seem to look at it either

Re: vio.c:__vio_register_driver && LPAR Migration issue

2018-08-03 Thread Tyrel Datwyler
On 08/02/2018 11:15 AM, Michael Bringmann wrote: > Hello: > I have been observing an anomaly during LPAR migrations between > a couple of P8 systems. > > This is the problem. After migrating an LPAR, the PPC mobility code > receives RTAS requests to delete nodes with platform-/hardware-specif

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 12:05:07AM -0700, Christoph Hellwig wrote: > On Thu, Aug 02, 2018 at 04:13:09PM -0500, Benjamin Herrenschmidt wrote: > > So let's differenciate the two problems of having an IOMMU (real or > > emulated) which indeeds adds overhead etc... and using the DMA API. > > > > At th

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 10:41:41AM +0800, Jason Wang wrote: > > > On 2018年08月03日 04:55, Michael S. Tsirkin wrote: > > On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > > > This patch series is the follow up on the discussions we had before about > > > the RFC titled [RFC,V2] vi

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > 2- Make virtio use the DMA API with our custom platform-provided > > > swiotlb callbacks when needed, that is when not using IOMMU *and* > > > running on a s

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 09:02 -0700, Christoph Hellwig wrote: > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > > 2- Make virtio use the DMA API with our custom platform-provided > > > > swiotlb callbacks

Re: [PATCH 2/2] powerpc/cpu: post the event cpux add/remove instead of online/offline during hotplug

2018-08-03 Thread kbuild test robot
/commits/Pingfan-Liu/powerpc-cpuidle-dynamically-register-unregister-cpuidle_device-during-hotplug/20180803-151916 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-allnoconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0

Applied "ASoC: fsl_esai: Mark expected switch fall-through" to the asoc tree

2018-08-03 Thread Mark Brown
The patch ASoC: fsl_esai: Mark expected switch fall-through has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sen

[PATCH 2/7] ASoC: fsl_esai: Mark expected switch fall-through

2018-08-03 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1222121 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/fsl/fsl_esai.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fs

[PATCH 0/7] ASoC: Mark expected switch fall-throughs

2018-08-03 Thread Gustavo A. R. Silva
Hi all, In preparation to enabling -Wimplicit-fallthrough, this patchset aims to add some annotations in order to mark switch cases where we are expecting to fall through. Thanks Gustavo A. R. Silva (7): ASoC: davinci-i2s: mark expected switch fall-through ASoC: fsl_esai: Mark expected switc

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Benjamin Herrenschmidt
On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > 2- Make virtio use the DMA API with our custom platform-provided > > swiotlb callbacks when needed, that is when not using IOMMU *and* > > running on a secure VM in our case. > > And total NAK the customer platform-provided part of

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Christoph Hellwig
On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > 2- Make virtio use the DMA API with our custom platform-provided > > > swiotlb callbacks when needed, that is when not using IOMMU *and* > > > running on a s

[PATCH v2] selftests/powerpc: Avoid remaining process/threads

2018-08-03 Thread Breno Leitao
There are some powerpc selftests, as tm/tm-unavailable, that run for a long period (>120 seconds), and if it is interrupted, as pressing CRTL-C (SIGINT), the foreground process (harness) dies but the child process and threads continue to execute (with PPID = 1 now) in background. In this case, you

[GIT PULL] Please pull powerpc/linux.git powerpc-4.18-5 tag

2018-08-03 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 4.18: The following changes since commit b03897cf318dfc47de33a7ecbc7655584266f034: powerpc/powernv: Fix save/restore of SPRG3 on entry/exit from stop (idle) (2018-07-18 20:40:17 +1000) are avai

Re: [PATCH v4 5/6] powerpc: Add show_user_instructions()

2018-08-03 Thread Murilo Opsfelder Araujo
Hi, everyone. I'd like to thank you all that contributed to refining and making this series better. I did appreciate. Thank you! Cheers Murilo

[PATCH] misc: cxl: changed asterisk position

2018-08-03 Thread Parth Y Shah
Resolved <"foo* bar" should be "foo *bar"> error Signed-off-by: Parth Y Shah --- drivers/misc/cxl/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c index 70dbb6d..d45f3e6 100644 --- a/drivers/misc/cxl/fault.c +++ b/dri

Re: powerpc/powernv: Fix concurrency issue with npu->mmio_atsd_usage

2018-08-03 Thread Michael Ellerman
On Fri, 2018-08-03 at 04:03:36 UTC, Reza Arbab wrote: > We've encountered a performance issue when multiple processors stress > {get,put}_mmio_atsd_reg(). These functions contend for mmio_atsd_usage, > an unsigned long used as a bitmask. > > The accesses to mmio_atsd_usage are done using test_and_

Re: powernv/cpuidle: Fix idle states all being marked invalid

2018-08-03 Thread Michael Ellerman
On Thu, 2018-08-02 at 15:39:51 UTC, Nicholas Piggin wrote: > Commit 9c7b185ab2 ("powernv/cpuidle: Parse dt idle properties into > global structure") parses dt idle states into structs, but never > marks them valid. This results in all idle states being lost. > > Cc: Akshay Adiga > Cc: Gautham R.

Re: powerpc/4xx: Fix error return path in ppc4xx_msi_probe()

2018-08-03 Thread Michael Ellerman
On Tue, 2018-07-31 at 01:44:14 UTC, Guenter Roeck wrote: > An arbitrary error in ppc4xx_msi_probe() quite likely results in a > crash similar to the following, seen after dma_alloc_coherent() > returned an error. > > Unable to handle kernel paging request for data at address 0x > Faulting

Re: powerpc: do not redefined NEED_DMA_MAP_STATE

2018-08-03 Thread Michael Ellerman
On Mon, 2018-07-30 at 07:37:21 UTC, Christoph Hellwig wrote: > kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it > from PPC64 and NOT_COHERENT_CACHE instead. > > Signed-off-by: Christoph Hellwig Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/06832fc004815b

Re: [PATCH] powerpc/selftests: Avoid backgroud process/threads

2018-08-03 Thread Michael Ellerman
Breno Leitao writes: > Current tm-unavailable test runs for a long period (>120 seconds), and if it > is > interrupted, as pressing CRTL-C (SIGINT), the foreground process (harness) > dies > but the child process and threads continue to execute (with PPID = 1 now). > > In this case, you'd think

Re: [PATCH 1/2] of: Add of_machine_compatible_match()

2018-08-03 Thread Michael Ellerman
Rob Herring writes: > On Mon, Jul 30, 2018 at 7:15 AM Michael Ellerman wrote: ... >> diff --git a/include/linux/of.h b/include/linux/of.h >> index 4d25e4f952d9..05e3e23a3a57 100644 >> --- a/include/linux/of.h >> +++ b/include/linux/of.h >> @@ -389,6 +389,7 @@ extern int of_alias_get_id(struct dev

Re: [PATCH] powerpc/mm: Don't report PUDs as memory leaks when using kmemleak

2018-08-03 Thread Michael Ellerman
Paul Menzel writes: > On 07/30/18 08:43, Michael Ellerman wrote: >> Paul Menzel writes: >>> Am 19.07.2018 um 16:33 schrieb Michael Ellerman: >> ... The fix is fairly simple. We need to tell kmemleak to ignore PUD allocations and never report them as leaks. We can also tell it not t

Re: [PATCH] powerpc/pasemi: Seach for PCI root bus by compatible property

2018-08-03 Thread Michael Ellerman
Olof Johansson writes: > On Wed, Aug 1, 2018 at 7:36 AM, Michael Ellerman wrote: >> Christian Zigotzky writes: >> >>> Just for info: I tested it on my Nemo board today and it works. >> >> Awesome thanks. >> >> That's probably sufficient to merge it, and if it breaks anything we can >> always rev

[PATCH v3 0/4] powerpc/64: copy_tofrom_user exception handling improvements

2018-08-03 Thread Paul Mackerras
This is a repost of a series that I posted back in 2016 but which was never applied. It aims to make the exception handling code in __copy_tofrom_user_base clearer and easier to verify, and strengthens the selftests for the user copy code to test all the paths and to test the exception handling.

[PATCH v3 4/4] powerpc/64: Copy as much as possible in __copy_tofrom_user

2018-08-03 Thread Paul Mackerras
In __copy_tofrom_user, if we encounter an exception on a store, we stop copying and return the number of bytes not copied. However, if the store is wider than one byte and is to an unaligned address, it is possible that the store operand overlaps a page boundary and the exception occurred on the l

[PATCH v3 1/4] powerpc/64: Make exception table clearer in __copy_tofrom_user_base

2018-08-03 Thread Paul Mackerras
This aims to make the generation of exception table entries for the loads and stores in __copy_tofrom_user_base clearer and easier to verify. Instead of having a series of local labels on the loads and stores, with a series of corresponding labels later for the exception handlers, we now use macro

[PATCH v3 3/4] selftests/powerpc/64: Test exception cases in copy_tofrom_user

2018-08-03 Thread Paul Mackerras
From: Michael Ellerman This adds a set of test cases to test the behaviour of copy_tofrom_user when exceptions are encountered accessing the source or destination. Currently, copy_tofrom_user does not always copy as many bytes as possible when an exception occurs on a store to the destination, a

[PATCH v3 2/4] selftests/powerpc/64: Test all paths through copy routines

2018-08-03 Thread Paul Mackerras
The hand-coded assembler 64-bit copy routines include feature sections that select one code path or another depending on which CPU we are executing on. The self-tests for these copy routines end up testing just one path. This adds a mechanism for selecting any desired code path at compile time, a

Re: [PATCH v5 09/11] hugetlb: Introduce generic version of huge_ptep_set_wrprotect

2018-08-03 Thread Alexandre Ghiti
Hi Michael, Thanks, I will then remove those two specific implementations and we'll use the generic ones. I send a v6 asap. Thanks again, Alex On 08/03/2018 10:51 AM, Michael Ellerman wrote: Hi Alex, Sorry missed your previous mail. Alex Ghiti writes: Ok, I tried every defconfig avail

Re: [PATCH v5 09/11] hugetlb: Introduce generic version of huge_ptep_set_wrprotect

2018-08-03 Thread Michael Ellerman
Hi Alex, Sorry missed your previous mail. Alex Ghiti writes: > Ok, I tried every defconfig available: > > - for the nohash/32, I found that I could use mpc885_ads_defconfig and I > activated HUGETLBFS. > I removed the definition of huge_ptep_set_wrprotect from > nohash/32/pgtable.h, add an #er

Re: [PATCH v4 5/6] powerpc: Add show_user_instructions()

2018-08-03 Thread Michael Ellerman
Christophe LEROY writes: > Le 03/08/2018 à 02:42, Murilo Opsfelder Araujo a écrit : >> Hi, Christophe. >> On Thu, Aug 02, 2018 at 07:26:20AM +0200, Christophe LEROY wrote: >>> Le 01/08/2018 à 23:33, Murilo Opsfelder Araujo a écrit : show_user_instructions() is a slightly modified version of >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Christoph Hellwig
On Thu, Aug 02, 2018 at 04:13:09PM -0500, Benjamin Herrenschmidt wrote: > So let's differenciate the two problems of having an IOMMU (real or > emulated) which indeeds adds overhead etc... and using the DMA API. > > At the moment, virtio does this all over the place: > > if (use_dma_api) >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Christoph Hellwig
On Thu, Aug 02, 2018 at 11:53:08PM +0300, Michael S. Tsirkin wrote: > > We don't need cache flushing tricks. > > You don't but do real devices on same platform need them? IBMs power plaforms are always cache coherent. There are some powerpc platforms have not cache coherent DMA, but I guess this