[PATCH V2] KVM: PPC: BOOK3S: HV: Use base page size when comparing against slb value

2014-06-15 Thread Aneesh Kumar K.V
With guests supporting Multiple page size per segment (MPSS), hpte_page_size returns the actual page size used. Add a new function to return base page size and use that to compare against the the page size calculated from SLB. Without this patch a hpte lookup can fail since we are comparing wrong

[PATCH -next 01/26] powerpc: Use dma_zalloc_coherent

2014-06-15 Thread Joe Perches
Use the zeroing function instead of dma_alloc_coherent memset(,0,) Signed-off-by: Joe Perches j...@perches.com --- arch/powerpc/platforms/pasemi/dma_lib.c | 8 +++- arch/powerpc/sysdev/fsl_rmu.c | 9 - 2 files changed, 7 insertions(+), 10 deletions(-) diff --git

[PATCH -next 00/26] treewide: Use dma_zalloc_coherent

2014-06-15 Thread Joe Perches
Use the zeroing function instead of dma_alloc_coherent memset(,0,) Joe Perches (26): powerpc: Use dma_zalloc_coherent sh: Use dma_zalloc_coherent ata: Use dma_zalloc_coherent block: Use dma_zalloc_coherent crypto: Use dma_zalloc_coherent dma: Use dma_zalloc_coherent gpu: Use

[PATCH -next 26/26] sound: Use dma_zalloc_coherent

2014-06-15 Thread Joe Perches
Use the zeroing function instead of dma_alloc_coherent memset(,0,) Signed-off-by: Joe Perches j...@perches.com --- sound/aoa/soundbus/i2sbus/core.c | 12 sound/sparc/dbri.c | 6 ++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git

Re: kmemleak: Unable to handle kernel paging request

2014-06-15 Thread Michael Ellerman
On Fri, 2014-06-13 at 14:26 +0400, Denis Kirjanov wrote: On 6/13/14, Catalin Marinas catalin.mari...@arm.com wrote: On Fri, Jun 13, 2014 at 08:12:08AM +0100, Denis Kirjanov wrote: On 6/12/14, Catalin Marinas catalin.mari...@arm.com wrote: On Thu, Jun 12, 2014 at 01:00:57PM +0100, Denis

Re: [PATCH v2 01/10] DMA, CMA: clean-up log message

2014-06-15 Thread Joonsoo Kim
On Thu, Jun 12, 2014 at 11:53:16AM +0200, Michal Nazarewicz wrote: On Thu, Jun 12 2014, Michal Nazarewicz min...@mina86.com wrote: I used “function(arg1, arg2, …)” at the *beginning* of functions when the arguments passed to the function were included in the message. In all other cases I

Re: [PATCH v2 04/10] DMA, CMA: support alignment constraint on cma region

2014-06-15 Thread Joonsoo Kim
On Thu, Jun 12, 2014 at 12:02:38PM +0200, Michal Nazarewicz wrote: On Thu, Jun 12 2014, Joonsoo Kim iamjoonsoo@lge.com wrote: ppc kvm's cma area management needs alignment constraint on I've noticed it earlier and cannot seem to get to terms with this. It should IMO be PPC, KVM and CMA

Re: [PATCH v2 05/10] DMA, CMA: support arbitrary bitmap granularity

2014-06-15 Thread Joonsoo Kim
On Thu, Jun 12, 2014 at 12:19:54PM +0200, Michal Nazarewicz wrote: On Thu, Jun 12 2014, Joonsoo Kim iamjoonsoo@lge.com wrote: ppc kvm's cma region management requires arbitrary bitmap granularity, since they want to reserve very large memory and manage this region with bitmap that one

Re: [PATCH v2 03/10] DMA, CMA: separate core cma management codes from DMA APIs

2014-06-15 Thread Joonsoo Kim
On Thu, Jun 12, 2014 at 02:37:43PM +0900, Minchan Kim wrote: On Thu, Jun 12, 2014 at 12:21:40PM +0900, Joonsoo Kim wrote: To prepare future generalization work on cma area management code, we need to separate core cma management codes from DMA APIs. We will extend these core functions to

Re: [PATCH v2 06/10] CMA: generalize CMA reserved area management functionality

2014-06-15 Thread Joonsoo Kim
On Sat, Jun 14, 2014 at 03:46:44PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: Currently, there are two users on CMA functionality, one is the DMA subsystem and the other is the kvm on powerpc. They have their own code to manage CMA reserved area even if they

Re: [PATCH v2 07/10] PPC, KVM, CMA: use general CMA reserved area management framework

