LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Problem with OF interrupt parsing code
From: Benjamin Herrenschmidt @ 2007-10-01 21:36 UTC (permalink / raw)
  To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <20071001210025.314240@gmx.net>


On Mon, 2007-10-01 at 23:00 +0200, Gerhard Pircher wrote:
> Hi,
> 
> I think I found an issue in the OF interrupt parsing code, although I
> have to admit that my device tree source doesn't really follow the
> specification.
> 
> First some information about my target setup. I didn't specify an
> interrupt-map and interrupt-map-mask property in the pci node, because
> AFAIK there are three different AmigaOne models with different IRQ
> routing. Secondly the AmigaOne is a desktop system with 4 PCI/AGP slots,
> thus I can't specify device nodes for all possible devices. By looking at
> pci_read_irq_line() in pci_common.c it should be possible for the kernel
> to fall back to the interrupt settings in the PCI config space of every
> device.

That's deprecated and only support for legacy stuff that predates the
current device-tree support & old/crappy firmware.

You should be able to generate the appropriate interrupt-map from your
loader or wrapper to provide the routing for your slots. It should be
easy enough to have 3 static arrays in your wrapper and use the right
one to "set" the property value.

> Unfortunately I couldn't capture the kernel log, because the serial
> console is not yet working, so here comes a description of what I think
> is going on.
> Well, pci_read_irq_line() starts with PCI device 00:00.0 (PCI host bridge)
> and invokes of_irq_map_pci() in prom_parse.c. It find the predefined
> device node in the device tree. Since of_irq_map_one() can't find an
> interrupt property in the device node, it returns to pci_read_irq_line()
> and setups the interrupt mapping based on the settings in the PCI config
> space. So far so good.
> The problem occurs now, if there is no device node defined for another
> PCI device. In this case, of_irq_map_pci() checks for an interrupt pin,
> searches again for the host bridge node and calls of_irq_map_raw() with
> the device node of the host bridge. The function finds the
> #interrupt-cells, #address-cells, interrupt-controller properties, but
> fails to find the interrupt-map property (because it's missing in the
> device tree). Therefore the function then tries to find a new parent,
> which leads to an endless loop (it always selects the PCI2ISA southbridge
> in the device tree).
> 
> Can somebody confirm my explanation? It would help, if the kernel could
> fall back to the PCI settings in this case, too.

I'm not sure what you are trying to explain above... It looks like your
tree layout is somewhat broken though I think I see how... 

One option would be to make the PCI specific IRQ parsing stop & fail if
the host bridge doesn't provide a map instead of following up an
interrupt-parent link (which is I think what you have in there).

But I don't like that. Just fixup your maps properly and everything
should work just fine.

Ben.

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Scott Wood @ 2007-10-01 21:37 UTC (permalink / raw)
  To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <470165F6.7030505@freescale.com>

Scott Wood wrote:
>> The problem occurs now, if there is no device node defined for another
>> PCI device. In this case, of_irq_map_pci() checks for an interrupt pin,
>> searches again for the host bridge node and calls of_irq_map_raw() with
>> the device node of the host bridge. The function finds the
>> #interrupt-cells, #address-cells, interrupt-controller properties, but
>> fails to find the interrupt-map property (because it's missing in the
>> device tree). Therefore the function then tries to find a new parent,
>> which leads to an endless loop (it always selects the PCI2ISA southbridge
>> in the device tree).
> 
> That seems likely... there should probably be some loop detection.

Actually, it doesn't -- it should stop when it sees the 
interrupt-controller property in the i8259 node, at which point it'll be 
trying to use the raw PCI IRQ pin number as an i8259 IRQ.  This is 
Unlikely To Work(tm).

-Scott

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Benjamin Herrenschmidt @ 2007-10-01 21:39 UTC (permalink / raw)
  To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <20071001211120.156280@gmx.net>


