Memory mapped IO and Direct File IO

2009-08-04 Thread Stefan Bohne
Greetings, everyone, I'm trying to save some data block from a memory mapped device into a file - real fast, i.e., without any copying. My approach so far was to get a pointer to the io memory via mmap-ing /dev/mem, and then writing this pointer to a file (in user space). This works, if I don't

Re: [PATCH 3/20] powerpc/mm: Add HW threads support to no_hash TLB management

2009-08-04 Thread Benjamin Herrenschmidt
On Mon, 2009-08-03 at 12:57 -0500, Dave Kleikamp wrote: cpu_last_thread_in_core(cpu) is a moving target. You want something like: cpu = cpu_first_thread_in_core(cpu); last = cpu_last_thread_in_core(cpu); while (cpu = last) { __clear_bit(id, stale_map[cpu]); cpu++; }

AW: Kernel fault with simple UIO interrupt driver in 2.6.30.4

2009-08-04 Thread Frank Prepelica
Oh okay, I didnt think anybody would need it :) = bootm 200 - 300 ## Booting image at 0200 ... Image Name: Linux-2.6.30.4 Created: 2009-08-04 7:06:18 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size:3978238 Bytes = 3.8 MB Load

AW: Kernel fault with simple UIO interrupt driver in 2.6.30.4

2009-08-04 Thread Frank Prepelica
Additional information: The kernel fault already happens in 2.6.25 The driver works fine in 2.6.24 (Interrupt available in /proc/interrupts and /sys/class/uio/uio0) Are there changes in 2.6.25 which could cause the kernel fault? Any hint is appreaciated! Thx and kind regards Frank

Re: Ang: Re: [PATCH 0/2] Setting GPIOs simultaneously

2009-08-04 Thread Joakim Tjernlund
Anton Vorontsov avoront...@ru.mvista.com wrote on 15/07/2009 00:09:31: On Tue, Jul 14, 2009 at 11:20:13PM +0200, Joakim Tjernlund wrote: [...] But any users of the legacy bindings should be in-tree. ehh, it was working until you made it OF only. Why do call the native way legacy? It is

Re: 2.6.31-rc5-git2 crash [net/core/flow.c:flow_cache_new_hashrnd]

2009-08-04 Thread Michael Ellerman
On Tue, 2009-08-04 at 19:13 +0530, Sachin Sant wrote: Forgot to copy netdev in my original message. Forwarding .. I have a power6 blade [IBM,7998-61X] running 2.6.31-rc5-git2 kernel (a33a052f19a21d727847391c8c1aff3fb221c472). After some period of inactivity the machine drops into xmon with

[PATCH 2.6.31] ehea: Fix napi list corruption on ifconfig down

2009-08-04 Thread Hannes Hering
This patch fixes the napi list handling when an ehea interface is shut down to avoid corruption of the napi list. Signed-off-by: Hannes Hering heri...@de.ibm.com --- diff -Nurp -X dontdiff linux-2.6.31-rc5/drivers/net/ehea/ehea.h patched_kernel/drivers/net/ehea/ehea.h ---

Re: Ang: Re: [PATCH 0/2] Setting GPIOs simultaneously

2009-08-04 Thread Anton Vorontsov
On Tue, Aug 04, 2009 at 03:38:40PM +0200, Joakim Tjernlund wrote: Anton Vorontsov avoront...@ru.mvista.com wrote on 15/07/2009 00:09:31: On Tue, Jul 14, 2009 at 11:20:13PM +0200, Joakim Tjernlund wrote: [...] But any users of the legacy bindings should be in-tree. ehh, it was

Re: Ang: Re: [PATCH 0/2] Setting GPIOs simultaneously

2009-08-04 Thread Joakim Tjernlund
Anton Vorontsov avoront...@ru.mvista.com wrote on 04/08/2009 16:22:50: On Tue, Aug 04, 2009 at 03:38:40PM +0200, Joakim Tjernlund wrote: Anton Vorontsov avoront...@ru.mvista.com wrote on 15/07/2009 00:09:31: On Tue, Jul 14, 2009 at 11:20:13PM +0200, Joakim Tjernlund wrote: [...]

Re: Re:[PATCH 1/2] powerpc: add kexec support on FSL-Book-E

