[PATCH] powerpc/powernv: Properly drop characters if console is closed

2013-05-07 Thread Benjamin Herrenschmidt
If the firmware returns an error such as "closed" (or hardware error), we should drop characters. Currently we only do that when a firmware compatible with OPAL v2 APIs is detected, in the code that calls opal_console_write_buffer_space(), which didn't exist with OPAL v1 (or didn't work). However

[PATCH] powerpc/rtas_flash: Fix validate_flash buffer overflow issue

2013-05-07 Thread Vasant Hegde
ibm,validate-flash-image RTAS call output buffer contains 150 - 200 bytes of data on latest system. Presently we have output buffer size as 64 bytes and we use sprintf to copy data from RTAS buffer to local buffer. This causes kernel oops (see below call trace). This patch increases local buffer s

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-07 Thread tiejun.chen
On 05/08/2013 07:40 AM, Scott Wood wrote: On 05/07/2013 06:06:30 AM, Tiejun Chen wrote: We also can direct ISI exception to Guest like DSI. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke_emulate.c |3 +++ arch/powerpc/kvm/e500mc.c|3 ++- 2 files changed, 5 insertions(+)

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-07 Thread Scott Wood
On 05/07/2013 06:06:30 AM, Tiejun Chen wrote: We also can direct ISI exception to Guest like DSI. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke_emulate.c |3 +++ arch/powerpc/kvm/e500mc.c|3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) Are you seeing a real per

Re: [PATCH] arch/powerpc: advertise ISA2.07, HTM, DSCR, EBB and ISEL bits in HWCAP2

2013-05-07 Thread Nishanth Aravamudan
On 08.05.2013 [06:49:38 +1000], Benjamin Herrenschmidt wrote: > On Tue, 2013-05-07 at 13:33 -0700, Nishanth Aravamudan wrote: > > > Similarily, Nish, you may need to check that we remove those bits if > > > pHyp has the partition in a mode that doesn't support them (P7 > > > compatibility for examp

Re: [PATCH] arch/powerpc: advertise ISA2.07, HTM, DSCR, EBB and ISEL bits in HWCAP2

2013-05-07 Thread Benjamin Herrenschmidt
On Tue, 2013-05-07 at 13:33 -0700, Nishanth Aravamudan wrote: > > Similarily, Nish, you may need to check that we remove those bits if > > pHyp has the partition in a mode that doesn't support them (P7 > > compatibility for example) for migration purposes. > > Yep, I'll need to talk with Mikey abo

Re: [PATCH] arch/powerpc: advertise ISA2.07, HTM, DSCR, EBB and ISEL bits in HWCAP2

2013-05-07 Thread Nishanth Aravamudan
On 07.05.2013 [07:37:08 +1000], Benjamin Herrenschmidt wrote: > On Mon, 2013-05-06 at 09:38 -0500, Ryan Arnold wrote: > > My understanding was that these bits being 'on' is an indication of > > what features the hardware supports (or what the kernel emulates) and > > a not an indication of whether

[PATCH v9 3/3] of/pci: microblaze: convert to common of_pci_range_parser

2013-05-07 Thread Andrew Murray
This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau --- arch/microblaze/pci/pci-common.c | 106 ++ 1 files changed, 38 insertions(+), 68 deletions(-) diff --g

[PATCH v9 2/3] of/pci: mips: convert to common of_pci_range_parser

2013-05-07 Thread Andrew Murray
This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Signed-off-by: Gabor Juhos Reviewed-by: Rob Herring Reviewed-by: Grant Likely Tested-by: Linus Walleij --- arch/mips/pci/pci.c | 50 ++

[PATCH v9 0/3] of/pci: Provide common support for PCI DT parsing

2013-05-07 Thread Andrew Murray
This patchset factors out duplicated code associated with parsing PCI DT "ranges" properties across the architectures and introduces a "ranges" parser. This parser "of_pci_range_parser" can be used directly by ARM host bridge drivers enabling them to obtain ranges from device trees. I've included

[PATCH v9 1/3] of/pci: Provide support for parsing PCI DT ranges property

2013-05-07 Thread Andrew Murray
This patch factors out common implementation patterns to reduce overall kernel code and provide a means for host bridge drivers to directly obtain struct resources from the DT's ranges property without relying on architecture specific DT handling. This will make it easier to write archiecture indep

Re: [PATCH] arch/powerpc: advertise ISA2.07, HTM, DSCR, EBB and ISEL bits in HWCAP2

2013-05-07 Thread Ryan Arnold
Benjamin Herrenschmidt wrote on 05/06/2013 04:37:08 PM: > Benjamin Herrenschmidt > 05/06/2013 04:37 PM > > To > > Ryan Arnold/Rochester/IBM@IBMUS > > cc > > Nishanth Aravamudan , linuxppc- > d...@lists.ozlabs.org, Michael R Meissner/Cambridge/IBM@IBMUS, > Michael Neuling , Peter Bergner/ > Roche

Re: [PATCH v2 1/4] powerpc/cputable: reserve bits in HWCAP2 for new features

2013-05-07 Thread Ryan Arnold
Benjamin Herrenschmidt wrote on 05/06/2013 04:41:01 PM: > Benjamin Herrenschmidt > 05/06/2013 04:41 PM > > To > > Ryan Arnold/Rochester/IBM@IBMUS > > cc > > Nishanth Aravamudan , linuxppc- > d...@lists.ozlabs.org, mich...@ellerman.id.au, Michael R Meissner/ > Cambridge/IBM@IBMUS, Michael Neuling

[PATCH][v2] powerpc: Bring all threads online prior to migration/hibernation

2013-05-07 Thread Robert Jennings
This patch brings online all threads which are present but not online prior to migration/hibernation. After migration/hibernation those threads are taken back offline. During migration/hibernation all online CPUs must call H_JOIN, this is required by the hypervisor. Without this patch, threads t

[PATCH] powerpc/fsl_msi: fix error return code in fsl_of_msi_probe()

2013-05-07 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code in the MSI bitmap alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/powerpc/sysdev/fsl_msi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc

[v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-07 Thread Tiejun Chen
We also can direct ISI exception to Guest like DSI. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke_emulate.c |3 +++ arch/powerpc/kvm/e500mc.c|3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke_emulate.c b/arch/powerpc/kvm/booke_emu

[v2][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with CONFIG_PPC_DOORBELL

2013-05-07 Thread Tiejun Chen
CONFIG_PPC_DOORBELL is enough to cover all variants. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..62d4ece 100644 --- a/arch/powerpc/kvm/booke.c +++

Re: [v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-07 Thread tiejun.chen
On 05/07/2013 09:33 AM, tiejun.chen wrote: On 05/06/2013 10:58 PM, Alexander Graf wrote: On 05/06/2013 04:53 AM, Tiejun Chen wrote: Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chen --- arch/powerpc/kvm/booke

Re: [PATCH v8 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-05-07 Thread Benjamin Herrenschmidt
On Tue, 2013-05-07 at 09:01 +0100, Andrew Murray wrote: > > There were no objections to this latest revision until now and it is > currently sitting with Jason Cooper (mvebu-next/pcie). [1] Ok, well I've just sent Linus a pull request for my changes so at least drop the powerpc changes from your

[git pull] Please pull powerpc.git merge branch

2013-05-07 Thread Benjamin Herrenschmidt
Hi Linus ! Here are a few more powerpc bits that I would like in 3.10. Mostly remaining bolts & screw tightening of power8 support such as actually exposing the new features via the previously added AT_HWCAP2, and a few fixes, some of them for problems exposed recently like irqdomain warnings or s

[PATCH] powerpc, cpu hotplug: Fix warning on boot regarding sysfs file permission

2013-05-07 Thread Srivatsa S. Bhat
On boot, the following warning shows up on each CPU online operation: [ cut here ] WARNING: at drivers/base/core.c:575 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: GW3.9.0+ #2 task: c006fa18 ti: c006fa20 task.ti: c006fa20 NIP

[PATCH v2] powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning again

2013-05-07 Thread Li Zhong
Saw this warning again, and this time from the ret_from_fork path. It seems we could clear the back chain earlier in copy_thread(), which could cover both path, and also fix potential lockdep usage in schedule_tail(), or exception occurred before we clear the back chain. Signed-off-by: Li Zhong

Re: [PATCH] powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning again

2013-05-07 Thread Li Zhong
On Tue, 2013-05-07 at 10:32 +0800, Li Zhong wrote: > Saw this warning again, and this time from the ret_from_fork path. > > It seems we could clear the back chain earlier in copy_thread(), which > could cover both path, and also fix potential lockdep usage in > schedule_tail(), or exception occur

Re: [PATCH v8 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-05-07 Thread Andrew Murray
On Sun, May 05, 2013 at 03:41:49AM +0100, Benjamin Herrenschmidt wrote: > On Mon, 2013-04-22 at 11:41 +0100, Andrew Murray wrote: > > The pci_process_bridge_OF_ranges function, used to parse the "ranges" > > property of a PCI host device, is found in both Microblaze and PowerPC > > architectures. T

Re: [PATCH] powerpc: Make hard_irq_disable() do the right thing vs. irq tracing

2013-05-07 Thread Benjamin Herrenschmidt
On Tue, 2013-05-07 at 15:15 +0800, tiejun.chen wrote: > Could we simplify this as follows: > > +#define hard_irq_disable() do {\ > + __hard_irq_disable(); \ > + if (get_paca()->soft_enabled) { \ > + trace_h

Re: [PATCH] powerpc: Make hard_irq_disable() do the right thing vs. irq tracing

2013-05-07 Thread tiejun.chen
On 05/07/2013 03:04 PM, Benjamin Herrenschmidt wrote: If hard_irq_disable() is called while interrupts are already soft-disabled (which is the most common case) all is already well. However you can (and in some cases want) to call it while everything is enabled (to make sure you don't get a lazy

[PATCH] powerpc: Make hard_irq_disable() do the right thing vs. irq tracing

2013-05-07 Thread Benjamin Herrenschmidt
If hard_irq_disable() is called while interrupts are already soft-disabled (which is the most common case) all is already well. However you can (and in some cases want) to call it while everything is enabled (to make sure you don't get a lazy even, for example before entry into KVM guests) and in