Re: power-next

2011-09-19 Thread Benjamin Herrenschmidt
On Tue, 2011-09-20 at 16:46 +1000, Benjamin Herrenschmidt wrote: > Hi folks ! > > So I've finally got to setup a branch on github for powerpc next. > > I've also committed a bunch of stuff to it, so here it is. I'll go back > to kernel.org as soon as it's been fixed. > > https://github.com/ozben

power-next

2011-09-19 Thread Benjamin Herrenschmidt
Hi folks ! So I've finally got to setup a branch on github for powerpc next. I've also committed a bunch of stuff to it, so here it is. I'll go back to kernel.org as soon as it's been fixed. https://github.com/ozbenh/linux/commits/next Cheers, Ben.

[PATCH 08/20] powerpc/powernv: Add OPAL takeover from PowerVM

2011-09-19 Thread Benjamin Herrenschmidt
On machines supporting the OPAL firmware version 1, the system is initially booted under pHyp. We then use a special hypercall to verify if OPAL is available and if it is, we then trigger a "takeover" which disables pHyp and loads the OPAL runtime firmware, giving control to the kernel in hyperviso

[PATCH 11/20] powerpc/powernv: Add support for instanciating OPAL v2 from Open Firmware

2011-09-19 Thread Benjamin Herrenschmidt
OPAL v2 is instantiated in a way similar to RTAS using Open Firmware client interface calls, and the resulting address and entry point are put in the device-tree Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/prom_init.c | 136 +-- 1 files chan

[PATCH 13/20] powerpc/powernv: Hookup reboot and poweroff functions

2011-09-19 Thread Benjamin Herrenschmidt
This calls the respective HAL functions, and spin on hal_poll_event() to ensure the HAL has a chance to communicate with the FSP to trigger the reboot or shutdown operation Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/powernv/setup.c | 32 ++-- 1

Re: [PATCH v2] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Grant Likely
On Tue, Sep 20, 2011 at 02:50:15PM +1000, Benjamin Herrenschmidt wrote: > We used to overwrite with CONFIG_CMDLINE if we found a chosen > node but failed to get bootargs out of it or they were empty, > unless CONFIG_CMDLINE_FORCE is set. > > Instead change that to overwrite if "data" is non empty

[PATCH v2] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Benjamin Herrenschmidt
We used to overwrite with CONFIG_CMDLINE if we found a chosen node but failed to get bootargs out of it or they were empty, unless CONFIG_CMDLINE_FORCE is set. Instead change that to overwrite if "data" is non empty after the bootargs check. It allows arch code to have other mechanisms to retrieve

[PATCH v2] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Benjamin Herrenschmidt
We used to overwrite with CONFIG_CMDLINE if we found a chosen node but failed to get bootargs out of it or they were empty, unless CONFIG_CMDLINE_FORCE is set. Instead change that to overwrite if "data" is non empty after the bootargs check. It allows arch code to have other mechanisms to retrieve

Re: [PATCH 06/20] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Grant Likely
On Mon, Sep 19, 2011 at 10:30 PM, Grant Likely wrote: > On Mon, Sep 19, 2011 at 9:44 PM, Benjamin Herrenschmidt > wrote: >> We used to overwrite with CONFIG_CMDLINE if we found a chosen >> node but failed to get bootargs out of it or they were empty, >> unless CONFIG_CMDLINE_FORCE is set. >> >> I

Re: [PATCH 06/20] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Benjamin Herrenschmidt
On Mon, 2011-09-19 at 22:30 -0600, Grant Likely wrote: > On Mon, Sep 19, 2011 at 9:44 PM, Benjamin Herrenschmidt > wrote: > > We used to overwrite with CONFIG_CMDLINE if we found a chosen > > node but failed to get bootargs out of it or they were empty, > > unless CONFIG_CMDLINE_FORCE is set. > >

Re: [PATCH 06/20] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Grant Likely
On Mon, Sep 19, 2011 at 9:44 PM, Benjamin Herrenschmidt wrote: > We used to overwrite with CONFIG_CMDLINE if we found a chosen > node but failed to get bootargs out of it or they were empty, > unless CONFIG_CMDLINE_FORCE is set. > > Instead change that to overwrite if cmd_line is non empty after >

[PATCH 13/20] powerpc/powernv: Hookup reboot and poweroff functions

2011-09-19 Thread Benjamin Herrenschmidt
This calls the respective HAL functions, and spin on hal_poll_event() to ensure the HAL has a chance to communicate with the FSP to trigger the reboot or shutdown operation Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/powernv/setup.c | 32 ++-- 1

[PATCH 11/20] powerpc/powernv: Add support for instanciating OPAL v2 from Open Firmware

2011-09-19 Thread Benjamin Herrenschmidt
OPAL v2 is instantiated in a way similar to RTAS using Open Firmware client interface calls, and the resulting address and entry point are put in the device-tree Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/prom_init.c | 136 +-- 1 files chan

[PATCH 08/20] powerpc/powernv: Add OPAL takeover from PowerVM

2011-09-19 Thread Benjamin Herrenschmidt
On machines supporting the OPAL firmware version 1, the system is initially booted under pHyp. We then use a special hypercall to verify if OPAL is available and if it is, we then trigger a "takeover" which disables pHyp and loads the OPAL runtime firmware, giving control to the kernel in hyperviso

[PATCH 17/20] powerpc/powernv: Machine check and other system interrupts

2011-09-19 Thread Benjamin Herrenschmidt
OPAL can handle various interrupt for us such as Machine Checks (it performs all sorts of recovery tasks and passes back control to us with informations about the error), Hardware Management Interrupts and Softpatch interrupts. This wires up the mechanisms and prints out specific informations retu

[PATCH 20/20] powerpc/powernv: Handle PCI-X/PCIe reset delay

2011-09-19 Thread Benjamin Herrenschmidt
The firmware doesn't wait after lifting the PCI reset. However it does timestamp it in the device tree. We use that to ensure we wait long enough (3s is our current arbitrary setting) from that timestamp to actually probing the bus. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platform

[PATCH 18/20] powerpc/powernv: Add support for p5ioc2 PCI-X and PCIe

2011-09-19 Thread Benjamin Herrenschmidt
This adds support for PCI-X and PCIe on the p5ioc2 IO hub using OPAL. This includes allocating & setting up TCE tables and config space access routines. This also supports fallbacks via RTAS when OPAL is absent, using legacy TCE format pre-allocated via the device-tree (BML style) Signed-off-by:

[PATCH 19/20] powerpc/powernv: Implement MSI support for p5ioc2 PCIe

2011-09-19 Thread Benjamin Herrenschmidt
This implements support for MSIs on p5ioc2 PHBs. We only support MSIs on the PCIe PHBs, not the PCI-X ones as the later hasn't been properly verified in HW. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/powernv/pci-p5ioc2.c | 49 arch/powerpc/platforms/powernv/p

[PATCH 12/20] powerpc/powernv: Support for OPAL console

2011-09-19 Thread Benjamin Herrenschmidt
This adds a udbg and an hvc console backend for supporting a console using the OPAL console interfaces. On OPAL v1 we have hvc0 mapped to whatever console the system was configured for (network or hvsi serial port) via the service processor. On OPAL v2 we have hvcN mapped to the Nth console provi

[PATCH 16/20] powerpc/powernv: Register and handle OPAL interrupts

2011-09-19 Thread Benjamin Herrenschmidt
We do the minimum which is to "pass" interrupts to HAL, which makes the console smoother and will allow us to implement interrupt based completion and console. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/powernv/opal.c | 31 +++ 1 files changed,

[PATCH 15/20] powerpc/powernv: Add OPAL ICS backend

2011-09-19 Thread Benjamin Herrenschmidt
OPAL handles HW access to the various ICS or equivalent chips for us (with the exception of p5ioc2 based HEA which uses a different backend) similarily to what RTAS does on pSeries. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/xics.h| 19 +++ arch/powerpc/sysdev/x

[PATCH 14/20] powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks

2011-09-19 Thread Benjamin Herrenschmidt
Implements OPAL RTC and NVRAM support and wire all that up to the powernv platform. We use RTAS for RTC as a fallback if available. Using RTAS for nvram is not supported yet, pending some rework/cleanup and generalization of the pSeries & CHRP code. We also use RTAS fallbacks for power off and reb

[PATCH 10/20] powerpc/powernv: Basic support for OPAL

2011-09-19 Thread Benjamin Herrenschmidt
Add definition of OPAL interfaces along with the wrappers to call into OPAL runtime and the early device-tree parsing hook to locate the OPAL runtime firmware. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/firmware.h| 10 + arch/powerpc/include/asm/opal.h

[PATCH 09/20] powerpc/powernv: Get kernel command line accross OPAL takeover

2011-09-19 Thread Benjamin Herrenschmidt
We stash it in boot_command_line which isn't in BSS and so won't be overwritten. We then use that as a default cmd_line before we walk the device-tree. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/prom.c |7 +++ arch/powerpc/kernel/prom_init.c|4 +

[PATCH 07/20] powerpc/powernv: Add CPU hotplug support

2011-09-19 Thread Benjamin Herrenschmidt
Unplugged CPU go into NAP mode in a loop until woken up Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/Kconfig |2 +- arch/powerpc/platforms/powernv/smp.c | 78 +- 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/arch/p

[PATCH 05/20] powerpc: Add skeleton PowerNV platform

2011-09-19 Thread Benjamin Herrenschmidt
This adds a skeletton for the new Power "Non Virtualized" platform which will be used by machines supporting running without an hypervisor, for example in order to run KVM. These machines will be using a new firmware called OPAL for which the support will be provided by later patches. The PowerNV

[PATCH 06/20] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE

2011-09-19 Thread Benjamin Herrenschmidt
We used to overwrite with CONFIG_CMDLINE if we found a chosen node but failed to get bootargs out of it or they were empty, unless CONFIG_CMDLINE_FORCE is set. Instead change that to overwrite if cmd_line is non empty after the bootargs check. It allows arch code to have other mechanisms to retrie

[PATCH 04/20] powerpc/powernv: Don't clobber r9 in relative_toc()

2011-09-19 Thread Benjamin Herrenschmidt
With OPAL, r8 and r9 will be used to pass the OPAL base and entry for debugging purposes (those informations are also in the device-tree). We don't want to clobber those registers that early. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/head_64.S |6 +++--- 1 files changed,

[PATCH 03/20] powerpc/pci: Call pcie_bus_configure_settings()

2011-09-19 Thread Benjamin Herrenschmidt
This new function is used to properly setup the PCI Express Max Payload Size (and in some circumstances Max Read Request Size). Some systems will not operate properly if these aren't set correctly and the firmware doesn't always do it. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kern

[PATCH 02/20] powerpc/smp: More generic support for "soft hotplug"

2011-09-19 Thread Benjamin Herrenschmidt
This adds more generic support for doing CPU hotplug with a simple idle loop and no actual reset of the processors. The generic smp_generic_kick_cpu() does the hotplug bringup trick if the PACA shows that the CPU has already been started at boot and we provide an accessor for the CPU state. Signed

[PATCH 01/20] powerpc/udbg: Fix Kconfig entry for avoiding 44x early debug with KVM

2011-09-19 Thread Benjamin Herrenschmidt
It was preventing the global early debug selection whenever KVM was enabled instead of only preventing the 440 specific one. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/Kconfig.debug |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/Kconfig.de

Re: [PATCH 0/5] ppc64 scheduler fixes

2011-09-19 Thread Benjamin Herrenschmidt
On Tue, 2011-09-20 at 10:19 +1000, Anton Blanchard wrote: > Hi Peter, > > > On Mon, 2011-07-25 at 12:33 +1000, Anton Blanchard wrote: > > > Here are a set of ppc64 scheduler fixes that help with some > > > multi node performance issues. > > > > They look fine to me. I'll probably ping you when I'

Re: [PATCH 0/5] ppc64 scheduler fixes

2011-09-19 Thread Anton Blanchard
Hi Peter, > On Mon, 2011-07-25 at 12:33 +1000, Anton Blanchard wrote: > > Here are a set of ppc64 scheduler fixes that help with some > > multi node performance issues. > > They look fine to me. I'll probably ping you when I'll rip out all > that SD_NODES_PER_DOMAIN crap for good, but until then

Re: WARNING: vmlinux.o (.PPC.EMB.apuinfo): unexpected non-allocatable section.

2011-09-19 Thread Scott Wood
On 09/19/2011 03:18 PM, Timur Tabi wrote: > This kernel continues to compile and link, but when I try to boot it, it stops > here (this is under the hypervisor): "The hypervisor" is ambiguous. We have Topaz, and KVM. > Linux version 3.0.4-31-00029-g06d86c8-dirty (b04825@efes) (gcc version 4.5.1

WARNING: vmlinux.o (.PPC.EMB.apuinfo): unexpected non-allocatable section.

2011-09-19 Thread Timur Tabi
When trying to build a 64-bit kernel, I'm getting this warning message: WARNING: vmlinux.o (.PPC.EMB.apuinfo): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example contains section definitions for use in .S files. This kernel continues to compil

RFC [PATCH] fsl pci quirk to __devinit Re: PCIe end-point on FPGA doesn't show up on PCI bus when configured

2011-09-19 Thread Matias Garcia
On Fri, 2011-01-28 at 21:06 +0100, Elie De Brauwer wrote: > On 01/28/11 19:37, Matias Garcia wrote: > > I'm running a vanilla linux 2.6.37 kernel on a Freescale P2020 dual-core > > processor, and have the following conundrum: I configure the FPGA which > > brings up a PCIe interface to the processo