Re: [PATCH kernel v8 06/31] vfio: powerpc/spapr: Disable DMA mappings on disabled container

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:48PM +1000, Alexey Kardashevskiy wrote: > At the moment DMA map/unmap requests are handled irrespective to > the container's state. This allows the user space to pin memory which > it might not be allowed to pin. > > This adds checks to MAP/UNMAP that the container is

Re: [PATCH kernel v8 09/31] powerpc/powernv: Do not set "read" flag if direction==DMA_NONE

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:51PM +1000, Alexey Kardashevskiy wrote: > Normally a bitmap from the iommu_table is used to track what TCE entry > is in use. Since we are going to use iommu_table without its locks and > do xchg() instead, it becomes essential not to put bits which are not > implied i

Re: [PATCH kernel v8 08/31] vfio: powerpc/spapr: Rework groups attaching

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:50PM +1000, Alexey Kardashevskiy wrote: > This is to make extended ownership and multiple groups support patches > simpler for review. > > This is a mechanical patch. I think you're pushing the meaning of that term. Moving whole slabs of code by copy/paste I'd call

Re: [PATCH kernel v8 07/31] vfio: powerpc/spapr: Moving pinning/unpinning to helpers

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:49PM +1000, Alexey Kardashevskiy wrote: > This is a pretty mechanical patch to make next patches simpler. > > New tce_iommu_unuse_page() helper does put_page() now but it might skip > that after the memory registering patch applied. > > As we are here, this removes u

Re: [PATCH kernel v8 10/31] powerpc/iommu: Move tce_xxx callbacks from ppc_md to iommu_table

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:52PM +1000, Alexey Kardashevskiy wrote: > This adds a iommu_table_ops struct and puts pointer to it into > the iommu_table struct. This moves tce_build/tce_free/tce_get/tce_flush > callbacks from ppc_md to the new struct where they really belong to. > > This adds the

[PATCH V2] QorIQ/TMU: add TMU node to device tree for QorIQ T104x

2015-04-15 Thread Jia Hongtao
This is Thermal Monitoring Unit for QorIQ platform. Signed-off-by: Jia Hongtao --- Changes from V1: * Provide more details on compatible and calibration properties. .../devicetree/bindings/thermal/qoriq-thermal.txt | 68 ++ arch/powerpc/boot/dts/fsl/qoriq-tmu-t104xsi.dtsi | 8

RE: [v2] dt/bindings: fsl/guts: Added global-utilities compatibles

2015-04-15 Thread igal.liber...@freescale.com
Regards, Igal Liberman. > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, April 14, 2015 11:09 PM > To: Liberman Igal-B31950 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org > Subject: Re: [v2] dt/bindings: fsl/guts: Added global-utilities compatibles > > On

Re: 'perf upgrade' (was: Re: [PATCH v9 00/11] Add support for JSON event files.)

2015-04-15 Thread Ingo Molnar
* Michael Ellerman wrote: > > We just merged a patch series that was first sent in 2013. Some > > things take time to get right. > > The first attempt to get symbolic event name support into perf was > sent in 2010, that's FIVE years ago [1]. kgdb took even longer, I think it was first propo

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-15 Thread Vasant Hegde
On 04/15/2015 02:12 PM, Jacek Anaszewski wrote: > Hi Vasant, > > On 04/15/2015 08:26 AM, Vasant Hegde wrote: >> On 04/14/2015 08:50 PM, Jacek Anaszewski wrote: >>> Hi Vasant, >> >> Hi Jacek, >> This patch implements LED driver for PowerNV platform using the existing generic LED clas

RE: [v2] powerpc/dts: Add some SoC specific "fsl,*-device-config" compatibles

2015-04-15 Thread igal.liber...@freescale.com
Regards, Igal Liberman. > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, April 14, 2015 11:09 PM > To: Liberman Igal-B31950 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org > Subject: Re: [v2] powerpc/dts: Add some SoC specific "fsl,*-device-config" > compat

RE: [PATCH] powerpc/dts: Update the core cluster PLL node(s)

2015-04-15 Thread igal.liber...@freescale.com
Regards, Igal Liberman. > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, April 14, 2015 11:23 PM > To: Liberman Igal-B31950 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH] powerpc/dts: Update the core cluster PLL node(s) > > On Tue,

Re: [RESEND PATCH v3 1/2] mm: Introducing arch_remap hook

2015-04-15 Thread Laurent Dufour
On 14/04/2015 21:38, Andrew Morton wrote: > On Tue, 14 Apr 2015 11:26:13 +0200 Laurent Dufour > wrote: > >>> Do away with __HAVE_ARCH_REMAP and do it like this: >>> >>> arch/x/include/asm/y.h: >>> >>> extern void arch_remap(...); >>> #define arch_remap arch_remap >>> >>> include/linux/z.

Re: [PATCH kernel v8 07/31] vfio: powerpc/spapr: Moving pinning/unpinning to helpers

2015-04-15 Thread Alexey Kardashevskiy
On 04/15/2015 05:10 PM, David Gibson wrote: On Fri, Apr 10, 2015 at 04:30:49PM +1000, Alexey Kardashevskiy wrote: This is a pretty mechanical patch to make next patches simpler. New tce_iommu_unuse_page() helper does put_page() now but it might skip that after the memory registering patch appli

Re: [PATCH v5 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-15 Thread Preeti U Murthy
On 04/15/2015 11:54 AM, Shreyas B. Prabhu wrote: > +/* > + * Used to store fastsleep workaround state > + * 0 - Workaround applied/undone at fastsleep entry/exit path (Default) > + * 1 - Workaround applied once, never undone. > + */ > +static u8 fastsleep_workaround_state; > + > +static const char

[PATCH v5 1/3] mm: New mm hook framework

2015-04-15 Thread Laurent Dufour
This patch introduces a new set of header file to manage mm hooks: - per architecture empty header file (arch/x/include/asm/mm-arch-hooks.h) - a generic header (include/linux/mm-arch-hooks.h) The architecture which need to overwrite a hook as to redefine it in its header file, while architecture w

[PATCH v5 0/3] Tracking user space vDSO remaping

2015-04-15 Thread Laurent Dufour
CRIU is recreating the process memory layout by remapping the checkpointee memory area on top of the current process (criu). This includes remapping the vDSO to the place it has at checkpoint time. However some architectures like powerpc are keeping a reference to the vDSO base address to build th

[PATCH v5 2/3] mm: New arch_remap hook

2015-04-15 Thread Laurent Dufour
Some architecture would like to be triggered when a memory area is moved through the mremap system call. This patch is introducing a new arch_remap mm hook which is placed in the path of mremap, and is called before the old area is unmapped (and the arch_unmap hook is called). Signed-off-by: Laur

[PATCH v5 3/3] powerpc/mm: Tracking vDSO remap

2015-04-15 Thread Laurent Dufour
Some processes (CRIU) are moving the vDSO area using the mremap system call. As a consequence the kernel reference to the vDSO base address is no more valid and the signal return frame built once the vDSO has been moved is not pointing to the new sigreturn address. This patch handles vDSO remappin

RE: [1/3][PATCH][v2] Device Tree bindings for Freescale TDM controller

2015-04-15 Thread sand...@freescale.com
Hi Laurentiu, Thanks for your comments. Reply inline. Regards Sandeep > -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+sandeep=freescale@lists.ozlabs.org] On Behalf Of Laurentiu Tudor > Sent: Thursday, April 02, 2015 5:26 PM > To: linuxppc-dev@lists.ozlabs.or

Re: [PATCH] powerpc/dts: Update the core cluster PLL node(s)

2015-04-15 Thread Scott Wood
On Wed, 2015-04-15 at 06:07 -0500, Liberman Igal-B31950 wrote: > > > Regards, > Igal Liberman. > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, April 14, 2015 11:23 PM > > To: Liberman Igal-B31950 > > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org >

Re: [v2] dt/bindings: fsl/guts: Added global-utilities compatibles

2015-04-15 Thread Scott Wood
On Wed, 2015-04-15 at 03:43 -0500, Liberman Igal-B31950 wrote: > > > Regards, > Igal Liberman. > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, April 14, 2015 11:09 PM > > To: Liberman Igal-B31950 > > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org >

Re: [v3] dt/bindings: qoriq-clock: Add binding for FMan clock mux

2015-04-15 Thread Scott Wood
On Tue, 2015-04-14 at 13:56 +0300, Igal.Liberman wrote: > From: Igal Liberman > > v3: Addressed feedback from Scott: > - Removed clock specifier description. > > v2: Addressed feedback from Scott: > - Moved the "fman-clk-mux" clock provider details > under "clocks" property.

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-15 Thread Stewart Smith
Jacek Anaszewski writes: >> +static struct platform_driver powernv_led_driver = { >> +.probe = powernv_led_probe, >> +.remove = powernv_led_remove, >> +.driver = { >> +.name = "powernv-led-driver", >> +.owner = THIS_MODULE, >> +.of_match_table = pow

Re: 'perf upgrade' (was: Re: [PATCH v9 00/11] Add support for JSON event files.)

2015-04-15 Thread Andi Kleen
> My suggestion to resolve the technical objections and lift the NAK > would be: > > - to add the tables to the source code, in a more human readable >format and (optionally) structure the event names better into a >higher level hierarchy, than the humungous linear dumps with no >

Pull request: scottwood/linux.git master

2015-04-15 Thread Scott Wood
This is a fix to a 4.0 regression that causes hugetlb use on PPC to emit kernel output such as "BUG: non-zero nr_pmds on freeing mm: 1" The following changes since commit 39a8804455fb23f09157341d3ba7db6d7ae6ee76: Linux 4.0 (2015-04-12 15:12:50 -0700) are available in the git repository at:

[PATCH] powerpc/mm: Don't call __flush_dcache_icache_phys() with PA>VA

2015-04-15 Thread Scott Wood
__flush_dcache_icache_phys() requires the ability to access the memory with the MMU disabled, which means that on a 32-bit system any memory above 4 GiB is inaccessible. In particular, mpc86xx is 32-bit and can have more than 4 GiB of RAM. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/

Re: new way of writing defconfigs for freescale's powerpc platforms

2015-04-15 Thread Bob Cochran
On 04/09/2015 06:31 PM, Scott Wood wrote: On Thu, 2015-04-09 at 16:52 -0500, Pan Lijun-B44306 wrote: Hi Maintainers, We have a proposal for writing the defconfigs for freescale's powperpc platforms in a new way. Can you take a look and provide some feedback? You know currently we have mpc85xx

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-15 Thread Vasant Hegde
On 04/16/2015 12:20 AM, Stewart Smith wrote: > Jacek Anaszewski writes: >>> +static struct platform_driver powernv_led_driver = { >>> + .probe = powernv_led_probe, >>> + .remove = powernv_led_remove, >>> + .driver = { >>> + .name = "powernv-led-driver", >>> + .owner = TH

Re: [PATCH kernel v8 11/31] powerpc/iommu: Introduce iommu_table_alloc() helper

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:53PM +1000, Alexey Kardashevskiy wrote: > This replaces multiple calls of kzalloc_node() with a new > iommu_table_alloc() helper. Right now it calls kzalloc_node() but > later it will be modified to allocate a iommu_table_group struct with > a single iommu_table in it.

Re: [PATCH kernel v8 12/31] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:54PM +1000, Alexey Kardashevskiy wrote: > Modern IBM POWERPC systems support multiple (currently two) TCE tables > per IOMMU group (a.k.a. PE). This adds a iommu_table_group container > for TCE tables. Right now just one table is supported. > > Signed-off-by: Alexey K

Re: [PATCH kernel v8 13/31] vfio: powerpc/spapr: powerpc/iommu: Rework IOMMU ownership control

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:55PM +1000, Alexey Kardashevskiy wrote: > This replaces iommu_take_ownership()/iommu_release_ownership() calls > with the callback calls and it is up to the platform code to call > iommu_take_ownership()/iommu_release_ownership() if needed. I think this commit message

Re: [PATCH kernel v8 15/31] powerpc/iommu: Fix IOMMU ownership control functions

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:57PM +1000, Alexey Kardashevskiy wrote: > This adds missing locks in iommu_take_ownership()/ > iommu_release_ownership(). > > This marks all pages busy in iommu_table::it_map in order to catch > errors if there is an attempt to use this table while ownership over it >

Re: [PATCH kernel v8 14/31] vfio: powerpc/spapr: powerpc/powernv/ioda2: Rework IOMMU ownership control

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:56PM +1000, Alexey Kardashevskiy wrote: > At the moment the iommu_table struct has a set_bypass() which enables/ > disables DMA bypass on IODA2 PHB. This is exposed to POWERPC IOMMU code > which calls this callback when external IOMMU users such as VFIO are > about to

RE: [v3] dt/bindings: qoriq-clock: Add binding for FMan clock mux

2015-04-15 Thread igal.liber...@freescale.com
Regards, Igal Liberman. > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, April 15, 2015 8:36 PM > To: Liberman Igal-B31950 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org > Subject: Re: [v3] dt/bindings: qoriq-clock: Add binding for FMan clock mux > > On

RE: [PATCH] powerpc/dts: Update the core cluster PLL node(s)

2015-04-15 Thread igal.liber...@freescale.com
Regards, Igal Liberman. > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, April 15, 2015 8:15 PM > To: Liberman Igal-B31950 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH] powerpc/dts: Update the core cluster PLL node(s) > > On Wed,

Re: [PATCH kernel v8 16/31] powerpc/powernv/ioda/ioda2: Rework tce_build()/tce_free()

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:58PM +1000, Alexey Kardashevskiy wrote: > The pnv_pci_ioda_tce_invalidate() helper invalidates TCE cache. It is > supposed to be called on IODA1/2 and not called on p5ioc2. It receives > start and end host addresses of TCE table. This approach makes it possible > to ge

Re: [PATCH kernel v8 18/31] powerpc/powernv/ioda2: Rework iommu_table creation

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:31:00PM +1000, Alexey Kardashevskiy wrote: > This moves iommu_table creation to the beginning. This is a mechanical > patch. > > Signed-off-by: Alexey Kardashevskiy > --- > arch/powerpc/platforms/powernv/pci-ioda.c | 34 > --- > 1 file chan

Re: [PATCH kernel v8 17/31] powerpc/iommu/powernv: Release replaced TCE

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:30:59PM +1000, Alexey Kardashevskiy wrote: > At the moment writing new TCE value to the IOMMU table fails with EBUSY > if there is a valid entry already. However PAPR specification allows > the guest to write new TCE value without clearing it first. > > Another problem t

Re: [PATCH kernel v8 19/31] powerpc/powernv/ioda2: Introduce pnv_pci_ioda2_create_table/pnc_pci_free_table

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:31:01PM +1000, Alexey Kardashevskiy wrote: > This is a part of moving TCE table allocation into an iommu_ops > callback to support multiple IOMMU groups per one VFIO container. > > This enforce window size to be a power of two. > > This is a pretty mechanical patch. ??

Re: [PATCH kernel v8 21/31] powerpc/iommu: Split iommu_free_table into 2 helpers

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:31:03PM +1000, Alexey Kardashevskiy wrote: > The iommu_free_table helper release memory it is using (the TCE table and > @it_map) and release the iommu_table struct as well. We might not want > the very last step as we store iommu_table in parent structures. Yeah, as I c

Re: [PATCH kernel v8 20/31] powerpc/powernv/ioda2: Introduce pnv_pci_ioda2_set_window

2015-04-15 Thread David Gibson
On Fri, Apr 10, 2015 at 04:31:02PM +1000, Alexey Kardashevskiy wrote: > This is a part of moving DMA window programming to an iommu_ops > callback. > > This is a mechanical patch. > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson -- David Gibson| I'll have

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-15 Thread Vasant Hegde
On 04/15/2015 06:42 PM, Jacek Anaszewski wrote: > On 04/15/2015 12:15 PM, Vasant Hegde wrote: >> On 04/15/2015 02:12 PM, Jacek Anaszewski wrote: >>> Hi Vasant, Hi Jacek, .../... > I mean, we have to retain the state of LED across system reboot. >>> >>> Static variables are reinitia