2009-08-04 Thread Sebastian Andrzej Siewior
* wilbur.chan | 2009-08-02 09:25:43 [+0800]: Hi, Sebastian, Hi Wilbur, In your patch of Booke support for kexec , it setup a 1GB TMP mapping and jump to it. But I saw that, the max size for an e500 entry is 256M??so I changed your code to setup 4*256M entries, and it works well on mpc8541. The

[PATCH 2/3] agp/uninorth: Simplify cache flushing.

2009-08-04 Thread Michel Dänzer
From: Michel Dänzer daen...@vmware.com Map the GART table uncached, so we don't always need to flush the CPU caches explicitly after updates. Signed-off-by: Michel Dänzer daen...@vmware.com --- drivers/char/agp/uninorth-agp.c | 33 + 1 files changed, 25

[PATCH 3/3] agp/uninorth: Unify U3 and pre-U3 insert_memory and remove_memory hooks.

2009-08-04 Thread Michel Dänzer
From: Michel Dänzer daen...@vmware.com Signed-off-by: Michel Dänzer daen...@vmware.com --- drivers/char/agp/uninorth-agp.c | 64 +++ 1 files changed, 11 insertions(+), 53 deletions(-) diff --git a/drivers/char/agp/uninorth-agp.c

[PATCH 1/3] agp/uninorth: Allow larger aperture sizes on pre-U3 bridges.

2009-08-04 Thread Michel Dänzer
From: Michel Dänzer daen...@vmware.com Using the radeon KMS test functionality, I verified that the AGP bridge of the Intrepid2 chipset in my PowerBook supports aperture sizes up to 256M. So allow aperture sizes up to 256M on pre-U3 bridges as well, and bump the default size to 256M. It's

kexec on e300 core / mpc5121

2009-08-04 Thread Sebastian Andrzej Siewior
I've tried kexec on e300 core which should be easy since it is possible to disable the MMU on that core. However it does not work. Once I disable the MMU, I can't access my MBAR and print chars on the serial port. Is this normal or do I have still some caches on? After I've setup two BATs one for

Re: [PATCH 0/7] Device table matching for SPI subsystem

2009-08-04 Thread David Brownell
On Wednesday 29 July 2009, Anton Vorontsov wrote: platform_data is overkill for m25p80 chips, the driver only needs to know exact chip model, and that's what device tables are for. To be fair, the platform_data also supports partitioning and labeling e.g. for cmdlinepart ... though I'd

Re: [PATCH 1/7] spi: Add support for device table matching

2009-08-04 Thread David Brownell
On Wednesday 29 July 2009, Ben Dooks wrote:  struct spi_driver { + const struct spi_device_id *id_table; + int (*probe_id)(struct spi_device *spi, +     const struct spi_device_id *id); how about leaving it at just probe

Re: [PATCH 2/6] mtd: m25p80: Convert to device table matching

2009-08-04 Thread David Brownell
On Thursday 30 July 2009, Anton Vorontsov wrote: This patch converts the m25p80 driver so that now it uses .id_table for device matching, making it properly detect devices on OpenFirmware platforms (prior to this patch the driver misdetected non-JEDEC chips, seeing all chips as m25p80). I

Re: BUG in dma-mapping.h:218 // MESH SCSI driver not working

2009-08-04 Thread FUJITA Tomonori
On Mon, 03 Aug 2009 09:13:37 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Sun, 2009-08-02 at 10:52 +0200, Stef Simoens wrote: Hey Benjamin, Thanks for the bisection. I'll have a look when I'm back from skiing :-) In the meantime, maybe Fujita has an idea ? The commit

Re: BUG in dma-mapping.h:218 // MESH SCSI driver not working

2009-08-04 Thread Benjamin Herrenschmidt
On Wed, 2009-08-05 at 10:04 +0900, FUJITA Tomonori wrote: Looks like that READ CAPACITY fails. We use kmalloc'ed buffer for READ CAPACITY so I'm not sure about an alignment issue that you mentioned in this thread earlier. You said your machine with a MESH appears to work. Did you confirm

Re: [Patch 0/6] [Patch 0/6] PPC64-HWBKPT: Hardware Breakpoint interfaces - ver VIII

