ALSA: vmalloc buffers should use normal mmap

2011-03-24 Thread Benjamin Herrenschmidt
It's a big no-no to use pgprot_noncached() when mmap'ing such buffers into userspace since they are mapped cachable in kernel space. This can cause all sort of interesting things ranging from to garbled sound to lockups on various architectures. I've observed that usb-audio is broken on powerpc 4x

[PATCH] powerpc: Implement dma_mmap_coherent()

2011-03-24 Thread Benjamin Herrenschmidt
This is used by Alsa to mmap buffers allocated with dma_alloc_coherent() into userspace. We need a special variant to handle machines with non-coherent DMAs as those buffers have "special" virt addresses and require non-cachable mappings Signed-off-by: Benjamin Herrenschmidt --- Dunno if anybody

[PATCH] powerpc/dts:Update PCIe memory maps to match u-boot of Px020RDB

2011-03-24 Thread Prabhakar Kushwaha
PCIe memory address space is 1:1 mapped with u-boot. Update dts of Px020RDB i.e. P1020RDB and P2020RDB to match the address map changes in u-boot. Signed-off-by: Prabhakar Kushwaha Acked-by: Kumar Gala --- Based upon git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (Branch

Re: Query: PCIe range entry at pcie@0 in dts files

2011-03-24 Thread Kumar Gala
On Mar 23, 2011, at 10:20 PM, Kushwaha Prabhakar-B32579 wrote: > > Hi all, > > I have query about usage of range field at pcie@0 under PCIe controller. > Please find snap shot from mpc8536_36.dts.. > > pci3: pcie@fffe0b000 { > compatible = "fsl,mpc8548-pcie"; >

[BUG] pgprot_noncached() is -NOT- safe for mapping vmalloc buffers into userspace

2011-03-24 Thread Benjamin Herrenschmidt
Hi Takashi ! While working on endian-fixing xHCI with Matt (CC), we discovered the source of our problems with usb-audio on a board we were working on. c32d977b8157bf67cdf47729ce7dd054a26eb534 "ALSA: pcm - Call pgprot_noncached() for vmalloc'ed buffers" I'm afraid that this is totally bogus :-)

[PATCH 1/4] powerpc: Add fsl mpic timer binding

2011-03-24 Thread Scott Wood
Update the existing example in the general mpic binding to have a separate TCRx region. Currently the example doesn't describe TCRx at all. The one upstream device tree with an mpic timer node (p1022ds) uses one large reg region to describe both, even though there are other unrelated registers in

[PATCH] powerpc: ARCH_PFN_OFFSET should be unsigned long

2011-03-24 Thread Scott Wood
pfns are unsigned long, but MEMORY_START is phys_addr_t. This leads to page_to_pfn() returning phys_addr_t, and thus type mismatches in a few print statements. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/page.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a

[PATCH] powerpc/booke: Correct the SPRN_MAS5 definition.

2011-03-24 Thread Scott Wood
From: Varun Sethi 339 is the SPR number for MAS5 documented by Power ISA 2.06, and implemented by e500mc. It is not yet used anywhere in the kernel, so nothing should be relying on the wrong number. Signed-off-by: Varun Sethi Signed-off-by: Scott Wood --- arch/powerpc/include/asm/reg_booke.h

[PATCH 2/4] powerpc/p1022ds: fix broken mpic timer node

2011-03-24 Thread Scott Wood
There is no hardware interrupt 0xf7. But now we can express the timer interrupt using 4-cell interrupts. This requires converting all of the other interrupt specifiers in the tree as well. Also add the second timer group, and fix the reg property to only describe the timer registers. Signed-off

[PATCH 4/4] powerpc/mpic: add the mpic global timer support

2011-03-24 Thread Scott Wood
Add support for MPIC timers as requestable interrupt sources. Based on http://patchwork.ozlabs.org/patch/20941/ by Dave Liu. Signed-off-by: Dave Liu Signed-off-by: Scott Wood --- arch/powerpc/include/asm/mpic.h |3 +- arch/powerpc/sysdev/mpic.c | 92 +

[PATCH 3/4] powerpc/mpic: parse 4-cell intspec types other than zero

2011-03-24 Thread Scott Wood
Signed-off-by: Scott Wood --- arch/powerpc/include/asm/mpic.h |2 ++ arch/powerpc/sysdev/mpic.c | 37 - 2 files changed, 38 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h index 7005ee0..2

High load average (~2.0) on an idle PowerPC 64 machine

2011-03-24 Thread Romain Goyet
I there, I've this Quad G5 machine that's sitting pretty much idle with the latest Debian stable installed, and yet it's got an abnormaly high load average. I've detailed the situation over here, maybe you guys will find it interesting or have something to say : http://serverfault.com/questions/2

Re: [PATCH] powerpc: add clock_adjtime for powerpc

2011-03-24 Thread Richard Cochran
On Thu, Mar 24, 2011 at 04:05:17PM +0100, Richard Cochran wrote: > This patch adds the clock_adjtime system call to the powerpc architecture. Never mind this patch. Stephen Rothwell already posted a patch on linuxppc-dev adding this syscall eariler today. Thanks, Richard

Re: hvc_console: Don't access hvc_task if not initialised

2011-03-24 Thread Milton Miller
[removed stable list from discussion] On Thu, 24 Mar 2011 07:29:58 -, Amit Shah wrote: > hvc_open() can be called without having any backing device. This > results in a call to hvc_kick() which calls wake_up_process on a NULL > pointer. How is hvc_open called without a hvc_driver registere

[PATCH] powerpc: add clock_adjtime for powerpc

2011-03-24 Thread Richard Cochran
This patch adds the clock_adjtime system call to the powerpc architecture. The call was introduced in f1f1d5ebd10ffa4242bce7a90a56a222d6b7bc77 Signed-off-by: Richard Cochran --- arch/powerpc/include/asm/systbl.h |1 + arch/powerpc/include/asm/unistd.h |3 ++- 2 files changed, 3 insertio

Re: vmsplice bad address

2011-03-24 Thread Guillaume Dargaud
On Monday 07 March 2011 10:35:44 Benjamin Herrenschmidt wrote: > I'm not completely surprised ... I wouldn't expect vmsplice to work > on /dev/mem ... No struct page backing the memory for example. So how would that work to do zero-copy ? Somebody gave me a hint of marking the memory regions as

[PATCH] hvc_console: Don't access hvc_task if not initialised

2011-03-24 Thread Amit Shah
hvc_open() can be called without having any backing device. This results in a call to hvc_kick() which calls wake_up_process on a NULL pointer. Ensure hvc is initialised by checking for a non-NULL hvc_task before waking up the hvc thread. This was found by an autotest run for virtio_console with