Re: [PATCH v4 5/6] bus: fsl-mc: supoprt dma configure for devices on fsl-mc bus

2018-04-30 Thread kbuild test robot
Hi Nipun, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc3 next-20180430] [cannot apply to iommu/next glikely/devicetree/next] [if your patch is applied to the wrong git tree, please drop us a note to help improve

Re: [PATCH RFC 1/1] KVM: PPC: Book3S HV: pack VCORE IDs to access full VCPU ID space

2018-04-30 Thread Sam Bobroff
On Tue, Apr 24, 2018 at 01:48:25PM +1000, David Gibson wrote: > On Tue, Apr 24, 2018 at 01:19:15PM +1000, Sam Bobroff wrote: > > On Mon, Apr 23, 2018 at 11:06:35AM +0200, Cédric Le Goater wrote: > > > On 04/16/2018 06:09 AM, David Gibson wrote: > > > > On Thu, Apr 12, 2018 at 05:02:06PM +1000, Sam

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-04-30 Thread Nicholas Piggin
On Mon, 30 Apr 2018 14:42:08 +0530 Akshay Adiga wrote: > Powersaving for stop0_lite and stop1_lite is observed to be quite similar > and both states resume without state loss. Using context_switch test [1] > we observe that stop0_lite has slightly lower latency,

[resend] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Balbir Singh
This commit was a stop-gap to prevent crashes on hotunplug, caused by the mismatch between the 1G mappings used for the linear mapping and the memory block size. Those issues are now resolved because we split the linear mapping at hotunplug time if necessary, as implemented in commit 4dd5f8a99e79

[PATCH] powerpc/watchdog: provide more data in watchdog messages

2018-04-30 Thread Nicholas Piggin
Provide timebase and timebase of last heartbeat in watchdog lockup messages. Also provide a stack trace of when a CPU becomes un-stuck, which can be useful -- it could be where irqs are re-enabled, so it may be the end of the critical section which is responsible for the latency. Signed-off-by:

[PATCH 08/14] powerpc: Wire up restartable sequences system call

2018-04-30 Thread Mathieu Desnoyers
From: Boqun Feng Wire up the rseq system call on powerpc. This provides an ABI improving the speed of a user-space getcpu operation on powerpc by skipping the getcpu system call on the fast path, as well as improving the speed of user-space operations on per-cpu data

[PATCH 07/14] powerpc: Add support for restartable sequences

2018-04-30 Thread Mathieu Desnoyers
From: Boqun Feng Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Boqun Feng

Re: [PATCH v10 17/25] mm: protect mm_rb tree with a rwlock

2018-04-30 Thread Punit Agrawal
Hi Laurent, One nitpick below. On Tue, Apr 17, 2018 at 3:33 PM, Laurent Dufour wrote: > This change is inspired by the Peter's proposal patch [1] which was > protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in > that particular case, and it is

Re: [PATCH v10 24/25] x86/mm: add speculative pagefault handling

2018-04-30 Thread Punit Agrawal
Hi Laurent, I am looking to add support for speculative page fault handling to arm64 (effectively porting this patch) and had a few questions. Apologies if I've missed an obvious explanation for my queries. I'm jumping in bit late to the discussion. On Tue, Apr 17, 2018 at 3:33 PM, Laurent

Re: [PATCH v4 2/6] iommu: of: make of_pci_map_rid() available for other devices too

2018-04-30 Thread Bjorn Helgaas
On Mon, Apr 30, 2018 at 11:57:17AM +0530, Nipun Gupta wrote: > iommu-map property is also used by devices with fsl-mc. This > patch moves the of_pci_map_rid to generic location, so that it > can be used by other busses too. > > 'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no >

Re: [PATCH 0/4] powerpc/xive: add support for H_INT_RESET

2018-04-30 Thread Cédric Le Goater
On 04/03/2018 09:15 AM, Cédric Le Goater wrote: > H_INT_RESET performs a reset of the Hypervisor internal interrupt > structures, removing all settings done with H_INT_SET_SOURCE_CONFIG > and H_INT_SET_QUEUE_CONFIG. This is most important for kdump and kexec > to be able to restart in a clean

Re: [PATCH v10 08/25] mm: VMA sequence count

2018-04-30 Thread Laurent Dufour
On 23/04/2018 08:42, Minchan Kim wrote: > On Tue, Apr 17, 2018 at 04:33:14PM +0200, Laurent Dufour wrote: >> From: Peter Zijlstra >> >> Wrap the VMA modifications (vma_adjust/unmap_page_range) with sequence >> counts such that we can easily test if a VMA is changed. > >

[PATCH 15/15] powerpc/powernv: provide a console flush operation for opal hvc driver

2018-04-30 Thread Nicholas Piggin
Provide the flush hv_op for the opal hvc driver. This will flush the firmware console buffers without spinning with interrupts disabled. Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin ---

[PATCH 14/15] tty: hvc: introduce the hv_ops.flush operation for hvc drivers

2018-04-30 Thread Nicholas Piggin
Use .flush to wait for drivers to flush their console outside of the spinlock, to reduce lock/irq latencies. Flush the hvc console driver after each write, which can help messages make it out to the console after a crash. Signed-off-by: Nicholas Piggin ---

[PATCH 13/15] tty: hvc: hvc_write may sleep

2018-04-30 Thread Nicholas Piggin
Rework the hvc_write loop to drop and re-take the spinlock on each iteration, add a cond_resched. Don't bother with an initial hvc_push initially, which makes the logic simpler -- just do a hvc_push on each time around the loop. Signed-off-by: Nicholas Piggin ---

[PATCH 12/15] tty: hvc: hvc_poll may sleep

2018-04-30 Thread Nicholas Piggin
Introduce points where hvc_poll drops the lock, enables interrupts, and reschedules. Signed-off-by: Nicholas Piggin --- drivers/tty/hvc/hvc_console.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c

[PATCH 11/15] tty: hvc: hvc_poll break hv read loop

2018-04-30 Thread Nicholas Piggin
Avoid looping with the spinlock held while there is read data being returned from the hv driver. Instead note if the entire size returned by tty_buffer_request_room was read, and request another read poll. This limits the critical section lengths, and provides more even service to other consoles

[PATCH 10/15] tty: hvc: use mutex instead of spinlock for hvc_structs lock

2018-04-30 Thread Nicholas Piggin
This allows hvc operations to sleep under the lock. Signed-off-by: Nicholas Piggin --- drivers/tty/hvc/hvc_console.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c

[PATCH 09/15] tty: hvc: remove unexplained "just in case" spin delay

2018-04-30 Thread Nicholas Piggin
This delay was in the very first OPAL console commit 6.5 years ago, and came from the vio hvc driver. The firmware console has hardened sufficiently to remove it. Reviewed-by: Benjamin Herrenschmidt Signed-off-by: Nicholas Piggin ---

[PATCH 08/15] powerpc/powernv: implement opal_put_chars_atomic

2018-04-30 Thread Nicholas Piggin
The RAW console does not need writes to be atomic, so relax opal_put_chars to be able to do partial writes, and implement an _atomic variant which does not take a spinlock. This API is used in xmon, so the less locking that is used, the better chance there is that a crash can be debugged. Cc:

[PATCH 07/15] powerpc/powernv: move opal console flushing to udbg

2018-04-30 Thread Nicholas Piggin
OPAL console writes do not have to synchronously flush firmware / hardware buffers unless they are going through the udbg path. Remove the unconditional flushing from opal_put_chars. Flush if there was no space in the buffer as an optimisation (callers loop waiting for success in that case). udbg

[PATCH 06/15] powerpc/powernv: Remove OPALv1 support from opal console driver

2018-04-30 Thread Nicholas Piggin
opal_put_chars deals with partial writes because in OPALv1, opal_console_write_buffer_space did not work correctly. That firmware is not supported. This reworks the opal_put_chars code to no longer deal with partial writes by turning them into full writes. Partial write handling is still

[PATCH 05/15] powerpc/powernv: Implement and use opal_flush_console

2018-04-30 Thread Nicholas Piggin
A new console flushing firmware API was introduced to replace event polling loops, and implemented in opal-kmsg with affddff69c55e ("powerpc/powernv: Add a kmsg_dumper that flushes console output on panic"), to flush the console in the panic path. The OPAL console driver has other situations

[PATCH 04/15] powerpc/powernv: opal-kmsg use flush fallback from console code

2018-04-30 Thread Nicholas Piggin
Use the more refined and tested event polling loop from opal_put_chars as the fallback console flush in the opal-kmsg path. This loop is used by the console driver today, whereas the opal-kmsg fallback is not likely to have been used for years. Use WARN_ONCE rather than a printk when the fallback

[PATCH 03/15] powerpc/powernv: opal-kmsg standardise OPAL_BUSY handling

2018-04-30 Thread Nicholas Piggin
OPAL_CONSOLE_FLUSH is documented as being able to return OPAL_BUSY, so implement the standard OPAL_BUSY handling for it. Reviewed-by: Russell Currey Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/opal-kmsg.c | 24 ++

[PATCH 02/15] powerpc/powernv: Fix OPAL console driver OPAL_BUSY loops

2018-04-30 Thread Nicholas Piggin
The OPAL console driver does not delay in case it gets OPAL_BUSY or OPAL_BUSY_EVENT from firmware. It can't yet be made to sleep because it is called under spinlock, but it can be changed to the standard OPAL_BUSY loop form, and a delay added to keep it from hitting the firmware too frequently.

[PATCH 01/15] powerpc/powernv: opal_put_chars partial write fix

2018-04-30 Thread Nicholas Piggin
The intention here is to consume and discard the remaining buffer upon error. This works if there has not been a previous partial write. If there has been, then total_len is no longer total number of bytes to copy. total_len is always "bytes left to copy", so it should be added to written bytes.

[PATCH 00/15] hvc and powerpc opal console latency reduction

2018-04-30 Thread Nicholas Piggin
I'm seeing scattered reports of hard lockups triggering in the OPAL console code. I haven't got a full latency trace -- they are difficult to reproduce and sometimes just show up in dmesg of a bug report when the system is having other issues. But it does seem like there are some improvements that

Re: [PATCH v10 06/25] mm: make pte_unmap_same compatible with SPF

2018-04-30 Thread Laurent Dufour
On 23/04/2018 08:31, Minchan Kim wrote: > On Tue, Apr 17, 2018 at 04:33:12PM +0200, Laurent Dufour wrote: >> pte_unmap_same() is making the assumption that the page table are still >> around because the mmap_sem is held. >> This is no more the case when running a speculative page fault and >>

[PATCH 1/2] powerpc: wii_defconfig: Disable Ethernet driver support code

2018-04-30 Thread Jonathan Neuschäfer
The Wii doesn't have built-in Ethernet and USB Ethernet adapters are in a different menu. Disable CONFIG_ETHERNET to save some space in support code for Ethernet drivers. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-367 (-367) Function old new delta

[PATCH 2/2] powerpc: wii_defconfig: Enable GPIO-related options

2018-04-30 Thread Jonathan Neuschäfer
Now that there's a GPIO driver for the Wii, let's enable the following drivers: - the GPIO driver itself - gpio-keys - gpio-poweroff - gpio-leds and a few LED triggers Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/configs/wii_defconfig | 8 1 file changed,

Re: [PATCH] net: ethernet: ucc: fix spelling mistake: "tx-late-collsion" -> "tx-late-collision"

2018-04-30 Thread David Miller
From: Colin King Date: Sat, 28 Apr 2018 10:57:07 +0100 > From: Colin Ian King > > Trivial fix to spelling mistake in tx_fw_stat_gstrings text > > Signed-off-by: Colin Ian King Applied.

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Balbir Singh
On Mon, Apr 30, 2018 at 8:43 PM, Michael Ellerman wrote: > Balbir Singh writes: >> This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. > > Firstly everything here only applies to Radix, so we need to say that. The subject mentions it :) >

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Michael Ellerman
Nicholas Piggin writes: > On Mon, 30 Apr 2018 18:34:32 +1000 > Balbir Singh wrote: > >> This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. >> >> The commit above changed the memblock size to 1GiB, which did some >> nice things like create

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Michael Ellerman
Balbir Singh writes: > This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. Firstly everything here only applies to Radix, so we need to say that. > The commit above changed the memblock size to 1GiB, which did some > nice things like create fewer TLB entries for

[PATCH v3] powerpc/config: powernv_defconfig updates

2018-04-30 Thread Nicholas Piggin
For consideration: * Add NVDIMM support - Enables greater testing, mambo device. * Add IPv6 support built in + additional modules - Because it's 2018 maan. * Add DEFERRED_STRUCT_PAGE_INIT - Let's see what breaks. * Add PPC_MEMTRACE - Small powernv debugfs driver for getting hardware traces. * Add

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Nicholas Piggin
On Mon, 30 Apr 2018 18:34:32 +1000 Balbir Singh wrote: > This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. > > The commit above changed the memblock size to 1GiB, which did some > nice things like create fewer TLB entries for mapping memory at > the time of

[PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Balbir Singh
This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. The commit above changed the memblock size to 1GiB, which did some nice things like create fewer TLB entries for mapping memory at the time of hotplug. The downside is that it changes the granularity at which memory can be hot-plugged

[PATCH v4 6/6] arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc

2018-04-30 Thread Nipun Gupta
fsl-mc bus support the new iommu-map property. Comply to this binding for fsl_mc bus. Signed-off-by: Nipun Gupta --- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH v4 5/6] bus: fsl-mc: supoprt dma configure for devices on fsl-mc bus

2018-04-30 Thread Nipun Gupta
Signed-off-by: Nipun Gupta --- drivers/bus/fsl-mc/fsl-mc-bus.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 5d8266c..624828b 100644 ---

