Re: [PATCH v6 10/42] powerpc/powernv: pnv_ioda_setup_dma() configure one PE only

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 12:39:02PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:29 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 07:31:11PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: The original implementation of pnv_ioda_setup_dma() iterates the list of

[v2 01/11] powerpc: re-add devm_ioremap_prot()

2015-08-12 Thread Roy Pledge
From: Emil Medve emilian.me...@freescale.com devm_ioremap_prot() was removed in commit dedd24a12, and was introduced in commit b41e5fffe8. This reverts commit dedd24a12fe6735898feeb06184ee346907abb5d. Signed-off-by: Emil Medve emilian.me...@freescale.com --- arch/powerpc/include/asm/io.h |

[v2 10/11] soc/qman: Add HOTPLUG_CPU support to the QMan driver

2015-08-12 Thread Roy Pledge
From: Hai-Ying Wang haiying.w...@freescale.com Add support for CPU hotplug for the DPAA 1.0 Queue Manager driver. Signed-off-by: Hai-Ying Wang haiying.w...@freescale.com Signed-off-by: Emil Medve emilian.me...@freescale.com Signed-off-by: Roy Pledge roy.ple...@freescale.com ---

[v2 09/11] soc/bman: Add HOTPLUG_CPU support to the BMan driver

2015-08-12 Thread Roy Pledge
From: Hai-Ying Wang haiying.w...@freescale.com Add support for CPU hotplug for the DPAA 1.0 Buffer Manager driver Signed-off-by: Hai-Ying Wang haiying.w...@freescale.com Signed-off-by: Emil Medve emilian.me...@freescale.com Signed-off-by: Roy Pledge roy.ple...@freescale.com ---

Re: RFC: prepare for struct scatterlist entries without page backing

2015-08-12 Thread Julian Calaby
Hi, On Wed, Aug 12, 2015 at 10:42 PM, Boaz Harrosh b...@plexistor.com wrote: On 08/12/2015 10:05 AM, Christoph Hellwig wrote: It turns out most DMA mapping implementation can handle SGLs without page structures with some fairly simple mechanical work. Most of it is just about consistently

Re: [PATCH v6 08/42] powerpc/powernv: Calculate PHB's DMA weight dynamically

2015-08-12 Thread Gavin Shan
On Mon, Aug 10, 2015 at 07:21:12PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: For P7IOC, the whole available DMA32 space, which is below the MEM32 space, is divided evenly into 256MB segments. The number of continuous segments assigned to one particular PE depends

[v2 07/11] soc/bman: Add debugfs support for the BMan driver

2015-08-12 Thread Roy Pledge
From: Geoff Thorpe geoff.tho...@freescale.com Add debugfs support for querying the state of hardware based Buffer Manager pools used in DPAA 1.0. Signed-off-by: Geoff Thorpe geoff.tho...@freescale.com Signed-off-by: Emil Medve emilian.me...@freescale.com Signed-off-by: Roy Pledge

[v2 11/11] soc/qman: add qman_delete_cgr_safe()

2015-08-12 Thread Roy Pledge
From: Madalin Bucur madalin.bu...@freescale.com Add qman_delete_cgr_safe() that can be called from any CPU. This in turn schedules qman_delete_cgr() on the proper CPU. Signed-off-by: Madalin Bucur madalin.bu...@freescale.com Signed-off-by: Roy Pledge roy.ple...@freescale.com ---

Re: [PATCH v6 07/42] powerpc/powernv: Improve IO and M32 mapping

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 12:32:13PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:12 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 05:40:08PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: There're 3 windows (IO, M32 and M64) for PHB, root port and upstream

[v2 05/11] soc/bman: Add self-tester for BMan driver

2015-08-12 Thread Roy Pledge
From: Geoff Thorpe geoff.tho...@freescale.com Add a self test for the DPAA 1.0 Buffer Manager driver. This test ensures that the driver can properly acquire and release buffers using the BMan portal infrastructure. Signed-off-by: Geoff Thorpe geoff.tho...@freescale.com Signed-off-by: Emil Medve

[v2 02/11] soc/fsl: Introduce DPAA BMan device management driver

2015-08-12 Thread Roy Pledge
From: Geoff Thorpe geoff.tho...@freescale.com This driver enables the Freescale DPAA 1.0 Buffer Manager block. BMan is a hardware buffer pool manager that allows accelerators connected to the SoC datapath to acquire and release buffers during data processing. Signed-off-by: Geoff Thorpe

Re: [PATCH v2 05/10] cxl: Refactor adaptor init/teardown

2015-08-12 Thread Daniel Axtens
The function above doesn't even use the 'rc' value. Darn, you're right. I'll fix that in a new version. -- Regards, Daniel -- Regards, Daniel signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list

Re: RFC: prepare for struct scatterlist entries without page backing

2015-08-12 Thread Grant Grundler
On Wed, Aug 12, 2015 at 10:00 AM, James Bottomley james.bottom...@hansenpartnership.com wrote: On Wed, 2015-08-12 at 09:05 +0200, Christoph Hellwig wrote: ... However the ccio (parisc) and sba_iommu (parisc ia64) IOMMUs seem to be operate mostly on virtual addresses. It's a fairly odd concept

Re: [PATCH v6 11/42] powerpc/powernv: Trace DMA32 segments consumed by PE

2015-08-12 Thread Gavin Shan
On Mon, Aug 10, 2015 at 07:43:48PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: On P7IOC, the whole DMA32 space is divided evenly to 256MB segments. Each PE can consume one or multiple DMA32 segments. Current code doesn't trace the available DMA32 segments and those

Re: [PATCH v6 12/42] powerpc/powernv: Increase PE# capacity

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 12:47:25PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:38 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 07:53:02PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: Each PHB maintains an array helping to translate RID (Request ID) to PE#

[v2 00/11] Freescale DPAA QBMan Drivers

2015-08-12 Thread Roy Pledge
The Freescale Data Path Acceleration Architecture (DPAA) is a set of hardware components on specific QorIQ multicore processors. This architecture provides the infrastructure to support simplified sharing of networking interfaces and accelerators by multiple CPU cores and the accelerators.

[v2 08/11] soc/qman: Add debugfs support for the QMan driver

2015-08-12 Thread Roy Pledge
From: Geoff Thorpe geoff.tho...@freescale.com Add debugfs sypport for querying the state of hardware based queues managed by the DPAA 1.0 Queue Manager. Signed-off-by: Geoff Thorpe geoff.tho...@freescale.com Signed-off-by: Emil Medve emilian.me...@freescale.com Signed-off-by: Madalin Bucur

Re: [PATCH 31/31] dma-mapping-common: skip kmemleak checks for page-less SG entries

2015-08-12 Thread Catalin Marinas
Christoph, On 12 August 2015 at 08:05, Christoph Hellwig h...@lst.de wrote: Signed-off-by: Christoph Hellwig h...@lst.de --- include/asm-generic/dma-mapping-common.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/dma-mapping-common.h

Re: [PATCH v6 05/42] powerpc/powernv: Track IO/M32/M64 segments from PE

2015-08-12 Thread Gavin Shan
On Wed, Aug 12, 2015 at 10:57:33PM +1000, Alexey Kardashevskiy wrote: On 08/12/2015 09:20 PM, Gavin Shan wrote: On Wed, Aug 12, 2015 at 09:05:09PM +1000, Alexey Kardashevskiy wrote: On 08/12/2015 08:45 PM, Gavin Shan wrote: On Tue, Aug 11, 2015 at 12:23:42PM +1000, Alexey Kardashevskiy wrote: On

[v2 06/11] soc/qman: Add self-tester for QMan driver

2015-08-12 Thread Roy Pledge
From: Geoff Thorpe geoff.tho...@freescale.com Add a self test for the DPAA 1.0 Queue Manager driver. The tests ensure that the driver can properly enqueue and dequeue from frame queues using the QMan portal infrastructure. Signed-off-by: Geoff Thorpe geoff.tho...@freescale.com Signed-off-by:

Re: [PATCH v6 18/42] powerpc/powernv: Allocate PE# in deasending order

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 12:50:33PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:43 AM, Gavin Shan wrote: On Tue, Aug 11, 2015 at 12:39:02AM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: The available PE#, represented by a bitmap in the PHB, is allocated in

Re: [1/8] powerpc/slb: Remove a duplicate extern variable

2015-08-12 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:09:58 UTC, Anshuman Khandual wrote: This patch just removes one redundant entry for one extern variable 'slb_compare_rr_to_size' from the scope. This patch does not change any functionality. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Applied to

[PATCH v4 00/11] CXL EEH Handling

2015-08-12 Thread Daniel Axtens
CXL accelerators are unfortunately not immune from failure. This patch set enables them to particpate in the Extended Error Handling process. This series starts with a number of preparatory patches: - Patch 1 is cleanup: converting macros to static inlines. - Patch 2 makes sure we don't touch

Re: [1/4] cxl: Compile with -Werror

2015-08-12 Thread Michael Ellerman
On Fri, 2015-07-08 at 03:18:17 UTC, Daniel Axtens wrote: It's a good idea, and it brings us in line with the rest of arch/powerpc. Signed-off-by: Daniel Axtens d...@axtens.net Acked-by: Michael Neuling mi...@neuling.org Applied to powerpc next, thanks.

Re: [6/8] powerpc/prom: Simplify the logic while fetching SLB size

2015-08-12 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:10:03 UTC, Anshuman Khandual wrote: This patch just simplifies the existing code logic while fetching the SLB size property from the device tree. This also changes the function name from check_cpu_slb_size to init_mmu_slb_size as it just initializes the mmu_slb_size

[PATCH v4 04/11] cxl: Make IRQ release idempotent

2015-08-12 Thread Daniel Axtens
Check if an IRQ is mapped before releasing it. This will simplify future EEH code by allowing unconditional unmapping of IRQs. Acked-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/irq.c | 9 + 1 file changed, 9 insertions(+) diff

[PATCH v4 07/11] cxl: Refactor AFU init/teardown

2015-08-12 Thread Daniel Axtens
As with an adapter, some aspects of initialisation are done only once in the lifetime of an AFU: for example, allocating memory, or setting up sysfs/debugfs files. However, we may want to be able to do some parts of the initialisation multiple times: for example, in error recovery we want to be

[PATCH v4 05/11] cxl: Clean up adapter MMIO unmap path.

2015-08-12 Thread Daniel Axtens
- MMIO pointer unmapping is guarded by a null pointer check. However, iounmap doesn't null the pointer, just invalidate it. Therefore, explicitly null the pointer after unmapping. - afu_desc_mmio also needs to be unmapped. - PCI regions are allocated in cxl_map_adapter_regs.

[PATCH v4 11/11] cxl: Add CONFIG_CXL_EEH symbol

2015-08-12 Thread Daniel Axtens
CONFIG_CXL_EEH is for CXL's EEH related code. Other drivers can depend on or #ifdef on this symbol to configure PERST behaviour, allowing CXL to participate in the EEH process. Reviewed-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/Kconfig |

