[PATCH 01/14] common: dma-mapping: introduce alloc_attrs and free_attrs methods

2011-12-23 Thread Marek Szyprowski
Introduce new generic alloc and free methods with attributes argument. Existing alloc_coherent and free_coherent can be implemented on top of the new calls with NULL attributes argument. Later also dma_alloc_non_coherent can be implemented using DMA_ATTR_NONCOHERENT attribute as well as

[PATCH 00/14] DMA-mapping framework redesign preparation

2011-12-23 Thread Marek Szyprowski
Hello eveyone, On Linaro Memory Management meeting in Budapest (May 2011) we have discussed about the design of DMA mapping framework. We tried to identify the drawbacks and limitations as well as to provide some a solution for them. The discussion was mainly about ARM architecture, but some of

[PATCH 05/14] IA64: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core IA64 architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 03/14] MIPS: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core MIPS architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 02/14] X86: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core X86 architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 07/14] Alpha: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core Alpha architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 08/14] SH: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core SH architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 04/14] PowerPC: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core PowerPC architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 09/14] Microblaze: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core Microblaze architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 13/14] common: DMA-mapping: add WRITE_COMBINE attribute

2011-12-23 Thread Marek Szyprowski
DMA_ATTR_WRITE_COMBINE specifies that writes to the mapping may be buffered to improve performance. It will be used by the replacement for ARM/ARV32 specific dma_alloc_writecombine() function. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Signed-off-by: Kyungmin Park

[PATCH 12/14] common: dma-mapping: introduce mmap method

2011-12-23 Thread Marek Szyprowski
Introduce new generic mmap method with attributes argument. This method lets drivers to create a userspace mapping for a DMA buffer in generic, architecture independent way. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com ---

[PATCH 06/14] SPARC: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core SPARC architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 11/14] common: dma-mapping: remove old alloc_coherent and free_coherent methods

2011-12-23 Thread Marek Szyprowski
Remove old, unused alloc_coherent and free_coherent methods from dma_map_ops structure. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- include/linux/dma-mapping.h |4 1 files changed, 0 insertions(+), 4 deletions(-)

[PATCH 10/14] Unicore32: adapt for dma_map_ops changes

2011-12-23 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz andrze...@samsung.com Adapt core Unicore32 architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 14/14] common: DMA-mapping: add NON-CONSISTENT attribute

2011-12-23 Thread Marek Szyprowski
DMA_ATTR_NON_CONSISTENT lets the platform to choose to return either consistent or non-consistent memory as it sees fit. By using this API, you are guaranteeing to the platform that you have all the correct and necessary sync points for this memory in the driver should it choose to return

Re: [PATCH 4/5] KVM: PPC: Book3s HV: Implement get_dirty_log using hardware changed bit

2011-12-23 Thread Alexander Graf
On 15.12.2011, at 13:03, Paul Mackerras wrote: This changes the implementation of kvm_vm_ioctl_get_dirty_log() for Book3s HV guests to use the hardware C (changed) bits in the guest hashed page table. Since this makes the implementation quite different from the Book3s PR case, this moves

Re: [PATCH 5/5] KVM: PPC: Book3s HV: Implement H_CLEAR_REF and H_CLEAR_MOD hcalls

2011-12-23 Thread Alexander Graf
On 15.12.2011, at 13:04, Paul Mackerras wrote: This adds implementations for the H_CLEAR_REF (test and clear reference bit) and H_CLEAR_MOD (test and clear changed bit) hypercalls. These hypercalls are not used by Linux guests at this stage, and these implementations are only compile

Re: [PATCH] KVM: Move gfn_to_memslot() to kvm_host.h

2011-12-23 Thread Alexander Graf
On 20.12.2011, at 10:21, Paul Mackerras wrote: This moves gfn_to_memslot(), and the functions it calls, that is, search_memslots() and __gfn_to_memslot(), from kvm_main.c to kvm_host.h so that gfn_to_memslot() can be called from non-modular code even when KVM is a module. On powerpc, the

Re: [PATCH] arch/powerpc/kvm/e500: Additional module.h = export.h fixup

2011-12-23 Thread Alexander Graf
On 22.12.2011, at 17:21, Kyle Moffett wrote: This file, like many others, needs to include linux/export.h. Signed-off-by: Kyle Moffett kyle.d.moff...@boeing.com Thanks, I already applied a patch from Scott that addresses the same issue. Alex

Re: [PATCH 0/5] Make use of hardware reference and change bits in HPT

2011-12-23 Thread Alexander Graf
On 15.12.2011, at 13:00, Paul Mackerras wrote: This series of patches builds on top of my previous series and modifies the Book3S HV memory management code to use the hardware reference and change bits in the guest hashed page table. This makes kvm_age_hva() more efficient, lets us

Re: [PATCH 00/14] DMA-mapping framework redesign preparation

2011-12-23 Thread Matthew Wilcox
On Fri, Dec 23, 2011 at 01:27:19PM +0100, Marek Szyprowski wrote: The first issue we identified is the fact that on some platform (again, mainly ARM) there are several functions for allocating DMA buffers: dma_alloc_coherent, dma_alloc_writecombine and dma_alloc_noncoherent Is this

p1020 unstable with 3.2

2011-12-23 Thread Alexander Graf
Hi guys, While trying to test my latest patch queue for ppc kvm, I realized that even though the device trees got updated, the p1020 box still is unstable. The trace below is the one I've seen the most. It only occurs during network I/O which happens a lot on that box, since I'm running it

[PATCH 8/9] arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree

2011-12-23 Thread Julia Lawall
rmu needs to be freed before leaving the function in an error case. A simplified version of the semantic match that finds the problem is as follows: (http://coccinelle.lip6.fr) // smpl @r exists@ local idexpression x; statement S; identifier f1; position p1,p2; expression *ptr != NULL; @@ x@p1

Kernel not booting when supplying boot parameter mem

2011-12-23 Thread Arshad, Farrukh
Greetings All, I have a basic question. I have 512 MB memory. I want my kernel to use only last 128 MB of memory starting from address 0x1000. I have configured the kernel CONFIG_PHYSICAL_START=0x1000 and in kernel boot parameter I have set mem=128M. In this scenario my kernel is not

Re: p1020 unstable with 3.2

2011-12-23 Thread Benjamin Herrenschmidt
On Fri, 2011-12-23 at 17:54 +0100, Alexander Graf wrote: Hi guys, While trying to test my latest patch queue for ppc kvm, I realized that even though the device trees got updated, the p1020 box still is unstable. The trace below is the one I've seen the most. It only occurs during network

Re: [PATCH 00/14] DMA-mapping framework redesign preparation

2011-12-23 Thread Benjamin Herrenschmidt
On Fri, 2011-12-23 at 09:35 -0700, Matthew Wilcox wrote: I really think this wants to be a separate function. dma_alloc_coherent is for allocating memory to be shared between the kernel and a driver; we already have dma_map_sg for mapping userspace I/O as an alternative interface. This feels