[PATCH v4 4/6] iommu: arm-smmu: Add support for the fsl-mc bus

2018-04-30 Thread Nipun Gupta
Implement bus specific support for the fsl-mc bus including registering arm_smmu_ops and bus specific device add operations. Signed-off-by: Nipun Gupta --- drivers/iommu/arm-smmu.c | 7 +++ drivers/iommu/iommu.c| 21 + include/linux/fsl/mc.h |

[PATCH v4 3/6] iommu: support iommu configuration for fsl-mc devices

2018-04-30 Thread Nipun Gupta
Signed-off-by: Nipun Gupta --- drivers/iommu/of_iommu.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 811e160..284474d 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c

[PATCH v4 2/6] iommu: of: make of_pci_map_rid() available for other devices too

2018-04-30 Thread Nipun Gupta
iommu-map property is also used by devices with fsl-mc. This patch moves the of_pci_map_rid to generic location, so that it can be used by other busses too. 'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no functional change done in the API. Signed-off-by: Nipun Gupta

[PATCH v4 1/6] Docs: dt: add fsl-mc iommu-map device-tree binding

2018-04-30 Thread Nipun Gupta
The existing IOMMU bindings cannot be used to specify the relationship between fsl-mc devices and IOMMUs. This patch adds a generic binding for mapping fsl-mc devices to IOMMUs, using iommu-map property. Signed-off-by: Nipun Gupta Reviewed-by: Rob Herring

[PATCH v4 0/6] Support for fsl-mc bus and its devices in SMMU

2018-04-30 Thread Nipun Gupta
This patchset defines IOMMU DT binding for fsl-mc bus and adds support in SMMU for fsl-mc bus. This patch series is dependent on patset: https://patchwork.kernel.org/patch/10317337/ These patches - Define property 'iommu-map' for fsl-mc bus (patch 1) - Integrates the fsl-mc bus with the SMMU