[PATCH SDK1.2 3/3] powerpc/fsl-pci: Add pci inbound/outbound PM support

2011-12-20 Thread Jia Hongtao
Power supply for PCI inbound/outbound window registers is off when system go to deep-sleep state. We save the values of registers before suspend and restore to registers after resume. Signed-off-by: Jiang Yutang Signed-off-by: Jia Hongtao Signed-off-by: Li Yang --- arch/powerpc/include/asm/pci

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

2011-12-20 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 | 3

[PATCH SDK1.2 1/3] powerpc/fsl-pci: Unify pci/pcie initialization code

2011-12-20 Thread Jia Hongtao
We unified the Freescale pci/pcie initialization by changing the fsl_pci to a platform driver. In previous version pci/pcie initialization is in platform code which Initialize pci bridge base on EP/RC or host/agent settings. Signed-off-by: Jia Hongtao Signed-off-by: Li Yang --- arch/powerpc/pl

[PATCH SDK1.2 0/3] pci patches description

2011-12-20 Thread Jia Hongtao
This serials of patches include two parts. First, we unify the pci initialization code using platform driver mechanism. Then, we add PM support for deep sleep stat to save and restore inbound/outbound window registers. These patches are against 'next' branch on: http://git.kernel.org/?p=linux/kern

[PATCH] [boot] Change the WARN to INFO for boot wrapper overlap message

2011-12-20 Thread Suzuki K. Poulose
commit c55aef0e5bc6 ("powerpc/boot: Change the load address for the wrapper to fit the kernel") introduced a WARNING to inform the user that the uncompressed kernel would overlap the boot uncompressing wrapper code. Change it to an INFO. I initially thought, this would be a 'WARNING' for the those

RE: [PATCH 3/3] powerpc/44x: Add support PCI-E for APM821xx SoC and Bluestone board

2011-12-20 Thread Vinh Huu Tuong Nguyen
Hi Josh, Please see below for my comments. If you have any concerns or suggestion, please let me know. Best regards, Vinh Nguyen. -Original Message- From: Josh Boyer [mailto:jwbo...@gmail.com] Sent: Tuesday, December 20, 2011 10:32 PM To: Vinh Nguyen Huu Tuong Cc: Benjamin Herrenschmidt; P

Re: [PATCH] Copy machine descriptor after probe succeed

2011-12-20 Thread bill4carson
On 2011年12月20日 18:17, Stephen Rothwell wrote: Hi Bill, On Tue, 20 Dec 2011 17:08:47 +0800 bill4car...@gmail.com wrote: From: Bill Carson It make more sense to copy machine descriptor AFTER machine probe return succeed. Some of the platform's probe routines modify the ppc_md structure and so

[RFC PATCH 14/16] KVM: PPC: booke: category E.HV (GS-mode) support

2011-12-20 Thread Scott Wood
Chips such as e500mc that implement category E.HV in Power ISA 2.06 provide hardware virtualization features, including a new MSR mode for guest state. The guest OS can perform many operations without trapping into the hypervisor, including transitions to and from guest userspace. Since we can us

[RFC PATCH 16/16] KVM: PPC: e500mc support

2011-12-20 Thread Scott Wood
Add processor support for e500mc, using hardware virtualization support (GS-mode). Current issues include: - No support for external proxy (coreint) interrupt mode in the guest. Includes work by Ashish Kalra , Varun Sethi , and Liu Yu . Signed-off-by: Scott Wood --- arch/powerpc/include/asm/c

[RFC PATCH 15/16] KVM: PPC: booke: standard PPC floating point support

2011-12-20 Thread Scott Wood
e500mc has a normal PPC FPU, rather than SPE which is found on e500v1/v2. Based on code from Liu Yu . Signed-off-by: Scott Wood --- arch/powerpc/include/asm/system.h |1 + arch/powerpc/kvm/booke.c | 44 + arch/powerpc/kvm/booke.h | 3

[RFC PATCH 12/16] KVM: PPC: e500: emulate tlbilx

2011-12-20 Thread Scott Wood
tlbilx is the new, preferred invalidation instruction. It is not found on e500 prior to e500mc, but there should be no harm in supporting it on all e500. Based on code from Ashish Kalra . Signed-off-by: Scott Wood --- arch/powerpc/kvm/e500.h |1 + arch/powerpc/kvm/e500_emulate.c |

[RFC PATCH 13/16] powerpc/booke: Provide exception macros with interrupt name

2011-12-20 Thread Scott Wood
DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary numbers that Linux passes, but it's an undocumented mess that sort of corresponds to server/classic exception vectors but not really. FIXME: Replace the existing trap numbering rather than add to it.