2009-08-04 Thread David Gibson
On Tue, Aug 04, 2009 at 02:23:16AM +0530, K.Prasad wrote: On Fri, Jul 31, 2009 at 04:10:13PM +1000, David Gibson wrote: On Mon, Jul 27, 2009 at 05:41:52AM +0530, K.Prasad wrote: edited Reasons - Signal delivery before execution of instruction requires complex

Re: [Patch 2/6] Introduce PPC64 specific Hardware Breakpoint interfaces

2009-08-04 Thread David Gibson
On Tue, Aug 04, 2009 at 02:29:38AM +0530, K.Prasad wrote: On Fri, Jul 31, 2009 at 04:16:46PM +1000, David Gibson wrote: On Mon, Jul 27, 2009 at 05:43:17AM +0530, K.Prasad wrote: [snip] + /* Verify if dar lies within the address range occupied by the symbol + * being watched. Since we

[PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus

2009-08-04 Thread Kumar Gala
Introduced a temporary variable into our iterating over the list cpus that are threads on the same core. For some reason Ben forgot how for loops work. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/mm/mmu_context_nohash.c |9 + 1 files changed, 5

Re: [PATCH] powerpc/mpc52xx/wdt: Fix 5200 wdt always being used as gpt

2009-08-04 Thread Grant Likely
On Mon, Aug 3, 2009 at 12:46 PM, Albrecht Dreßalbrecht.dr...@arcor.de wrote: Am 03.08.09 19:50 schrieb(en) Grant Likely: Just about all mpc5200 device trees have the fsl,has-wdt property on GPT0 even when it isn't used as a watchdog. Sorry, I do not understand...  The file

[PATCH -v2 2/7] powerpc: remove swiotlb_pci_dma_ops

2009-08-04 Thread FUJITA Tomonori
Now swiotlb_pci_dma_ops is identical to swiotlb_dma_ops; we can use swiotlb_dma_ops with any devices. This removes swiotlb_pci_dma_ops. Signed-off-by: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Acked-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/include/asm/swiotlb.h |

[PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h

2009-08-04 Thread FUJITA Tomonori
This is the second version of the patchset to convert POWERPC to use asm-generic/dma-mapping-common.h: http://marc.info/?l=linux-kernelm=124840628128189w=2 There are some minor changes since the first version are: - removed unused CONFIG_PPC_NEED_DMA_SYNC_OPS [5/7] (Becky pointed out). -

[PATCH -v2 5/7] powerpc: use asm-generic/dma-mapping-common.h

2009-08-04 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Acked-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/Kconfig |6 +- arch/powerpc/include/asm/dma-mapping.h | 242 +--- 2 files changed, 7 insertions(+), 241 deletions(-)

[PATCH -v2 3/7] add set_dma_mask hook to struct dma_map_ops

2009-08-04 Thread FUJITA Tomonori
POWERPC needs this hook. SPARC could use it too. Signed-off-by: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Acked-by: Becky Bruce bec...@kernel.crashing.org --- include/linux/dma-mapping.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/dma-mapping.h

[PATCH -v2 4/7] powerpc: use dma_map_ops struct

2009-08-04 Thread FUJITA Tomonori
This converts uses dma_map_ops struct (in include/linux/dma-mapping.h) instead of POWERPC homegrown dma_mapping_ops. Signed-off-by: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Acked-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/include/asm/device.h |4 +-

[PATCH -v2 6/7] powerpc: handle SWIOTLB mapping error properly

2009-08-04 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp --- arch/powerpc/include/asm/dma-mapping.h |5 + arch/powerpc/kernel/dma-swiotlb.c |3 ++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/dma-mapping.h

[PATCH -v2 7/7] powerpc: add CONFIG_DMA_API_DEBUG support

2009-08-04 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp --- arch/powerpc/Kconfig |1 + arch/powerpc/include/asm/dma-mapping.h | 11 ++- arch/powerpc/kernel/dma.c | 11 +++ 3 files changed, 22 insertions(+), 1 deletions(-) diff --git

[PATCH -v2 1/7] powerpc: remove addr_needs_map in struct dma_mapping_ops

2009-08-04 Thread FUJITA Tomonori
This patch adds max_direct_dma_addr to struct dev_archdata to remove addr_needs_map in struct dma_mapping_ops. It also converts dma_capable() to use max_direct_dma_addr. max_direct_dma_addr is initialized in pci_dma_dev_setup_swiotlb(), called via ppc_md.pci_dma_dev_setup hook. For further