Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-10 Thread Nick Piggin
On Wed, Feb 10, 2010 at 10:10:25PM +1100, Anton Blanchard wrote: > > Nick Piggin discovered that lwsync barriers around locks were faster than > isync > on 970. That was a long time ago and I completely dropped the ball in testing > his patches across other ppc64 processors. > > Turns out the id

Re: [PATCH 1/6] powerpc: Use lwarx hint in spinlocks

2010-02-10 Thread Nick Piggin
On Wed, Feb 10, 2010 at 09:57:28PM +1100, Anton Blanchard wrote: > > Recent versions of the PowerPC architecture added a hint bit to the larx > instructions to differentiate between an atomic operation and a lock > operation: > > > 0 Other programs might attempt to modify the word in storage add

Re: [PATCH] powerpc: pair loads and stores in copy_4k_page

2010-02-10 Thread Mark Nelson
Hi Anton, On Thursday 11 February 2010 15:07:54 Anton Blanchard wrote: > > A number of our chips like loads and stores to be paired. A small kernel > module testcase shows the improvement of pairing loads and stores in > copy_4k_page: > > POWER6: +9% > POWER7: +1.5% I just tried this on one of

Re: register long sp asm("r1") incorrect

2010-02-10 Thread Benjamin Herrenschmidt
On Tue, 2010-02-09 at 16:24 +0100, Pavel Machek wrote: > ...according to gcc docs, sp should be global, or placement in > register is not guaranteed (except at asm boundaries, but there are > none). Sorry I'm not sure I grok what you mean. Cheers, Ben. __

[PATCH] powerpc: pair loads and stores in copy_4k_page

2010-02-10 Thread Anton Blanchard
A number of our chips like loads and stores to be paired. A small kernel module testcase shows the improvement of pairing loads and stores in copy_4k_page: POWER6: +9% POWER7: +1.5% #include #include #define ITERATIONS 1000 static int __init copypage_init(void) { struct timespe

Re: [PATCH 01/04] powerpc/booke: Introduce new CONFIG options for advanced debug registers

2010-02-10 Thread David Gibson
On Mon, Feb 08, 2010 at 02:50:57PM -0700, Dave Kleikamp wrote: > powerpc/booke: Introduce new CONFIG options for advanced debug registers > > From: Dave Kleikamp > > Introduce new config options to simplify the ifdefs pertaining to the > advanced debug registers for booke and 40x processors: >

Re: [PATCH] perf_event: e500 support

2010-02-10 Thread Paul Mackerras
On Wed, Feb 10, 2010 at 06:06:10PM -0600, Scott Wood wrote: > Paul Mackerras wrote: > >>Some limitations: > >>- No threshold support -- need to figure out how to represent it in > >> the event struct from userspace. > > > >What does "threshold support" mean in this context? Does it mean > >somet

Re: [PATCH] powerpc/40x: Add support for PPC40x boards with > 512MB SDRAM

2010-02-10 Thread Benjamin Herrenschmidt
On Wed, 2010-02-10 at 14:54 +0100, Stefan Roese wrote: > This patch adds support for boards with more that 512MByte RAM. Currently > only 512MB of memory are enabled in the DCCR/ICCR real-mode cache > control registers. This patch now enables caching in real-mode for > 2GByte. Should we make that

[PATCH] powerpc: Improve 64bit copy_tofrom_user

2010-02-10 Thread Anton Blanchard
Here is a patch from Paul Mackerras that improves the ppc64 copy_tofrom_user. The loop now does 32 bytes at a time and as well as pairing loads and stores. A quick test case that reads 8kB over and over shows the improvement: POWER6: 53% faster POWER7: 51% faster #define _XOPEN_SOURCE 500 #inc

Re: [PATCH] perf_event: e500 support

2010-02-10 Thread Scott Wood
Paul Mackerras wrote: Some limitations: - No threshold support -- need to figure out how to represent it in the event struct from userspace. What does "threshold support" mean in this context? Does it mean something different from getting an interrupt after N events have been counted? Or do

Re: [PATCH] perf_event: e500 support

2010-02-10 Thread Paul Mackerras
On Fri, Jan 15, 2010 at 03:43:51PM -0600, Scott Wood wrote: > This implements perf_event support for the Freescale embedded performance > monitor, based on the existing perf_event.c that supports server/classic > chips. Eventually we may want to factor out some of the common bits. Cool! I agree

Re: [PATCH] powerpc: Use lwarx hint bit in spinlocks

2010-02-10 Thread Josh Boyer
On Wed, Feb 10, 2010 at 09:40:34AM -0600, Kumar Gala wrote: >> In the off chance that someone actually does an SMP 44x, I think the hint bit >> here would just be ignored (I could test possibly if we want to verify). >> However, I thought the FSL parts didn't like toggling the reserved bits and >>

Re: [rtc-linux] Re: [PATCH v3 03/11] rtc: Add MPC5121 Real time clock driver

2010-02-10 Thread Alessandro Zummo
On Tue, 9 Feb 2010 19:39:35 -0700 Grant Likely wrote: > Acked-by: Grant Likely > > Alessandro, do you want me to carry this one in my powerpc tree along > with the rest of the 5121 patches, or do you want to carry it? There > aren't any commit ordering issues on this one. Yes please. thanks.

Re: [PATCH] powerpc: Use lwarx hint bit in spinlocks

2010-02-10 Thread Kumar Gala
On Feb 9, 2010, at 9:19 PM, Josh Boyer wrote: > On Wed, Feb 10, 2010 at 01:50:11PM +1100, Anton Blanchard wrote: >> >> Recent versions of the PowerPC architecture added a hint bit to the larx >> instructions to differentiate between an atomic operation and a lock >> operation: >> >>> 0 Other p

[PATCH v7 4/4] powerpc: doc/dts-bindings: update doc of FSL I2C bindings

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger This patch adds the MPC5121 to the list of supported devices, enhances the doc of the "clock-frequency" property and removes the obsolete "cell-index", "device_type" and "fsl-i2c" property. Furthermore an example for the MPC5121 has been added. Signed-off-by: Wolfgang G

[PATCH v7 1/4] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger "__devinit[data]" has not yet been used for all initialization functions and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has been renamed to "mpc_i2c_data", which is even the better name. Signed-off-by: Wolfgang Grandegger Tested-by: Wolfram Sang

[PATCH v7 3/4] i2c-mpc: add support for the MPC512x processors from Freescale

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger As I2C interrupts must be enabled for the MPC512x by the setup function as well, "fsl,preserve-clocking" is handled in a slighly different way. Also, the old settings are now reported calling dev_dbg(). For the MPC512x the clock setup function of the MPC52xx can be re-u

[PATCH v7 0/4] i2c-mpc: add support for the Freescale MPC512x and other fixes

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger This patch series adds support for the MPC512x from Freescale to the i2c-mpc driver. At that occasion, issues with __devinit[data] have been fixed and the doc of the FSL I2C dts bindings updated. It has been tested on a MPC5121ADS, TQM5200 and TQM8560 board Changes sin

[PATCH v7 2/4] i2c-mpc: rename "setclock" initialization functions to "setup"

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger To prepare support for the MPC512x processors from Freescale the "setclock" initialization functions have been renamed to "setup" because I2C interrupts must be enabled for the MPC512x by this function as well. Signed-off-by: Wolfgang Grandegger --- drivers/i2c/busse

Re: [PATCH v4 1/3] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Wolfgang Grandegger
Grant Likely wrote: > On Wed, Feb 10, 2010 at 3:53 AM, Wolfgang Grandegger > wrote: >> Stephen Rothwell wrote: >>> Hi Wolfgang, >>> >>> On Wed, 10 Feb 2010 11:09:25 +0100 Wolfgang Grandegger >>> wrote: > __devinitdata goes at the end, immediately before the '='. Ditto > throughout the

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-10 Thread Grant Likely
On Wed, Feb 10, 2010 at 3:20 AM, Wolfgang Grandegger wrote: > Wolfgang Grandegger wrote: >> Hi David, >> >> David Miller wrote: >>> From: Anatolij Gustschin >>> Date: Tue, 9 Feb 2010 15:23:17 +0100 >>> In my understanding, in the ESP scsi driver the set of defines for the register offs

Re: [PATCH v4 1/3] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Grant Likely
On Wed, Feb 10, 2010 at 3:53 AM, Wolfgang Grandegger wrote: > Stephen Rothwell wrote: >> Hi Wolfgang, >> >> On Wed, 10 Feb 2010 11:09:25 +0100 Wolfgang Grandegger >> wrote: __devinitdata goes at the end, immediately before the '='.  Ditto throughout the file. >>> This made a differenc

[PATCH] powerpc/40x: Add support for PPC40x boards with > 512MB SDRAM

2010-02-10 Thread Stefan Roese
This patch adds support for boards with more that 512MByte RAM. Currently only 512MB of memory are enabled in the DCCR/ICCR real-mode cache control registers. This patch now enables caching in real-mode for 2GByte. Signed-off-by: Stefan Roese Cc: Benjamin Herrenschmidt Cc: Josh Boyer --- arch/

[PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-10 Thread Anton Blanchard
Nick Piggin discovered that lwsync barriers around locks were faster than isync on 970. That was a long time ago and I completely dropped the ball in testing his patches across other ppc64 processors. Turns out the idea helps on other chips. Using a microbenchmark that uses a lot of threads to co

[PATCH 4/6] powerpc: Rename LWSYNC_ON_SMP to PPC_RELEASE_BARRIER, ISYNC_ON_SMP to PPC_ACQUIRE_BARRIER

2010-02-10 Thread Anton Blanchard
For performance reasons we are about to change ISYNC_ON_SMP to sometimes be lwsync. Now that the macro name doesn't make sense, change it and LWSYNC_ON_SMP to better explain what the barriers are doing. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/atomic.h

[PATCH 5/6] powerpc: Fix lwsync patching code on 64bit

2010-02-10 Thread Anton Blanchard
do_lwsync_fixups doesn't work on 64bit, we end up writing lwsyncs to the wrong addresses: 0:mon> di c001000bfacc c001000bfacc 7c2004ac lwsync Since the lwsync section has negative offsets we need to use a signed int pointer so we sign extend the value. Signed-off-by: Anton Blancha

[PATCH 2/6] powerpc: Use lwarx/ldarx hint in bit locks

2010-02-10 Thread Anton Blanchard
This patch implements the lwarx/ldarx hint bit for bit locks. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/asm-compat.h === --- powerpc.git.orig/arch/powerpc/include/asm/asm-compat.h 2010-02-1

[PATCH 3/6] powerpc: Convert open coded native hashtable bit lock

2010-02-10 Thread Anton Blanchard
Now we have real bit locks use them instead of open coding it. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 056d23a..9e1aa4f 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c @@ -122,

[PATCH 1/6] powerpc: Use lwarx hint in spinlocks

2010-02-10 Thread Anton Blanchard
Recent versions of the PowerPC architecture added a hint bit to the larx instructions to differentiate between an atomic operation and a lock operation: > 0 Other programs might attempt to modify the word in storage addressed by EA > even if the subsequent Store Conditional succeeds. > > 1 Other

Re: [PATCH v4 1/3] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Wolfgang Grandegger
Stephen Rothwell wrote: > Hi Wolfgang, > > On Wed, 10 Feb 2010 11:09:25 +0100 Wolfgang Grandegger > wrote: >>> __devinitdata goes at the end, immediately before the '='. Ditto >>> throughout the file. >> This made a difference and revealed section mismatches. "const" seems to >> be incompatible

Re: [PATCH v4 1/3] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Stephen Rothwell
Hi Wolfgang, On Wed, 10 Feb 2010 11:09:25 +0100 Wolfgang Grandegger wrote: > > > __devinitdata goes at the end, immediately before the '='. Ditto > > throughout the file. > > This made a difference and revealed section mismatches. "const" seems to > be incompatible with "__devinitdata". Maybe

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-10 Thread Wolfgang Grandegger
Wolfgang Grandegger wrote: > Hi David, > > David Miller wrote: >> From: Anatolij Gustschin >> Date: Tue, 9 Feb 2010 15:23:17 +0100 >> >>> In my understanding, in the ESP scsi driver the set of defines for >>> the register offsets is common for all chip drivers. The chip driver >>> methods for reg

Re: [PATCH v6 2/4] i2c-mpc: rename "setclock" initialization functions to "setup"

2010-02-10 Thread Wolfram Sang
On Wed, Feb 10, 2010 at 11:05:28AM +0100, Wolfgang Grandegger wrote: > From: Wolfgang Grandegger > > To prepare support for the MPC512x processors from Freescale the > "setclock" initialization functions have been renamed to "setup" > because I2C interrupts must be enabled for the MPC512x by thi

Re: [PATCH v4 1/3] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Wolfgang Grandegger
Grant Likely wrote: > On Thu, Jan 28, 2010 at 6:25 AM, Wolfgang Grandegger > wrote: >> From: Wolfgang Grandegger >> >> "__devinit[data]" has not yet been used for all initialization functions >> and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has >> been renamed to "mpc_i2c_

[PATCH v6 0/4] i2c-mpc: add support for the Freescale MPC512x and other fixes

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger This patch series adds support for the MPC512x from Freescale to the i2c-mpc driver. At that occasion, issues with __devinit[data] have been fixed and the doc of the FSL I2C dts bindings updated. It has been tested on a MPC5121ADS, TQM5200 and TQM8560 board Changes sin

[PATCH v6 3/4] i2c-mpc: add support for the MPC512x processors from Freescale

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger As I2C interrupts must be enabled for the MPC512x by the setup function as well, "fsl,preserve-clocking" is handled in a slighly different way. Also, the old settings are now reported calling dev_dbg(). For the MPC512x the clock setup function of the MPC52xx can be re-u

[PATCH v6 1/4] i2c-mpc: use __devinit[data] for initialization functions and data

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger "__devinit[data]" has not yet been used for all initialization functions and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has been renamed to "mpc_i2c_data", which is even the better name. Signed-off-by: Wolfgang Grandegger Tested-by: Wolfram Sang

[PATCH v6 2/4] i2c-mpc: rename "setclock" initialization functions to "setup"

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger To prepare support for the MPC512x processors from Freescale the "setclock" initialization functions have been renamed to "setup" because I2C interrupts must be enabled for the MPC512x by this function as well. Signed-off-by: Wolfgang Grandegger --- drivers/i2c/busse

[PATCH v6 4/4] powerpc: doc/dts-bindings: update doc of FSL I2C bindings

2010-02-10 Thread Wolfgang Grandegger
From: Wolfgang Grandegger This patch adds the MPC5121 to the list of supported devices, enhances the doc of the "clock-frequency" property and removes the obsolete "cell-index", "device_type" and "fsl-i2c" property. Furthermore an example for the MPC5121 has been added. Signed-off-by: Wolfgang G

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-10 Thread Wolfgang Grandegger
Hi David, David Miller wrote: > From: Anatolij Gustschin > Date: Tue, 9 Feb 2010 15:23:17 +0100 > >> In my understanding, in the ESP scsi driver the set of defines for >> the register offsets is common for all chip drivers. The chip driver >> methods for register access translate the offsets bec

[PATCH] powerpc/44x: Update Arches dts

2010-02-10 Thread Stefan Roese
Sync Arches dts with latest Canyonlands version: - Add 16k FIFO size to supported EMAC nodes - Add next-level-cache property - Add Crypto device node Signed-off-by: Stefan Roese Cc: Josh Boyer --- arch/powerpc/boot/dts/arches.dts | 12 1 files changed, 12 insertions(+), 0 deleti

[PATCH] powerpc/44x: Fix L2-cache support for 460GT

2010-02-10 Thread Stefan Roese
Also set L2C_CFG_RDBW on 460GT platforms and not only on 460EX. Signed-off-by: Stefan Roese Cc: Josh Boyer --- arch/powerpc/sysdev/ppc4xx_soc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c index 5b

[PATCH] powerpc/44x: Update Glacier dts

2010-02-10 Thread Stefan Roese
Sync Glacier dts with latest Canyonlands version: - Add l2 cache support - Add NDFC support - Add RTC support - Add AD7414 hwmon support - Change EMAC compatible node from emac4 to emac4sync and correct the register size - Add support for ISA holes on 4xx PCI/X/E (as done in Benjamin Herrensch