[RFC PATCH 10/16] KVM: PPC: e500: refactor core-specific TLB code

2011-12-20 Thread Scott Wood
The PID handling is e500v1/v2-specific, and is moved to e500.c. The MMU sregs code and kvmppc_core_vcpu_translate will be shared with e500mc, and is moved from e500.c to e500_tlb.c. Partially based on patches from Liu Yu . Signed-off-by: Scott Wood --- arch/powerpc/include/asm/kvm_host.h |

[RFC PATCH 11/16] KVM: PPC: e500: Track TLB1 entries with a bitmap

2011-12-20 Thread Scott Wood
Rather than invalidate everything when a TLB1 entry needs to be taken down, keep track of which host TLB1 entries are used for a given guest TLB1 entry, and invalidate just those entries. Based on code from Ashish Kalra and Liu Yu . Signed-off-by: Scott Wood --- arch/powerpc/kvm/e500.h |

[RFC PATCH 09/16] KVM: PPC: e500: clean up arch/powerpc/kvm/e500.h

2011-12-20 Thread Scott Wood
Move vcpu to the beginning of vcpu_e500 to give it appropriate prominence, especially if more fields end up getting added to the end of vcpu_e500 (and vcpu ends up in the middle). Remove gratuitous "extern" and add parameter names to prototypes. Signed-off-by: Scott Wood --- arch/powerpc/kvm/e5

[RFC PATCH 08/16] KVM: PPC: e500: merge into arch/powerpc/kvm/e500.h

2011-12-20 Thread Scott Wood
Keeping two separate headers for e500-specific things was a pain, and wasn't even organized along any logical boundary. There was TLB stuff in despite the existence of arch/powerpc/kvm/e500_tlb.h, and nothing in needed to be referenced from outside arch/powerpc/kvm. Signed-off-by: Scott Wood -

[RFC PATCH 07/16] KVM: PPC: e500: rename e500_tlb.h to e500.h

2011-12-20 Thread Scott Wood
This is in preparation for merging in the contents of arch/powerpc/include/asm/kvm_e500.h. Signed-off-by: Scott Wood --- arch/powerpc/kvm/e500.c |2 +- arch/powerpc/kvm/{e500_tlb.h => e500.h} |6 +++--- arch/powerpc/kvm/e500_emulate.c |2 +- arch/powerpc/kvm/e

[RFC PATCH 03/16] KVM: PPC: Use pt_regs in vcpu->arch

2011-12-20 Thread Scott Wood
This makes it easy to pass to host exception handling functions, in situations where we can't just let the interrupt happen again naturally. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/kvm_book3s.h | 28 arch/powerpc/include/asm/kvm_booke.h| 24 +

[RFC PATCH 06/16] KVM: PPC: booke: Move vm core init/destroy out of booke.c

2011-12-20 Thread Scott Wood
e500mc will want to do lpid allocation/deallocation here. Signed-off-by: Scott Wood --- arch/powerpc/kvm/44x.c |9 + arch/powerpc/kvm/booke.c |9 - arch/powerpc/kvm/e500.c |9 + 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kv

[RFC PATCH 02/16] powerpc/e500: split CPU_FTRS_ALWAYS/CPU_FTRS_POSSIBLE

2011-12-20 Thread Scott Wood
Split e500 (v1/v2) and e500mc/e5500 to allow optimization of feature checks that differ between the two. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/cputable.h | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/cputable.h b/ar

[RFC PATCH 04/16] KVM: PPC: factor out lpid allocator from book3s_64_mmu_hv

2011-12-20 Thread Scott Wood
We'll use it on e500mc as well. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/kvm_book3s.h |3 ++ arch/powerpc/include/asm/kvm_booke.h |3 ++ arch/powerpc/include/asm/kvm_ppc.h|5 arch/powerpc/kvm/book3s_64_mmu_hv.c | 26 +--- arch/powerpc/k

[RFC PATCH 05/16] KVM: PPC: booke: add booke-level vcpu load/put

2011-12-20 Thread Scott Wood
This gives us a place to put load/put actions that correspond to code that is booke-specific but not specific to a particular core. Signed-off-by: Scott Wood --- arch/powerpc/kvm/44x.c |3 +++ arch/powerpc/kvm/booke.c |8 arch/powerpc/kvm/booke.h |3 +++ arch/powerpc/kvm/e

[RFC PATCH 01/16] powerpc/booke: Set CPU_FTR_DEBUG_LVL_EXC on 32-bit

2011-12-20 Thread Scott Wood
Currently 32-bit only cares about this for choice of exception vector, which is done in core-specific code. However, KVM will want to distinguish as well. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/cputable.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 00/16] KVM: PPC: e500mc support

2011-12-20 Thread Scott Wood
This is a preliminary patchset for e500mc KVM support, using hardware virtualization support. There's still some ugliness that I need to tame, and it needs a bunch of testing -- but I wanted to get something out for people to comment on and/or test. CCing linuxppc-dev as well since some of the pa

Re: linux-next: build warnings after merge of the 4xx tree

2011-12-20 Thread Josh Boyer
On Tue, Dec 20, 2011 at 7:13 PM, Stephen Rothwell wrote: > Hi Josh, > > After merging the 4xx tree, today's linux-next build (powerpc ppc64_defconfig) > produced these warnings: > > WARN: Uncompressed kernel (size 0xe32858) overlaps the address of the > wrapper() > WARN: Fixing the link_address o

Re: [PATCH 2/2] [PowerPC Book3E] Introduce new ptrace debug feature flag

2011-12-20 Thread David Gibson
On Thu, Dec 08, 2011 at 04:53:30PM +0530, K.Prasad wrote: > While PPC_PTRACE_SETHWDEBUG ptrace flag in PowerPC accepts > PPC_BREAKPOINT_MODE_EXACT mode of breakpoint, the same is not intimated to the > user-space debuggers (like GDB) who may want to use it. Hence we introduce a > new PPC_DEBUG_FEAT

Re: [PATCH 1/2] [hw-breakpoint] Use generic hw-breakpoint interfaces for new PPC ptrace flags

2011-12-20 Thread David Gibson
On Thu, Dec 08, 2011 at 04:49:48PM +0530, K.Prasad wrote: > PPC_PTRACE_GETHWDBGINFO, PPC_PTRACE_SETHWDEBUG and PPC_PTRACE_DELHWDEBUG are > PowerPC specific ptrace flags that use the watchpoint register. While they are > targeted primarily towards BookE users, user-space applications such as GDB > h

linux-next: build warnings after merge of the 4xx tree

2011-12-20 Thread Stephen Rothwell
Hi Josh, After merging the 4xx tree, today's linux-next build (powerpc ppc64_defconfig) produced these warnings: WARN: Uncompressed kernel (size 0xe32858) overlaps the address of the wrapper() WARN: Fixing the link_address of wrapper to (0xf0) WARN: Uncompressed kernel (size 0xd6c9e8) overlap

Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip

2011-12-20 Thread Scott Wood
On 12/20/2011 03:08 AM, Li Yang wrote: > On Tue, Dec 20, 2011 at 12:47 AM, Scott Wood wrote: >> On 12/19/2011 05:05 AM, Li Yang wrote: >>> On Sat, Dec 17, 2011 at 1:59 AM, Scott Wood wrote: On 12/15/2011 08:44 PM, LiuShuo wrote: > hi Artem, > Could this patch be applied now and we ma

Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}

2011-12-20 Thread Scott Wood
On 12/20/2011 12:44 PM, McClintock Matthew-B29882 wrote: > On Fri, Dec 16, 2011 at 3:29 PM, Scott Wood wrote: >> It would be nice if we could eliminate all usage of the boot cpu dtb >> field -- it's easy to forget to set it, especially if you're not making >> an AMP config. The default -1 means t

Re: [PATCH v2] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}

2011-12-20 Thread McClintock Matthew-B29882
On Fri, Dec 16, 2011 at 3:29 PM, Scott Wood wrote: > On 12/15/2011 09:35 PM, Benjamin Herrenschmidt wrote: >> On Fri, 2011-12-16 at 03:29 +, McClintock Matthew-B29882 wrote: >>> On Thu, Dec 15, 2011 at 9:12 PM, Benjamin Herrenschmidt >>> wrote: On Mon, 2011-11-28 at 22:24 -0600, Matthew

Please pull 'next' branch of 4xx tree

2011-12-20 Thread Josh Boyer
Hi Ben, This is the relocatable series from Suzie that has been brewing for quite a while. I also included a small fix for currituck that I hit when I was building various kernels. NOTE: To build anything config that includes the NDFC driver, you need the fix Tony posted and is in linux-next to

Re: [PATCH 3/3] powerpc/44x: Add support PCI-E for APM821xx SoC and Bluestone board

