LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] powerpc/85xx: Add NOR, LEDs and PIB support for MPC8568E-MDS boards
From: Kumar Gala @ 2010-02-18  3:19 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20100205210626.GA9882@oksana.dev.rtsoft.ru>


On Feb 5, 2010, at 3:06 PM, Anton Vorontsov wrote:

> This patch adds NOR Flash, LEDs and PIB support for MPC8568E-MDS
> boards. Plus, move bcsr node into localbus node, and add bcsr5
> gpio-controller node.
>=20
> Some platform code modifications were also needed.
>=20
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8568mds.dts      |   65 =
+++++++++++++++++++++++++++-
> arch/powerpc/platforms/85xx/mpc85xx_mds.c |    3 +
> 2 files changed, 65 insertions(+), 3 deletions(-)

applied to next

- k=

^ permalink raw reply

* [git pull] Please pull powerpc.git merge branch
From: Kumar Gala @ 2010-02-18  3:21 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Linus Torvalds

Ben,

These are two minor fixes that should go into 2.6.33.

- k

The following changes since commit 724e6d3fe8003c3f60bf404bf22e4e331327c596:
  Linus Torvalds (1):
        Linux 2.6.33-rc8

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git merge

Anton Vorontsov (1):
      powerpc/85xx: Fix oops during MSI driver probe on MPC85xxMDS boards

Peter Tyser (1):
      powerpc/85xx: Fix SMP when "cpu-release-addr" is in lowmem

 arch/powerpc/platforms/85xx/mpc85xx_mds.c |    3 ++-
 arch/powerpc/platforms/85xx/smp.c         |   21 +++++++++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

^ permalink raw reply

* Re: [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2010-02-18  3:24 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Linus Torvalds
In-Reply-To: <Pine.LNX.4.64.1002172120310.13512@localhost.localdomain>

On Wed, 2010-02-17 at 21:21 -0600, Kumar Gala wrote:
> Ben,
> 
> These are two minor fixes that should go into 2.6.33.

It's a bit late for such fixes, but it's your platforms and your call
here so I'll pull and push out to Linus.

Cheers,
Ben.

> - k
> 
> The following changes since commit 724e6d3fe8003c3f60bf404bf22e4e331327c596:
>   Linus Torvalds (1):
>         Linux 2.6.33-rc8
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git merge
> 
> Anton Vorontsov (1):
>       powerpc/85xx: Fix oops during MSI driver probe on MPC85xxMDS boards
> 
> Peter Tyser (1):
>       powerpc/85xx: Fix SMP when "cpu-release-addr" is in lowmem
> 
>  arch/powerpc/platforms/85xx/mpc85xx_mds.c |    3 ++-
>  arch/powerpc/platforms/85xx/smp.c         |   21 +++++++++++++++++++--
>  2 files changed, 21 insertions(+), 3 deletions(-)

^ permalink raw reply

* Re: [git pull] Please pull powerpc.git merge branch
From: Kumar Gala @ 2010-02-18  3:26 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Linus Torvalds
In-Reply-To: <1266463484.16346.382.camel@pasglop>


On Feb 17, 2010, at 9:24 PM, Benjamin Herrenschmidt wrote:

> On Wed, 2010-02-17 at 21:21 -0600, Kumar Gala wrote:
>> Ben,
>>=20
>> These are two minor fixes that should go into 2.6.33.
>=20
> It's a bit late for such fixes, but it's your platforms and your call
> here so I'll pull and push out to Linus.
>=20
> Cheers,
> Ben.

Yeah, I've been swamped with other stuff and haven't found time to push =
them out.  Was also hoping to find another oops that was reported but I =
cant reproduce it.

- k

^ permalink raw reply

* Re: [PATCH] perf_event: e500 support
From: Kumar Gala @ 2010-02-18  3:29 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <4B7349F2.8030802@freescale.com>


On Feb 10, 2010, at 6:06 PM, Scott Wood wrote:

>>> 
>>> --- a/arch/powerpc/kernel/Makefile
>>> +++ b/arch/powerpc/kernel/Makefile
>>> @@ -98,7 +98,10 @@ obj64-$(CONFIG_AUDIT)		+= compat_audit.o
>>>  obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
>>> obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o
>>> -obj-$(CONFIG_PPC_PERF_CTRS)	+= perf_event.o perf_callchain.o
>>> +obj-$(CONFIG_PPC_PERF_CTRS)	+= perf_event.o
>>> +obj-$(CONFIG_FSL_EMB_PERF_EVENT) += perf_event_fsl_emb.o
>>> +obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o
>>> +obj-$(CONFIG_PERF_EVENTS)	+= perf_callchain.o
>> This is because we want perf_callchain.o even if we don't have
>> hardware PMU support, is it?  If so this is a separate fix that
>> deserves its own patch.
> 
> OK.

You going to repost with this broken up into two patches?

- k

^ permalink raw reply

* Re: [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2010-02-18  3:30 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Linus Torvalds
In-Reply-To: <3033DBDF-FFD6-4AA5-ADDF-71FE7E0E04E7@kernel.crashing.org>

On Wed, 2010-02-17 at 21:26 -0600, Kumar Gala wrote:
> On Feb 17, 2010, at 9:24 PM, Benjamin Herrenschmidt wrote:
> 
> > On Wed, 2010-02-17 at 21:21 -0600, Kumar Gala wrote:
> >> Ben,
> >> 
> >> These are two minor fixes that should go into 2.6.33.
> > 
> > It's a bit late for such fixes, but it's your platforms and your call
> > here so I'll pull and push out to Linus.
> > 
> > Cheers,
> > Ben.
> 
> Yeah, I've been swamped with other stuff and haven't found time to push them out. 
> Was also hoping to find another oops that was reported but I cant reproduce it.

Ok, done. Linus, feel free to pull from either Kumar's tree or mine:

The following changes since commit b0483e78e5c4c9871fc5541875b3bc006846d46b:
  Linus Torvalds (1):
        Merge git://git.kernel.org/.../gregkh/tty-2.6

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge

Anton Vorontsov (1):
      powerpc/85xx: Fix oops during MSI driver probe on MPC85xxMDS boards

Peter Tyser (1):
      powerpc/85xx: Fix SMP when "cpu-release-addr" is in lowmem

 arch/powerpc/platforms/85xx/mpc85xx_mds.c |    3 ++-
 arch/powerpc/platforms/85xx/smp.c         |   21 +++++++++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

^ permalink raw reply

* Re: [PATCH] perf_event: e500 support
From: Kumar Gala @ 2010-02-18  3:33 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Scott Wood, linuxppc-dev list
In-Reply-To: <4B7436BC.10406@freescale.com>


On Feb 11, 2010, at 10:56 AM, Scott Wood wrote:

> Paul Mackerras wrote:
>> 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
>>>> something different from getting an interrupt after N events have =
been
>>>> counted?  Or does it mean counting instances where something takes
>>>> longer than a specific number of cycles?
>>> The latter.
>> OK.  I handled that on classic by using some extra high bits in the
>> event config for the threshold value.=20
>=20
> OK.
>=20
>> If you have a single threshold
>> value in hardware but more than one event that uses that threshold
>> value, then you will need to add a constraint that all threshold
>> events have to specify the same threshold.
>=20
> There's a separate threshold for each counter.
>=20
>> So, it sounds like you have a class of events which are the
>> thresholding events, and two constraints:
>> * at most two events in the thresholding event class
>> * at most four events in total
>> Are there other constraints?  Apart from the thresholding events, can
>> any event go on any counter, or can some events only be counted on =
one
>> particular counter?
>=20
> No, those are the only constraints.
>=20
>> If your constraints are just the two listed above (<=3D 2 threshold
>> events, <=3D 4 events total), then doing it the obvious =
straightforward
>> way is fine.  If there are other constraints as well, such as certain
>> events only being available on one specific PMC, then you should
>> consider reusing the constraint checking machinery from ppc64.
>=20
> I'll stick with the straightforward approach then.  If future chips =
have more complicated constraints we can revisit using the more general =
scheme.

Paul,

Other than splitting the patch did you have any other changes you wanted =
to see before we'd get an Ack.  I'd like to see this go in for .34.

- k=

^ permalink raw reply

* [git pull] Please pull powerpc.git next branch
From: Kumar Gala @ 2010-02-18  4:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

The following changes since commit efd0f0f385da6ee6d1a22cfe1ac94607ebe2a292:
  Benjamin Herrenschmidt (1):
        Merge commit 'jwb/next' into next

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git next

Anton Vorontsov (1):
      powerpc/85xx: Add NOR, LEDs and PIB support for MPC8568E-MDS boards

Malcolm Crossley (3):
      powerpc/86xx: Fix GE SBC310 XMC site support
      powerpc/86xx: Add MSI section to GE SBC610 DTS
      powerpc/86xx: Add MSI section to GE PPC9A DTS

Martyn Welch (5):
      powerpc/86xx: Add MSI section to GE SBC310 DTS
      powerpc/86xx: Basic flash support for GE SBC610
      powerpc/86xx: Switch on highmem support on GE SBC610
      powerpc/86xx: Enable VME driver on the GE PPC9A
      powerpc/86xx: Enable VME driver on the GE SBC610

Sebastian Andrzej Siewior (1):
      powerpc/fsl-booke: replace a hardcoded constant

 arch/powerpc/boot/dts/gef_ppc9a.dts            |   16 ++++++
 arch/powerpc/boot/dts/gef_sbc310.dts           |   19 +++++++-
 arch/powerpc/boot/dts/gef_sbc610.dts           |   66 +++++++++++++++++++++---
 arch/powerpc/boot/dts/mpc8568mds.dts           |   65 ++++++++++++++++++++++-
 arch/powerpc/configs/86xx/gef_ppc9a_defconfig  |   47 ++++++++++++++++-
 arch/powerpc/configs/86xx/gef_sbc610_defconfig |   65 +++++++++++++++++++----
 arch/powerpc/kernel/head_fsl_booke.S           |    4 +-
 arch/powerpc/platforms/85xx/mpc85xx_mds.c      |    3 +
 8 files changed, 259 insertions(+), 26 deletions(-)

^ permalink raw reply

* State of PREEMPT_RT in PPC arch
From: Ryan @ 2010-02-18  6:33 UTC (permalink / raw)
  To: ppcdev

Hi,

We have a MPC7448 based board with 2.6.21 ported (ppc arch). We want
to apply the PREEPMT_RT patch to the existing kernel and drivers.
Well, it turns out to be a difficult task since the ppc arch doesn't
seem to support the RT patch very well. Has anyone had a working
2.6.21+ kernel with RT patch for the ppc arch? Is the ppc arch just
dying?

I may have two choices. One is to move to the powerpc arch that is
actively developed and has proven working RT patches from the
community. This will force us to migrate our drivers to a newer kernel
and a new arch, which is certainly not trivial. The other is to back
port an existing and working RT patch to the ppc arch of 2.6.21,
which, at least for now, seems quite difficult and may not be merited
for future.

I'm soliciting comments from the community. Thanks in advance for
sharing your thoughts.

-Ryan.

^ permalink raw reply

* Please pull mpc5xxx support for -next
From: Grant Likely @ 2010-02-18  6:37 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev; +Cc: Ernst Schwab, Anatolij Gustschin

Hi Ben,

Here's all the stuff I've got queued up for 2.6.34.  Mostly mpc5121
support, but some 5200 stuff too.  These commits have already had some
time in linux-next.

Cheers,
g.

The following changes since commit 724e6d3fe8003c3f60bf404bf22e4e331327c596:
  Linus Torvalds (1):
        Linux 2.6.33-rc8

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6.git next

Anatolij Gustschin (10):
      powerpc/mpc5121: avoid using arch_initcall for clock init
      powerpc/mpc5121: Add machine restart support
      rtc: Add MPC5121 Real time clock driver
      powerpc/mpc5121: create and register NFC device
      powerpc/mpc5121: update mpc5121ads DTS
      powerpc/mpc5121: Add default config for MPC5121
      serial: mpc52xx_uart: re-enable mpc5121 PSC UART support
      powerpc: doc/dts-bindings: document mpc5121 psc uart dts-bindings
      powerpc/mpc5121: enable support for more PSC UARTs
      powerpc/mpc5121: correct DIU compatible property

Ernst Schwab (1):
      powerpc/of: added documentation for spi chipselects

 .../powerpc/dts-bindings/fsl/mpc5121-psc.txt       |   70 +
 Documentation/powerpc/dts-bindings/fsl/spi.txt     |    7 +
 arch/powerpc/boot/dts/mpc5121ads.dts               |   55 +-
 arch/powerpc/configs/mpc512x_defconfig             | 1694 ++++++++++++++++++++
 arch/powerpc/include/asm/mpc5121.h                 |   24 +
 arch/powerpc/include/asm/mpc52xx_psc.h             |    4 +
 arch/powerpc/platforms/512x/clock.c                |    6 +-
 arch/powerpc/platforms/512x/mpc5121_ads.c          |    3 +-
 arch/powerpc/platforms/512x/mpc5121_generic.c      |    3 +-
 arch/powerpc/platforms/512x/mpc512x.h              |    3 +
 arch/powerpc/platforms/512x/mpc512x_shared.c       |   43 +
 drivers/rtc/Kconfig                                |   10 +
 drivers/rtc/Makefile                               |    1 +
 drivers/rtc/rtc-mpc5121.c                          |  387 +++++
 drivers/serial/mpc52xx_uart.c                      |  251 +++-
 drivers/video/fsl-diu-fb.c                         |    5 +
 16 files changed, 2522 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/fsl/mpc5121-psc.txt
 create mode 100644 arch/powerpc/configs/mpc512x_defconfig
 create mode 100644 arch/powerpc/include/asm/mpc5121.h
 create mode 100644 drivers/rtc/rtc-mpc5121.c


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* Re: [Patch v2 1/2] 5200/mpc: improve i2c bus error recovery
From: Joakim Tjernlund @ 2010-02-18  8:09 UTC (permalink / raw)
  To: Albrecht Dreß
  Cc: Linux PPC Development, Devicetree Discussions,
	Ben Dooks (embedded platforms), Ira W. Snyder
In-Reply-To: <1266433154.2322.0@antares>

>
> This patch improves the recovery of the MPC's I2C bus from errors lik=
e bus
> hangs resulting in timeouts:
> 1. make the bus timeout configurable, as it depends on the bus clock =
and
>     the attached slave chip(s); default is still 1 second;
> 2. detect any of the cases indicated by the CF, BB and RXAK MSR flags=
 if a
>     timeout occurs, and add a missing (required) MAL reset;
> 3. use a more reliable method to fixup the bus if a hang has been det=
ected.
>     The sequence is sent 9 times which seems to be necessary if a sla=
ve
>     "misses" more than one clock cycle.  For 400 kHz bus speed, the f=
ixup is
>     also ~70us (81us vs. 150us) faster.
>
> Tested on a custom Lite5200b derived board, with a Dallas RTC, AD sen=
sors
> and NXP IO expander chips attached to the i2c.
>
> Changes vs. v1:
> - use improved bus fixup sequence for all chips (not only the 5200)
> - calculate real clock from defaults if no clock is given in the devi=
ce tree
> - better description (I hope) of the changes.
>
> I didn't split the changes in this file into three parts as recommend=
ed by
> Grant, as they actually belong together (i.e. they address one single=

> problem, just in three places of one single source file).
>
> Signed-off-by: Albrecht Dre=DF <albrecht.dress@arcor.de>
>
> ---
>
> Note about the reset sequence: I verified the waveforms for 18.4kHz, =
85.9kHz
> and 375kHz (drop me a note if you want to see scope screen shots).  N=
ot
> verified on other mpc chips yet.
> @Ira: thanks in advance for giving it a try on your box!

Does this reset sequence also send a START condition for every clock?
The ideal I2C reset sequence should look like this:

	for(j =3D 0; j < 9; j++) {
		if(I2C_READ)
			send_start();
		I2C_SCL(0);
		I2C_DELAY;
		I2C_TRISTATE;
		I2C_SDA(1);
		I2C_DELAY;
		I2C_SCL(1);
		I2C_DELAY;
		I2C_DELAY;
	}
	send_stop();

static void send_start(void)
{
	I2C_DELAY;
	I2C_TRISTATE;
	I2C_SDA(1);
	I2C_DELAY;
	I2C_SCL(1);
	I2C_DELAY;
	I2C_SDA(0);
	I2C_ACTIVE;
	I2C_DELAY;
}

static void send_stop(void)
{
	I2C_SCL(0);
	I2C_DELAY;
	I2C_SDA(0);
	I2C_ACTIVE;
	I2C_DELAY;
	I2C_SCL(1);
	I2C_DELAY;
	I2C_TRISTATE;
	I2C_SDA(1);
	I2C_DELAY;
}

 Jocke=

^ permalink raw reply

* Re: [PATCH 1/5] powerpc/head fsl: fix the case where we are not in the first page
From: Sebastian Andrzej Siewior @ 2010-02-18  8:53 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Sebastian Andrzej Siewior
In-Reply-To: <2C4630C6-1537-4653-8F7C-BEE3BB4EDC18@kernel.crashing.org>

* Kumar Gala | 2010-02-17 21:07:49 [-0600]:

>
>On Jan 15, 2010, at 10:41 AM, Sebastian Andrzej Siewior wrote:
>
>> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> 
>> During boot we change the mapping a few times until we have a "defined"
>> mapping. During this procedure a small 4KiB mapping is created and after
>> that one a 64MiB. Currently the offset of the 4KiB page in that we run
>> is zero because the complete startup up code is in first page which
>> starts at RPN zero.
>> If the code is recycled and moved to another location then its execution
>> will fail because the start address in the 64 MiB mapping is computed
>> wrongly. It does not consider the offset to the page from the begin of
>> the memory.
>> This patch fixes this. Usually (system boot) r25 is zero so this does
>> not change anything unless the code is recycled.
>> 
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> ---
>> arch/powerpc/kernel/head_fsl_booke.S |    1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>
>I don't get this.  Why would would we not run at KERNELBASE?
We don't. The ld script makes sure that the entry code is at the begin
of our vmlinux and is linked against offset 0. This makes sure it starts
at RPN 0. If it would be linked against 4096 _or_ we would have other
code in front of us (atleast 4KiB) then the rfi down there would fail
because the code assumes that it was started at 0.
Right now this is basically a nop because the kernel always starts at 0.
This is only required because I grab the same code in kexec /
default_machine_kexec() and run it in a random page which is not RPN 0.

>- k
>
>> diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
>> index 7f4bd7f..799ddbe 100644
>> --- a/arch/powerpc/kernel/head_fsl_booke.S
>> +++ b/arch/powerpc/kernel/head_fsl_booke.S
>> @@ -275,6 +275,7 @@ skpinv:	addi	r6,r6,1				/* Increment */
>> 1:	mflr	r9
>> 	rlwimi	r6,r9,0,20,31
>> 	addi	r6,r6,(2f - 1b)
>> +	add	r6, r6, r25
>> 	mtspr	SPRN_SRR0,r6
>> 	mtspr	SPRN_SRR1,r7
>> 	rfi				/* start execution out of TLB1[0] entry */

Sebastian

^ permalink raw reply

* Re: [PATCH 2/5] powerpc/head fsl: move the temp 4KiB mapping to TLB0
From: Sebastian Andrzej Siewior @ 2010-02-18  9:08 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Sebastian Andrzej Siewior
In-Reply-To: <4714F80D-5102-4C25-BA62-0034D775C63B@kernel.crashing.org>

* Kumar Gala | 2010-02-17 21:09:08 [-0600]:

>
>On Jan 15, 2010, at 10:41 AM, Sebastian Andrzej Siewior wrote:
>
>> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> 
>> Right now the setup code takes ESEL of the current mapping and puts the
>> temporary into ESEL (old_ESEL & 1 ) + 1 which is either one or two.
>> This is actually not required since all slots in TLB0 are invalid by now
>> and can be used.
>> This patch moved the temp mapping to TLB0, ESEL[0]. The invalidation of
>> TLB0 does not care about IPPROT so that part can go as well.
>> The benefit is that now the setup code may set every slot of TLB1 while
>> before that it was not allowed to touch ESEL one or two depending on the
>> old_ESEL.
>> 
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> ---
>> arch/powerpc/kernel/head_fsl_booke.S |   20 +++++---------------
>> 1 files changed, 5 insertions(+), 15 deletions(-)
>
>this is problematic, we can't assume that TLB0 is safe.  It possible some other software is running on a second core and does a broadcast tlbivax which will wipe what's in TLB0.

Ah right SMP. So if CPU0 would wait until CPU1-X are up and kick them
one by one could make it work but is not that pretty.
So let me think of something. I will probably just skip the current
mapping while making new ones for kexec.

>- k

Sebastian

^ permalink raw reply

* Re: [Patch v2 1/2] 5200/mpc: improve i2c bus error recovery
From: Albrecht Dreß @ 2010-02-18  9:09 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linuxppc-dev, devicetree-discuss, ben-linux, iws
In-Reply-To: <OF3D88A7A0.9A4F1639-ONC12576CE.002C0FB9-C12576CE.002CCBBB@transmode.se>


[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]

Hi Joakim:

> Does this reset sequence also send a START condition for every clock?

Please see the attached scan from a scope output, showing the first two out of the 9 sequences at 375 kHz (that's what the 5200's divider makes from 400 kHz requested).  Resolution is 2us/div and 1V/div for both signals.  The waveform itself for each of the 9 sequences is exactly the same we had before with the old solution, just the timing is faster and adjusted to the ii2c clock, i.e. the /relative/ waveforms look identical for slower clocks.

Any insight if this is *really* correct would be great, as I'm not an i2c expert.  I can only say it reliably fixes the bus hangs I saw!

Thanks,
Albrecht.

Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für Sie: der neue Arcor.de-Newsletter!
Jetzt anmelden und einfach alles wissen: http://www.arcor.de/rd/footer.newsletter

[-- Attachment #2: i2c-fixup.png --]
[-- Type: image/png, Size: 17960 bytes --]

^ permalink raw reply

* Re: [PATCH] perf_event: e500 support
From: Paul Mackerras @ 2010-02-18  9:27 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Scott Wood, linuxppc-dev list
In-Reply-To: <2035B8E4-B957-4C66-938E-95C0312DABD3@kernel.crashing.org>

On Wed, Feb 17, 2010 at 09:33:06PM -0600, Kumar Gala wrote:
> Other than splitting the patch did you have any other changes you
> wanted to see before we'd get an Ack.  I'd like to see this go in
> for .34.

I thought it was a bit ugly having two different definitions of struct
power_pmu in perf_event.h with ifdefs.  Either give the two structs
different names or put them in different files.  That plus the
splitting out of the perf_callchain patch were my two main concerns.

Paul.

^ permalink raw reply

* Reading command line args from assmebly
From: Anand Android @ 2010-02-18 11:15 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 1544 bytes --]

Hi All,
I have written one sample assmebly and c code which reads command line args
and displays .

find the source files as attachments.

expected output is ,
        $ ./a.out
           Inside __linker_init argc = 1
           Inside __linker_init argv[0] = ./a.out
           Segmentation fault [Seg fault Never mind]

if i statically link startx86.S  & linker.c  on x86 AND statrt_ppc.S &
linker.c on PS3,i'll get SEGV fault on both system. But on PS3, inside
'_start' function if i verify the contents of 'r1[stack pointer]' and '(Char
*) *(r1 + 4)'  in GDB i get '1' and '~/a.out' respectively .But once 'r1'
moved to r3[holds the 1st arg of the function] & passed as argument to
__linker_init ,inside the function '*elfdata' points '1' but (char *)
*(elfdata + 1) points to some junk string. some thing like this
"|c\033x|i\003�N\200\004 \224!��|\b\002�\220\001".
find the GDB log file of PS3.

if i link them without statically,i'll get the correct output on x86 .i.e

        $ ./a.out
           Inside __linker_init argc = 1
           Inside __linker_init argv[0] = ./a.out
           Segmentation fault [Seg fault Never mind]

but  on ps3 i get this,
        $ ./a.out
           Inside __linker_init argc = 0
           Inside __linker_init argv[0] = |c|i�N� �!����
           Segmentation fault
Why am i getting strange characters instead of './a.out' and y 'argc' having
'zero'  ?

Why is this two different outputs for static linking and dynamic linking ?

-Anand

[-- Attachment #1.2: Type: text/html, Size: 1915 bytes --]

[-- Attachment #2: gdb.txt --]
[-- Type: text/plain, Size: 2129 bytes --]

This GDB was configured as "powerpc-linux-gnu"...                            
(gdb) b _start
Breakpoint 1 at 0x100000e4: file start.S, line 35.
(gdb) r                                           
Starting program: /home/dayananda/junks/power/a.out

Breakpoint 1, _start () at start.S:37
37              bl      __linker_init
Current language:  auto; currently asm
(gdb) s                               
__linker_init (elfdata=0x0) at linker.c:5
5        {                               
Current language:  auto; currently c     
(gdb) i r
r0             0x0      0
r1             0xff9a1820       4288288800
r2             0x0      0
r3             0xff9a1820       4288288800
r4             0x0      0
r5             0x0      0
r6             0x0      0
r7             0x0      0
r8             0x0      0
r9             0x0      0
r10            0x0      0
r11            0x0      0
r12            0x0      0
r13            0x0      0
r14            0x0      0
r15            0x0      0
r16            0x0      0
r17            0x0      0
r18            0x0      0
r19            0x0      0
r20            0x0      0
r21            0x0      0
r22            0x0      0
r23            0x0      0
r24            0x0      0
r25            0x0      0
r26            0x0      0
r27            0x0      0
r28            0x0      0
r29            0x0      0
r30            0x0      0
r31            0x0      0
pc             0x100000f4       268435700
msr            0x4010c032       1074839602
cr             0x0      0
lr             0x100000e8       268435688
ctr            0x0      0
xer            0x0      0
(gdb) p *(0xff9a1820)
$1 = 1
(gdb) p *(0xff9a1820+4)
$2 = -6678169
(gdb) p (char *)*(0xff9a1820+4)
$3 = 0xff9a1967 "/home/dayananda/junks/power/a.out"
(gdb) s
7               int argc = (int) *elfdata;
(gdb) s
8               char **argv = (char**) (elfdata + 1);
(gdb) p elfdata
$4 = (unsigned int **) 0xff9a1820
(gdb) p *elfdata
$5 = (unsigned int *) 0x1
(gdb) p *(elfdata + 1)
$6 = (unsigned int *) 0x100000e8
(gdb) p (char *)*(elfdata + 1)
$7 = 0x100000e8 "|c\033x|i\003�N\200\004 \224!��|\b\002�\220\001"



[-- Attachment #3: linker.c --]
[-- Type: application/octet-stream, Size: 278 bytes --]


#include<stdio.h>


unsigned __linker_init(unsigned **elfdata)
 {
 
	int argc = (int) *elfdata;
	char **argv = (char**) (elfdata + 1);

	printf("Inside __linker_init argc = %d\n", argc );	
	printf("Inside __linker_init argv[0] = %s\n", argv[0]);

	return 0;
}


[-- Attachment #4: start_ppc.S --]
[-- Type: application/octet-stream, Size: 1745 bytes --]

/*
 * Copyright (C) 2008 The Android Open Source Project
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

	.text
	.align 4
	.type _start,@function
	.globl _start

_start:
	mr	3,1
	bl	__linker_init

	/* linker init returns the _entry address in the main image */
/* 	return value will be in r3,*/
	mr 3,3
	mtctr	3
	bctr			/*branch the address stored in the r3 i.e count register*/ 

	.section .ctors, "wa"
	.globl __CTOR_LIST__
__CTOR_LIST__:
	.long -1

[-- Attachment #5: start_x86.S --]
[-- Type: application/octet-stream, Size: 556 bytes --]


  .text
  .align 4
  .type _start, @function
  .globl _start
  
  _start:
          /* save the elfdata ptr to %eax, AND push it onto the stack */
          mov    %esp, %eax
          pushl  %esp
  
          pushl  %eax
          call   __linker_init
  
          /* linker init returns (%eax) the _entry address in the main image */
          /* entry point expects sp to point to elfdata */
          popl   %esp
          jmp    *%eax
  
  .section .ctors, "wa"
  .globl __CTOR_LIST__
  
  __CTOR_LIST__:
          .long -1


^ permalink raw reply

* [patch 00/15] powerpc: raw_spinlock conversions
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev

Ben,

the following patch series is from preempt-rt. It converts the locks
which need to be real spinlocks in -rt to raw_spinlocks.

There is no behaviourial change for !RT kernels because spinlocks and
raw_spinlocks are the same on !RT. So for mainline this is a pure
annotation while having it in mainline takes the burden of keeping up
with the code changes from the RT patch set.

Please consider to merge into .34.

Thanks,

	tglx

^ permalink raw reply

* [patch 06/15] powerpc: Convert tlbivax_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

tlbivax_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/mm/tlb_nohash.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6-tip/arch/powerpc/mm/tlb_nohash.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/mm/tlb_nohash.c
+++ linux-2.6-tip/arch/powerpc/mm/tlb_nohash.c
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(local_flush_tlb_page);
  */
 #ifdef CONFIG_SMP
 
-static DEFINE_SPINLOCK(tlbivax_lock);
+static DEFINE_RAW_SPINLOCK(tlbivax_lock);
 
 static int mm_is_core_local(struct mm_struct *mm)
 {
@@ -232,10 +232,10 @@ void __flush_tlb_page(struct mm_struct *
 		if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
 			int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL);
 			if (lock)
-				spin_lock(&tlbivax_lock);
+				raw_spin_lock(&tlbivax_lock);
 			_tlbivax_bcast(vmaddr, pid, tsize, ind);
 			if (lock)
-				spin_unlock(&tlbivax_lock);
+				raw_spin_unlock(&tlbivax_lock);
 			goto bail;
 		} else {
 			struct tlb_flush_param p = {

^ permalink raw reply

* [patch 03/15] powerpc: Convert die.lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

die.lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/kernel/traps.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6-tip/arch/powerpc/kernel/traps.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/traps.c
+++ linux-2.6-tip/arch/powerpc/kernel/traps.c
@@ -102,11 +102,11 @@ static inline void pmac_backlight_unblan
 int die(const char *str, struct pt_regs *regs, long err)
 {
 	static struct {
-		spinlock_t lock;
+		raw_spinlock_t lock;
 		u32 lock_owner;
 		int lock_owner_depth;
 	} die = {
-		.lock =			__SPIN_LOCK_UNLOCKED(die.lock),
+		.lock =			__RAW_SPIN_LOCK_UNLOCKED(die.lock),
 		.lock_owner =		-1,
 		.lock_owner_depth =	0
 	};
@@ -120,7 +120,7 @@ int die(const char *str, struct pt_regs 
 
 	if (die.lock_owner != raw_smp_processor_id()) {
 		console_verbose();
-		spin_lock_irqsave(&die.lock, flags);
+		raw_spin_lock_irqsave(&die.lock, flags);
 		die.lock_owner = smp_processor_id();
 		die.lock_owner_depth = 0;
 		bust_spinlocks(1);
@@ -155,7 +155,7 @@ int die(const char *str, struct pt_regs 
 	bust_spinlocks(0);
 	die.lock_owner = -1;
 	add_taint(TAINT_DIE);
-	spin_unlock_irqrestore(&die.lock, flags);
+	raw_spin_unlock_irqrestore(&die.lock, flags);
 
 	if (kexec_should_crash(current) ||
 		kexec_sr_activated(smp_processor_id()))

^ permalink raw reply

* [patch 02/15] powerpc: Convert pmc_owner_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

pmc_owner_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/kernel/pmc.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6-tip/arch/powerpc/kernel/pmc.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/pmc.c
+++ linux-2.6-tip/arch/powerpc/kernel/pmc.c
@@ -37,7 +37,7 @@ static void dummy_perf(struct pt_regs *r
 }
 
 
-static DEFINE_SPINLOCK(pmc_owner_lock);
+static DEFINE_RAW_SPINLOCK(pmc_owner_lock);
 static void *pmc_owner_caller; /* mostly for debugging */
 perf_irq_t perf_irq = dummy_perf;
 
@@ -45,7 +45,7 @@ int reserve_pmc_hardware(perf_irq_t new_
 {
 	int err = 0;
 
-	spin_lock(&pmc_owner_lock);
+	raw_spin_lock(&pmc_owner_lock);
 
 	if (pmc_owner_caller) {
 		printk(KERN_WARNING "reserve_pmc_hardware: "
@@ -59,21 +59,21 @@ int reserve_pmc_hardware(perf_irq_t new_
 	perf_irq = new_perf_irq ? new_perf_irq : dummy_perf;
 
  out:
-	spin_unlock(&pmc_owner_lock);
+	raw_spin_unlock(&pmc_owner_lock);
 	return err;
 }
 EXPORT_SYMBOL_GPL(reserve_pmc_hardware);
 
 void release_pmc_hardware(void)
 {
-	spin_lock(&pmc_owner_lock);
+	raw_spin_lock(&pmc_owner_lock);
 
 	WARN_ON(! pmc_owner_caller);
 
 	pmc_owner_caller = NULL;
 	perf_irq = dummy_perf;
 
-	spin_unlock(&pmc_owner_lock);
+	raw_spin_unlock(&pmc_owner_lock);
 }
 EXPORT_SYMBOL_GPL(release_pmc_hardware);
 

^ permalink raw reply

* [patch 10/15] powerpc: Convert nv_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

nv_lock needs to be a real spinlock in RT. Convert it to raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/platforms/powermac/nvram.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6-tip/arch/powerpc/platforms/powermac/nvram.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/powermac/nvram.c
+++ linux-2.6-tip/arch/powerpc/platforms/powermac/nvram.c
@@ -80,7 +80,7 @@ static int is_core_99;
 static int core99_bank = 0;
 static int nvram_partitions[3];
 // XXX Turn that into a sem
-static DEFINE_SPINLOCK(nv_lock);
+static DEFINE_RAW_SPINLOCK(nv_lock);
 
 static int (*core99_write_bank)(int bank, u8* datas);
 static int (*core99_erase_bank)(int bank);
@@ -165,10 +165,10 @@ static unsigned char indirect_nvram_read
 	unsigned char val;
 	unsigned long flags;
 
-	spin_lock_irqsave(&nv_lock, flags);
+	raw_spin_lock_irqsave(&nv_lock, flags);
 	out_8(nvram_addr, addr >> 5);
 	val = in_8(&nvram_data[(addr & 0x1f) << 4]);
-	spin_unlock_irqrestore(&nv_lock, flags);
+	raw_spin_unlock_irqrestore(&nv_lock, flags);
 
 	return val;
 }
@@ -177,10 +177,10 @@ static void indirect_nvram_write_byte(in
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(&nv_lock, flags);
+	raw_spin_lock_irqsave(&nv_lock, flags);
 	out_8(nvram_addr, addr >> 5);
 	out_8(&nvram_data[(addr & 0x1f) << 4], val);
-	spin_unlock_irqrestore(&nv_lock, flags);
+	raw_spin_unlock_irqrestore(&nv_lock, flags);
 }
 
 
@@ -481,7 +481,7 @@ static void core99_nvram_sync(void)
 	if (!is_core_99 || !nvram_data || !nvram_image)
 		return;
 
-	spin_lock_irqsave(&nv_lock, flags);
+	raw_spin_lock_irqsave(&nv_lock, flags);
 	if (!memcmp(nvram_image, (u8*)nvram_data + core99_bank*NVRAM_SIZE,
 		NVRAM_SIZE))
 		goto bail;
@@ -503,7 +503,7 @@ static void core99_nvram_sync(void)
 		if (core99_write_bank(core99_bank, nvram_image))
 			printk("nvram: Error writing bank %d\n", core99_bank);
  bail:
-	spin_unlock_irqrestore(&nv_lock, flags);
+	raw_spin_unlock_irqrestore(&nv_lock, flags);
 
 #ifdef DEBUG
        	mdelay(2000);

^ permalink raw reply

* [patch 05/15] powerpc: Convert context_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

context_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/mm/mmu_context_nohash.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6-tip/arch/powerpc/mm/mmu_context_nohash.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/mm/mmu_context_nohash.c
+++ linux-2.6-tip/arch/powerpc/mm/mmu_context_nohash.c
@@ -56,7 +56,7 @@ static unsigned int next_context, nr_fre
 static unsigned long *context_map;
 static unsigned long *stale_map[NR_CPUS];
 static struct mm_struct **context_mm;
-static DEFINE_SPINLOCK(context_lock);
+static DEFINE_RAW_SPINLOCK(context_lock);
 
 #define CTX_MAP_SIZE	\
 	(sizeof(unsigned long) * (last_context / BITS_PER_LONG + 1))
@@ -121,9 +121,9 @@ static unsigned int steal_context_smp(un
 	/* This will happen if you have more CPUs than available contexts,
 	 * all we can do here is wait a bit and try again
 	 */
-	spin_unlock(&context_lock);
+	raw_spin_unlock(&context_lock);
 	cpu_relax();
-	spin_lock(&context_lock);
+	raw_spin_lock(&context_lock);
 
 	/* This will cause the caller to try again */
 	return MMU_NO_CONTEXT;
@@ -194,7 +194,7 @@ void switch_mmu_context(struct mm_struct
 	unsigned long *map;
 
 	/* No lockless fast path .. yet */
-	spin_lock(&context_lock);
+	raw_spin_lock(&context_lock);
 
 	pr_hard("[%d] activating context for mm @%p, active=%d, id=%d",
 		cpu, next, next->context.active, next->context.id);
@@ -278,7 +278,7 @@ void switch_mmu_context(struct mm_struct
 	/* Flick the MMU and release lock */
 	pr_hardcont(" -> %d\n", id);
 	set_context(id, next->pgd);
-	spin_unlock(&context_lock);
+	raw_spin_unlock(&context_lock);
 }
 
 /*
@@ -307,7 +307,7 @@ void destroy_context(struct mm_struct *m
 
 	WARN_ON(mm->context.active != 0);
 
-	spin_lock_irqsave(&context_lock, flags);
+	raw_spin_lock_irqsave(&context_lock, flags);
 	id = mm->context.id;
 	if (id != MMU_NO_CONTEXT) {
 		__clear_bit(id, context_map);
@@ -318,7 +318,7 @@ void destroy_context(struct mm_struct *m
 		context_mm[id] = NULL;
 		nr_free_contexts++;
 	}
-	spin_unlock_irqrestore(&context_lock, flags);
+	raw_spin_unlock_irqrestore(&context_lock, flags);
 }
 
 #ifdef CONFIG_SMP

^ permalink raw reply

* [patch 04/15] powerpc: Convert native_tlbie_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

native_tlbie_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/mm/hash_native_64.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6-tip/arch/powerpc/mm/hash_native_64.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/mm/hash_native_64.c
+++ linux-2.6-tip/arch/powerpc/mm/hash_native_64.c
@@ -37,7 +37,7 @@
 
 #define HPTE_LOCK_BIT 3
 
-static DEFINE_SPINLOCK(native_tlbie_lock);
+static DEFINE_RAW_SPINLOCK(native_tlbie_lock);
 
 static inline void __tlbie(unsigned long va, int psize, int ssize)
 {
@@ -104,7 +104,7 @@ static inline void tlbie(unsigned long v
 	if (use_local)
 		use_local = mmu_psize_defs[psize].tlbiel;
 	if (lock_tlbie && !use_local)
-		spin_lock(&native_tlbie_lock);
+		raw_spin_lock(&native_tlbie_lock);
 	asm volatile("ptesync": : :"memory");
 	if (use_local) {
 		__tlbiel(va, psize, ssize);
@@ -114,7 +114,7 @@ static inline void tlbie(unsigned long v
 		asm volatile("eieio; tlbsync; ptesync": : :"memory");
 	}
 	if (lock_tlbie && !use_local)
-		spin_unlock(&native_tlbie_lock);
+		raw_spin_unlock(&native_tlbie_lock);
 }
 
 static inline void native_lock_hpte(struct hash_pte *hptep)
@@ -434,7 +434,7 @@ static void native_hpte_clear(void)
 	/* we take the tlbie lock and hold it.  Some hardware will
 	 * deadlock if we try to tlbie from two processors at once.
 	 */
-	spin_lock(&native_tlbie_lock);
+	raw_spin_lock(&native_tlbie_lock);
 
 	slots = pteg_count * HPTES_PER_GROUP;
 
@@ -458,7 +458,7 @@ static void native_hpte_clear(void)
 	}
 
 	asm volatile("eieio; tlbsync; ptesync":::"memory");
-	spin_unlock(&native_tlbie_lock);
+	raw_spin_unlock(&native_tlbie_lock);
 	local_irq_restore(flags);
 }
 
@@ -521,7 +521,7 @@ static void native_flush_hash_range(unsi
 		int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE);
 
 		if (lock_tlbie)
-			spin_lock(&native_tlbie_lock);
+			raw_spin_lock(&native_tlbie_lock);
 
 		asm volatile("ptesync":::"memory");
 		for (i = 0; i < number; i++) {
@@ -536,7 +536,7 @@ static void native_flush_hash_range(unsi
 		asm volatile("eieio; tlbsync; ptesync":::"memory");
 
 		if (lock_tlbie)
-			spin_unlock(&native_tlbie_lock);
+			raw_spin_unlock(&native_tlbie_lock);
 	}
 
 	local_irq_restore(flags);

^ permalink raw reply

* [patch 08/15] powerpc: Convert beatic_irq_mask_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:22 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

beatic_irq_mask_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/platforms/cell/beat_interrupt.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Index: linux-2.6-tip/arch/powerpc/platforms/cell/beat_interrupt.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/cell/beat_interrupt.c
+++ linux-2.6-tip/arch/powerpc/platforms/cell/beat_interrupt.c
@@ -30,7 +30,7 @@
 #include "beat_wrapper.h"
 
 #define	MAX_IRQS	NR_IRQS
-static DEFINE_SPINLOCK(beatic_irq_mask_lock);
+static DEFINE_RAW_SPINLOCK(beatic_irq_mask_lock);
 static uint64_t	beatic_irq_mask_enable[(MAX_IRQS+255)/64];
 static uint64_t	beatic_irq_mask_ack[(MAX_IRQS+255)/64];
 
@@ -65,30 +65,30 @@ static void beatic_mask_irq(unsigned int
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(&beatic_irq_mask_lock, flags);
+	raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
 	beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
 	beatic_update_irq_mask(irq_plug);
-	spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
+	raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
 }
 
 static void beatic_unmask_irq(unsigned int irq_plug)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(&beatic_irq_mask_lock, flags);
+	raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
 	beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
 	beatic_update_irq_mask(irq_plug);
-	spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
+	raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
 }
 
 static void beatic_ack_irq(unsigned int irq_plug)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(&beatic_irq_mask_lock, flags);
+	raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
 	beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
 	beatic_update_irq_mask(irq_plug);
-	spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
+	raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
 }
 
 static void beatic_end_irq(unsigned int irq_plug)
@@ -103,10 +103,10 @@ static void beatic_end_irq(unsigned int 
 
 		printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug);
 	}
-	spin_lock_irqsave(&beatic_irq_mask_lock, flags);
+	raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
 	beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
 	beatic_update_irq_mask(irq_plug);
-	spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
+	raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
 }
 
 static struct irq_chip beatic_pic = {

^ permalink raw reply

* [patch 12/15] powerpc: Convert confirm_error_lock to raw_spinlock
From: Thomas Gleixner @ 2010-02-18 12:23 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100218121904.620984825@linutronix.de>

confirm_error_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/platforms/pseries/eeh.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6-tip/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/pseries/eeh.c
+++ linux-2.6-tip/arch/powerpc/platforms/pseries/eeh.c
@@ -100,7 +100,7 @@ int eeh_subsystem_enabled;
 EXPORT_SYMBOL(eeh_subsystem_enabled);
 
 /* Lock to avoid races due to multiple reports of an error */
-static DEFINE_SPINLOCK(confirm_error_lock);
+static DEFINE_RAW_SPINLOCK(confirm_error_lock);
 
 /* Buffer for reporting slot-error-detail rtas calls. Its here
  * in BSS, and not dynamically alloced, so that it ends up in
@@ -436,7 +436,7 @@ static void __eeh_clear_slot(struct devi
 void eeh_clear_slot (struct device_node *dn, int mode_flag)
 {
 	unsigned long flags;
-	spin_lock_irqsave(&confirm_error_lock, flags);
+	raw_spin_lock_irqsave(&confirm_error_lock, flags);
 	
 	dn = find_device_pe (dn);
 	
@@ -447,7 +447,7 @@ void eeh_clear_slot (struct device_node 
 	PCI_DN(dn)->eeh_mode &= ~mode_flag;
 	PCI_DN(dn)->eeh_check_count = 0;
 	__eeh_clear_slot(dn, mode_flag);
-	spin_unlock_irqrestore(&confirm_error_lock, flags);
+	raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
 }
 
 /**
@@ -506,7 +506,7 @@ int eeh_dn_check_failure(struct device_n
 	 * in one slot might report errors simultaneously, and we
 	 * only want one error recovery routine running.
 	 */
-	spin_lock_irqsave(&confirm_error_lock, flags);
+	raw_spin_lock_irqsave(&confirm_error_lock, flags);
 	rc = 1;
 	if (pdn->eeh_mode & EEH_MODE_ISOLATED) {
 		pdn->eeh_check_count ++;
@@ -575,7 +575,7 @@ int eeh_dn_check_failure(struct device_n
 	 * with other functions on this device, and functions under
 	 * bridges. */
 	eeh_mark_slot (dn, EEH_MODE_ISOLATED);
-	spin_unlock_irqrestore(&confirm_error_lock, flags);
+	raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
 
 	eeh_send_failure_event (dn, dev);
 
@@ -586,7 +586,7 @@ int eeh_dn_check_failure(struct device_n
 	return 1;
 
 dn_unlock:
-	spin_unlock_irqrestore(&confirm_error_lock, flags);
+	raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
 	return rc;
 }
 
@@ -1064,7 +1064,7 @@ void __init eeh_init(void)
 	struct device_node *phb, *np;
 	struct eeh_early_enable_info info;
 
-	spin_lock_init(&confirm_error_lock);
+	raw_spin_lock_init(&confirm_error_lock);
 	spin_lock_init(&slot_errbuf_lock);
 
 	np = of_find_node_by_path("/rtas");

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox