Re: [PATCH] powerpc/iommu: remove default window before creating larger window

2011-10-31 Thread Nishanth Aravamudan
Hi Ben, Please don't take this patch :) While, it does work around some issues I'm tracking down, it can lead to worse ones if we are unable to configure the larger DMA window, or if some functions in a PE don't use 64-bit DMA masks. Thanks, Nish On 26.10.2011 [15:43:23 -0700], Nishanth Aravamu

[PATCH] [v3] powerpc/fsl_msi: add support for the fsl, msi property in PCI nodes

2011-10-31 Thread Timur Tabi
On Freescale parts with multiple MSI controllers, the controllers are combined into one "pool" of interrupts. Whenever a device requests an MSI interrupt, the next available interrupt from the pool is selected, regardless of which MSI controller the interrupt is from. This works because each PCI

[RFC PATCH 09/10] powerpc/mpic: Cache the device-tree node in "struct mpic"

2011-10-31 Thread Kyle Moffett
Store the node pointer in the MPIC during initialization so that all of the later operational code can just reuse the cached pointer. Signed-off-by: Kyle Moffett --- arch/powerpc/include/asm/mpic.h |3 +++ arch/powerpc/sysdev/mpic.c | 32 2 files chang

[RFC PATCH 10/10] powerpc/mpic: Add in-core support for cascaded MPICs

2011-10-31 Thread Kyle Moffett
The Cell and PowerMac platforms use virtually identical cascaded-IRQ setup code, so just merge it into the core. This does the obvious thing when an MPIC device-node specifies an "interrupts" property. Signed-off-by: Kyle Moffett --- arch/powerpc/platforms/cell/setup.c | 22

[RFC PATCH 08/10] powerpc/mpic: Put "pic-no-reset" test back into the MPIC code

2011-10-31 Thread Kyle Moffett
There's not really any reason to have this one-liner in a separate static inline function, given that all the other similar tests are already in the alloc_mpic() code. Signed-off-by: Kyle Moffett --- arch/powerpc/sysdev/mpic.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) dif

[RFC PATCH 07/10] powerpc/mpic: Don't open-code dcr_resource_start

2011-10-31 Thread Kyle Moffett
Don't open-code the OpenFirmware "dcr-reg" property lookup trying to map DCR resources. This makes the code a bit easier to read. Signed-off-by: Kyle Moffett --- arch/powerpc/sysdev/mpic.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/sysdev/mpic.c

[RFC PATCH 06/10] powerpc/mpic: Invert the meaning of MPIC_PRIMARY

2011-10-31 Thread Kyle Moffett
It turns out that there are only 2 in-tree platforms which use MPICs which are not "primary": IBM Cell and PowerMac. To reduce the complexity of the typical board setup code, invert the MPIC_PRIMARY bit into MPIC_SECONDARY. Signed-off-by: Kyle Moffett --- arch/powerpc/include/asm/mpic.h

[RFC PATCH 05/10] powerpc/mpic: Search for open-pic device-tree node if NULL

2011-10-31 Thread Kyle Moffett
Almost all PowerPC platforms use a standard "open-pic" device node so the mpic_alloc() function now accepts NULL for the device-node. This will cause it to perform a default search with of_find_matching_node(). Signed-off-by: Kyle Moffett --- arch/powerpc/platforms/85xx/corenet_ds.c |

[RFC PATCH 04/10] powerpc/mpic: Save computed phys_addr for board-specific code

2011-10-31 Thread Kyle Moffett
The MPIC code can already perform an automatic OF address translation step as part of mpic_alloc(), but several boards need to use that base address when they perform mpic_assign_isu(). The easiest solution is to save the computed physical address into the "struct mpic" for later use by the board

[RFC PATCH 03/10] powerpc/mpic: Assume a device-node was passed in mpic_alloc()