2011-12-20 Thread Josh Boyer
On Tue, Dec 20, 2011 at 7:44 AM, Vinh Nguyen Huu Tuong wrote: > This patch extends PCI-E driver to support PCI-E for APM821xx SoC on > Bluestone board. > > Signed-off-by: Vinh Nguyen Huu Tuong > +static int apm821xx_pciex_init_port_hw(struct ppc4xx_pciex_port *port) > +{ > +       u32 val; > +

[PATCH 3/3] powerpc/44x: Add support PCI-E for APM821xx SoC and Bluestone board

2011-12-20 Thread Vinh Nguyen Huu Tuong
This patch extends PCI-E driver to support PCI-E for APM821xx SoC on Bluestone board. Signed-off-by: Vinh Nguyen Huu Tuong --- arch/powerpc/platforms/44x/Kconfig |1 + arch/powerpc/sysdev/ppc4xx_pci.c | 109 +++- arch/powerpc/sysdev/ppc4xx_pci.h |4 +

[PATCH 2/3] powerpc/44x: Add additional support for APM821xx SoC and Bluestone board

2011-12-20 Thread Vinh Nguyen Huu Tuong
This patch updates the dts file for bluestone board with support: - UART1 - L2 cache - NAND with NDFC - PCI-E Signed-off-by: Vinh Nguyen Huu Tuong --- arch/powerpc/boot/dts/bluestone.dts | 127 ++- 1 files changed, 125 insertions(+), 2 deletions(-) diff --git a/

[PATCH 1/3] powerpc/44x: The bug fixed support for APM821xx SoC and Bluestone board

2011-12-20 Thread Vinh Nguyen Huu Tuong
This patch consists of: - Fix the pvr mask for checking pvr in cputable.c - Fix the cpu name as consistent with cpu name is describled in dts file Signed-off-by: Vinh Nguyen Huu Tuong --- arch/powerpc/kernel/cputable.c |2 +- arch/powerpc/platforms/44x/ppc44x_simple.c |2 +-

[KVM PATCH 2/2] KVM: PPC: Book3S HV: Report stolen time to guest through dispatch trace log

2011-12-20 Thread Paul Mackerras
This adds code to measure "stolen" time per virtual core in units of timebase ticks, and to report the stolen time to the guest using the dispatch trace log (DTL). The guest can register an area of memory for the DTL for a given vcpu. The DTL is a ring buffer where KVM fills in one entry every ti

[RFC PATCH 0/2] KVM: PPC: Book3S HV: Report stolen time to guests

2011-12-20 Thread Paul Mackerras
Under pHyp, recent kernels use the dispatch trace log (DTL) to measure stolen time. The DTL is a ring buffer containing 48-byte entries, where the hypervisor creates an entry each time a virtual cpu is dispatched. The entries contain a couple of fields that the kernel interprets as stolen time, m

[RFC PATCH 1/2] KVM: PPC: Book3S HV: Make virtual processor area registration more robust

2011-12-20 Thread Paul Mackerras
The PAPR API allows three sorts of per-virtual-processor areas to be registered (VPA, SLB shadow buffer, and dispatch trace log), and furthermore, these can be registered and unregistered for another virtual CPU. Currently we just update the vcpu fields pointing to these areas at the time of regis

Re: [PATCH] Copy machine descriptor after probe succeed

2011-12-20 Thread Stephen Rothwell
Hi Bill, On Tue, 20 Dec 2011 17:08:47 +0800 bill4car...@gmail.com wrote: > > From: Bill Carson > > It make more sense to copy machine descriptor AFTER machine probe return > succeed. Some of the platform's probe routines modify the ppc_md structure and so assume that it is has been popluated be

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

2011-12-20 Thread Paul Mackerras
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 Book3S HV style of KVM has code that is called from real

Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip

2011-12-20 Thread Li Yang
On Tue, Dec 20, 2011 at 12:47 AM, Scott Wood wrote: > On 12/19/2011 05:05 AM, Li Yang wrote: >> On Sat, Dec 17, 2011 at 1:59 AM, Scott Wood wrote: >>> On 12/15/2011 08:44 PM, LiuShuo wrote: hi Artem, Could this patch be applied now and we make a independent patch for  bad block inf

[PATCH] Copy machine descriptor after probe succeed

2011-12-20 Thread bill4carson
From: Bill Carson It make more sense to copy machine descriptor AFTER machine probe return succeed. Signed-off-by: Bill Carson --- arch/powerpc/kernel/setup-common.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/k

[PATCH-v1]Copy machine descriptor after probe succeed

2011-12-20 Thread bill4carson
This patch fix minor issue with machine probe process, It's much better to copy machine descriptor after probe succeed. arch/powerpc/kernel/setup-common.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(- ___ Linuxppc-dev mailing list Linu