On Mon, 2007-10-01 at 23:11 +0200, Gerhard Pircher wrote:
>         pci@80000000 {
>                 device_type = "pci";
>                 compatible = "mai-logic,articia-s";
>                 bus-frequency = <01fca055>;             // 33.3MHz
>                 bus-range = <0 ff>;
>                 ranges = <01000000 0 00000000 fe000000 0
> 00c00000       // PCI I/O
>                           02000000 0 80000000 80000000 0
> 7d000000       // PCI memory
>                           02000000 0 fd000000 fd000000 0
> 01000000>;     // PCI alias memory
>                 8259-interrupt-acknowledge = <fef00000>;
>                 interrupt-parent = <&i8259>;
>                 #interrupt-cells = <1>;
>                 #address-cells = <3>;
>                 #size-cells = <2>;
> 

Part of your problem is that interrupt-parent property. You shouldn't
have such a property in a PCI host bridge. It's not technically illegal,
but it's triggering the "loop" you've been experiencing.

If you want the parsing to fail for PCI devices (to get the fallback to
config space values), you need to make sure it does fail. 

Another option is to put an empty interrupt-map in there. That will
guarantee failure.

But that's all very ugly. I don't understand why you don't setup a
proper map either from your bootloader, zImage wrapper or even prom_init
or platform code.

Ben.

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Benjamin Herrenschmidt @ 2007-10-01 21:43 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <470168B4.7090005@freescale.com>


On Mon, 2007-10-01 at 16:37 -0500, Scott Wood wrote:
> Scott Wood wrote:
> >> The problem occurs now, if there is no device node defined for another
> >> PCI device. In this case, of_irq_map_pci() checks for an interrupt pin,
> >> searches again for the host bridge node and calls of_irq_map_raw() with
> >> the device node of the host bridge. The function finds the
> >> #interrupt-cells, #address-cells, interrupt-controller properties, but
> >> fails to find the interrupt-map property (because it's missing in the
> >> device tree). Therefore the function then tries to find a new parent,
> >> which leads to an endless loop (it always selects the PCI2ISA southbridge
> >> in the device tree).
> > 
> > That seems likely... there should probably be some loop detection.
> 
> Actually, it doesn't -- it should stop when it sees the 
> interrupt-controller property in the i8259 node, at which point it'll be 
> trying to use the raw PCI IRQ pin number as an i8259 IRQ.  This is 
> Unlikely To Work(tm).

It will work in the specific 8259 case I suppose since it gets the
legacy 1:1 mapping... but it sucks :-)

Ben.

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Scott Wood @ 2007-10-01 21:48 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <1191274981.6310.19.camel@pasglop>

Benjamin Herrenschmidt wrote:
> On Mon, 2007-10-01 at 16:37 -0500, Scott Wood wrote:
>> Scott Wood wrote:
>> Actually, it doesn't -- it should stop when it sees the 
>> interrupt-controller property in the i8259 node, at which point it'll be 
>> trying to use the raw PCI IRQ pin number as an i8259 IRQ.  This is 
>> Unlikely To Work(tm).
> 
> It will work in the specific 8259 case I suppose since it gets the
> legacy 1:1 mapping... but it sucks :-)

The mapping between INTA-D and i8259 numbers isn't generally 1:1, and it 
looked as if it'd try using the former... though the code is 
sufficiently complicated that I could easily be missing something.

-Scott

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Benjamin Herrenschmidt @ 2007-10-01 22:07 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <47016B11.3070609@freescale.com>


On Mon, 2007-10-01 at 16:48 -0500, Scott Wood wrote:
> Benjamin Herrenschmidt wrote:
> > On Mon, 2007-10-01 at 16:37 -0500, Scott Wood wrote:
> >> Scott Wood wrote:
> >> Actually, it doesn't -- it should stop when it sees the 
> >> interrupt-controller property in the i8259 node, at which point it'll be 
> >> trying to use the raw PCI IRQ pin number as an i8259 IRQ.  This is 
> >> Unlikely To Work(tm).
> > 
> > It will work in the specific 8259 case I suppose since it gets the
> > legacy 1:1 mapping... but it sucks :-)
> 
> The mapping between INTA-D and i8259 numbers isn't generally 1:1, and it 
> looked as if it'd try using the former... though the code is 
> sufficiently complicated that I could easily be missing something.

If the whole of_* thing totally fails, pci_read_irq_line should pickup
the value in the config space PCI_INTERRUPT_LINE. That will work on
things like Pegasos and possibly on this AmigaOne but it sucks.

Ben.

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Segher Boessenkool @ 2007-10-01 22:33 UTC (permalink / raw)
  To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <20071001211120.156280@gmx.net>

> 		  	i8259: interrupt-controller@20 {
> 				device_type = "interrupt-controller";
> 				compatible = "pnpPNP,000";
> 				interrupt-controller;
> 				reg = <00000001 00000020 00000002
> 				       00000001 000000a0 00000002
> 				       00000001 000004d0 00000002>;
> 				reserved-interrupts = <2>;
> 			};

This is an interrupt controller (it has an "interrupt-controller"
property, and it has no interrupt parent (there is no "interrupt-parent"
property, for interrupt controllers you do not follow the "normal" tree
parent), so it is the root interrupt controller and there is no loop.

It seems from your description that the Linux code is using the tree
parent as interrupt parent even for interrupt controller nodes.  This
is wrong behaviour.


Segher

^ permalink raw reply

* Re: [PATCH 2/2]: PCI Error Recovery: Symbios SCSI First Failure
From: Linas Vepstas @ 2007-10-01 22:41 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linuxppc-dev, linux-pci, linux-kernel, linux-scsi
In-Reply-To: <20071001201247.GN12049@parisc-linux.org>

On Mon, Oct 01, 2007 at 02:12:47PM -0600, Matthew Wilcox wrote:
> 
> I think the fundamental problem is that completions aren't really
> supposed to be used like this.  Here's one attempt at using completions
> perhaps a little more the way they're supposed to be used, 

Yes, that looks very good to me.  I see it solves a bug that
I hadn't been quite aware of. I don't understand why 
struct host_data is preferable to struct sym_shcb (is it because 
this is the structure that is "naturally protectected" by the 
spinlock?)

My gut instinct is to say "ack", although prudence dictates that 
I should test first. Which might take a few days...

> although now
> I've written it, I wonder if we shouldn't just use a waitqueue instead.

I thought that earlier versions of the driver used waitqueues (I vaguely
remember "eh_wait" in the code), which were later converted to 
completions (I also vaguely recall thinking that the new code was
more elegant/simpler). I converted my patch to use the completions 
likewise, and, as you've clearly shown, did a rather sloppy job in 
the conversion.

I'm tempted to go with this patch; but if you prod, I could attempt
a wait-queue based patch.

--linas

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Benjamin Herrenschmidt @ 2007-10-01 22:54 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev
In-Reply-To: <d3eb2341d21ed1f9f7e71f097878731f@kernel.crashing.org>


On Tue, 2007-10-02 at 00:33 +0200, Segher Boessenkool wrote:
> > 		  	i8259: interrupt-controller@20 {
> > 				device_type = "interrupt-controller";
> > 				compatible = "pnpPNP,000";
> > 				interrupt-controller;
> > 				reg = <00000001 00000020 00000002
> > 				       00000001 000000a0 00000002
> > 				       00000001 000004d0 00000002>;
> > 				reserved-interrupts = <2>;
> > 			};
> 
> This is an interrupt controller (it has an "interrupt-controller"
> property, and it has no interrupt parent (there is no "interrupt-parent"
> property, for interrupt controllers you do not follow the "normal" tree
> parent), so it is the root interrupt controller and there is no loop.
> 
> It seems from your description that the Linux code is using the tree
> parent as interrupt parent even for interrupt controller nodes.  This
> is wrong behaviour.

It shoudn't normally happen. The reason it -does- happen in fact is that
the above node is also missing the #interrupt-cells property, which
cause the parent-lookup routine to skip it before it gets a chance to
see that there's an "interrupt-controller" property in there.

I'm not sure whether linux behaviour is a bug or not since I believe we
are clearly in undefined-land as an interrupt controller should always
have a #interrupt-cells property.

Ben.

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Benjamin Herrenschmidt @ 2007-10-01 22:55 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, David Gibson
In-Reply-To: <1191279244.6310.32.camel@pasglop>


On Tue, 2007-10-02 at 08:54 +1000, Benjamin Herrenschmidt wrote:
> It shoudn't normally happen. The reason it -does- happen in fact is
> that
> the above node is also missing the #interrupt-cells property, which
> cause the parent-lookup routine to skip it before it gets a chance to
> see that there's an "interrupt-controller" property in there.
> 
> I'm not sure whether linux behaviour is a bug or not since I believe
> we
> are clearly in undefined-land as an interrupt controller should always
> have a #interrupt-cells property.

That's btw something we could add as a warning to dtc...

A node with "interrupt-controller" or "interrupt-map" in it should
always have a #interrupt-cells property.

Ben.

^ permalink raw reply

* Re: [PATCH 2/7] [POWERPC] Fix QEIC->MPIC cascading
From: Benjamin Herrenschmidt @ 2007-10-01 23:14 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20070925143429.GB5323@localhost.localdomain>


On Tue, 2007-09-25 at 18:34 +0400, Anton Vorontsov wrote:
> set_irq_chained_handler overwrites MPIC's handle_irq function
> (handle_fasteoi_irq) thus MPIC never gets eoi event from the
> cascaded IRQ. This situation hangs MPIC on MPC8568E.
> 
> Patch adds flow level "end" handler to the MPIC, and QEIC calls
> it when QEIC's interrupt processing finished.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Not sure if I already NAKed it on the list, so if I didn't here's it :-)

The proper way of doing that is to have the cascade handler perform the
EOI call to mpic. Look at how it's done for i8259 mpic cascade handlers.

Basically, when doing a cascade nowadays, you can either just do a
normal request_irq() of the cascade, in which case your handler don't
have to care about the parent controller at all, but you get various
limitations and/or overhead from being a full blown interrupt handler,
or you can use the chained handler mechanism which is a "shortcut" but
implies that your cascade handler "knows" what needs to be done to the
parent (and thus is specific to the combination parent/child).

Cheers,
Ben.

^ permalink raw reply

* Re: Problem with OF interrupt parsing code
From: Segher Boessenkool @ 2007-10-01 23:36 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <1191279244.6310.32.camel@pasglop>

>> This is an interrupt controller (it has an "interrupt-controller"
>> property, and it has no interrupt parent (there is no 
>> "interrupt-parent"
>> property, for interrupt controllers you do not follow the "normal" 
>> tree
>> parent), so it is the root interrupt controller and there is no loop.
>>
>> It seems from your description that the Linux code is using the tree
>> parent as interrupt parent even for interrupt controller nodes.  This
>> is wrong behaviour.
>
> It shoudn't normally happen. The reason it -does- happen in fact is 
> that
> the above node is also missing the #interrupt-cells property, which
> cause the parent-lookup routine to skip it before it gets a chance to
> see that there's an "interrupt-controller" property in there.
>
> I'm not sure whether linux behaviour is a bug or not since I believe we
> are clearly in undefined-land as an interrupt controller should always
> have a #interrupt-cells property.

That isn't required for legacy (pieces of) trees that don't go
through an interrupt-map, actually (but strongly recommended of
course) -- and I'm not sure how valid a tree that uses the imap
recommended practice for only part of the tree is really ;-)

Either way, the Linux code should use the explicit information (the
lack of "interrupt-parent" in a node with "interrupt-controller")
to determine whether a node is the root interrupt controller, instead
of some implicit information.  You can then more clearly do sanity
checking on "#interrupt-cells" etc.


Segher

^ permalink raw reply

* Re: [PATCH] powerpc: Implement logging of unhandled signals
From: Stephen Rothwell @ 2007-10-01 23:41 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus
In-Reply-To: <20071001203242.GA14091@lixom.net>

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

Hi Olof,

On Mon, 1 Oct 2007 15:32:42 -0500 Olof Johansson <olof@lixom.net> wrote:
>
> +	char fmt32[] = KERN_INFO "%s[%d]: unhandled signal %d " \
> +			"at %08lx nip %08lx lr %08lx code %x\n";
> +	char fmt64[] = KERN_INFO "%s[%d]: unhandled signal %d " \
> +			"at %016lx nip %016lx lr %016lx code %x\n";

const char ... ?

> +static char fmt32[] = KERN_INFO \
> +	"%s[%d]: bad frame in %s: %08lx nip %08lx lr %08lx\n";
> +static char fmt64[] = KERN_INFO \
> +	"%s[%d]: bad frame in %s: %016lx nip %016lx lr %016lx\n";

again?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] PowerPC: Add RGMII support for Sequoia 440EPx
From: Josh Boyer @ 2007-10-01 23:56 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev
In-Reply-To: <20071001141209.GA23971@ru.mvista.com>

On Mon, 2007-10-01 at 18:12 +0400, Valentine Barshak wrote:
> This adds RGMII support to Sequoia DTS and sets correct phy-mode
> for EMACs. According to Sequoia datasheet, both ethernet ports
> are connected to RGMII interface, while ZMII is used only for MDIO.

I'm going to hold off on this one until the new EMAC driver is in Paul's
tree.

josh

^ permalink raw reply

* Re: PowerPC: new EMAC driver typo fix
From: Josh Boyer @ 2007-10-01 23:57 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev, david
In-Reply-To: <20071001142316.GA24156@ru.mvista.com>

On Mon, 2007-10-01 at 18:23 +0400, Valentine Barshak wrote:
> This looks like typo. Please, apply this patch to fix.
> 
> diff -ruNp linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c
> --- linux-2.6.orig/drivers/net/ibm_newemac/core.c	2007-10-01 17:23:35.000000000 +0400
> +++ linux-2.6/drivers/net/ibm_newemac/core.c	2007-10-01 17:44:57.000000000 +0400
> @@ -1232,9 +1232,9 @@ static inline int emac_xmit_finish(struc
>  	 * instead
>  	 */
>  	if (emac_has_feature(dev, EMAC_FTR_EMAC4))
> -		out_be32(&p->tmr0, EMAC_TMR0_XMIT);
> -	else
>  		out_be32(&p->tmr0, EMAC4_TMR0_XMIT);
> +	else
> +		out_be32(&p->tmr0, EMAC_TMR0_XMIT);
> 
>  	if (unlikely(++dev->tx_cnt == NUM_TX_BUFF)) {
>  		netif_stop_queue(ndev);

No Signed-off-by: line.

The patch looks sane otherwise.  David, Ben, comments?

josh

^ permalink raw reply

* Re: PowerPC: new EMAC driver typo fix
From: Benjamin Herrenschmidt @ 2007-10-02  0:10 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, david
In-Reply-To: <1191283028.10089.15.camel@localhost.localdomain>


On Mon, 2007-10-01 at 18:57 -0500, Josh Boyer wrote:
> On Mon, 2007-10-01 at 18:23 +0400, Valentine Barshak wrote:
> > This looks like typo. Please, apply this patch to fix.
> > 
> > diff -ruNp linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c
> > --- linux-2.6.orig/drivers/net/ibm_newemac/core.c	2007-10-01 17:23:35.000000000 +0400
> > +++ linux-2.6/drivers/net/ibm_newemac/core.c	2007-10-01 17:44:57.000000000 +0400
> > @@ -1232,9 +1232,9 @@ static inline int emac_xmit_finish(struc
> >  	 * instead
> >  	 */
> >  	if (emac_has_feature(dev, EMAC_FTR_EMAC4))
> > -		out_be32(&p->tmr0, EMAC_TMR0_XMIT);
> > -	else
> >  		out_be32(&p->tmr0, EMAC4_TMR0_XMIT);
> > +	else
> > +		out_be32(&p->tmr0, EMAC_TMR0_XMIT);
> > 
> >  	if (unlikely(++dev->tx_cnt == NUM_TX_BUFF)) {
> >  		netif_stop_queue(ndev);
> 
> No Signed-off-by: line.
> 
> The patch looks sane otherwise.  David, Ben, comments?

It does definitely look like a genuine typo so Acked by me.

Ben.

^ permalink raw reply

* Re: [RFC] Get rid of linuxppc-embedded?
From: Mark A. Greer @ 2007-10-02  0:15 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40710011359x188d2930y38cd8a6faacb0f26@mail.gmail.com>

On Mon, Oct 01, 2007 at 02:59:14PM -0600, Grant Likely wrote:
> On 10/1/07, Mark A. Greer <mgreer@mvista.com> wrote:
> > With the merging of the powerpc trees I'm not sure there is a clear
> > reason why we have 2 separate powerpc lists anymore (linuxppc-dev and
> > linuxppc-embedded).
> >
> > linuxppc-embedded is fairly low volume/noise but there is still the occasional
> > patch posted there that should really be posted to linuxppc-dev.  I think
> > it would be nice to have just one list where all eyes are focused.
> >
> > Is it time to get rid of linuxppc-embedded?
> 
> Ack Ack Ack!
> 
> I agree 100%

Okay.  Even if we keep the list around, we should update MAINTAINERS to
only refer to -dev.  I'll post a patch in a second.

Mark

^ permalink raw reply

* [PATCH] powerpc: Change MAINTAINER references linuxppc-embedded
From: Mark A. Greer @ 2007-10-02  0:20 UTC (permalink / raw)
  To: linuxppc-dev

Powerpc patches should be posted to linuxppc-dev@ozlabs.org so modify
MAINTAINERS to no longer reference linuxppc-embedded@ozlabs.org.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>

---
 MAINTAINERS |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

---
diff --git a/MAINTAINERS b/MAINTAINERS
index 8f80068..06259b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1543,7 +1543,7 @@ P:	Pantelis Antoniou
 M:	pantelis.antoniou@gmail.com
 P:	Vitaly Bordug
 M:	vbordug@ru.mvista.com
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 L:	netdev@vger.kernel.org
 S:	Maintained
 
@@ -1551,14 +1551,14 @@ FREESCALE HIGHSPEED USB DEVICE DRIVER
 P:	Li Yang
 M:	leoli@freescale.com
 L:	linux-usb-devel@lists.sourceforge.net
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
 P:	Li Yang
 M:	leoli@freescale.com
 L:	netdev@vger.kernel.org
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 FILE LOCKING (flock() and fcntl()/lockf())
@@ -2291,7 +2291,6 @@ M:	tnt@246tNt.com
 W:	http://www.246tNt.com/mpc52xx/
 W:	http://www.penguinppc.org/
 L:	linuxppc-dev@ozlabs.org
-L:	linuxppc-embedded@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC4XX
@@ -2300,7 +2299,7 @@ M:	jwboyer@linux.vnet.ibm.com
 P:	Matt Porter
 M:	mporter@kernel.crashing.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 T:	git kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc.git
 S:	Maintained
 
@@ -2308,21 +2307,21 @@ LINUX FOR POWERPC BOOT CODE
 P:	Tom Rini
 M:	trini@kernel.crashing.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC8XX
 P:	Marcelo Tosatti
 M:	marcelo@kvack.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX
 P:	Kumar Gala
 M:	galak@kernel.crashing.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC PA SEMI PWRFICIENT
@@ -2978,7 +2977,7 @@ POWERPC 4xx EMAC DRIVER
 P:	Eugene Surovegin
 M:	ebs@ebshome.net
 W:	http://kernel.ebshome.net/emac/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 L:	netdev@vger.kernel.org
 S:	Maintained
 

^ permalink raw reply related

* Re: [PATCH] powerpc: Change MAINTAINER references linuxppc-embedded
From: Mark A. Greer @ 2007-10-02  0:22 UTC (permalink / raw)
  To: Mark A. Greer; +Cc: linuxppc-dev
In-Reply-To: <20071002002053.GB11277@mag.az.mvista.com>

On Mon, Oct 01, 2007 at 05:20:53PM -0700, Mark A. Greer wrote:
> Powerpc patches should be posted to linuxppc-dev@ozlabs.org so modify
> MAINTAINERS to no longer reference linuxppc-embedded@ozlabs.org.
> 
> Signed-off-by: Mark A. Greer <mgreer@mvista.com>

/me sighs.

Disregard this.  I send before I had the proper subject

Mark

^ permalink raw reply

* Re: [PATCH] powerpc: Implement logging of unhandled signals
From: Olof Johansson @ 2007-10-02  0:27 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, paulus
In-Reply-To: <20071002094130.98cdcff6.sfr@canb.auug.org.au>

On Tue, Oct 02, 2007 at 09:41:30AM +1000, Stephen Rothwell wrote:
> Hi Olof,
> 
> On Mon, 1 Oct 2007 15:32:42 -0500 Olof Johansson <olof@lixom.net> wrote:
> >
> > +	char fmt32[] = KERN_INFO "%s[%d]: unhandled signal %d " \
> > +			"at %08lx nip %08lx lr %08lx code %x\n";
> > +	char fmt64[] = KERN_INFO "%s[%d]: unhandled signal %d " \
> > +			"at %016lx nip %016lx lr %016lx code %x\n";
> 
> const char ... ?
> 
> > +static char fmt32[] = KERN_INFO \
> > +	"%s[%d]: bad frame in %s: %08lx nip %08lx lr %08lx\n";
> > +static char fmt64[] = KERN_INFO \
> > +	"%s[%d]: bad frame in %s: %016lx nip %016lx lr %016lx\n";
> 
> again?

Yeah, sure.


Thanks,

-Olof

^ permalink raw reply

* Re: [PATCH] powerpc: MAINTAINERS shouldn't reference linuxppc-embedded
From: Mark A. Greer @ 2007-10-02  0:24 UTC (permalink / raw)
  To: Mark A. Greer; +Cc: linuxppc-dev
In-Reply-To: <20071002002053.GB11277@mag.az.mvista.com>

Powerpc patches should be posted to linuxppc-dev@ozlabs.org so modify
MAINTAINERS to no longer reference linuxppc-embedded@ozlabs.org.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>

---
 MAINTAINERS |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

---

diff --git a/MAINTAINERS b/MAINTAINERS
index 8f80068..06259b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1543,7 +1543,7 @@ P:	Pantelis Antoniou
 M:	pantelis.antoniou@gmail.com
 P:	Vitaly Bordug
 M:	vbordug@ru.mvista.com
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 L:	netdev@vger.kernel.org
 S:	Maintained
 
@@ -1551,14 +1551,14 @@ FREESCALE HIGHSPEED USB DEVICE DRIVER
 P:	Li Yang
 M:	leoli@freescale.com
 L:	linux-usb-devel@lists.sourceforge.net
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
 P:	Li Yang
 M:	leoli@freescale.com
 L:	netdev@vger.kernel.org
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 FILE LOCKING (flock() and fcntl()/lockf())
@@ -2291,7 +2291,6 @@ M:	tnt@246tNt.com
 W:	http://www.246tNt.com/mpc52xx/
 W:	http://www.penguinppc.org/
 L:	linuxppc-dev@ozlabs.org
-L:	linuxppc-embedded@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC4XX
@@ -2300,7 +2299,7 @@ M:	jwboyer@linux.vnet.ibm.com
 P:	Matt Porter
 M:	mporter@kernel.crashing.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 T:	git kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc.git
 S:	Maintained
 
@@ -2308,21 +2307,21 @@ LINUX FOR POWERPC BOOT CODE
 P:	Tom Rini
 M:	trini@kernel.crashing.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC8XX
 P:	Marcelo Tosatti
 M:	marcelo@kvack.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX
 P:	Kumar Gala
 M:	galak@kernel.crashing.org
 W:	http://www.penguinppc.org/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 S:	Maintained
 
 LINUX FOR POWERPC PA SEMI PWRFICIENT
@@ -2978,7 +2977,7 @@ POWERPC 4xx EMAC DRIVER
 P:	Eugene Surovegin
 M:	ebs@ebshome.net
 W:	http://kernel.ebshome.net/emac/
-L:	linuxppc-embedded@ozlabs.org
+L:	linuxppc-dev@ozlabs.org
 L:	netdev@vger.kernel.org
 S:	Maintained
 

^ permalink raw reply related

* Re: [PATCH 05/18] Add PowerPC Xilinx Virtex entry to maintainers
From: Paul Mackerras @ 2007-10-02  0:40 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40709281205m6a011859yc7cbfd0f7bb13d5b@mail.gmail.com>

Grant Likely writes:
> On 9/28/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > ---
> >
> > Paul, is this okay by you?  Josh has already okayed it.
> 
> Specifically, I'll collect the virtex changes and ask Josh to pull
> them from me before requesting a pull from you.

Sounds fine to me.

Paul.

^ permalink raw reply

* Re: [PATCH 2/2]: PCI Error Recovery: Symbios SCSI First Failure
From: Matthew Wilcox @ 2007-10-02  1:27 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: linuxppc-dev, linux-pci, linux-kernel, linux-scsi
In-Reply-To: <20071001224132.GH4338@austin.ibm.com>

On Mon, Oct 01, 2007 at 05:41:32PM -0500, Linas Vepstas wrote:
> On Mon, Oct 01, 2007 at 02:12:47PM -0600, Matthew Wilcox wrote:
> > I think the fundamental problem is that completions aren't really
> > supposed to be used like this.  Here's one attempt at using completions
> > perhaps a little more the way they're supposed to be used, 
> 
> Yes, that looks very good to me.  I see it solves a bug that
> I hadn't been quite aware of. I don't understand why 
> struct host_data is preferable to struct sym_shcb (is it because 
> this is the structure that is "naturally protectected" by the 
> spinlock?)

The thing to remember is that sym2 is in transition from being a dual
BSD/Linux driver to being a purely Linux driver.  I know, it's been more
than two years, and I'm still not done.

My latest thing I'm looking at fixing is to make Scsi_Host very
much the primary entity in the sym2 driver, and leave just the
device/scripts-accessible stuff in the hcb.

> My gut instinct is to say "ack", although prudence dictates that 
> I should test first. Which might take a few days...

Fine by me.  Do you have the ability to produce failures on a whim on
your platforms?  I've been vaguely musing a PCI device failure patch for
x86, just so people can test driver failure paths.

> I thought that earlier versions of the driver used waitqueues (I vaguely
> remember "eh_wait" in the code), which were later converted to 
> completions (I also vaguely recall thinking that the new code was
> more elegant/simpler). I converted my patch to use the completions 
> likewise, and, as you've clearly shown, did a rather sloppy job in 
> the conversion.

eh_wait (when I removed it) contained a completion ... I think it used
to be a semaphore, some time before 2.6.12

> I'm tempted to go with this patch; but if you prod, I could attempt
> a wait-queue based patch.

Let's leave it with a completion for now.  I think it works out more
efficiently in the end.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply

* [PATCH v3 01/12] Virtex: Add uartlite bootwrapper driver
From: Grant Likely @ 2007-10-02  2:15 UTC (permalink / raw)
  To: linuxppc-dev, jwboyer
In-Reply-To: <20071002021334.9579.68179.stgit@trillian.cg.shawcable.net>

From: Grant Likely <grant.likely@secretlab.ca>

Allows the bootwrapper to use the uartlite device for console output.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/powerpc/boot/Makefile   |    2 +
 arch/powerpc/boot/ops.h      |    1 +
 arch/powerpc/boot/serial.c   |    2 +
 arch/powerpc/boot/uartlite.c |   64 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index c1582b6..371fbc6 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -45,7 +45,7 @@ src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
 		ns16550.c serial.c simple_alloc.c div64.S util.S \
 		gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
 		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
-		cpm-serial.c stdlib.c
+		cpm-serial.c stdlib.c uartlite.c
 src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
 		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
 		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 703255b..4ef30e4 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -84,6 +84,7 @@ int serial_console_init(void);
 int ns16550_console_init(void *devp, struct serial_console_data *scdp);
 int mpsc_console_init(void *devp, struct serial_console_data *scdp);
 int cpm_console_init(void *devp, struct serial_console_data *scdp);
+int uartlite_console_init(void *devp, struct serial_console_data *scdp);
 void *simple_alloc_init(char *base, unsigned long heap_size,
 			unsigned long granularity, unsigned long max_allocs);
 extern void flush_cache(void *, unsigned long);
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index d47f8e0..70f36bf 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -126,6 +126,8 @@ int serial_console_init(void)
 	         dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
 	         dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
 		rc = cpm_console_init(devp, &serial_cd);
+	else if (dt_is_compatible(devp, "xilinx,uartlite"))
+		rc = uartlite_console_init(devp, &serial_cd);
 
 	/* Add other serial console driver calls here */
 
diff --git a/arch/powerpc/boot/uartlite.c b/arch/powerpc/boot/uartlite.c
new file mode 100644
index 0000000..f4249a7
--- /dev/null
+++ b/arch/powerpc/boot/uartlite.c
@@ -0,0 +1,64 @@
+/*
+ * Xilinx UARTLITE bootloader driver
+ *
+ * Copyright (C) 2007 Secret Lab Technologies Ltd.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <stdarg.h>
+#include <stddef.h>
+#include "types.h"
+#include "string.h"
+#include "stdio.h"
+#include "io.h"
+#include "ops.h"
+
+static void * reg_base;
+
+static int uartlite_open(void)
+{
+	/* Clear the RX FIFO */
+	out_be32(reg_base + 0x0C, 0x2);
+	return 0;
+}
+
+static void uartlite_putc(unsigned char c)
+{
+	while ((in_be32(reg_base + 0x8) & 0x08) != 0); /* spin */
+	out_be32(reg_base + 0x4, c);
+}
+
+static unsigned char uartlite_getc(void)
+{
+	while ((in_be32(reg_base + 0x8) & 0x01) == 0); /* spin */
+	return in_be32(reg_base);
+}
+
+static u8 uartlite_tstc(void)
+{
+	return ((in_be32(reg_base + 0x8) & 0x01) != 0);
+}
+
+int uartlite_console_init(void *devp, struct serial_console_data *scdp)
+{
+	int n;
+	unsigned long reg_phys;
+
+	n = getprop(devp, "virtual-reg", &reg_base, sizeof(reg_base));
+	if (n != sizeof(reg_base)) {
+		if (!dt_xlate_reg(devp, 0, &reg_phys, NULL))
+			return -1;
+
+		reg_base = (void *)reg_phys;
+	}
+
+	scdp->open = uartlite_open;
+	scdp->putc = uartlite_putc;
+	scdp->getc = uartlite_getc;
+	scdp->tstc = uartlite_tstc;
+	scdp->close = NULL;
+	return 0;
+}

^ permalink raw reply related

* [PATCH v3 00/12] Xilinx Virtex and Uartlite arch/powerpc patches ready for merge
From: Grant Likely @ 2007-10-02  2:15 UTC (permalink / raw)
  To: linuxppc-dev, jwboyer

Josh,

Here is the Xilinx Virtex and Uartlite series of patches to add support
to arch/powerpc.  Please merge.

Device tree source files (.dts) and defconfigs to follow in a subsuquent
patch series.

Thanks,
g.

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

^ 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