[PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-08-27 Thread Michael Ellerman
Some Power9 boxes will have this adapter installed, so add it to the defconfig so we can boot on those machines without an initrd. Signed-off-by: Michael Ellerman --- arch/powerpc/configs/powernv_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2 01/10] powerpc: Handle most loads and stores in instruction emulation code

2017-08-27 Thread Michael Ellerman
Paul Mackerras writes: > diff --git a/arch/powerpc/lib/quad.S b/arch/powerpc/lib/quad.S > new file mode 100644 > index 000..2cc77dc > --- /dev/null > +++ b/arch/powerpc/lib/quad.S > @@ -0,0 +1,62 @@ > +/* > + * Quadword loads and stores > + * for use in instruction

Re: [RFC] cxl: Enable use of custom PE-id for contexts

2017-08-27 Thread Andrew Donnellan
On 28/08/17 14:15, Vaibhav Jain wrote: Some AFUs differentiate between multiple PE's based on their PE-ids. Unfortunately presently cxl provides no way for external users (libcxl/kernel-api) to control the id assigned to a specific PE. The ids are currently assigned serially to PE's and are

Re: Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce

2017-08-27 Thread Al Viro
On Mon, Aug 28, 2017 at 02:38:37PM +1000, Paul Mackerras wrote: > On Sun, Aug 27, 2017 at 10:02:20PM +0100, Al Viro wrote: > > On Wed, Aug 23, 2017 at 04:06:24PM +1000, Paul Mackerras wrote: > > > > > It seems to me that it would be better to do the anon_inode_getfd() > > > call before the

Re: [PATCH v7 12/12] powerpc/vas: Define copy/paste interfaces

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > A few more things ... > > Sukadev Bhattiprolu writes: > > > diff --git a/arch/powerpc/platforms/powernv/copy-paste.h > > b/arch/powerpc/platforms/powernv/copy-paste.h > > new file mode 100644 > > index

Re: [PATCH v7 10/12] powerpc/vas: Define vas_win_close() interface

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > More comments :) Thanks! > > Sukadev Bhattiprolu writes: > > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > index 2dd4b63..24288dd

Re: [PATCH v7 08/12] powerpc/vas: Define vas_win_id()

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu writes: > > > Define an interface to return a system-wide unique id for a given VAS > > window. > > > > The vas_win_id() will be used in a follow-on patch to generate an unique > > handle for a user

Re: [PATCH v7 06/12] powerpc/vas: Define helpers to alloc/free windows

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu writes: > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > + rc = ida_pre_get(ida, GFP_KERNEL); > > + if (!rc) > > +

Re: [PATCH v7 05/12] powerpc/vas: Define helpers to init window context

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Sukadev Bhattiprolu writes: > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > index a3a705a..3a50d6a 100644 > > ---

Re: Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce

2017-08-27 Thread Paul Mackerras
On Sun, Aug 27, 2017 at 10:02:20PM +0100, Al Viro wrote: > On Wed, Aug 23, 2017 at 04:06:24PM +1000, Paul Mackerras wrote: > > > It seems to me that it would be better to do the anon_inode_getfd() > > call before the kvm_get_kvm() call, and go to the fail label if it > > fails. > > And what

[PATCH] KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list

2017-08-27 Thread Paul Mackerras
Al Viro pointed out that while one thread of a process is executing in kvm_vm_ioctl_create_spapr_tce(), another thread could guess the file descriptor returned by anon_inode_getfd() and close() it before the first thread has added it to the kvm->arch.spapr_tce_tables list. That highlights a more

Re: [PATCH v7 04/12] powerpc/vas: Define helpers to access MMIO regions

2017-08-27 Thread Sukadev Bhattiprolu
Michael Ellerman [m...@ellerman.id.au] wrote: > Hi Suka, > > Comments inline. > > Sukadev Bhattiprolu writes: > > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > > b/arch/powerpc/platforms/powernv/vas-window.c > > index 6156fbe..a3a705a 100644 > > ---

[PATCH] powerpc/64: Fix watchdog configuration regressions

2017-08-27 Thread Nicholas Piggin
This fixes a couple more bits of fallout from the new hard lockup watchdog patch. It restores the required hw_nmi_get_sample_period() function for the perf watchdog, and removes some function declarations on 64e that are only defined for 64s. This fixes the 64e build when the hardlockup detector

Re: [PATCH] cxl: Set the valid bit in PE for dedicated mode

2017-08-27 Thread Andrew Donnellan
On 28/08/17 14:15, Vaibhav Jain wrote: Make sure to set the valid-bit in software-state field of the populated PE. This was earlier missing for dedicated mode AFUs, hence was causing a PSL freeze when the AFU was activated. Signed-off-by: Vaibhav Jain Acked-by:

[PATCH] cxl: Set the valid bit in PE for dedicated mode

2017-08-27 Thread Vaibhav Jain
Make sure to set the valid-bit in software-state field of the populated PE. This was earlier missing for dedicated mode AFUs, hence was causing a PSL freeze when the AFU was activated. Signed-off-by: Vaibhav Jain --- drivers/misc/cxl/native.c | 4 1 file

[RFC] cxl: Enable use of custom PE-id for contexts

2017-08-27 Thread Vaibhav Jain
Some AFUs differentiate between multiple PE's based on their PE-ids. Unfortunately presently cxl provides no way for external users (libcxl/kernel-api) to control the id assigned to a specific PE. The ids are currently assigned serially to PE's and are dolled out using an idr table. With this

Re: Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce

2017-08-27 Thread Al Viro
On Wed, Aug 23, 2017 at 04:06:24PM +1000, Paul Mackerras wrote: > It seems to me that it would be better to do the anon_inode_getfd() > call before the kvm_get_kvm() call, and go to the fail label if it > fails. And what happens if another thread does close() on the (guessed) fd?

[PATCH] leds-PowerNV: Delete an error message for a failed memory allocation in powernv_led_create()

2017-08-27 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 27 Aug 2017 22:00:22 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 12/12] dma-mapping: turn dma_cache_sync into a dma_map_ops method

2017-08-27 Thread Christoph Hellwig
After we removed all the dead wood it turns out only two architectures actually implement dma_cache_sync as a no-op: mips and parisc. Add a cache_sync method to struct dma_map_ops and implement it for the mips defualt DMA ops, and the parisc pa11 ops. Note that arm, arc and openrisc support

[PATCH 11/12] sh: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
sh does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. On the other hand sh uses dma_cache_sync internally in the dma_ops implementation and for the maple

[PATCH 10/12] xtensa: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
xtensa does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig --- arch/xtensa/include/asm/dma-mapping.h | 6

[PATCH 09/12] unicore32: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
unicore32 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig --- arch/unicore32/include/asm/cacheflush.h

[PATCH 08/12] powerpc: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
powerpc does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/dma-mapping.h | 2

[PATCH 07/12] mn10300: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
mn10300 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig --- arch/mn10300/include/asm/dma-mapping.h | 4

[PATCH 06/12] microblaze: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
microblaze does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. This also allows moving __dma_sync out of the microblaze asm/dma-mapping.h and thus greatly

[PATCH 05/12] ia64: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
ia64 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig --- arch/ia64/include/asm/dma-mapping.h | 5 -

[PATCH 02/12] mips: don't use dma_cache_sync to implement fd_cacheflush

2017-08-27 Thread Christoph Hellwig
The floppy drivers doesn't otherwise use the DMA API, so indirecting through it just for cache flushing in MIPS-specific code just call dma_cache_wback_inv directly. Signed-off-by: Christoph Hellwig --- arch/mips/include/asm/floppy.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 01/12] floppy: consolidate the dummy fd_cacheflush definition

2017-08-27 Thread Christoph Hellwig
Only mips defines this helper, so remove all the other arch definitions. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/floppy.h| 2 -- arch/powerpc/include/asm/floppy.h | 2 -- arch/sparc/include/asm/floppy_32.h | 1 - arch/sparc/include/asm/floppy_64.h | 1 -

refactor dma_cache_sync

2017-08-27 Thread Christoph Hellwig
The dma_cache_sync routines is used to flush caches for memory returned by dma_alloc_attrs with the DMA_ATTR_NON_CONSISTENT flag (or previously from dma_alloc_noncoherent), but the requirements for it seems to be frequently misunderstood. dma_cache_sync is documented to be a no-op for allocations

[PATCH 03/12] frv: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
frv does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig --- arch/frv/include/asm/dma-mapping.h | 1 - 1

[PATCH 04/12] x86: make dma_cache_sync a no-op

2017-08-27 Thread Christoph Hellwig
x86 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig

[PATCH v4 7/7] dpaa_eth: check allocation result

2017-08-27 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 73ca8d7..4225806 100644 ---

[PATCH v4 6/7] Documentation: networking: add RSS information

2017-08-27 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- Documentation/networking/dpaa.txt | 68 ++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/dpaa.txt b/Documentation/networking/dpaa.txt index 76e016d..f88194f

[PATCH v4 5/7] dpaa_eth: add NETIF_F_RXHASH

2017-08-27 Thread Madalin Bucur
Set the skb hash when then FMan Keygen hash result is available. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 23 +++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 1 +

[PATCH v4 4/7] dpaa_eth: enable Rx hashing control

2017-08-27 Thread Madalin Bucur
Allow ethtool control of the Rx flow hashing. By default RSS is enabled, this allows to turn it off by bypassing the FMan Keygen block and sending all traffic on the default Rx frame queue. Signed-off-by: Madalin Bucur ---

[PATCH v4 2/7] fsl/fman: enable FMan Keygen

2017-08-27 Thread Madalin Bucur
From: Iordache Florinel-R70177 Add support for the FMan Keygen with a hardcoded scheme to spread incoming traffic on a FQ range based on source and destination IPs and ports. Signed-off-by: Iordache Florinel Signed-off-by: Madalin Bucur

[PATCH v4 3/7] dpaa_eth: use multiple Rx frame queues

2017-08-27 Thread Madalin Bucur
Add a block of 128 Rx frame queues per port. The FMan hardware will send traffic on one of these queues based on the FMan port Parse Classify Distribute setup. The hash computed by the FMan Keygen block will select the Rx FQ. Signed-off-by: Madalin Bucur ---

[PATCH v4 1/7] fsl/fman: move struct fman to header file

2017-08-27 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman.c | 80 + drivers/net/ethernet/freescale/fman/fman.h | 75 +++ drivers/net/ethernet/freescale/fman/fman_port.c | 8 +-- 3 files changed, 82

[PATCH v4 0/7] Add RSS to DPAA 1.x Ethernet driver

2017-08-27 Thread Madalin Bucur
This patch set introduces Receive Side Scaling for the DPAA Ethernet driver. Documentation is updated with details related to the new feature and limitations that apply. Added also a small fix. v2: removed a C++ style comment v3: move struct fman to header file to avoid exporting a function v4: