Re: [PATCH v11 4/5] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Wolfgang Grandegger
On 08/11/2011 06:46 AM, Kumar Gala wrote: > > On Aug 10, 2011, at 1:16 PM, Wolfgang Grandegger wrote: > >> On 08/10/2011 07:01 PM, Kumar Gala wrote: >>> >>> On Aug 10, 2011, at 11:27 AM, Robin Holt wrote: >>> I added a simple clock source for the p1010rdb so the flexcan driver could det

Re: [PATCH v11 4/5] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Wolfgang Grandegger
On 08/11/2011 05:56 AM, Robin Holt wrote: > On Wed, Aug 10, 2011 at 08:16:33PM +0200, Wolfgang Grandegger wrote: >> On 08/10/2011 07:01 PM, Kumar Gala wrote: >>> >>> On Aug 10, 2011, at 11:27 AM, Robin Holt wrote: >>> I added a simple clock source for the p1010rdb so the flexcan driver co

[RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread Joakim Tjernlund
PPC __arch_swab32 and __arch_swab16 generates non optimal code. It doesn't schedule very well, need to copy its input register and and swab16 needs an extra insn to clear its upper bits. I have improved these functions(see my__xx). Any problem with the new asm? If not I will send a patch. Below s

Re: [RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread Andreas Schwab
Joakim Tjernlund writes: > unsigned short my__arch_swab16(unsigned short value) > { > __asm__("rlwimi %0,%0,16,0x00ff" > : "+r" (value)); You are creating a value that does not fit in a short. Andreas. -- Andreas Schwab, sch...@redhat.com GPG Key fingerprint = D4E8 DBE

Re: [RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread Joakim Tjernlund
Andreas Schwab wrote on 2011/08/11 10:45:42: > > Joakim Tjernlund writes: > > > unsigned short my__arch_swab16(unsigned short value) > > { > >__asm__("rlwimi %0,%0,16,0x00ff" > > : "+r" (value)); > > You are creating a value that does not fit in a short. Short is passed in a 32 bit

RE: [RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread David Laight
> Joakim Tjernlund writes: > > > unsigned short my__arch_swab16(unsigned short value) > > { > > __asm__("rlwimi %0,%0,16,0x00ff" > > : "+r" (value)); > > You are creating a value that does not fit in a short. Which is a problem because the compiler could schedule it be writt

RE: [RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread Joakim Tjernlund
"David Laight" wrote on 2011/08/11 10:56:26: > > > Joakim Tjernlund writes: > > > > > unsigned short my__arch_swab16(unsigned short value) > > > { > > >__asm__("rlwimi %0,%0,16,0x00ff" > > > : "+r" (value)); > > > > You are creating a value that does not fit in a short. > > Which is

RE: [RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread David Laight
> > Which is a problem because the compiler could schedule > > it be written back to real memory between the instructions. > > It can? There is no memory here, just registers. Even if it > is written to memory, how would that affect the register? Although the function argument is passed in a re

RE: [RFC] Optimize __arch_swab32 and __arch_swab16

2011-08-11 Thread Joakim Tjernlund
"David Laight" wrote on 2011/08/11 11:29:33: > > > > > Which is a problem because the compiler could schedule > > > it be written back to real memory between the instructions. > > > > It can? There is no memory here, just registers. Even if it > > is written to memory, how would that affect the re

Re: [PATCH v11 4/5] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Robin Holt
On Wed, Aug 10, 2011 at 11:46:27PM -0500, Kumar Gala wrote: > > On Aug 10, 2011, at 1:16 PM, Wolfgang Grandegger wrote: > > > On 08/10/2011 07:01 PM, Kumar Gala wrote: > >> > >> On Aug 10, 2011, at 11:27 AM, Robin Holt wrote: > >> > >>> I added a simple clock source for the p1010rdb so the flex

Re: [Cbe-oss-dev] [PATCH 01/15] [PS3] Add udbg driver using the PS3 gelic Ethernet device

2011-08-11 Thread Arnd Bergmann
On Thursday 04 August 2011, Geoff Levand wrote: > > + * > > + * udbg debug output routine via GELIC UDP broadcasts > > + * Copyright (C) 2010 Hector Martin > > + * Copyright (C) 2011 Andre Heider > > Some of this seems to be taken from the gelic driver, so shouldn't > the copyright info from the

Re: [Cbe-oss-dev] [PATCH 00/15] ps3: Support more than the OtherOS lpar

2011-08-11 Thread Arnd Bergmann
On Monday 01 August 2011, Andre Heider wrote: > This series addresses various issues and extends support when running > in lpars like GameOS. Included are some patches from Hector Martin, which > I found useful. Hi Andre, I've looked at the entire series and support merging it into 3.2 once the c

Re: [PATCH v11 4/5] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Kumar Gala
On Aug 11, 2011, at 5:42 AM, Robin Holt wrote: > On Wed, Aug 10, 2011 at 11:46:27PM -0500, Kumar Gala wrote: >> >> On Aug 10, 2011, at 1:16 PM, Wolfgang Grandegger wrote: >> >>> On 08/10/2011 07:01 PM, Kumar Gala wrote: On Aug 10, 2011, at 11:27 AM, Robin Holt wrote: > I ad

[PATCH] p1010rdb: gianfar config does not have queues.

2011-08-11 Thread Robin Holt
If I have the the fsl,num_rx_queues and fsl,num_tx_queues properties defined in the p1010's device tree file, I get a kernel panic very shortly after boot. The failure indicates we are configuring the gianfar.c driver for a queue depth greater than actual. Removing the properties got the problem

[PATCH v12 0/6] flexcan/powerpc: Add support for powerpc flexcan (freescale p1010)

2011-08-11 Thread Robin Holt
With all the patches applied, my p1010rdb works for communicating between its two can ports and also can communicate with an external PSOC. I have done no testing beyond compile testing for an arm system as I have no access to an arm based system. With the latest version, changes to the arch tree

[PATCH v11 1/6] flexcan: Remove #include

2011-08-11 Thread Robin Holt
powerpc does not have a mach-/clock.h. When testing, I found neither arm nor powerpc needed the mach/clock.h at all so I removed it. Signed-off-by: Robin Holt Acked-by: Marc Kleine-Budde Acked-by: Wolfgang Grandegger Cc: U Bhaskar-B22300 Cc: socketcan-c...@lists.berlios.de Cc: net...@vger

[PATCH v11 2/6] flexcan: Abstract off read/write for big/little endian.

2011-08-11 Thread Robin Holt
Make flexcan driver handle register reads in the appropriate endianess. This was a basic search and replace and then define some inlines. Signed-off-by: Robin Holt Acked-by: Marc Kleine-Budde Acked-by: Wolfgang Grandegger Cc: U Bhaskar-B22300 Cc: socketcan-c...@lists.berlios.de Cc: net...@vger

[PATCH v11 3/6] flexcan: Fix up fsl-flexcan device tree binding.

2011-08-11 Thread Robin Holt
This patch cleans up the documentation of the device-tree binding for the Flexcan devices on Freescale's PowerPC and ARM cores. Extra properties are not used by the driver so we are removing them. Signed-off-by: Robin Holt To: Marc Kleine-Budde , To: Wolfgang Grandegger , To: U Bhaskar-B22300 To

[PATCH v11 4/6] flexcan: Add of_match to platform_device definition.

2011-08-11 Thread Robin Holt
On powerpc, the OpenFirmware devices are not matched without specifying an of_match array. Introduce that array as that is used for matching on the Freescale P1010 processor. Signed-off-by: Robin Holt Acked-by: Marc Kleine-Budde Acked-by: Wolfgang Grandegger Cc: U Bhaskar-B22300 Cc: Grant Lik

[PATCH v11 5/6] flexcan: Prefer device tree clock frequency if available.

2011-08-11 Thread Robin Holt
If our CAN device's device tree node has a clock-frequency property, then use that value for the can devices clock frequency. If not, fall back to asking the platform/mach code for the clock frequency associated with the flexcan device. Signed-off-by: Robin Holt To: Kumar Gala To: Wolfgang Gran

[PATCH v11 6/6] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Robin Holt
Allow the p1010 processor to select the flexcan network driver. Signed-off-by: Robin Holt Acked-by: Marc Kleine-Budde , Acked-by: Wolfgang Grandegger , Cc: U Bhaskar-B22300 Cc: socketcan-c...@lists.berlios.de, Cc: net...@vger.kernel.org, Cc: PPC list Cc: Kumar Gala --- arch/powerpc/boot/dts/p

Re: [PATCH v11 5/6] flexcan: Prefer device tree clock frequency if available.

2011-08-11 Thread Marc Kleine-Budde
On 08/11/2011 06:07 PM, Robin Holt wrote: > If our CAN device's device tree node has a clock-frequency property, > then use that value for the can devices clock frequency. If not, fall > back to asking the platform/mach code for the clock frequency associated > with the flexcan device. nitpicking

Re: [PATCH v11 6/6] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Wolfgang Grandegger
On 08/11/2011 06:07 PM, Robin Holt wrote: > Allow the p1010 processor to select the flexcan network driver. > > Signed-off-by: Robin Holt > Acked-by: Marc Kleine-Budde , > Acked-by: Wolfgang Grandegger , > Cc: U Bhaskar-B22300 > Cc: socketcan-c...@lists.berlios.de, > Cc: net...@vger.kernel.org,

Re: [PATCH v11 5/6] flexcan: Prefer device tree clock frequency if available.

2011-08-11 Thread Wolfgang Grandegger
On 08/11/2011 06:07 PM, Robin Holt wrote: > If our CAN device's device tree node has a clock-frequency property, > then use that value for the can devices clock frequency. If not, fall > back to asking the platform/mach code for the clock frequency associated > with the flexcan device. > > Signed

Re: [PATCH v11 6/6] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Robin Holt
On Thu, Aug 11, 2011 at 06:35:08PM +0200, Wolfgang Grandegger wrote: > On 08/11/2011 06:07 PM, Robin Holt wrote: > > Allow the p1010 processor to select the flexcan network driver. > > > > Signed-off-by: Robin Holt > > Acked-by: Marc Kleine-Budde , > > Acked-by: Wolfgang Grandegger , > > Cc: U Bh

Re: [PATCH v11 3/6] flexcan: Fix up fsl-flexcan device tree binding.

2011-08-11 Thread Grant Likely
On Thu, Aug 11, 2011 at 10:07 AM, Robin Holt wrote: > This patch cleans up the documentation of the device-tree binding for > the Flexcan devices on Freescale's PowerPC and ARM cores. Extra > properties are not used by the driver so we are removing them. > > Signed-off-by: Robin Holt > To: Marc K

Re: [Cbe-oss-dev] [PATCH 01/15] [PS3] Add udbg driver using the PS3 gelic Ethernet device

2011-08-11 Thread Andre Heider
On Thu, Aug 11, 2011 at 2:13 PM, Arnd Bergmann wrote: > On Thursday 04 August 2011, Geoff Levand wrote: >> > + * >> > + * udbg debug output routine via GELIC UDP broadcasts >> > + * Copyright (C) 2010 Hector Martin >> > + * Copyright (C) 2011 Andre Heider >> >> Some of this seems to be taken fro

Re: [Cbe-oss-dev] [PATCH 00/15] ps3: Support more than the OtherOS lpar

2011-08-11 Thread Andre Heider
On Thu, Aug 11, 2011 at 2:17 PM, Arnd Bergmann wrote: > On Monday 01 August 2011, Andre Heider wrote: >> This series addresses various issues and extends support when running >> in lpars like GameOS. Included are some patches from Hector Martin, which >> I found useful. > > Hi Andre, > > I've look

Re: [PATCH v11 5/6] flexcan: Prefer device tree clock frequency if available.

2011-08-11 Thread Kumar Gala
On Aug 11, 2011, at 11:18 AM, Marc Kleine-Budde wrote: > On 08/11/2011 06:07 PM, Robin Holt wrote: >> If our CAN device's device tree node has a clock-frequency property, >> then use that value for the can devices clock frequency. If not, fall >> back to asking the platform/mach code for the clo

Re: [PATCH v11 6/6] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Kumar Gala
On Aug 11, 2011, at 11:07 AM, Robin Holt wrote: > Allow the p1010 processor to select the flexcan network driver. > > Signed-off-by: Robin Holt > Acked-by: Marc Kleine-Budde , > Acked-by: Wolfgang Grandegger , > Cc: U Bhaskar-B22300 > Cc: socketcan-c...@lists.berlios.de, > Cc: net...@vger.kern

Re: [PATCH v11 6/6] powerpc: Add flexcan device support for p1010rdb.

2011-08-11 Thread Robin Holt
On Thu, Aug 11, 2011 at 12:41:34PM -0500, Kumar Gala wrote: > > On Aug 11, 2011, at 11:07 AM, Robin Holt wrote: > > > Allow the p1010 processor to select the flexcan network driver. > > > > Signed-off-by: Robin Holt > > Acked-by: Marc Kleine-Budde , > > Acked-by: Wolfgang Grandegger , > > Cc: U

[PATCH part1 v2 0/9] ps3: General improvements and preparation for support more than the OtherOS lpar

2011-08-11 Thread Andre Heider
This is the first part of my previous series including the discussed fixups. I dropped the old #2 ([PS3] Get lv1 high memory region from devtree) and replaced it with 2 new patches, now #2 and #3. The latter contains the fixups mentioned on the old #2 thread. Patches are based on today's Linus' t

[PATCH part1 v2 1/9] Add udbg driver using the PS3 gelic Ethernet device

2011-08-11 Thread Andre Heider
From: Hector Martin Signed-off-by: Hector Martin [a.heider: Various cleanups to make checkpatch.pl happy] Signed-off-by: Andre Heider --- arch/powerpc/Kconfig.debug |8 + arch/powerpc/include/asm/udbg.h |1 + arch/powerpc/kernel/udbg.c |2 + arch/p

[PATCH part1 v2 2/9] ps3: Add helper functions to read highmem info from the repository

2011-08-11 Thread Andre Heider
An earlier step in the boot chain can preallocate the highmem region. A boot loader doing so will place the region infos in the repository. Provide helper functions to read the required nodes. Signed-off-by: Andre Heider --- arch/powerpc/platforms/ps3/platform.h |3 ++ arch/powerpc/platfor

[PATCH part1 v2 4/9] Add region 1 memory early

2011-08-11 Thread Andre Heider
From: Hector Martin Real mode memory can be limited and runs out quickly as memory is allocated during kernel startup. Having region1 available sooner fixes this. Signed-off-by: Hector Martin [a.heider: Various cleanups to make checkpatch.pl happy] Signed-off-by: Andre Heider --- arch/powerpc

[PATCH part1 v2 5/9] ps3: MEMORY_HOTPLUG is not a requirement anymore

2011-08-11 Thread Andre Heider
Signed-off-by: Andre Heider --- arch/powerpc/platforms/ps3/Kconfig |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index 476d9d9..84df5c8 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/po

[PATCH part1 v2 3/9] ps3: Get lv1 high memory region from the repository

2011-08-11 Thread Andre Heider
This lets the bootloader preallocate the high lv1 region and pass its location to the kernel through the repository. Thus, it can be used to hold the initrd. If the region info doesn't exist, the kernel retains the old behavior and attempts to allocate the region itself. Based on the patch "[PS3]

[PATCH part1 v2 6/9] ps3: Detect the current lpar

2011-08-11 Thread Andre Heider
Detect it by reading the ss laid repository node, and make it accessible via ps3_get_ss_laid(). Signed-off-by: Andre Heider --- arch/powerpc/include/asm/ps3.h |6 ++ arch/powerpc/platforms/ps3/platform.h |4 arch/powerpc/platforms/ps3/repository.c | 19 +

[PATCH part1 v2 7/9] ps3: Log the detected lpar on startup

2011-08-11 Thread Andre Heider
Add PS3_SS_LAID_GAMEOS to enum ps3_ss_laid. Signed-off-by: Andre Heider --- arch/powerpc/include/asm/ps3.h |1 + arch/powerpc/platforms/ps3/setup.c | 13 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/

[PATCH part1 v2 8/9] ps3flash: Refuse to work in lpars other than OtherOS

2011-08-11 Thread Andre Heider
The driver implements a character and misc device, meant for the axed OtherOS to exchange various settings with GameOS. Since Firmware 3.21 there is no support anymore to write these settings, so test if we're running in OtherOS, and refuse to load if that is not the case. Signed-off-by: Andre Hei

[PATCH part1 v2 9/9] ps3: Only prealloc the flash bounce buffer for the OtherOS lpar

2011-08-11 Thread Andre Heider
It's only used by the ps3flash driver, which only supports the OtherOS lpar. Signed-off-by: Andre Heider --- arch/powerpc/platforms/ps3/setup.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c in

Re: Question about the drivers movement (IBM_NEW_EMAC)

2011-08-11 Thread Stephen Rothwell
[just cc'ing linuxppc-dev mailing list] On Fri, 12 Aug 2011 12:07:44 +1000 Stephen Rothwell wrote: > > Hi Jeff, > > In commit 9aa328359545 ("ehea/ibm*: Move the IBM drivers") from Dave's > net tree, you not only move the drivers around, but you change > CONFIG_IBM_NEW_EMAC to CONFIG_IBM_EMAC.

Re: [PATCH 09/10] KVM: PPC: Support SC1 hypercalls for PAPR in PR mode

2011-08-11 Thread David Gibson
On Tue, Aug 09, 2011 at 06:31:47PM +0200, Alexander Graf wrote: > PAPR defines hypercalls as SC1 instructions. Using these, the guest modifies > page tables and does other privileged operations that it wouldn't be allowed > to do in supervisor mode. > > This patch adds support for PR KVM to trap t

Re: [PATCH 07/10] KVM: PPC: Add PAPR hypercall code for PR mode

2011-08-11 Thread David Gibson
On Tue, Aug 09, 2011 at 06:31:45PM +0200, Alexander Graf wrote: > When running a PAPR guest, we need to handle a few hypercalls in kernel space, > most prominently the page table invalidation (to sync the shadows). > > So this patch adds handling for a few PAPR hypercalls to PR mode KVM. I tried >

Re: [PATCH 09/10] KVM: PPC: Support SC1 hypercalls for PAPR in PR mode

2011-08-11 Thread Alexander Graf
Am 12.08.2011 um 05:33 schrieb David Gibson : > On Tue, Aug 09, 2011 at 06:31:47PM +0200, Alexander Graf wrote: >> PAPR defines hypercalls as SC1 instructions. Using these, the guest modifies >> page tables and does other privileged operations that it wouldn't be allowed >> to do in supervisor mo

Re: [PATCH 07/10] KVM: PPC: Add PAPR hypercall code for PR mode

2011-08-11 Thread Alexander Graf
Am 12.08.2011 um 05:35 schrieb David Gibson : > On Tue, Aug 09, 2011 at 06:31:45PM +0200, Alexander Graf wrote: >> When running a PAPR guest, we need to handle a few hypercalls in kernel >> space, >> most prominently the page table invalidation (to sync the shadows). >> >> So this patch adds ha