2011-10-31 Thread Kyle Moffett
All of the existing callers of mpic_alloc() pass in a non-NULL device-node pointer, so the checks for a NULL device-node may be removed. Signed-off-by: Kyle Moffett --- arch/powerpc/sysdev/mpic.c | 50 ++- 1 files changed, 21 insertions(+), 29 deletions(

[RFC PATCH 02/10] powerpc: Consolidate mpic_alloc() OF address translation

2011-10-31 Thread Kyle Moffett
Instead of using the open-coded "reg" property lookup and address translation in mpic_alloc(), directly call of_address_to_resource(). This includes various workarounds for special cases which the naive of_address_translate() does not. Afterwards it is possible to remove the copiously copy-pasted

[RFC PATCH 01/10] powerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h"

2011-10-31 Thread Kyle Moffett
This removes a bunch of "extern" declarations and CONFIG_SMP ifdefs. Signed-off-by: Kyle Moffett Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Kumar Gala --- arch/powerpc/platforms/85xx/corenet_ds.c |7 +-- arch/powerpc/platforms/85xx/mpc85xx_ds.c |6 +- arch/powerpc/pla

[RFC PATCH 00/10] powerpc/mpic: General cleanup patch series

2011-10-31 Thread Kyle Moffett
Hello, I've been tinkering with a series of patches to clean up the PowerPC MPIC/OpenPIC init recently as part of a new board port I'm working on. It's reached the point where I'd like some feedback on the general approach. The code itself hasn't been tested at all yet, and probably does not com

Re: [4/4] powerpc/booke: Re-organize debug code

2011-10-31 Thread Jimi Xenidis
On Oct 31, 2011, at 9:21 AM, Kumar Gala wrote: > > On Oct 28, 2011, at 2:37 PM, Jimi Xenidis wrote: > >> >> On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote: >> >>> * set_dabr/do_dabr are no longer used when CNFIG_PPC_ADV_DEBUG_REGS is set >>> refactor code a bit such that we only build the dabr

Re: [1/4] powerpc: Revert show_regs() define for readability

2011-10-31 Thread Jimi Xenidis
On Oct 31, 2011, at 9:18 AM, Kumar Gala wrote: > > On Oct 28, 2011, at 2:40 PM, Jimi Xenidis wrote: > >> >> On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote: >> >>> We had an existing ifdef for 4xx & BOOKE processors that got changed to >>> CONFIG_PPC_ADV_DEBUG_REGS. The define has nothing to do

[RFC PATCH v3 10/10] fadump: Introduce config option for firmware assisted dump feature

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar This patch introduces a new config option CONFIG_FA_DUMP for firmware assisted dump feature on Powerpc (ppc64) architecture. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/Kconfig | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/a

[RFC PATCH v3 09/10] fadump: Invalidate the fadump registration during machine shutdown.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar If dump is active during system reboot, shutdown or halt then invalidate the fadump registration as it does not get invalidated automatically. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/kernel/setup-common.c |8 1 files changed, 8 insertions(+), 0 de

[RFC PATCH v3 06/10] fadump: Add PT_NOTE program header for vmcoreinfo

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Introduce a PT_NOTE program header that points to physical address of vmcoreinfo_note buffer declared in kernel/kexec.c. The vmcoreinfo note buffer is populated during crash_fadump() at the time of system crash. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/kernel/f

[RFC PATCH v3 08/10] fadump: Invalidate registration and release reserved memory for general use.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar This patch introduces an sysfs interface '/sys/kernel/fadump_release_mem' to invalidate the last fadump registration, invalidate '/proc/vmcore', release the reserved memory for general use and re-register for future kernel dump. Once the dump is copied to the disk, the use

[RFC PATCH v3 07/10] fadump: Introduce cleanup routine to invalidate /proc/vmcore.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar With the firmware-assisted dump support we don't require a reboot when we are in second kernel after crash. The second kernel after crash is a normal kernel boot and has knowledge about entire system RAM with the page tables initialized for entire system RAM. Hence once th

[RFC PATCH v3 05/10] fadump: Convert firmware-assisted cpu state dump data into elf notes.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar When registered for firmware assisted dump on powerpc, firmware preserves the registers for the active CPUs during a system crash. This patch reads the cpu register data stored in Firmware-assisted dump format (except for crashing cpu) and converts it into elf notes and up

[RFC PATCH v3 04/10] fadump: Initialize elfcore header and add PT_LOAD program headers.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Build the crash memory range list by traversing through system memory during the first kernel before we register for firmware-assisted dump. After the successful dump registration, initialize the elfcore header and populate PT_LOAD program headers with crash memory ranges.

[RFC PATCH v3 03/10] fadump: Register for firmware assisted dump.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar This patch registers for firmware-assisted dump using rtas token ibm,configure-kernel-dump. During registration firmware is informed about the reserved area where it saves the CPU state data, HPTE table and contents of RMR region at the time of kernel crash. Apart from thi

[RFC PATCH v3 02/10] fadump: Reserve the memory for firmware assisted dump.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Reserve the memory during early boot to preserve CPU state data, HPTE region and RMR region data in case of kernel crash. At the time of crash, powerpc firmware will store CPU state data, HPTE region data and move RMR region data to the reserved memory area. If the firmwa

[RFC PATCH v3 01/10] fadump: Add documentation for firmware-assisted dump.

2011-10-31 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar Documentation for firmware-assisted dump. This document is based on the original documentation written for phyp assisted dump by Linas Vepstas and Manish Ahuja, with few changes to reflect the current implementation. Change in v3: - Modified the documentation to reflect i

[RFC PATCH v3 00/10] fadump: Firmware-assisted dump support for Powerpc.

2011-10-31 Thread Mahesh J Salgaonkar
Hi All, Please find the version 3 of the patchset that implements firmware-assisted dump mechanism to capture kernel crash dump for Powerpc architecture. The firmware-assisted dump is a robust mechanism to get reliable kernel crash dump with assistance from firmware. This approach does not use kex

Re: powerpc 476, Little-endian, pte fault

2011-10-31 Thread Santosh Kumar
This is not the first user-space instruction. While executing this process kernel has added two TLB entries with TID(process id) 1. while trying to map 0x10fc it is raising pte faults . Santosh Kumar .A Vision without Action is a daydream... Action without Vision is a nightmare... On 31 Oc

Re: [4/4] powerpc/booke: Re-organize debug code

2011-10-31 Thread Kumar Gala
On Oct 28, 2011, at 2:37 PM, Jimi Xenidis wrote: > > On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote: > >> * set_dabr/do_dabr are no longer used when CNFIG_PPC_ADV_DEBUG_REGS is set >> refactor code a bit such that we only build the dabr code for >> !CONFIG_PPC_ADV_DEBUG_REGS and removed some CONF

Re: RFC: ESR_I/DLK processing

2011-10-31 Thread Kumar Gala
On Oct 28, 2011, at 3:43 PM, Jimi Xenidis wrote: > arch/powerpc/kernel/head_fsl_booke.S has the following code: >> /* Data Storage Interrupt */ >> START_EXCEPTION(DataStorage) >> NORMAL_EXCEPTION_PROLOG >> mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */

Re: [1/4] powerpc: Revert show_regs() define for readability

2011-10-31 Thread Kumar Gala
On Oct 28, 2011, at 2:40 PM, Jimi Xenidis wrote: > > On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote: > >> We had an existing ifdef for 4xx & BOOKE processors that got changed to >> CONFIG_PPC_ADV_DEBUG_REGS. The define has nothing to do with >> CONFIG_PPC_ADV_DEBUG_REGS. The define really shoul

Re: [RFC][PATCH 1/2] uio: allow drivers to override the pgprot for mmap

2011-10-31 Thread Kumar Gala
On Oct 29, 2011, at 1:38 AM, Greg KH wrote: > On Fri, Oct 28, 2011 at 11:48:12PM +0200, Hans J. Koch wrote: >> On Fri, Oct 28, 2011 at 10:50:29AM -0500, Kumar Gala wrote: >>> For some devices, the default behavior of pgprot_noncached() is not >>> appropriate for all of its mappable regions. This

Re: powerpc 476, Little-endian, pte fault

2011-10-31 Thread Benjamin Herrenschmidt
On Mon, 2011-10-31 at 20:49 +1100, Michael Neuling wrote: > > I have built a cross compiler for ppc440 in little endian mode and > > using it to build the kernel. > > > > Yes i am running Linux in Little-Endian. This is the first user space > > process. I wrote the below program and running it as

[PATCH 2/2] NAND Machine support for Integrated Flash Controller

2011-10-31 Thread b35362
From: Liu Shuo Integrated Flash Controller(IFC) can be used to hook NAND Flash chips using NAND Flash Machine available on it. Signed-off-by: Scott Wood Signed-off-by: Li Yang Signed-off-by: Liu Shuo --- drivers/mtd/nand/Kconfig| 10 + drivers/mtd/nand/Makefile |1 + driv

[PATCH v2] Integrated Flash Controller support

2011-10-31 Thread b35362
From: Liu Shuo Integrated Flash Controller supports various flashes like NOR, NAND and other devices using NOR, NAND and GPCM Machine available on it. IFC supports four chip selects. Signed-off-by: Dipen Dudhat Signed-off-by: Scott Wood Signed-off-by: Li Yang Signed-off-by: Liu Shuo --- arc

[PATCH] mtd/nand : set Nand flash page address to FBAR and FPAR correctly

2011-10-31 Thread b35362
From: Liu Shuo If we use the Nand flash chip whose number of pages in a block is greater than 64(for large page), we must treat the low bit of FBAR as being the high bit of the page address due to the limitation of FCM, it simply uses the low 6-bits (for large page) of the combined block/page add

Re: powerpc 476, Little-endian, pte fault

2011-10-31 Thread Michael Neuling
> I have built a cross compiler for ppc440 in little endian mode and > using it to build the kernel. > > Yes i am running Linux in Little-Endian. This is the first user space > process. I wrote the below program and running it as init from > /sbin/init. I have also set the permissions with chmod +

[PATCH 2/2] powerpc/fsl-pci: Only scan PCI bus if configured as a host

2011-10-31 Thread Jia Hongtao
If we're an agent/end-point or fsl_add_bridge doesn't succeed due to some resource failure we should not scan the PCI bus. We change fsl_add_bridge() to return -ENODEV in the case we're an agent/end-point. Signed-off-by: Jia Hongtao Signed-off-by: Li Yang --- arch/powerpc/sysdev/fsl_pci.c | 2

[PATCH 1/2] Unify pci/pcie initialization code

2011-10-31 Thread Jia Hongtao
In previous version pci/pcie initialization is in platform code which Initialize PCI bridge base on EP/RC or host/agent settings. We unified pci/pcie initialization as common APIs named fsl_pci_setup which can be called by platform code. Signed-off-by: Jia Hongtao Signed-off-by: Li Yang --- arc

[PATCH SDK1.1 v2 0/2] PCIEP Patches Description

2011-10-31 Thread Jia Hongtao
These patches against kernel 3.0 for SDK 1.1. The patches include contents from topic branch 15-pciep. Also we add PCI related patch from topic branch 05-MPC8572DS here. We update the pci/pcie initialization code. ___ Linuxppc-dev mailing list Linuxppc-d

RE: [PATCH 2/2] powerpc/fsl-pci: Only scan PCI bus if configured as a host

2011-10-31 Thread Jia Hongtao-B38951
-Original Message- From: linuxppc-dev-bounces+b38951=freescale@lists.ozlabs.org [mailto:linuxppc-dev-bounces+b38951=freescale@lists.ozlabs.org] On Behalf Of Kumar Gala Sent: Friday, October 28, 2011 9:10 PM To: Jia Hongtao-B38951 Cc: Gala Kumar-B11780; linuxppc-dev@lists.ozlabs.