LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [POWERPC] Fix duplicate time accounting
From: Olof Johansson @ 2007-10-29  3:16 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18213.19066.134475.220466@cargo.ozlabs.ibm.com>

On Mon, Oct 29, 2007 at 01:50:34PM +1100, Paul Mackerras wrote:
> Currently, process user and system times are advancing twice as fast
> as they should because they are being accounted in two places - in the
> generic code and in timer_interrupt.  This fixes it by removing the
> call to account_process_time in timer_interrupt.
> 
> Signed-off-by: Paul Mackerras <paulus@samba.org>

Tested-by: Olof Johansson <olof@lixom.net>

Thanks for fixing it!

-Olof

^ permalink raw reply

* Re: [POWERPC] Fix off-by-one error in setting decrementer on Book E
From: Paul Mackerras @ 2007-10-29  3:10 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <18213.19469.827909.663373@cargo.ozlabs.ibm.com>

I wrote:

> @@ -601,10 +601,8 @@ void timer_interrupt(struct pt_regs * regs)

That should be

@@ -601,8 +601,6 @@ void timer_interrupt(struct pt_regs * regs)

of course.

Paul.

^ permalink raw reply

* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Benjamin Herrenschmidt @ 2007-10-29  3:24 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20071029030648.GA14199@lixom.net>


On Sun, 2007-10-28 at 22:06 -0500, Olof Johansson wrote:
> > And I don't care, I will continue adding them because the opposite
> is
> > fugly :-)
> 
> Yeah , I know what you mean . This looks so much more natural .

Who said it has to be consistent ? :-)

I use spaces before ? and ! mostly. In fact, it might even be the rule
in french, I'm not too sure :-)

Ben.

^ permalink raw reply

* Re: [PATCH 11/16] Use of_get_next_child() in eeh_restore_bars()
From: Michael Ellerman @ 2007-10-29  3:46 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, David S.Miller
In-Reply-To: <20071026172909.f7a085e9.sfr@canb.auug.org.au>

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


On Fri, 2007-10-26 at 17:29 +1000, Stephen Rothwell wrote:
> On Fri, 26 Oct 2007 16:54:43 +1000 (EST) Michael Ellerman <michael@ellerman.id.au> wrote:
> >
> > +++ b/arch/powerpc/platforms/pseries/eeh.c
> > @@ -841,11 +841,8 @@ void eeh_restore_bars(struct pci_dn *pdn)
> >  	if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
> >  		__restore_bars (pdn);
> >  
> > -	dn = pdn->node->child;
> > -	while (dn) {
> > +	for (dn = NULL; (dn = of_get_next_child(pdn->node, dn));)
> 
> Just wondering if we need
> 
> #define for_each_child_node(dn, parent) \
> 	for (dn = of_get_next_child(parent, NULL); dn; \
> 		dn = of_get_next_child(parent, dn))

Hmm, perhaps. I count ~30 places we could use it under arch/powerpc, and
about another ~20 in drivers/.

If no one objects, I guess I'll get to it, sigh ... another Yak.

Should we perhaps make it for_each_child_device_node() ?
Otherwise it's slightly non obvious what kind of node it's talking
about, especially in driver code.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] fix appletouch geyser 1 breakage
From: Dmitry Torokhov @ 2007-10-29  5:09 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linuxppc-dev list, Benjamin Berg, Anton Ekblad, Joseph Jezak
In-Reply-To: <1193584081.5197.17.camel@johannes.berg>

On Sunday 28 October 2007 11:08, Johannes Berg wrote:
> 
> > I was hoping that FOUNTAIN_TP_ONLY_PRODUCT_ID (0x30A) behaves similar
> > to Geyser in this regard. If you know that this assumption is incorrect
> > then we need to rename atp_is_older_fountain() to atp_is_fountain()
> > anf add this product ID to it.
> 
> Ah ok, I forgot about that one. If I were to venture a guess I'd say
> that they renamed it to geyser because of this idle behaviour
> "technology upgrade", but I can't say, nor do I know anybody with such a
> version, sorry.

OK then let's play safe and don't touch fountains at all. How about the
patch below?

-- 
Dmitry

Input: appletouch - idle reset logic broke older Fountains

Fountains do not support change mode request and therefore
should be excluded from idle reset attempts.

Also:
 - do not re-submit URB when we decide that toucvhpad needs to be
   reinicialized
 - do not repeat size detection when reinitializing the touchpad
 - Add missing KERN_* prefixes to messages

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/input/mouse/appletouch.c |  125 ++++++++++++++++++++++++---------------
 1 file changed, 77 insertions(+), 48 deletions(-)

Index: work/drivers/input/mouse/appletouch.c
===================================================================
--- work.orig/drivers/input/mouse/appletouch.c
+++ work/drivers/input/mouse/appletouch.c
@@ -129,12 +129,12 @@ MODULE_DEVICE_TABLE (usb, atp_table);
  */
 #define ATP_THRESHOLD	 5
 
-/* MacBook Pro (Geyser 3 & 4) initialization constants */
-#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1
-#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9
-#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300
-#define ATP_GEYSER3_MODE_REQUEST_INDEX 0
-#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04
+/* Geyser initialization constants */
+#define ATP_GEYSER_MODE_READ_REQUEST_ID		1
+#define ATP_GEYSER_MODE_WRITE_REQUEST_ID	9
+#define ATP_GEYSER_MODE_REQUEST_VALUE		0x300
+#define ATP_GEYSER_MODE_REQUEST_INDEX		0
+#define ATP_GEYSER_MODE_VENDOR_VALUE		0x04
 
 /* Structure to hold all of our device specific stuff */
 struct atp {
@@ -142,9 +142,11 @@ struct atp {
 	struct usb_device *	udev;		/* usb device */
 	struct urb *		urb;		/* usb request block */
 	signed char *		data;		/* transferred data */
-	int			open;		/* non-zero if opened */
-	struct input_dev	*input;		/* input dev */
-	int			valid;		/* are the sensors valid ? */
+	struct input_dev *	input;		/* input dev */
+	unsigned char		open;		/* non-zero if opened */
+	unsigned char		valid;		/* are the sensors valid ? */
+	unsigned char		size_detect_done;
+	unsigned char		overflowwarn;	/* overflow warning printed? */
 	int			x_old;		/* last reported x/y, */
 	int			y_old;		/* used for smoothing */
 						/* current value of the sensors */
@@ -153,7 +155,6 @@ struct atp {
 	signed char		xy_old[ATP_XSENSORS + ATP_YSENSORS];
 						/* accumulated sensors */
 	int			xy_acc[ATP_XSENSORS + ATP_YSENSORS];
-	int			overflowwarn;	/* overflow warning printed? */
 	int			datalen;	/* size of an USB urb transfer */
 	int			idlecount;      /* number of empty packets */
 	struct work_struct      work;
@@ -170,7 +171,7 @@ struct atp {
 
 #define dprintk(format, a...)						\
 	do {								\
-		if (debug) printk(format, ##a);				\
+		if (debug) printk(KERN_DEBUG format, ##a);				\
 	} while (0)
 
 MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann");
@@ -188,6 +189,15 @@ static int debug = 1;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Activate debugging output");
 
+static inline int atp_is_fountain(struct atp *dev)
+{
+	u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct);
+
+	return productId == FOUNTAIN_ANSI_PRODUCT_ID ||
+	       productId == FOUNTAIN_ISO_PRODUCT_ID ||
+	       productId == FOUNTAIN_TP_ONLY_PRODUCT_ID;
+}
+
 /* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
 static inline int atp_is_geyser_2(struct atp *dev)
 {
@@ -211,52 +221,63 @@ static inline int atp_is_geyser_3(struct
 }
 
 /*
- * By default Geyser 3 device sends standard USB HID mouse
+ * By default newer Geyser devices send standard USB HID mouse
  * packets (Report ID 2). This code changes device mode, so it
  * sends raw sensor reports (Report ID 5).
  */
-static int atp_geyser3_init(struct usb_device *udev)
+static int atp_geyser_init(struct usb_device *udev)
 {
 	char data[8];
 	int size;
 
 	size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
-			ATP_GEYSER3_MODE_READ_REQUEST_ID,
+			ATP_GEYSER_MODE_READ_REQUEST_ID,
 			USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-			ATP_GEYSER3_MODE_REQUEST_VALUE,
-			ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+			ATP_GEYSER_MODE_REQUEST_VALUE,
+			ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
 
 	if (size != 8) {
 		err("Could not do mode read request from device"
-		    " (Geyser 3 mode)");
+		    " (Geyser Raw mode)");
 		return -EIO;
 	}
 
 	/* Apply the mode switch */
-	data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+	data[0] = ATP_GEYSER_MODE_VENDOR_VALUE;
 
 	size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-			ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+			ATP_GEYSER_MODE_WRITE_REQUEST_ID,
 			USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-			ATP_GEYSER3_MODE_REQUEST_VALUE,
-			ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+			ATP_GEYSER_MODE_REQUEST_VALUE,
+			ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
 
 	if (size != 8) {
 		err("Could not do mode write request to device"
-		    " (Geyser 3 mode)");
+		    " (Geyser Raw mode)");
 		return -EIO;
 	}
 	return 0;
 }
 
-/* Reinitialise the device if it's a geyser 3 */
+/*
+ * Reinitialise the device. This usually stops stream of empty packets
+ * coming from it.
+ */
 static void atp_reinit(struct work_struct *work)
 {
 	struct atp *dev = container_of(work, struct atp, work);
 	struct usb_device *udev = dev->udev;
+	int retval;
 
 	dev->idlecount = 0;
-	atp_geyser3_init(udev);
+
+	atp_geyser_init(udev);
+
+	retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
+	if (retval) {
+		err("%s - usb_submit_urb failed with result %d",
+		    __FUNCTION__, retval);
+	}
 }
 
 static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
@@ -337,7 +358,7 @@ static void atp_complete(struct urb* urb
 		break;
 	case -EOVERFLOW:
 		if(!dev->overflowwarn) {
-			printk("appletouch: OVERFLOW with data "
+			printk(KERN_WARNING "appletouch: OVERFLOW with data "
 				"length %d, actual length is %d\n",
 				dev->datalen, dev->urb->actual_length);
 			dev->overflowwarn = 1;
@@ -426,15 +447,17 @@ static void atp_complete(struct urb* urb
 		dev->x_old = dev->y_old = -1;
 		memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
 
-		if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
+		if (dev->size_detect_done ||
+		    atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
 			goto exit;
 
 		/* 17" Powerbooks have extra X sensors */
-		for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) {
-			if (!dev->xy_cur[i]) continue;
+		for (i = (atp_is_geyser_2(dev) ? 15 : 16); i < ATP_XSENSORS; i++) {
+			if (!dev->xy_cur[i])
+				continue;
 
-			printk("appletouch: 17\" model detected.\n");
-			if(atp_is_geyser_2(dev))
+			printk(KERN_INFO "appletouch: 17\" model detected.\n");
+			if (atp_is_geyser_2(dev))
 				input_set_abs_params(dev->input, ABS_X, 0,
 						     (20 - 1) *
 						     ATP_XFACT - 1,
@@ -444,10 +467,10 @@ static void atp_complete(struct urb* urb
 						     (ATP_XSENSORS - 1) *
 						     ATP_XFACT - 1,
 						     ATP_FUZZ, 0);
-
 			break;
 		}
 
+		dev->size_detect_done = 1;
 		goto exit;
 	}
 
@@ -479,7 +502,7 @@ static void atp_complete(struct urb* urb
 			dev->y_old = y;
 
 			if (debug > 1)
-				printk("appletouch: X: %3d Y: %3d "
+				printk(KERN_DEBUG "appletouch: X: %3d Y: %3d "
 				       "Xz: %3d Yz: %3d\n",
 				       x, y, x_z, y_z);
 
@@ -507,19 +530,25 @@ static void atp_complete(struct urb* urb
 	input_report_key(dev->input, BTN_LEFT, key);
 	input_sync(dev->input);
 
-	/* Many Geysers will continue to send packets continually after
-	   the first touch unless reinitialised. Do so if it's been
-	   idle for a while in order to avoid waking the kernel up
-	   several hundred times a second */
-
-	if (!x && !y && !key) {
-		dev->idlecount++;
-		if (dev->idlecount == 10) {
-			dev->valid = 0;
-			schedule_work(&dev->work);
-		}
-	} else
-		dev->idlecount = 0;
+	/*
+	 * Many Geysers will continue to send packets continually after
+	 * the first touch unless reinitialised. Do so if it's been
+	 * idle for a while in order to avoid waking the kernel up
+	 * several hundred times a second. Re-initialization does not
+	 * work on Fountain touchpads.
+	 */
+	if (!atp_is_fountain(dev)) {
+		if (!x && !y && !key) {
+			dev->idlecount++;
+			if (dev->idlecount == 10) {
+				dev->valid = 0;
+				schedule_work(&dev->work);
+				/* Don't resubmit urb here, wait for reinit */
+				return;
+			}
+		} else
+			dev->idlecount = 0;
+	}
 
 exit:
 	retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
@@ -593,12 +622,12 @@ static int atp_probe(struct usb_interfac
 	else
 		dev->datalen = 81;
 
-	if (atp_is_geyser_3(dev)) {
+	if (!atp_is_fountain(dev)) {
 		/* switch to raw sensor mode */
-		if (atp_geyser3_init(udev))
+		if (atp_geyser_init(udev))
 			goto err_free_devs;
 
-		printk("appletouch Geyser 3 inited.\n");
+		printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
 	}
 
 	dev->urb = usb_alloc_urb(0, GFP_KERNEL);

^ permalink raw reply

* RE: [PATCH] ucc_geth: add support for netpoll
From: Li Yang-r58472 @ 2007-10-29  6:12 UTC (permalink / raw)
  To: cbou, Sergei Shtylyov; +Cc: netdev, linux-kernel, linuxppc-dev
In-Reply-To: <20071027143731.GA2616@zarina>

> -----Original Message-----
> From: Anton Vorontsov [mailto:cbou@mail.ru]=20
> Sent: Saturday, October 27, 2007 10:38 PM
> To: Sergei Shtylyov
> Cc: Anton Vorontsov; netdev@vger.kernel.org; Li Yang-r58472;=20
> linux-kernel@vger.kernel.org; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH] ucc_geth: add support for netpoll
>=20
> On Sat, Oct 27, 2007 at 05:09:51PM +0400, Sergei Shtylyov wrote:
> > Hello.
> >=20
> > Anton Vorontsov wrote:
> >=20
> > > This patch adds netpoll support for the QE UCC Gigabit Ethernet=20
> > > driver. The approach is very similar to the gianfar driver.
> >=20
> >     It's rather contrarywise -- this is standard approach=20
> and gianfar=20
> > with its
> > 3 TSEC IRQs has a quite non-standard poll_controller()=20
> implementation.
>=20
> Oh.. well, right -- gianfar a bit more comlex in that regard.
>=20
> >=20
> > > Tested using netconsole.
> >=20
> >     KGDBoE is considered a better test (I hope you've also=20
> tested with it).
>=20
> At the time of posting it was tested using netconsole only, a=20
> few days later it's was tested using KGDBoE also. So, it works indeed.
>=20
> > > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>=20
> diff --git=20
> > > a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index=20
> > > 18a6f48..06807ce 100644
> > > --- a/drivers/net/ucc_geth.c
> > > +++ b/drivers/net/ucc_geth.c
> > > @@ -3691,6 +3691,22 @@ static irqreturn_t=20
> ucc_geth_irq_handler(int irq, void *info)
> > >  	return IRQ_HANDLED;
> > >  }
> > > =20
> > > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > > +/*
> > > + * Polling 'interrupt' - used by things like netconsole to send=20
> > > +skbs
> > > + * without having to re-enable interrupts. It's not called while
> > > + * the interrupt routine is executing.
> > > + */
> > > +static void ucc_netpoll(struct net_device *dev) {
> > > +	struct ucc_geth_private *ugeth =3D netdev_priv(dev);
> > > +
> > > +	disable_irq(ugeth->ug_info->uf_info.irq);
> > > +	ucc_geth_irq_handler(ugeth->ug_info->uf_info.irq, dev);
> > > +	enable_irq(ugeth->ug_info->uf_info.irq);
> >=20
> >     Why not make it less complex (for a reader and gcc too :-) ?
>=20
> Yup, I'm agree here but it's too late. Again. ;-)
>=20
> This patch already accepted into the -mm (a week or so after=20
> the silence), so.. now I'd rather not bother Andrew with such=20
> really cosmetic changes. But if Jeff would directly apply=20
> modfied patch, I'll send it. ;-)

Oops.  The original patch happened to hit the Junk mail box. :(  I think
the patch is good to merge after the cosmetic change.  I can do it in
next pull request to Jeff.

Thanks
- Leo

^ permalink raw reply

* Re: [PATCH] fix appletouch geyser 1 breakage
From: Johannes Berg @ 2007-10-29  8:12 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linuxppc-dev list, Benjamin Berg, Anton Ekblad, Joseph Jezak
In-Reply-To: <200710290109.49604.dtor@insightbb.com>

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



> OK then let's play safe and don't touch fountains at all. How about the
> patch below?

Looks fine to me, works with my fountain touchpad and should fix
Joseph's error too.

> Input: appletouch - idle reset logic broke older Fountains
> 
> Fountains do not support change mode request and therefore
> should be excluded from idle reset attempts.
> 
> Also:
>  - do not re-submit URB when we decide that toucvhpad needs to be
>    reinicialized
>  - do not repeat size detection when reinitializing the touchpad
>  - Add missing KERN_* prefixes to messages
> 
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
>  drivers/input/mouse/appletouch.c |  125 ++++++++++++++++++++++++---------------
>  1 file changed, 77 insertions(+), 48 deletions(-)

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* Re: [PATCH] powerpc: Fix demotion of segments to 4K pages
From: Geert Uytterhoeven @ 2007-10-29  8:32 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Olof Johansson, linuxppc-dev list, Paul Mackerras
In-Reply-To: <1193628268.9928.16.camel@pasglop>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1148 bytes --]

On Mon, 29 Oct 2007, Benjamin Herrenschmidt wrote:
> On Sun, 2007-10-28 at 22:06 -0500, Olof Johansson wrote:
> > > And I don't care, I will continue adding them because the opposite
> > is
> > > fugly :-)
> > 
> > Yeah , I know what you mean . This looks so much more natural .
> 
> Who said it has to be consistent ? :-)
> 
> I use spaces before ? and ! mostly. In fact, it might even be the rule
> in french, I'm not too sure :-)

Yes it is http://en.wikipedia.org/wiki/Punctuation_in_French ;-)

C'est permis, mais seulement en Français ;-)

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply

* Re: [PATCH] ehea: add kexec support
From: Jeff Garzik @ 2007-10-29  9:47 UTC (permalink / raw)
  To: Jan-Bernd Themann
  Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
	Christoph Raisch, Marcus Eder, Stefan Roscher
In-Reply-To: <200710261437.29117.ossthema@de.ibm.com>

Jan-Bernd Themann wrote:
> eHEA resources that are allocated via H_CALLs have a unique identifier each.
> These identifiers are necessary to free the resources. A reboot notifier
> is used to free all eHEA resources before the indentifiers get lost, i.e
> before kexec starts a new kernel.
> 
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>

applied to #upstream-fixes

^ permalink raw reply

* Re: [PATCH v4.3] FEC - fast ethernet controller for mpc52xx
From: Jeff Garzik @ 2007-10-29  9:59 UTC (permalink / raw)
  To: Domen Puncer; +Cc: linuxppc-dev, netdev
In-Reply-To: <20071026160749.GA21374@nd47.coderock.org>

Domen Puncer wrote:
> On 26/10/07 07:18 -0700, Dale Farnsworth wrote:
>> On Fri, Oct 26, 2007 at 01:59:09PM +0200, Domen Puncer wrote:
>>> +static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
>>> +{
>>> +	struct net_device *dev = dev_id;
>>> +	struct mpc52xx_fec_priv *priv = netdev_priv(dev);
>>> +
>>> +	spin_lock(&priv->lock);
>>> +
>>> +	while (bcom_buffer_done(priv->tx_dmatsk)) {
>>> +		struct sk_buff *skb;
>>> +		struct bcom_fec_bd *bd;
>>> +		skb = bcom_retrieve_buffer(priv->tx_dmatsk, NULL,
>>> +				(struct bcom_bd **)&bd);
>>> +		/* Here (and in rx routines) would be a good place for
>>> +		 * dma_unmap_single(), but bcom doesn't return bcom_bd of the
>>> +		 * finished transfer, and _unmap is empty on this platfrom.
>>> +		 */
>> Oops, you forgot to remove the above comment.  :)
> 
> Argh!
> 
> Repost w/o the comment.
> Sorry for receiving all this almost-spam.
> 
> 
>> Otherwise,
>> Acked-by: Dale Farnsworth <dale@farnsworth.org>
>>
>> Domen, thanks for all your work on this.  It's good to see it finally go in.
>>
>> -Dale
> 
> --- again, use your scisors here ;-) ---
> 
> 
> Driver for ethernet on mpc5200/mpc5200b SoCs (FEC).
> 
> 
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
> Acked-by: Dale Farnsworth <dale@farnsworth.org>
> 
> ---
>  drivers/net/Kconfig           |   24 
>  drivers/net/Makefile          |    4 
>  drivers/net/fec_mpc52xx.c     | 1112 ++++++++++++++++++++++++++++++++++++++++++
>  drivers/net/fec_mpc52xx.h     |  313 +++++++++++
>  drivers/net/fec_mpc52xx_phy.c |  198 +++++++
>  5 files changed, 1651 insertions(+)

applied to #upstream-fixes

it's not strictly a fix, but I did not want to hold this back until 
2.6.25 either

^ permalink raw reply

* Re: [PATCH/RFC] powerpc: Pass PID argument to _tlbie (WAS: Apparent kernel bug with GDB on ppc405)
From: Josh Boyer @ 2007-10-29 12:08 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev list, linuxppc-embedded, Kumar Gala, Matt Mackall
In-Reply-To: <1193470322.18243.63.camel@pasglop>

On Sat, 27 Oct 2007 17:32:02 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> Allright, so Matt, let me know if that fixes your problem with gdb, and
> I'll clean the patch up a bit and submit it. I want to double check if
> something similar may be needed for freescale booke.
> 
> Basically, the problem is that things like get_user_pages() can cause
> COW operations which in turn call _tlbie() to be called for translations
> that aren't in the current address space.
> 
> The current 40x and 44x implementation of _tlbie doesn't handle that
> properly as it only invalidates entries in the current PID.
> 
> This is an attempt at fixing it. Untested, I just checked it builds for
> arch/powerpc and arch/ppc. I also haven't looked whether the freescale
> BookE _tlbie needs similar treatement (it will get passed the pid in r4
> with that patch, so if it needs to do something with it, it can). Kumar,
> can you have a look ?

This looks pretty good at first glance.  I'll try to test it out today,
but I'd still like to hear if it solves Matt's problem as I doubt I'll
be able to duplicate it.

josh

^ permalink raw reply

* Re: [PATCH] ucc_geth: add support for netpoll
From: Anton Vorontsov @ 2007-10-29 12:17 UTC (permalink / raw)
  To: Li Yang-r58472; +Cc: netdev, linux-kernel, linuxppc-dev
In-Reply-To: <989B956029373F45A0B8AF0297081890019B61BF@zch01exm26.fsl.freescale.net>

On Mon, Oct 29, 2007 at 02:12:07PM +0800, Li Yang-r58472 wrote:
[...]
> > > > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > > > +/*
> > > > + * Polling 'interrupt' - used by things like netconsole to send 
> > > > +skbs
> > > > + * without having to re-enable interrupts. It's not called while
> > > > + * the interrupt routine is executing.
> > > > + */
> > > > +static void ucc_netpoll(struct net_device *dev) {
> > > > +	struct ucc_geth_private *ugeth = netdev_priv(dev);
> > > > +
> > > > +	disable_irq(ugeth->ug_info->uf_info.irq);
> > > > +	ucc_geth_irq_handler(ugeth->ug_info->uf_info.irq, dev);
> > > > +	enable_irq(ugeth->ug_info->uf_info.irq);
> > > 
> > >     Why not make it less complex (for a reader and gcc too :-) ?
> > 
> > Yup, I'm agree here but it's too late. Again. ;-)
> > 
> > This patch already accepted into the -mm (a week or so after 
> > the silence), so.. now I'd rather not bother Andrew with such 
> > really cosmetic changes. But if Jeff would directly apply 
> > modfied patch, I'll send it. ;-)
> 
> Oops.  The original patch happened to hit the Junk mail box. :(

That one as well? http://lkml.org/lkml/2007/10/11/128

> I think
> the patch is good to merge after the cosmetic change.  I can do it in
> next pull request to Jeff.

Ok, great. Thanks.

Here it is:

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH] ucc_geth: add support for netpoll

This patch adds netpoll support for the QE UCC Gigabit Ethernet
driver. Tested using netconsole and KGDBoE.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/net/ucc_geth.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index bec413b..94e78d8 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3678,6 +3678,23 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
 	return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void ucc_netpoll(struct net_device *dev)
+{
+	struct ucc_geth_private *ugeth = netdev_priv(dev);
+	int irq = ugeth->ug_info->uf_info.irq;
+
+	disable_irq(irq);
+	ucc_geth_irq_handler(irq, dev);
+	enable_irq(irq);
+}
+#endif /* CONFIG_NET_POLL_CONTROLLER */
+
 /* Called when something needs to use the ethernet device */
 /* Returns 0 for success. */
 static int ucc_geth_open(struct net_device *dev)
@@ -3963,6 +3980,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
 #ifdef CONFIG_UGETH_NAPI
 	netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT);
 #endif				/* CONFIG_UGETH_NAPI */
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = ucc_netpoll;
+#endif
 	dev->stop = ucc_geth_close;
 //    dev->change_mtu = ucc_geth_change_mtu;
 	dev->mtu = 1500;
-- 
1.5.2.2

^ permalink raw reply related

* Re: [POWERPC] Fix duplicate time accounting
From: Sergei Shtylyov @ 2007-10-29 13:56 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18213.19066.134475.220466@cargo.ozlabs.ibm.com>

Hello.

Paul Mackerras wrote:

> Currently, process user and system times are advancing twice as fast
> as they should because they are being accounted in two places - in the
> generic code and in timer_interrupt.  This fixes it by removing the
> call to account_process_time in timer_interrupt.

    But will the deterministic accounting option continue to work with such fix?

> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 9eb3284..5e253d6 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -599,16 +599,6 @@ void timer_interrupt(struct pt_regs * regs)
>  		get_lppaca()->int_dword.fields.decr_int = 0;
>  #endif
>  
> -	/*
> -	 * We cannot disable the decrementer, so in the period
> -	 * between this cpu's being marked offline in cpu_online_map
> -	 * and calling stop-self, it is taking timer interrupts.
> -	 * Avoid calling into the scheduler rebalancing code if this
> -	 * is the case.
> -	 */
> -	if (!cpu_is_offline(cpu))
> -		account_process_time(regs);
> -
>  	if (evt->event_handler)
>  		evt->event_handler(evt);
>  	else

WBR, Sergei

^ permalink raw reply

* boot/wrap assumes a biarch toolchain?
From: Anton Blanchard @ 2007-10-29 14:07 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: jdittmer


Hi,

Jan is seeing the following fail:

WRAP    arch/powerpc/boot/zImage.pmac
powerpc-linux-objcopy: vmlinux: File format not recognized

He is using a cross compile toolchain invoked with the following command
line:

# make HOSTCC=gcc-4.0 ARCH=powerpc CROSS_COMPILE=powerpc64-linux- CROSS32_COMPILE=powerpc-linux-

It seems like boot/wrap wants to use both 64bit and 32bit tools, however
it only receives the 32bit path:

ifneq ($(CROSS32_COMPILE),)
CROSSWRAP := -C "$(CROSS32_COMPILE)"
else
ifneq ($(CROSS_COMPILE),)
CROSSWRAP := -C "$(CROSS_COMPILE)"
endif
endif

Thoughts? I guess we have to pass in both cross compile targets.

One way to make this go away would be to build binutils as biarch:

# configure --target=powerpc-linux --enable-targets=powerpc64-linux ...

Anton

^ permalink raw reply

* Re: [PATCH 0/2] PowerPC: Add 44x NDFC device-tree aware support
From: Valentine Barshak @ 2007-10-29 15:19 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linuxppc-dev, sr, linux-mtd
In-Reply-To: <alpine.LFD.0.9999.0710262316590.3186@localhost.localdomain>

Thomas Gleixner wrote:
> On Fri, 26 Oct 2007, Valentine Barshak wrote:
>> The major difference is that the original implements each chip connected NDFC banks as a
>> separate MTD device. Here I try to have one MTD device spread on all chips found.
>> However, the chips should have equal ID's and sizes, but I've never seen several different
>> chips attached to single ndfc.
> 
> Bamboo has 2 different nand chips. And I'm aware of another board
> which has a 2k-page onboard NAND and sockets for SmartMedia /
> PictureXd cards, which will simply break with your design.
> 
> Restricting stuff for no good reason is never a good idea.
> 
> mtdconcat can build you a big one if you want, so why adding
> restrictions to a driver ?
> 
>> I'm adding ndfc_of as a separate file, since some other changes
>> have also been made (e.g. all i/o is made with ndfc_readl/writel inline functions).
> 
> This should be done in the original ndfc driver and not in a separate
> incarnation.
> 
>> The original version didn't handle driver removal well (it never calls del_mtd...),it's 
>> corrected here.
> 
> Why not fixing the original driver ?
> 
>> Any comments are greatly appreciated.
> 
> NACK.
> 
> Please fix the existing driver and convert it to deal with OF and fix
> the other short comings as well.
> 
> Duplicate code is not going anywhere near drivers/mtd/nand
> 
> 	tglx

Thanks all for your comments.
Well, let me explain why I did this.
First of all I should have checked twice, since I was thinking bamboo 
had identical chips :) I planned to add different chip support later a 
bit, just wanted to get a simple OF driver version working first. 
Surely, mtd concat can be used, but it adds a slight overhead for 
identical chips. Eventually, I wanted to make it support both separate 
mtd devices on each chip or spread across identical ones depending on 
the device-tree settings. The other thing is that the original driver 
lacked a distinct parent-child relationship between ndfc and chips. 
Simply registering chip driver only after ndfc is successfully 
registered doesn't guarantee we initialize chip device after ndfc is 
properly initialized.
Even if we set ndfc parent for the chip platform device as suggested by 
Stefan:
static struct platform_device nand_dev = {
	.name = "ndfc-chip",
	.id = 0,
	.num_resources = 1,
	.resource = &r,
	.dev = {
		.platform_data = &nand_chip,
		.parent = &ndfc_dev.dev,
	}
};
If for some reason ndfc probe fails the kernel will crash on the chip 
probe. Of course it would work most of the time, but I think that both 
initialization and clean-up has to be reworked in the original driver.
The original driver has a tight connection to the 
platform_device/platform_data structures. Stefan suggested a 
OF-to-platform device wrapper to make both versions work:
http://ozlabs.org/pipermail/linuxppc-dev/2007-October/044019.html
It's fine to have this glue code, but right now only 1 chip is 
supported. To add support for more chips we need an array of at least 4 
ndfc-chip platform devices. And this approach looks to me like inventing 
something new (OF) and then adding glue and quirks to make it work with 
the old stuff. Why invent new stuff then?
To make the original driver work with both "platform device" and new OF 
device descriptions need additional rework of the current ndfc code (add 
some #ifdefs, or completely split platform/OF and nand core stuff into 
separate files). I know that duplicating code is no good either, but 
since the original stuff is going to die and be removed anyway should it 
be a big problem?
So, these are just my thoughts.
Thanks,
Valentine.

^ permalink raw reply

* RFC:  replace device_type with new "class" property?
From: Yoder Stuart-B08248 @ 2007-10-29 14:37 UTC (permalink / raw)
  To: linuxppc-dev


We've had some discussions internally here at Freescale among=20
various PPC Linux developers about the device_type property
and how 'classes' of devices should be represented in the
device tree.

Taking a long term view, the question I'd like to pose is
how should classes of device should be identified in the
flat device tree model?   A device class, as I'm using it,
refers basically to general categories of devices-- devices
that share common properties.   Examples in current device
would be "cpu", "memory", "pci", "network", "serial".

Today the device_type property serves this purpose to some
degree.  However, the original meaning of device_type in
Open Firmware is related to the method interface of a node
it has a recent history of abuse in the Linux kernel DTS
files, with a plethora of types made up in an ad hoc way.
In addition, an OS can match on "compatible" and in the
absence of method interfaces really doesn't need
device_type anyway.

However, one good thing about device_type (if properly used)
is that it could identify which device nodes follow an official
binding, vs proprietary devices or one-off device node definitions.
Without something like device_type the _human_ reader of a DTS
file has to infer from the name or compatible what the device
type is.  So, device class identifiers like "memory", "cpu",
"serial", "pci", "network" provide that clarity.

So, what should the long term approach be?  Here are a couple
of options:

1.  Keep device_type, with it's use specifically defined to
    mean that the node with that property implements an
    'official' binding.   In the flat device tree model a
    binding is just a defined set of required (and optional
    properties.

2.  Get rid of device_type and create a _new_ property like
    "class".  The only nodes permitted to have this property
    are those with 'official' bindings.  These nodes would
    have a set of required (and optional) properties.

    The benefit of a new property is cutting all baggage
    associated with the old device_type property.

One other point-- the intent of a device class is not
necessarily to specify a sufficient set of properties
to implement drivers.  The "network" class would have
a base set of required properties (e.g. mac-address,etc),
but most likely would need additional properties
to implement a driver for a specific device.  The value
in the class is when a developer needs to represent
a new device that fits into an existing class he has a base
set of properties to start with that has had some good
thinking put into defining it.  A device class would
facilitate and encourage consistent use of properties
names, which would be a good thing.

The initial list of official classes would be small--
"cpu","memory", "cache", "pci", "serial", "network",
"open-pic"(?).  As other types get codified in actual use
and have official bindings specified (perhaps through
power.org) new types would be supported--e.g. "i2c",
"jdec-flash".

Thoughts?

Stuart Yoder
Freescale Semiconductor, Inc.

^ permalink raw reply

* Re: boot/wrap assumes a biarch toolchain?
From: Andreas Schwab @ 2007-10-29 14:38 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: linuxppc-dev, jdittmer
In-Reply-To: <20071029140719.GA17120@kryten>

Anton Blanchard <anton@samba.org> writes:

> One way to make this go away would be to build binutils as biarch:
>
> # configure --target=powerpc-linux --enable-targets=powerpc64-linux ...

If you configure your toolchain for powerpc64-linux you get a biarch
toolchain by default.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply

* Re: [PATCH 05/11] [POWERPC] TQM5200 DTS
From: Marian Balakowicz @ 2007-10-29 14:18 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Martin Krause
In-Reply-To: <20071026013343.GD457@localhost.localdomain>

David Gibson wrote:
> On Thu, Oct 25, 2007 at 05:46:19PM +0200, Marian Balakowicz wrote:
>> Grant Likely wrote:
>>> On 10/25/07, Martin Krause <Martin.Krause@tqs.de> wrote:
> [snip]
>>>> On a board with 16 MiB FLASH for example the "big-fs" _and_ the "misc"
>>>> partition could not be used. "big-fs", because the memory is too small
>>>> (which is OK) and "misc", because it overlaps 1 MiB over the physikal
>>>> flash border. So only the first 9 MiB of the flash could be used in Linux.
>>>> The remaining 7 MiB couldn't be accessed.
>>> Perhaps it would be better to drop the flash layout from the in-kernel
>>> dts files entirely since flash layout can be a fluid thing.
>> Well, but that would not be really user friendly, I'd rather stick
>> with some default config.
> 
> Strictly speaking the device-tree is not the right place for flash
> partitioning information.  We put it there because it's preferable to
> having hardcoded per-board flash layouts in the code itself.
> 
> It only really works well, though, when there are strong conventions
> (shared with the firmware) about how to partition the flash.
> 
> Where it's really up to the user to determine how they want to lay out
> their flash, putting things in the device tree isn't a really good
> idea.

In principle, you are right, we should not be putting a user dependent
configuration into .dts files. But on the other hand, bindings have
been defined for flash-like devices and their partition layouts and
physmap_of device driver is expecting to get this information from the
blob. So, it is the place for it. But if we are not to put partition
layouts into the default kernel .dts files then we should
provide/maintain some examples an that may be a even bigger mess.

> Incidentally, it's not required that *all* the flash address space be
> in partitions, so it is possible only give partitions for those flash
> chunks which the firmware needs to know about.

That might be nicer solution but different variants of TQM5200 boards
do not share the same subset of partitions (default u-boot partitions
at least), so it will not help much.

Cheers,
m.

^ permalink raw reply

* Re: boot/wrap assumes a biarch toolchain?
From: Anton Blanchard @ 2007-10-29 14:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev, jdittmer
In-Reply-To: <jesl3udm0e.fsf@sykes.suse.de>

 
Hi,

> If you configure your toolchain for powerpc64-linux you get a biarch
> toolchain by default.

I was wondering about people using pre biarch gcc toolchains. But I take
your point - I'm guessing binutils has been biarch for a long time.
Since we are only calling binutils functions in boot/wrap, maybe we can
just do:

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 18e3271..8961afd 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -121,13 +121,9 @@ wrapperbits	:= $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
 #############
 # Bits for building various flavours of zImage
 
-ifneq ($(CROSS32_COMPILE),)
-CROSSWRAP := -C "$(CROSS32_COMPILE)"
-else
 ifneq ($(CROSS_COMPILE),)
 CROSSWRAP := -C "$(CROSS_COMPILE)"
 endif
-endif
 
 # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
 quiet_cmd_wrap	= WRAP    $@

^ permalink raw reply related

* Re: boot/wrap assumes a biarch toolchain?
From: Jan Dittmer @ 2007-10-29 14:50 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <jesl3udm0e.fsf@sykes.suse.de>

Andreas Schwab wrote:
> Anton Blanchard <anton@samba.org> writes:
> 
>> One way to make this go away would be to build binutils as biarch:
>>
>> # configure --target=powerpc-linux --enable-targets=powerpc64-linux ...
> 
> If you configure your toolchain for powerpc64-linux you get a biarch
> toolchain by default.

Hmm:

$ powerpc64-linux-ld -V
GNU ld (Linux/GNU Binutils) 2.17.50.0.17.20070615
   Supported emulations:
    elf64ppc
    elf32ppclinux
    elf32ppc
    elf32ppcsim

$ powerpc64-linux-gcc-4.0.4 -v
Using built-in specs.
Target: powerpc64-linux
Configured with: ../configure --prefix=/usr/cc217 
--exec-prefix=/usr/cc217/powerpc64 --target=powerpc64-linux --disable-shared 
--disable-werror --disable-nls --disable-threads --disable-werror 
--disable-libmudflap --with-newlib --with-gnu-as --with-gnu-ld 
--enable-languages=c
Thread model: single
gcc version 4.0.4

g5_defconfig:

$ make ARCH=powerpc HOSTCC=gcc-4.0 CROSS_COMPILE=powerpc64-linux- 
CROSS32_COMPILE=powerpc64-linux-
...
   CC      arch/powerpc/kernel/signal.o
   LDS     arch/powerpc/kernel/vdso32/vdso32.lds
   VDSO32A arch/powerpc/kernel/vdso32/sigtramp.o
   VDSO32A arch/powerpc/kernel/vdso32/gettimeofday.o
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S: Assembler 
messages:
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:33: Error: 
syntax error; found `@' but expected `,'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:33: Error: 
junk at end of line: `@local'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:37: Error: 
syntax error; found `@' but expected `,'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:37: Error: 
junk at end of line: `@local'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:95: Error: 
syntax error; found `@' but expected `,'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:95: Error: 
junk at end of line: `@local'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:103: Error: 
syntax error; found `@' but expected `,'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:103: Error: 
junk at end of line: `@local'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:130: Error: 
syntax error; found `@' but expected `,'
/usr/src/xtest/linux-2.6/arch/powerpc/kernel/vdso32/gettimeofday.S:130: Error: 
junk at end of line: `@local'
make[3]: *** [arch/powerpc/kernel/vdso32/gettimeofday.o] Error 1
make[2]: *** [arch/powerpc/kernel/vdso32] Error 2
make[1]: *** [arch/powerpc/kernel] Error 2
make: *** [sub-make] Error 2


Jan

^ permalink raw reply

* Re: RFC:  replace device_type with new "class" property?
From: Matt Sealey @ 2007-10-29 15:20 UTC (permalink / raw)
  To: Yoder Stuart-B08248; +Cc: linuxppc-dev
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA30359F9BB@az33exm25.fsl.freescale.net>

Yoder Stuart-B08248 wrote:
> We've had some discussions internally here at Freescale among 
> various PPC Linux developers about the device_type property
> and how 'classes' of devices should be represented in the
> device tree.
> 
> The initial list of official classes would be small--
> "cpu","memory", "cache", "pci", "serial", "network",
> "open-pic"(?).  As other types get codified in actual use
> and have official bindings specified (perhaps through
> power.org) new types would be supported--e.g. "i2c",
> "jdec-flash".
> 
> Thoughts?

I think device_type, compatible and model properties fulfil
this already, they simply aren't being used correctly.

Remember that, while you may want to make FDTs easier to
design, OpenFirmware and the requirement on device interfaces
through the client interface still exist and are still
implemented (from time to time).

What I would recommend is that the device_type encapsulate
the class of the device as it is currently. This means for
a display, you set device_type to "display".

OF platform devices for displays can then get a list of
all the "displays" available on a system, or "i2c" controllers
available on a system.

For readability, the name of the device needn't match device_type;
for instance on the 5121E it may be that the 'diu' unit be
called diu, but be of device_type 'display' - further information
can be added through the 'compatible' property of devices that
also support the same register model.

Further differentiation should be done through the 'model'
property in my opinion. This is optional in the OpenFirmware
spec, but that does not mean it should be important. It is
currently defined as something to determine the exact model
of a chip in order to enable quirks, bugfixes and suchlike,
but most implementations switch on something else entirely
(like SVR or a heuristic behaviour).

Selecting the "model" would be no different to, for example,
having a list of PCI IDs that will work with a driver.

Basically, I envision that instead device trees should be
a little more verbose, and that OF device probing should be
improved so that drivers can hook in on many levels of
matching.

There was a little discussion at bplan once that it would be
easier to implement a kind of vendor/device id system much
like PCI, USB etc. implements in hardware in order to match
hardware. I suppose you could use a "class" property to
implement this - but for instance in the case of USB or
PCI, this is already encoded in the device_type for anything
the firmware cannot work out (pci1106,6062 or so).

Perhaps it is a solution though; mark each device with a
class property, for instance on the 5200B give it a unique
chip ID (fsl5200 or soc5200?) and each unit a device id and take a big
hint from PCI class codes and programming interfaces here -
USB might be fsl5200,0c0310 (0c, 03 and 10 are all the PCI
class, subclass and progif for USB OHCI).

Additionally you can add more specific information such as
the type of USB controller, for instance in the case of EHCI,
perhaps also differentiate between EHCI with a companion controller,
EHCI with a transaction translator and no companion controller, etc.
with a further code - fsl520B,0c0320.01

References to peek at:

http://www.openbios.org/data/docs/bus.usb.pdf
http://www.openbios.org/data/docs/bus.pci.pdf

Especially take a peek at the PCI docs, page 10 where
"Table 1: Generic Names based upon Class Code" gives a
bunch of really nice name/device_types.

Note that none of this adds any further properties to
the specification for identification - you can do it
all using device_type and compatible.

So, why not start up a registry of vendor, device and
"class-code" numbers for SoC devices for when PCI
numbering cannot adequately fill the gap? In this case,
Freescale, IBM, AMCC and PASemi already have registered
vendor codes, class-codes for 99% of interfaces can
be derived from the PCI specifications?

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

^ permalink raw reply

* Re: [PATCH v4.3] FEC - fast ethernet controller for mpc52xx
From: Grant Likely @ 2007-10-29 15:37 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linuxppc-dev, Domen Puncer, netdev
In-Reply-To: <4725AF08.6030309@garzik.org>

On 10/29/07, Jeff Garzik <jeff@garzik.org> wrote:
> Domen Puncer wrote:
> >  drivers/net/Kconfig           |   24
> >  drivers/net/Makefile          |    4
> >  drivers/net/fec_mpc52xx.c     | 1112 ++++++++++++++++++++++++++++++++++++++++++
> >  drivers/net/fec_mpc52xx.h     |  313 +++++++++++
> >  drivers/net/fec_mpc52xx_phy.c |  198 +++++++
> >  5 files changed, 1651 insertions(+)
>
> applied to #upstream-fixes
>
> it's not strictly a fix, but I did not want to hold this back until
> 2.6.25 either

Fantastic!  Thanks Jeff.

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: boot/wrap assumes a biarch toolchain?
From: Andreas Schwab @ 2007-10-29 15:39 UTC (permalink / raw)
  To: Jan Dittmer; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <4725F34C.6090904@ppp0.net>

Jan Dittmer <jdittmer@ppp0.net> writes:

> $ powerpc64-linux-gcc-4.0.4 -v
> Using built-in specs.
> Target: powerpc64-linux
> Configured with: ../configure --prefix=/usr/cc217
> --exec-prefix=/usr/cc217/powerpc64 --target=powerpc64-linux
> --disable-shared --disable-werror --disable-nls --disable-threads
> --disable-werror --disable-libmudflap --with-newlib --with-gnu-as
> --with-gnu-ld --enable-languages=c
> Thread model: single
> gcc version 4.0.4
>
> g5_defconfig:
>
> $ make ARCH=powerpc HOSTCC=gcc-4.0 CROSS_COMPILE=powerpc64-linux- 
> CROSS32_COMPILE=powerpc64-linux-

Your compiler still needs -m32 to generate 32-bit code (or use
--with-cpu=default32 to make that the default).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply

* Re: [PATCH 05/11] [POWERPC] TQM5200 DTS
From: Grant Likely @ 2007-10-29 15:40 UTC (permalink / raw)
  To: Marian Balakowicz; +Cc: linuxppc-dev, Martin Krause, David Gibson
In-Reply-To: <4725EB9E.1030507@semihalf.com>

On 10/29/07, Marian Balakowicz <m8@semihalf.com> wrote:
> David Gibson wrote:
> > On Thu, Oct 25, 2007 at 05:46:19PM +0200, Marian Balakowicz wrote:
> >> Grant Likely wrote:
> >>> On 10/25/07, Martin Krause <Martin.Krause@tqs.de> wrote:
> > [snip]
> >>>> On a board with 16 MiB FLASH for example the "big-fs" _and_ the "misc"
> >>>> partition could not be used. "big-fs", because the memory is too small
> >>>> (which is OK) and "misc", because it overlaps 1 MiB over the physikal
> >>>> flash border. So only the first 9 MiB of the flash could be used in Linux.
> >>>> The remaining 7 MiB couldn't be accessed.
> >>> Perhaps it would be better to drop the flash layout from the in-kernel
> >>> dts files entirely since flash layout can be a fluid thing.
> >> Well, but that would not be really user friendly, I'd rather stick
> >> with some default config.
> >
> > Strictly speaking the device-tree is not the right place for flash
> > partitioning information.  We put it there because it's preferable to
> > having hardcoded per-board flash layouts in the code itself.
> >
> > It only really works well, though, when there are strong conventions
> > (shared with the firmware) about how to partition the flash.
> >
> > Where it's really up to the user to determine how they want to lay out
> > their flash, putting things in the device tree isn't a really good
> > idea.
>
> In principle, you are right, we should not be putting a user dependent
> configuration into .dts files. But on the other hand, bindings have
> been defined for flash-like devices and their partition layouts and
> physmap_of device driver is expecting to get this information from the
> blob. So, it is the place for it. But if we are not to put partition
> layouts into the default kernel .dts files then we should
> provide/maintain some examples an that may be a even bigger mess.
>
> > Incidentally, it's not required that *all* the flash address space be
> > in partitions, so it is possible only give partitions for those flash
> > chunks which the firmware needs to know about.
>
> That might be nicer solution but different variants of TQM5200 boards
> do not share the same subset of partitions (default u-boot partitions
> at least), so it will not help much.

It's probably more appropriate to have the flash partition layout in
the u-boot environment and have u-boot populate the partition
information in the device tree.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: RFC:  replace device_type with new "class" property?
From: Scott Wood @ 2007-10-29 16:11 UTC (permalink / raw)
  To: Matt Sealey; +Cc: linuxppc-dev, Yoder Stuart-B08248
In-Reply-To: <4725FA58.4030505@genesi-usa.com>

On Mon, Oct 29, 2007 at 03:20:56PM +0000, Matt Sealey wrote:
> I think device_type, compatible and model properties fulfil
> this already, they simply aren't being used correctly.

device_type has a few drawbacks, though:

1. You can only specify one type, whereas with a new property we could
define it as a list (similar to compatible).  It's possible for one node to
comply with multiple class bindings, such as when there's a binding for
clients of the type of bus it's on as well as the type of device it is, or
when there are multiple levels of detail (such as complying with both
simple-bus and some specific bus binding).

2. We want to avoid any confusion with OF bindings and abused device_type
entries that have been allowed to become existing practice.

3. It's the only standard property (AFAIK) with an underscore in it. :-)

> Remember that, while you may want to make FDTs easier to
> design, OpenFirmware and the requirement on device interfaces
> through the client interface still exist and are still
> implemented (from time to time).

Sure -- and we don't want to risk the code thinking it can call into OF
based on what we put in a flat device tree, right?

> For readability, the name of the device needn't match device_type;
> for instance on the 5121E it may be that the 'diu' unit be
> called diu, but be of device_type 'display'

I don't think that's more readable than setting the name to display.
Something containing "diu" will be in the compatible list.

> Further differentiation should be done through the 'model'
> property in my opinion. This is optional in the OpenFirmware
> spec, but that does not mean it should be important. It is
> currently defined as something to determine the exact model
> of a chip in order to enable quirks, bugfixes and suchlike,
> but most implementations switch on something else entirely
> (like SVR or a heuristic behaviour).
> 
> Selecting the "model" would be no different to, for example,
> having a list of PCI IDs that will work with a driver.

It's what we currently do with compatible.  Why break it into two
properties?

The PCI ID thing can be quite a headache, BTW, when you get a new PCI device
that won't work with the existing driver, for no reason other than that it
hasn't been updated with the new ID.

> There was a little discussion at bplan once that it would be
> easier to implement a kind of vendor/device id system much
> like PCI, USB etc. implements in hardware in order to match
> hardware. I suppose you could use a "class" property to
> implement this -

No, you should use compatible for that.

> but for instance in the case of USB or PCI, this is already encoded in the
> device_type for anything the firmware cannot work out (pci1106,6062 or
> so).

No, that goes in name/compatible according to the OF PCI binding.

> Perhaps it is a solution though; mark each device with a
> class property, for instance on the 5200B give it a unique
> chip ID (fsl5200 or soc5200?)

No.  That's precisely the sort of device_type abuse we want to get away from
with class.

Personally, I'm fine with just using name and compatible, but others such as
Stuart have expressed a desire for something to formally indicate compliance
with a standard binding.  I don't think we should expand the use of
device_type in any case.

-Scott

^ 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