Memory Mapping DMA Buffers in User Space

2010-07-27 Thread Ravi Gupta
Hi, I am new to linux device driver development and I'm trying to learn the memory mapping. Currently I am trying to memory map a dma buffer allocated using pci_alloc_consistent() function. Now what exactly I want is that whenever I map a char device from user space program, let say /dev/test, in

Re: Memory Mapping a char array in User Space

2010-07-27 Thread Ravi Gupta
Hi David, Thanks for the quick reply. One more thing, in the end I have to memory map a DMA buffer allocated using pci_alloc_consisten() function to user space. *> I think you should be leaving the mapping to the core VM routines.* *> Furthermore, I don't think *you* should be calling remap_pfn_r

[PATCH] powerpc/kexec: Fix orphaned offline CPUs across kexec

2010-07-27 Thread Matt Evans
When CPU hotplug is used, some CPUs may be offline at the time a kexec is performed. The subsequent kernel may expect these CPUs to be already running, and will declare them stuck. On pseries, there's also a soft-offline (cede) state that CPUs may be in; this can also cause problems as the kexece

Re: [PATCH] powerpc: Add vmcoreinfo symbols to allow makdumpfile to filter core files properly

2010-07-27 Thread Américo Wang
On Mon, Jul 26, 2010 at 11:23 PM, Neil Horman wrote: > On Tue, Jul 13, 2010 at 09:46:09AM -0400, Neil Horman wrote: >> Hey all- >>       About 2 years ago now, I sent this patch upstream to allow makedumpfile >> to properly filter cores on ppc64: >> http://www.mail-archive.com/ke...@lists.infradea

Re: Where are logical memory block regions setup?

2010-07-27 Thread Benjamin Herrenschmidt
On Mon, 2010-07-26 at 22:52 -0400, Rick Ramstetter wrote: > Hi all, > > Where can I find the code that sets values in lmb.reserved.region[i]? > This is in reference to 2.6.27's arch/powerpc/mm/mem.c and > include/linux/lmb.h > > I'm looking specifically for code that sets lmb_region's region.siz

Re: [Patch v2] kexec: increase max of kexec segments and use dynamic allocation

2010-07-27 Thread Milton Miller
[ Added kexec at lists.infradead.org and linuxppc-dev@lists.ozlabs.org ] > > Currently KEXEC_SEGMENT_MAX is only 16 which is too small for machine with > many memory ranges. When hibernate on a machine with disjoint memory we do > need one segment for each memory region. Increase this hard limit

Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board