Re: [PATCH v6 23/42] powerpc/powernv: Release PEs dynamically

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 11:03:40PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: This adds the refcount to PE, which represents number of PCI devices contained in the PE. When last device leaves from the PE, the PE together with its consumed resources (IO, DMA,

Re: [2/4] cxl: sparse: Make declarations static

2015-08-12 Thread Michael Ellerman
On Fri, 2015-07-08 at 03:18:18 UTC, Daniel Axtens wrote: A few declarations were identified by sparse as needing to be static: /scratch/dja/linux-capi/drivers/misc/cxl/irq.c:408:6: warning: symbol 'afu_irq_name_free' was not declared. Should it be static?

Re: [5/8] powerpc/slb: Add documentation to runtime patching of SLB encoding

2015-08-12 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:10:02 UTC, Anshuman Khandual wrote: This patch adds some documentation to 'patch_slb_encoding' function explaining about how it clears the existing immediate value in the given instruction and inserts a new one there. Signed-off-by: Anshuman Khandual

[PATCH v4 10/11] cxl: EEH support

2015-08-12 Thread Daniel Axtens
EEH (Enhanced Error Handling) allows a driver to recover from the temporary failure of an attached PCI card. Enable basic CXL support for EEH. Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/pci.c | 253

[PATCH v4 06/11] cxl: Refactor adaptor init/teardown

2015-08-12 Thread Daniel Axtens
Some aspects of initialisation are done only once in the lifetime of an adapter: for example, allocating memory for the adapter, allocating the adapter number, or setting up sysfs/debugfs files. However, we may want to be able to do some parts of the initialisation multiple times: for example, in

Re: [7/8] powerpc/xmon: Drop the 'valid' variable completely in 'dump_segments'

2015-08-12 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:10:04 UTC, Anshuman Khandual wrote: Value of the 'valid' variable is zero when 'esid' is zero and it does not matter when 'esid' is non-zero. The variable 'valid' can be dropped from the function 'dump_segments' by checking for validity of 'esid' inside the nested code

[PATCH v4 02/11] cxl: Drop commands if the PCI channel is not in normal state

2015-08-12 Thread Daniel Axtens
If the PCI channel has gone down, don't attempt to poke the hardware. We need to guard every time cxl_whatever_(read|write) is called. This is because a call to those functions will dereference an offset into an mmio register, and the mmio mappings get invalidated in the EEH teardown. Check in

[PATCH v4 03/11] cxl: Allocate and release the SPA with the AFU

2015-08-12 Thread Daniel Axtens
Previously the SPA was allocated and freed upon entering and leaving AFU-directed mode. This causes some issues for error recovery - contexts hold a pointer inside the SPA, and they may persist after the AFU has been detached. We would ideally like to allocate the SPA when the AFU is allocated,

Re: [2/8] powerpc/slb: Rename all the 'slot' occurrences to 'entry'

2015-08-12 Thread Michael Ellerman
On Wed, 2015-29-07 at 07:09:59 UTC, Anshuman Khandual wrote: These are essentially SLB individual slots with entries what we are dealing with in these functions. Usage of both 'entry' and 'slot' synonyms makes it real confusing sometimes. This patch makes it uniform across the file by

Re: [4/4] cxl: sparse: Silence iomem warning in debugfs file creation

2015-08-12 Thread Michael Ellerman
On Fri, 2015-07-08 at 03:18:20 UTC, Daniel Axtens wrote: An IO address, tagged with __iomem, is passed to debugfs_create_file as private data. This requires that it be cast to void *. The cast creates a sparse warning: /scratch/dja/linux-capi/drivers/misc/cxl/debugfs.c:51:57: warning: cast

Re: powerpc/prom: Use DRCONF flags while processing detected LMBs

2015-08-12 Thread Michael Ellerman
On Thu, 2015-06-08 at 13:05:07 UTC, Anshuman Khandual wrote: This patch just replaces hard coded values with existing DRCONF flags while procesing detected LMBs from the device tree. This does not change any functionality. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Applied

[PATCH v4 01/11] cxl: Convert MMIO read/write macros to inline functions

2015-08-12 Thread Daniel Axtens
We're about to make these more complex, so make them functions first. Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/cxl.h | 51 ++ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/drivers/misc/cxl/cxl.h

[PATCH v4 09/11] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-12 Thread Daniel Axtens
Provide a kernel API and a sysfs entry which allow a user to specify that when a card is PERSTed, it's image will stay the same, allowing it to participate in EEH. cxl_reset is used to reflash the card. In that case, we cannot safely assert that the image will not change. Therefore, disallow

[PATCH v4 08/11] cxl: Don't remove AFUs/vPHBs in cxl_reset

2015-08-12 Thread Daniel Axtens
If the driver doesn't participate in EEH, the AFUs will be removed by cxl_remove, which will be invoked by EEH. If the driver does particpate in EEH, the vPHB needs to stick around so that the it can particpate. In both cases, we shouldn't remove the AFU/vPHB. Reviewed-by: Cyril Bur

Re: [PATCH] powerpc/prom: Use DRCONF flags while processing detected LMBs

2015-08-12 Thread Anshuman Khandual
On 08/11/2015 03:18 AM, Michael Ellerman wrote: On Fri, 2015-08-07 at 07:49 +0530, Madhavan Srinivasan wrote: On Thursday 06 August 2015 06:35 PM, Anshuman Khandual wrote: This patch just replaces hard coded values with existing Please drop This patch just and start with Replace

[PATCH 05/31] x86/pci-calgary: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
For the iommu offset we just need and offset into the page. Calculate that using the physical address instead of using the virtual address so that we don't require a virtual mapping. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/x86/kernel/pci-calgary_64.c | 10 -- 1 file

RFC: prepare for struct scatterlist entries without page backing

2015-08-12 Thread Christoph Hellwig
Dan Williams started to look into addressing I/O to and from Persistent Memory in his series from June: http://thread.gmane.org/gmane.linux.kernel.cross-arch/27944 I've started looking into DMA mapping of these SGLs specifically instead of the map_pfn method in there. In addition to

[PATCH 11/31] sparc/iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of __pa(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/sparc/kernel/iommu.c| 2 +- arch/sparc/kernel/iommu_common.h | 4 +--- arch/sparc/kernel/pci_sun4v.c| 2 +- 3 files changed, 3

[PATCH 12/31] mn10300: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/mn10300/include/asm/dma-mapping.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/mn10300/include/asm/dma-mapping.h

[PATCH 17/31] ia64/sba_iommu: remove sba_sg_address

2015-08-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de --- arch/ia64/hp/common/sba_iommu.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 344387a..9e5aa8e 100644 ---

[PATCH 24/31] xtensa: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig h...@lst.de --- arch/xtensa/include/asm/dma-mapping.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h

[PATCH 23/31] sh: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig h...@lst.de --- arch/sh/kernel/dma-nommu.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/sh/kernel/dma-nommu.c b/arch/sh/kernel/dma-nommu.c index 5b0bfcd..3b64dc7

Re: [PATCH 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list

2015-08-12 Thread Anshuman Khandual
On 08/12/2015 11:35 AM, Michael Ellerman wrote: On Wed, 2015-07-29 at 12:40 +0530, Anshuman Khandual wrote: This patch adds a set of new elements to the existing PACA dump list inside an xmon session which can be listed below improving the overall xmon debug support. (1) hmi_event_available

Re: [PATCH v3 09/11] cxl: Allow the kernel to trust that an image won't change on PERST.

2015-08-12 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:18 +1000 Daniel Axtens d...@axtens.net wrote: Provide a kernel API and a sysfs entry which allow a user to specify that when a card is PERSTed, it's image will stay the same, allowing it to participate in EEH. cxl_reset is used to reflash the card. In that case, we

Re: [4/8] powerpc/slb: Add some helper functions to improve modularization

2015-08-12 Thread Anshuman Khandual
On 08/12/2015 09:41 AM, Michael Ellerman wrote: On Wed, 2015-29-07 at 07:10:01 UTC, Anshuman Khandual wrote: This patch adds the following six helper functions to help improve modularization and readability of the code. (1) slb_invalidate_all:Invalidates the entire SLB (2)

[PATCH 01/31] scatterlist: add sg_pfn and sg_has_page helpers

2015-08-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de --- include/linux/scatterlist.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 9b1ef0c..b1056bf 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h

[PATCH 14/31] sparc32/io-unit: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
For the iommu offset we just need and offset into the page. Calculate that using the physical address instead of using the virtual address so that we don't require a virtual mapping. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/sparc/mm/io-unit.c | 23 --- 1 file

[PATCH 21/31] blackfin: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Switch from sg_virt to sg_phys as blackfin like all nommu architectures has a 1:1 virtual to physical mapping. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/blackfin/kernel/dma-mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 27/31] mips: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. To do this consolidate the two platform callouts using pages and virtual addresses into a single one using a physical address. Signed-off-by: Christoph Hellwig h...@lst.de ---

[PATCH 28/31] powerpc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig h...@lst.de --- arch/powerpc/kernel/dma.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 35e4dcc..cece40b 100644

Re: [V3] powerpc/irq: Enable some more exceptions in /proc/interrupts interface

2015-08-12 Thread Anshuman Khandual
On 08/09/2015 07:57 AM, Benjamin Herrenschmidt wrote: On Tue, 2015-08-04 at 19:57 +1000, Michael Ellerman wrote: On Mon, 2015-13-07 at 08:16:06 UTC, Anshuman Khandual wrote: This patch enables facility unavailable exceptions for generic facility, FPU, ALTIVEC and VSX in /proc/interrupts

Re: [PATCH v3 02/11] cxl: Drop commands if the PCI channel is not in normal state

2015-08-12 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:11 +1000 Daniel Axtens d...@axtens.net wrote: If the PCI channel has gone down, don't attempt to poke the hardware. We need to guard every time cxl_whatever_(read|write) is called. This is because a call to those functions will dereference an offset into an mmio

[PATCH 07/31] alpha/pci_iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address, and switch a few debug printfs to print physical instead of virtual addresses. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/alpha/kernel/pci_iommu.c | 36

[PATCH 08/31] c6x: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/c6x/kernel/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/c6x/kernel/dma.c b/arch/c6x/kernel/dma.c index

[PATCH 15/31] sparc32/iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Pass a PFN to iommu_get_one instad of calculating it locall from a page structure so that we don't need pages for every address we can DMA to or from. Also further restrict the cache flushing as we now have a non-highmem way of not kernel virtual mapped physical addresses. Signed-off-by:

[PATCH 16/31] s390: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of page_to_phys(sg_page(sg)) so that we don't require a page structure for all DMA memory. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/s390/pci/pci_dma.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git

[PATCH 22/31] metag: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig h...@lst.de --- arch/metag/include/asm/dma-mapping.h | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/arch/metag/include/asm/dma-mapping.h

Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface

2015-08-12 Thread Peter Zijlstra
On Tue, Aug 11, 2015 at 09:14:00PM -0700, Sukadev Bhattiprolu wrote: | +static void __perf_read_group_add(struct perf_event *leader, u64 read_format, u64 *values) | { | + struct perf_event *sub; | + int n = 1; /* skip @nr */ This n = 1 is to skip over the values[0] = 1 + nr_siblings

[PATCH] powerpc/xmon: Allow limiting the size of the paca display

2015-08-12 Thread Michael Ellerman
The paca display is already more than 24 lines, which can be problematic if you have an old school 80x24 terminal, or more likely you are on a virtual terminal which does not scroll for whatever reason. We'd like to expand the paca display even more, so add a way to limit the number of lines that

[PATCH 03/31] dma-debug: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_pfn to get a the PFN and skip checks that require a kernel virtual address. Signed-off-by: Christoph Hellwig h...@lst.de --- lib/dma-debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dma-debug.c b/lib/dma-debug.c index dace71f..a215a80 100644 ---

[PATCH 13/31] sparc/ldc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys(sg) PAGE_MASK instead of page_to_pfn(sg_page(sg)) PAGE_SHIFT to get at the page-aligned physical address ofa SG entry, so that we don't require a page backing for SG entries. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/sparc/kernel/ldc.c | 4 ++-- 1 file

[PATCH 19/31] arc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/arc/include/asm/dma-mapping.h | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git

[PATCH 20/31] avr32: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly, bypassing the noop page_to_bus. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/avr32/include/asm/dma-mapping.h | 14 +++--- 1 file changed, 7 insertions(+), 7

Re: [PATCH] powerpc/xmon: Allow limiting the size of the paca display

2015-08-12 Thread Anshuman Khandual
On 08/12/2015 12:27 PM, Michael Ellerman wrote: The paca display is already more than 24 lines, which can be problematic if you have an old school 80x24 terminal, or more likely you are on a virtual terminal which does not scroll for whatever reason. We'd like to expand the paca display even

Re: [PATCH 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list

2015-08-12 Thread Michael Ellerman
On Wed, 2015-07-29 at 12:40 +0530, Anshuman Khandual wrote: This patch adds a set of new elements to the existing PACA dump list inside an xmon session which can be listed below improving the overall xmon debug support. (1) hmi_event_available (2) dscr_default (3) vmalloc_sllp (4)

Re: [PATCH v3 01/11] cxl: Convert MMIO read/write macros to inline functions

2015-08-12 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:10 +1000 Daniel Axtens d...@axtens.net wrote: We're about to make these more complex, so make them functions first. Reviewed-by: Cyril Bur cyril...@gmail.com Signed-off-by: Daniel Axtens d...@axtens.net --- drivers/misc/cxl/cxl.h | 51

Re: [PATCH v3 10/11] cxl: EEH support

2015-08-12 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:19 +1000 Daniel Axtens d...@axtens.net wrote: EEH (Enhanced Error Handling) allows a driver to recover from the temporary failure of an attached PCI card. Enable basic CXL support for EEH. Looks like the only change since was the removal of the #ifdef, if that is

[PATCH 04/31] x86/pci-nommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/x86/kernel/pci-nommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index da15918..a218059 100644 ---

[PATCH 09/31] ia64/pci_dma: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/ia64/sn/pci/pci_dma.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/ia64/sn/pci/pci_dma.c

[PATCH 26/31] openrisc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/openrisc/kernel/dma.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/kernel/dma.c

[PATCH 31/31] dma-mapping-common: skip kmemleak checks for page-less SG entries

2015-08-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de --- include/asm-generic/dma-mapping-common.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index 940d5ec..afc3eaf 100644 ---

Re: [PATCH v3 06/11] cxl: Refactor adaptor init/teardown

2015-08-12 Thread Cyril Bur
On Wed, 12 Aug 2015 10:48:15 +1000 Daniel Axtens d...@axtens.net wrote: Some aspects of initialisation are done only once in the lifetime of an adapter: for example, allocating memory for the adapter, allocating the adapter number, or setting up sysfs/debugfs files. However, we may want to

[PATCH 02/31] scatterlist: use sg_phys()

2015-08-12 Thread Christoph Hellwig
From: Dan Williams dan.j.willi...@intel.com Coccinelle cleanup to replace open coded sg to physical address translations. This is in preparation for introducing scatterlists that reference __pfn_t. // sg_phys.cocci: convert usage page_to_phys(sg_page(sg)) to sg_phys(sg) // usage: make

[PATCH 06/31] alpha/pci-noop: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/alpha/kernel/pci-noop.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/alpha/kernel/pci-noop.c

[PATCH 10/31] powerpc/iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
For the iommu offset we just need and offset into the page. Calculate that using the physical address instead of using the virtual address so that we don't require a virtual mapping. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/powerpc/kernel/iommu.c | 14 +++--- 1 file

[PATCH 18/31] nios2: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/nios2/mm/dma-mapping.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[PATCH 25/31] frv: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Only call kmap_atomic_primary when the SG entry is mapped into kernel virtual space. XXX: the code already looks odd due to the lack of pairing between kmap_atomic_primary and kunmap_atomic_primary. Does it work either before or after this patch? Signed-off-by: Christoph Hellwig h...@lst.de ---

[PATCH 30/31] intel-iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/iommu/intel-iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3541d65..ae10573 100644 ---

[PATCH 29/31] parisc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig h...@lst.de --- arch/parisc/kernel/pci-dma.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git

Re: [PATCH 19/31] arc: handle page-less SG entries

2015-08-12 Thread Vineet Gupta
On Wednesday 12 August 2015 12:39 PM, Christoph Hellwig wrote: Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig h...@lst.de With a minor nit below. Acked-by: Vineet Gupta vgu...@synopsys.com ---

Re: [PATCH v6 03/42] powerpc/powernv: Enable M64 on P7IOC

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 12:06:26PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 09:45 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 04:30:09PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: The patch enables M64 window on P7IOC, which has been enabled on PHB3.

Re: [PATCH v6 05/42] powerpc/powernv: Track IO/M32/M64 segments from PE

2015-08-12 Thread Gavin Shan
On Wed, Aug 12, 2015 at 09:05:09PM +1000, Alexey Kardashevskiy wrote: On 08/12/2015 08:45 PM, Gavin Shan wrote: On Tue, Aug 11, 2015 at 12:23:42PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:03 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 05:16:40PM +1000, Alexey Kardashevskiy wrote: On

RE: [PATCH v2 05/10] cxl: Refactor adaptor init/teardown

2015-08-12 Thread David Laight
From: Cyril Bur Sent: 11 August 2015 07:01 ... You have a dilema with the use of ugly if (rc = foo()). I don't like it but the file is littered with it. Looks like the majority of uses in this file the conditional block is only one line then it makes sense (or at least in terms of numbers

Re: [PATCH 20/31] avr32: handle page-less SG entries

2015-08-12 Thread Hans-Christian Egtvedt
Around Wed 12 Aug 2015 09:05:39 +0200 or thereabout, Christoph Hellwig wrote: Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly, bypassing the noop page_to_bus. Signed-off-by: Christoph Hellwig h...@lst.de Acked-by: Hans-Christian

Re: [PATCH v6 05/42] powerpc/powernv: Track IO/M32/M64 segments from PE

2015-08-12 Thread Gavin Shan
On Tue, Aug 11, 2015 at 12:23:42PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:03 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 05:16:40PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: The patch is adding 6 bitmaps, three to PE and three to PHB, to track The

Re: [PATCH v6 05/42] powerpc/powernv: Track IO/M32/M64 segments from PE

2015-08-12 Thread Alexey Kardashevskiy
On 08/12/2015 08:45 PM, Gavin Shan wrote: On Tue, Aug 11, 2015 at 12:23:42PM +1000, Alexey Kardashevskiy wrote: On 08/11/2015 10:03 AM, Gavin Shan wrote: On Mon, Aug 10, 2015 at 05:16:40PM +1000, Alexey Kardashevskiy wrote: On 08/06/2015 02:11 PM, Gavin Shan wrote: The patch is adding 6

Re: [PATCH v7 2/6] mm: mlock: Add new mlock system call

2015-08-12 Thread Michal Hocko
On Sun 09-08-15 01:22:52, Eric B Munson wrote: With the refactored mlock code, introduce a new system call for mlock. The new call will allow the user to specify what lock states are being added. mlock2 is trivial at the moment, but a follow on patch will add a new mlock state making it

Re: [PATCH] powerpc/xmon: Allow limiting the size of the paca display

2015-08-12 Thread Michael Ellerman
On Wed, 2015-08-12 at 13:24 +0530, Anshuman Khandual wrote: On 08/12/2015 12:27 PM, Michael Ellerman wrote: @@ -2090,9 +2092,12 @@ static void dump_one_paca(int cpu) printf( %-*s = %s\n, 16, present, cpu_present(cpu) ? yes : no); printf( %-*s = %s\n, 16, online, cpu_online(cpu) ?

Re: [PATCH 30/31] intel-iommu: handle page-less SG entries

2015-08-12 Thread David Woodhouse
On Wed, 2015-08-12 at 09:05 +0200, Christoph Hellwig wrote: Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig h...@lst.de Acked-by: David Woodhouse david.woodho...@intel.com -- David WoodhouseOpen Source Technology

Re: [PATCH 31/31] dma-mapping-common: skip kmemleak checks for page-less SG entries

2015-08-12 Thread Linus Torvalds
On Wed, Aug 12, 2015 at 12:05 AM, Christoph Hellwig h...@lst.de wrote: + for_each_sg(sg, s, nents, i) { + if (sg_has_page(s)) + kmemcheck_mark_initialized(sg_virt(s), s-length); + } [ Again, I'm responding to one random patch - this pattern was

Re: [PATCH 29/31] parisc: handle page-less SG entries

2015-08-12 Thread Linus Torvalds
On Wed, Aug 12, 2015 at 12:05 AM, Christoph Hellwig h...@lst.de wrote: Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. So this worries me a bit (I'm just reacting to one random patch in the series). The reason? I think this wants

  1   2   >