2014-06-15 Thread Joonsoo Kim
On Sat, Jun 14, 2014 at 03:35:33PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Acked-by: Michal Nazarewicz min...@mina86.com

Re: [PATCH v2 00/10] CMA: generalize CMA reserved area management code

2014-06-15 Thread Joonsoo Kim
On Sat, Jun 14, 2014 at 12:55:39PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: Currently, there are two users on CMA functionality, one is the DMA subsystem and the other is the kvm on powerpc. They have their own code to manage CMA reserved area even if they

Re: [PATCH v2 07/10] PPC, KVM, CMA: use general CMA reserved area management framework

2014-06-15 Thread Joonsoo Kim
On Sat, Jun 14, 2014 at 02:23:59PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Acked-by: Michal Nazarewicz min...@mina86.com

[PATCH v3 -next 2/9] DMA, CMA: separate core CMA management codes from DMA APIs

2014-06-15 Thread Joonsoo Kim
To prepare future generalization work on CMA area management code, we need to separate core CMA management codes from DMA APIs. We will extend these core functions to cover requirements of PPC KVM's CMA area management functionality in following patches. This separation helps us not to touch DMA

[PATCH v3 -next 3/9] DMA, CMA: support alignment constraint on CMA region

2014-06-15 Thread Joonsoo Kim
PPC KVM's CMA area management needs alignment constraint on CMA region. So support it to prepare generalization of CMA area management functionality. Additionally, add some comments which tell us why alignment constraint is needed on CMA region. v3: fix wrongly spelled word,

[PATCH v3 -next 8/9] mm, CMA: change cma_declare_contiguous() to obey coding convention

2014-06-15 Thread Joonsoo Kim
Conventionally, we put output param to the end of param list and put the 'base' ahead of 'size', but cma_declare_contiguous() doesn't look like that, so change it. Additionally, move down cma_areas reference code to the position where it is really needed. v3: put 'base' ahead of 'size' (Minchan)

[PATCH v3 -next 0/9] CMA: generalize CMA reserved area management code

2014-06-15 Thread Joonsoo Kim
Currently, there are two users on CMA functionality, one is the DMA subsystem and the other is the KVM on powerpc. They have their own code to manage CMA reserved area even if they looks really similar. From my guess, it is caused by some needs on bitmap management. Kvm side wants to maintain

[PATCH v3 -next 6/9] PPC, KVM, CMA: use general CMA reserved area management framework

2014-06-15 Thread Joonsoo Kim
Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. v3: add zeroing to CMA region (Aneesh) fix compile error (Aneesh) move VM_BUG_ON() to kvm_alloc_hpt() in book3s_hv_builtin.c (Aneesh) Acked-by: Michal

[PATCH v3 -next 1/9] DMA, CMA: fix possible memory leak

2014-06-15 Thread Joonsoo Kim
We should free memory for bitmap when we find zone mis-match, otherwise this memory will leak. Additionally, I copy code comment from PPC KVM's CMA code to inform why we need to check zone mis-match. * Note Minchan suggested to add a tag for the stable, but, I don't do it, because I found this

[PATCH v3 -next 7/9] mm, CMA: clean-up CMA allocation error path

2014-06-15 Thread Joonsoo Kim
We can remove one call sites for clear_cma_bitmap() if we first call it before checking error number. Acked-by: Minchan Kim minc...@kernel.org Reviewed-by: Michal Nazarewicz min...@mina86.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Reviewed-by: Aneesh Kumar K.V

[PATCH v3 -next 9/9] mm, CMA: clean-up log message

2014-06-15 Thread Joonsoo Kim
We don't need explicit 'CMA:' prefix, since we already define prefix 'cma:' in pr_fmt. So remove it. Acked-by: Michal Nazarewicz min...@mina86.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com diff --git a/mm/cma.c b/mm/cma.c index

[PATCH v3 -next 4/9] DMA, CMA: support arbitrary bitmap granularity

2014-06-15 Thread Joonsoo Kim
PPC KVM's CMA area management requires arbitrary bitmap granularity, since they want to reserve very large memory and manage this region with bitmap that one bit for several pages to reduce management overheads. So support arbitrary bitmap granularity for following generalization. v3: use

[PATCH v3 -next 5/9] CMA: generalize CMA reserved area management functionality

2014-06-15 Thread Joonsoo Kim
Currently, there are two users on CMA functionality, one is the DMA subsystem and the other is the KVM on powerpc. They have their own code to manage CMA reserved area even if they looks really similar. From my guess, it is caused by some needs on bitmap management. KVM side wants to maintain