2010-07-27 Thread Anatolij Gustschin
Hi Grant, On Sun, 25 Jul 2010 01:42:23 -0600 Grant Likely wrote: ... > Hi Anatolij, > > Finally got some time tonight to properly dig into this patch. Comments > below. Thanks for review and comments! My reply below. ... > > +       n...@4000 { > > +               compatible = "fsl,mpc51

Please pull my perf.git urgent branch

2010-07-27 Thread Paul Mackerras
Linus, Please do a pull from git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perf.git urgent to get one commit that fixes a problem where, on some Freescale embedded PowerPC machines, unprivileged userspace could oops the kernel using the perf_event subsystem. I know it's late, but it is

Re: [PATCH v3] of: Create asm-generic/of.h and provide default of_node_to_nid()

2010-07-27 Thread Arnd Bergmann
On Tuesday 27 July 2010, Grant Likely wrote: > > I suggest to go back to v2 of your patch where you use asm-generic/of.h. > > Stephen suggested dropping asm-generic/of.h. I'm happy to do it either way. I don't mind adding stuff to asm-generic, but I think in this case it would be easier to keep

Re: Please pull my perf.git urgent branch

2010-07-27 Thread Scott Wood
On Tue, 27 Jul 2010 22:40:19 +1000 Paul Mackerras wrote: > Please do a pull from > > git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perf.git urgent > > to get one commit that fixes a problem where, on some Freescale > embedded PowerPC machines, unprivileged userspace could oops the > ke

Re: [PATCH v3] of: Create asm-generic/of.h and provide default of_node_to_nid()

2010-07-27 Thread Sam Ravnborg
On Tue, Jul 27, 2010 at 03:34:01PM +0200, Arnd Bergmann wrote: > On Tuesday 27 July 2010, Grant Likely wrote: > > > I suggest to go back to v2 of your patch where you use asm-generic/of.h. > > > > Stephen suggested dropping asm-generic/of.h. I'm happy to do it either way. > > I don't mind adding

Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board

2010-07-27 Thread Grant Likely
On Tue, Jul 27, 2010 at 4:36 AM, Anatolij Gustschin wrote: > Hi Grant, > > On Sun, 25 Jul 2010 01:42:23 -0600 > Grant Likely wrote: > ... >> Hi Anatolij, >> >> Finally got some time tonight to properly dig into this patch.  Comments >> below. > > Thanks for review and comments! My reply below.

Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board

2010-07-27 Thread Anatolij Gustschin
On Tue, 27 Jul 2010 10:58:33 -0600 Grant Likely wrote: ... > >> > +               s...@11900 { > >> > +                       compatible = "fsl,mpc5121-psc-spi", > >> > "fsl,mpc5121-psc"; > >> > +                       cell-index = <9>; > >> > >> Try to drop the cell-index properties.  They are a

Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board

2010-07-27 Thread Grant Likely
On Tue, Jul 27, 2010 at 11:28 AM, Anatolij Gustschin wrote: > On Tue, 27 Jul 2010 10:58:33 -0600 > Grant Likely wrote: > ... >> >> > +               s...@11900 { >> >> > +                       compatible = "fsl,mpc5121-psc-spi", >> >> > "fsl,mpc5121-psc"; >> >> > +                       cell-in

Re: [PATCH 3/6] of/spi: add support to parse the SPI flash's partitions

2010-07-27 Thread Grant Likely
[cc'ing spi-devel-general] On Mon, Jul 26, 2010 at 2:20 AM, Hu Mingkai-B21284 wrote: > > >> -Original Message- >> From: glik...@secretlab.ca [mailto:glik...@secretlab.ca] On >> Behalf Of Grant Likely >> Sent: Monday, July 26, 2010 3:53 PM >> To: Hu Mingkai-B21284 >> Cc: linuxppc-...@ozlab

Re: [Patch v2] kexec: increase max of kexec segments and use dynamic allocation

2010-07-27 Thread Eric W. Biederman
Milton Miller writes: > [ Added kexec at lists.infradead.org and linuxppc-dev@lists.ozlabs.org ] > >> >> Currently KEXEC_SEGMENT_MAX is only 16 which is too small for machine with >> many memory ranges. When hibernate on a machine with disjoint memory we do >> need one segment for each memory r

[PATCH] xilinxfb: update tft comp versions

2010-07-27 Thread Adrian Alonso
* Add tft display module compatibility for new hardware modules Signed-off-by: Adrian Alonso --- drivers/video/xilinxfb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index 574dc54..29b5daa 100644 --- a/drivers/vi

[PATCH v4 2/2] powerpc/mpc5121: add initial support for PDM360NG board

2010-07-27 Thread Anatolij Gustschin
Adds IFM PDM360NG device tree and platform code. Currently following is supported: - Spansion S29GL512P 256 MB NOR flash - ST Micro NAND 1 GiB flash - DIU, please use "fbcon=map:5 video=fslfb:800x480...@60" at the kernel command line to enable PrimeView PM070WL3 Display support. - FEC -

mpc512x_dma hangs when used from multiple threads

2010-07-27 Thread Ilya Yanok
Hello Piotr, everybody, I've found that mpc512x_dma channels hang sometimes while accessed from more than one thread simultaneously. The easiest way to reproduce this error I've managed to found is using dmatest module with rather high threads_per_chan value (20 should be enough): -bash-3.2#

Re: [PATCH 04/11] powerpc: Simplify update_vsyscall

2010-07-27 Thread Paul Mackerras
On Tue, Jul 13, 2010 at 05:56:21PM -0700, John Stultz wrote: > Currently powerpc's update_vsyscall calls an inline update_gtod. > However, both are straightforward, and there are no other users, > so this patch merges update_gtod into update_vsyscall. > > Compiles, but otherwise untested. This a

Patch "genirq: Deal with desc->set_type() changing desc->chip" has been added to the 2.6.34-stable tree

2010-07-27 Thread gregkh
This is a note to let you know that I've just added the patch titled genirq: Deal with desc->set_type() changing desc->chip to the 2.6.34-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "genirq: Deal with desc->set_type() changing desc->chip" has been added to the 2.6.33-stable tree

2010-07-27 Thread gregkh
This is a note to let you know that I've just added the patch titled genirq: Deal with desc->set_type() changing desc->chip to the 2.6.33-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "genirq: Deal with desc->set_type() changing desc->chip" has been added to the 2.6.32-stable tree

2010-07-27 Thread gregkh
This is a note to let you know that I've just added the patch titled genirq: Deal with desc->set_type() changing desc->chip to the 2.6.32-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

[PATCH] powerpc: print decimal values in prom_init.c

2010-07-27 Thread Michael Neuling
Currently we look pretty stupid when printing out a bunch of things in prom_init.c. eg. Max number of cores passed to firmware: 0x0080 So I've change this to print in decimal: Max number of cores passed to firmware: 128 (NR_CPUS = 256) This required adding a prom_print_dec() fu

Re: [PATCH 04/11] powerpc: Simplify update_vsyscall

2010-07-27 Thread john stultz
On Wed, 2010-07-28 at 09:41 +1000, Paul Mackerras wrote: > On Tue, Jul 13, 2010 at 05:56:21PM -0700, John Stultz wrote: > > > Currently powerpc's update_vsyscall calls an inline update_gtod. > > However, both are straightforward, and there are no other users, > > so this patch merges update_gtod i

Re: [PATCH] powerpc: print decimal values in prom_init.c

2010-07-27 Thread Michael Neuling
Currently we look pretty stupid when printing out a bunch of things in prom_init.c. eg. Max number of cores passed to firmware: 0x0080 So I've change this to print in decimal: Max number of cores passed to firmware: 128 (NR_CPUS = 256) This required adding a prom_print_dec() fu

Re: Please pull my perf.git urgent branch

2010-07-27 Thread Paul Mackerras
On Tue, Jul 27, 2010 at 11:28:54AM -0500, Scott Wood wrote: > Doesn't the setting of .period need to be maintained (it is in the other > powerpc perf_event implementation that this is derived from)? Gah, yes it does. > I don't see how this is a security fix -- the existing initializer above > sh

[PATCH 0/3] mmc: Add mmc support for P4080 chip

2010-07-27 Thread Roy Zang
This serial patch adds some workarounds to enable mmc card support for P4080 chip. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 3/3] mmc: Add ESDHC weird register workaround

2010-07-27 Thread Roy Zang
P4080 ESDHC controller induces weird register setting. This patch adds the workaround to correct the weird register setting. Signed-off-by: Roy Zang --- drivers/mmc/host/sdhci-of-core.c |5 + drivers/mmc/host/sdhci.c | 13 + drivers/mmc/host/sdhci.h |2 +

[PATCH 1/3] mmc: Auto CMD12 support for eSDHC driver

2010-07-27 Thread Roy Zang
From: Jerry Huang Add auto CMD12 command support for eSDHC driver. This is needed by P4080 and P1022 for block read/write. Manual asynchronous CMD12 abort operation causes protocol violations on these silicons. Signed-off-by: Jerry Huang Signed-off-by: Roy Zang --- drivers/mmc/host/sdhci-of-c

[PATCH 2/3] dts: Add sdhci-auto-cmd12 field for p4080 device tree

2010-07-27 Thread Roy Zang
Signed-off-by: Roy Zang --- arch/powerpc/boot/dts/p4080ds.dts |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/p4080ds.dts b/arch/powerpc/boot/dts/p4080ds.dts index 6b29eab..11c8884 100644 --- a/arch/powerpc/boot/dts/p4080ds.dts +++ b/arch/powerpc/bo