LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] firewire: endianess fix
From: Jarod Wilson @ 2008-02-28  3:21 UTC (permalink / raw)
  To: benh
  Cc: Kristian Hoegsberg, linux-kernel, linuxppc-dev, Stefan Richter,
	sparclinux, linux1394-devel, Sam Ravnborg, Harvey Harrison
In-Reply-To: <1204166422.15052.334.camel@pasglop>

On Wednesday 27 February 2008 09:40:22 pm Benjamin Herrenschmidt wrote:
> On Wed, 2008-02-27 at 14:58 -0500, Jarod Wilson wrote:
> > On Saturday 23 February 2008 06:24:17 am Stefan Richter wrote:
> > > The generation of incoming requests was filled in in wrong byte order
> > > on machines with big endian CPU.
> > >
> > > Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
> > > Cc: sparclinux@vger.kernel.org
> > > Cc: linuxppc-dev@ozlabs.org
> > > ---
> > >
> > > This patch is a shot in the dark, based on a warning when building with
> > > C=1 CHECKFLAGS="-D__CHECK_ENDIAN__".  Is it really a fix, or was the
> > > previous code accidentally correct?
> > >
> > > This needs to be tested on different big endian PCs, if possible with
> > > the Apple Uninorth FireWire controller and other types of controllers.
> > > One test which involves ohci->request_generation is simply with an
> > > SBP-2 device (harddisk, CD-ROM...).  Does SBP-2 login etc. work?
> >
> > Works just fine with the Apple UniNorth controller in my powerbook in
> > cursory testing. Tested with multiple sbp2 hard disks, plugging and
> > unplugging, mounting and unmounting, etc.
>
> Which specific rev/version of the uninorth controller ?

lspci says Apple Computer Inc. UniNorth 2 FireWire (rev 81), pci id 106b:0031, 
subsys id 106b:5811.

(Its a circa 2004 Aluminum 15" PowerBook G4 @ 1.67GHz, fwiw).

> There is the "interesting" one has vendorID Apple and deviceID 0x0018,
> the normal ones have different deviceIDs (and are just lucent
> controllers afaik).

Under Mac OS X, system.log says "FireWire (OHCI) Apple ID 31 built-in now 
active". Could still be lucent though, judging by the subsys device ID of 
5811, which matches up w/the Lucent/Agere FW323. But no, apparently I don't 
have the interesting one.


-- 
Jarod Wilson
jwilson@redhat.com

^ permalink raw reply

* Re: [PATCH 1/2] firewire: endianess fix
From: Jarod Wilson @ 2008-02-28  3:33 UTC (permalink / raw)
  To: linux1394-devel
  Cc: Kristian Hoegsberg, linux-kernel, linuxppc-dev, Stefan Richter,
	sparclinux, Sam Ravnborg, Harvey Harrison
In-Reply-To: <200802271458.28401.jwilson@redhat.com>

On Wednesday 27 February 2008 02:58:28 pm Jarod Wilson wrote:
> On Saturday 23 February 2008 06:24:17 am Stefan Richter wrote:
> > The generation of incoming requests was filled in in wrong byte order on
> > machines with big endian CPU.
> >
> > Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
> > Cc: sparclinux@vger.kernel.org
> > Cc: linuxppc-dev@ozlabs.org
> > ---
> >
> > This patch is a shot in the dark, based on a warning when building with
> > C=1 CHECKFLAGS="-D__CHECK_ENDIAN__".  Is it really a fix, or was the
> > previous code accidentally correct?
> >
> > This needs to be tested on different big endian PCs, if possible with
> > the Apple Uninorth FireWire controller and other types of controllers.
> > One test which involves ohci->request_generation is simply with an SBP-2
> > device (harddisk, CD-ROM...).  Does SBP-2 login etc. work?
>
> Works just fine with the Apple UniNorth controller in my powerbook in
> cursory testing. Tested with multiple sbp2 hard disks, plugging and
> unplugging, mounting and unmounting, etc.
>
> > If possible, also test whether the device remains accessible after
> > forcing a bus reset, e.g. by "echo br short > firecontrol".  You need
> > the easy to build utility firecontrol and a libraw1394 with "juju"
> > backend.  See wiki.linux1394.org for directions.
>
> Forgot to check that it survived bus resets. Will try to double-check that
> tonight.

Survives bus resets just fine, including with ongoing I/O from an sbp2 disk.


-- 
Jarod Wilson
jwilson@redhat.com

^ permalink raw reply

* dtc: Fix indentation of fixup_phandle_references
From: David Gibson @ 2008-02-28  5:42 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

Somehow the indentation of this function is messed up - 7 spaces
instead of 1 tab (probably a bad copy paste from a patch file).  This
patch fixes it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/checks.c
===================================================================
--- dtc.orig/checks.c	2008-02-28 16:40:04.000000000 +1100
+++ dtc/checks.c	2008-02-28 16:40:13.000000000 +1100
@@ -337,23 +337,23 @@
 static void fixup_phandle_references(struct check *c, struct node *dt,
 				     struct node *node, struct property *prop)
 {
-      struct marker *m = prop->val.markers;
-      struct node *refnode;
-      cell_t phandle;
-
-      for_each_marker_of_type(m, REF_PHANDLE) {
-	      assert(m->offset + sizeof(cell_t) <= prop->val.len);
-
-	      refnode = get_node_by_ref(dt, m->ref);
-	      if (! refnode) {
-		      FAIL(c, "Reference to non-existent node or label \"%s\"\n",
-			   m->ref);
-		      continue;
-	      }
-
-	      phandle = get_node_phandle(dt, refnode);
-	      *((cell_t *)(prop->val.val + m->offset)) = cpu_to_be32(phandle);
-      }
+	struct marker *m = prop->val.markers;
+	struct node *refnode;
+	cell_t phandle;
+
+	for_each_marker_of_type(m, REF_PHANDLE) {
+		assert(m->offset + sizeof(cell_t) <= prop->val.len);
+
+		refnode = get_node_by_ref(dt, m->ref);
+		if (! refnode) {
+			FAIL(c, "Reference to non-existent node or label \"%s\"\n",
+			     m->ref);
+			continue;
+		}
+
+		phandle = get_node_phandle(dt, refnode);
+		*((cell_t *)(prop->val.val + m->offset)) = cpu_to_be32(phandle);
+	}
 }
 CHECK(phandle_references, NULL, NULL, fixup_phandle_references, NULL, ERROR,
       &duplicate_node_names, &explicit_phandles);

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [PATCH 1/2] firewire: endianess fix
From: Benjamin Herrenschmidt @ 2008-02-28  6:25 UTC (permalink / raw)
  To: Jarod Wilson
  Cc: Kristian Hoegsberg, linux-kernel, linuxppc-dev, Stefan Richter,
	sparclinux, linux1394-devel, Sam Ravnborg, Harvey Harrison
In-Reply-To: <200802272221.38985.jwilson@redhat.com>


> Under Mac OS X, system.log says "FireWire (OHCI) Apple ID 31 built-in now 
> active". Could still be lucent though, judging by the subsys device ID of 
> 5811, which matches up w/the Lucent/Agere FW323. But no, apparently I don't 
> have the interesting one.

Well, it's interesting in the sense that it's a "normal" OHCI then on a
BE machine :-) My Pismo, which had the weirdo one, unfortunately died a
while ago. I'll see if I can find another machine with that one in.

Cheers,
Ben.

^ permalink raw reply

* Re: 2.6.25-rc3 on mpc8548amc doesn't boot
From: Kumar Gala @ 2008-02-28  7:03 UTC (permalink / raw)
  To: maxime louvel; +Cc: linuxppc-embedded
In-Reply-To: <dda529d0802270825p527fd1b5i3e5a72a16bd95a75@mail.gmail.com>


On Feb 27, 2008, at 10:25 AM, maxime louvel wrote:

> Hi again,
>
> I am answering my self sorry for the spam...
> Just to say that my problem has been solve if someone has something  
> similar...
> My changes were good, I just didn't compile the good file...

Any plans to submit patches to add support for this board to the kernel?

- k

^ permalink raw reply

* Re: 2.6.25-rc3 on mpc8548amc doesn't boot
From: maxime louvel @ 2008-02-28  7:56 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-embedded
In-Reply-To: <B3C9F997-0D0B-4033-9FED-F8B6B7F5DABC@kernel.crashing.org>

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

Hi,

I wanted first to check how the kernel is behaving, with a few tests.
Then what is the best solution to do this ?
A patch from the 2.6.25-rc3 vanilla kernel ?

cheers,
Maxime

On Thu, Feb 28, 2008 at 7:03 AM, Kumar Gala <galak@kernel.crashing.org>
wrote:

>
> On Feb 27, 2008, at 10:25 AM, maxime louvel wrote:
>
> > Hi again,
> >
> > I am answering my self sorry for the spam...
> > Just to say that my problem has been solve if someone has something
> > similar...
> > My changes were good, I just didn't compile the good file...
>
> Any plans to submit patches to add support for this board to the kernel?
>
> - k
>
>


-- 
Maxime Louvel
0044 7964 5555 80
43 Allen road
Whitemore reans
WV60AW Wolverhampton
United Kingdom

[-- Attachment #2: Type: text/html, Size: 1135 bytes --]

^ permalink raw reply

* Re: [RFC][PATCH] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround
From: Benjamin Herrenschmidt @ 2008-02-28  7:54 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <20080226090210.6816c130@zod.rchland.ibm.com>


On Tue, 2008-02-26 at 09:02 -0600, Josh Boyer wrote:
> Seems the code will do the right thing since everything is using
> flags.  I suppose my question can be withdrawn.  It is slightly
> confusing to do it that way though.  Perhaps a function to do
> read-modify-writes on DCRs would be welcome.  dcr_modify anyone?

Yup, we probably want to expose a dcri_clrset(), though I would also
expose then __mtdcri/__mfdcri (non locked version) and the spinlock in
case somebody wants to do something fancy.

Cheers,
Ben.

^ permalink raw reply

* Re: 2.6.25-rc3 on mpc8548amc doesn't boot
From: maxime louvel @ 2008-02-28  8:31 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-embedded
In-Reply-To: <dda529d0802272356p5db9066s5a9aaa336e74ab81@mail.gmail.com>

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

Hi,

I have a question for submitting my changes:
As I said I have commented a few line in arch/powerpc/boot/Makefile
#$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
#$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
#$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
#$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
#$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=40

I guess that shouldn't be integrated in my patch, should I ?
For what I have found on websearch that should come from my gcc version (
3.4.3 with specific stuff).
But still I needed that...

thanks,
Maxime

On Thu, Feb 28, 2008 at 7:56 AM, maxime louvel <m.louvel@gmail.com> wrote:

> Hi,
>
> I wanted first to check how the kernel is behaving, with a few tests.
> Then what is the best solution to do this ?
> A patch from the 2.6.25-rc3 vanilla kernel ?
>
> cheers,
> Maxime
>
>
> On Thu, Feb 28, 2008 at 7:03 AM, Kumar Gala <galak@kernel.crashing.org>
> wrote:
>
> >
> > On Feb 27, 2008, at 10:25 AM, maxime louvel wrote:
> >
> > > Hi again,
> > >
> > > I am answering my self sorry for the spam...
> > > Just to say that my problem has been solve if someone has something
> > > similar...
> > > My changes were good, I just didn't compile the good file...
> >
> > Any plans to submit patches to add support for this board to the kernel?
> >
> > - k
> >
> >
>
>
> --
> Maxime Louvel
> 0044 7964 5555 80
> 43 Allen road
> Whitemore reans
> WV60AW Wolverhampton
> United Kingdom
>



-- 
Maxime Louvel
0044 7964 5555 80
43 Allen road
Whitemore reans
WV60AW Wolverhampton
United Kingdom

[-- Attachment #2: Type: text/html, Size: 2317 bytes --]

^ permalink raw reply

* Re: [PATCH 1/2] firewire: endianess fix
From: Stefan Richter @ 2008-02-28  8:41 UTC (permalink / raw)
  To: benh
  Cc: Kristian Hoegsberg, linux-kernel, linuxppc-dev, sparclinux,
	linux1394-devel, Sam Ravnborg, Harvey Harrison
In-Reply-To: <1204166506.15052.336.camel@pasglop>

Benjamin Herrenschmidt wrote:
> Do we have the workaround for the old Apple UniNorth in the new FW OHCI
> driver (for selfID swapping iirc ?)

According to ohci1394.c, it selfIDs and headers of incoming packets are 
not byte-swapped by the old Apple Uninorth FireWire part.  And no, 
firewire-ohci doesn't have the workaround yet.

It should be trivial to copy'n'paste ohci1394's workaround into fw-ohci, 
but it would be good if someone could test before and after.

BTW, since that code is touched everytime a packet is received, we 
should enclose such a workaround in #ifdef CONFIG_PPC_PMAC && 
CONFIG_PPC32, shouldn't we?  (As a second step after adding the workaround.)
-- 
Stefan Richter
-=====-==--- --=- ===--
http://arcgraph.de/sr/

^ permalink raw reply

* dtc: Strip redundant "name" properties
From: David Gibson @ 2008-02-28  9:53 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

If an input device tree has "name" properties which are correct, then
they are redundant (because they can be derived from the unit name).
Therefore, extend the checking code for correctness of "name"
properties to remove them if they are correct.  dtc will still insert
name properties in the output if that's of a sufficiently old version
to require them.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/checks.c
===================================================================
--- dtc.orig/checks.c	2008-02-27 15:07:31.000000000 +1100
+++ dtc/checks.c	2008-02-27 21:00:30.000000000 +1100
@@ -316,9 +316,14 @@
 static void check_name_properties(struct check *c, struct node *root,
 				  struct node *node)
 {
-	struct property *prop;
+	struct property **pp, *prop = NULL;
+
+	for (pp = &node->proplist; *pp; pp = &((*pp)->next))
+		if (streq((*pp)->name, "name")) {
+			prop = *pp;
+			break;
+		}
 
-	prop = get_property(node, "name");
 	if (!prop)
 		return; /* No name property, that's fine */
 
@@ -326,6 +331,12 @@
 	    || (memcmp(prop->val.val, node->name, node->basenamelen) != 0))
 		FAIL(c, "\"name\" property in %s is incorrect (\"%s\" instead"
 		     " of base node name)", node->fullpath, prop->val.val);
+
+	/* The name property is correct, and therefore redundant.  Delete it */
+	*pp = prop->next;
+	free(prop->name);
+	data_free(prop->val);
+	free(prop);
 }
 CHECK_IS_STRING(name_is_string, "name", ERROR);
 NODE_CHECK(name_properties, NULL, ERROR, &name_is_string);

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* dtc: Test and fix conversion to/from old dtb versions
From: David Gibson @ 2008-02-28  9:55 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

This patch adds testcases which test dtc when used to convert between
different dtb versions.  These tests uncovered a couple of bugs
handling old dtb versions, which are also fixed.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh	2008-02-28 16:58:46.000000000 +1100
+++ dtc/tests/run_tests.sh	2008-02-28 20:53:39.000000000 +1100
@@ -173,6 +173,19 @@
 	run_test dtbs_equal_ordered $tree odts_$tree.test.dtb
     done
 
+    # Check version conversions
+    for tree in test_tree1.dtb ; do
+	 for aver in 1 2 3 16 17; do
+	     atree="ov${aver}_$tree.test.dtb"
+	     run_test dtc.sh -I dtb -O dtb -V$aver -o $atree $tree
+	     for bver in 16 17; do
+		 btree="ov${bver}_$atree"
+		 run_test dtc.sh -I dtb -O dtb -V$bver -o $btree $atree
+		 run_test dtbs_equal_ordered $btree $tree
+	     done
+	 done
+    done
+
     # Check some checks
     run_test dtc-checkfails.sh duplicate_node_names -- -I dts -O dtb dup-nodename.dts
     run_test dtc-checkfails.sh duplicate_property_names -- -I dts -O dtb dup-propname.dts
Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c	2008-02-28 17:02:36.000000000 +1100
+++ dtc/flattree.c	2008-02-28 20:53:39.000000000 +1100
@@ -410,7 +410,7 @@
 	 * the reserve buffer, add the reserve map terminating zeroes,
 	 * the device tree itself, and finally the strings.
 	 */
-	blob = data_append_data(blob, &fdt, sizeof(fdt));
+	blob = data_append_data(blob, &fdt, vi->hdr_size);
 	blob = data_append_align(blob, 8);
 	blob = data_merge(blob, reservebuf);
 	blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry));
@@ -809,7 +809,7 @@
 
 struct boot_info *dt_from_blob(FILE *f)
 {
-	u32 magic, totalsize, version, size_str, size_dt;
+	u32 magic, totalsize, version, size_dt;
 	u32 off_dt, off_str, off_mem_rsvmap;
 	int rc;
 	char *blob;
@@ -889,11 +889,13 @@
 	if (off_str > totalsize)
 		die("String table offset exceeds total size\n");
 
-	size_str = -1;
 	if (version >= 3) {
-		size_str = be32_to_cpu(fdt->size_dt_strings);
+		u32 size_str = be32_to_cpu(fdt->size_dt_strings);
 		if (off_str+size_str > totalsize)
 			die("String table extends past total size\n");
+		inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str);
+	} else {
+		inbuf_init(&strbuf, blob + off_str, blob + totalsize);
 	}
 
 	if (version >= 17) {
@@ -911,10 +913,6 @@
 	inbuf_init(&memresvbuf,
 		   blob + off_mem_rsvmap, blob + totalsize);
 	inbuf_init(&dtbuf, blob + off_dt, blob + totalsize);
-	if (size_str >= 0)
-		inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str);
-	else
-		inbuf_init(&strbuf, blob + off_str, blob + totalsize);
 
 	reservelist = flat_read_mem_reserve(&memresvbuf);
 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* dtc: Use for_each_marker_of_type in asm_emit_data()
From: David Gibson @ 2008-02-28  9:58 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

For no good reason, asm_emit_data() open-codes the equivalent of the
for_each_marker_of_type macro.  Use the macro instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

---
 flattree.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c	2008-02-28 20:53:51.000000000 +1100
+++ dtc/flattree.c	2008-02-28 20:56:56.000000000 +1100
@@ -162,14 +162,10 @@
 {
 	FILE *f = e;
 	int off = 0;
-	struct marker *m;
+	struct marker *m = d.markers;
 
-	m = d.markers;
-	while (m) {
-		if (m->type == LABEL)
-			emit_offset_label(f, m->ref, m->offset);
-		m = m->next;
-	}
+	for_each_marker_of_type(m, LABEL)
+		emit_offset_label(f, m->ref, m->offset);
 
 	while ((d.len - off) >= sizeof(u32)) {
 		fprintf(f, "\t.long\t0x%x\n",

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* [PATCH] MTD: fix partition scan control logic in physmap_of and fsl_elbc_nand
From: Li Yang @ 2008-02-28 12:17 UTC (permalink / raw)
  To: dwmw2, linux-mtd; +Cc: Stefan Roese, linuxppc-dev, Li Yang

The generic rule for partition scan is to try all supported
partition types before an usable partition table is found.
However the original code returns unsuccessful when there is
an error in any of the partition types.

Signed-off-by: Li Yang <leoli@freescale.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
---
I later found that Stefan has proposed a similar patch for physmap_of
and Peter proposed another patch to fix cmdlinepart instead.
I'd say that even after cmdlinepart patch is applied the scan control
logic still needs to be fixed.

 drivers/mtd/maps/physmap_of.c    |   12 ++----------
 drivers/mtd/nand/fsl_elbc_nand.c |    7 +------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 49acd41..5ebbbc4 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -225,23 +225,15 @@ static int __devinit of_flash_probe(struct of_device *dev,
 	 * line, these take precedence over device tree information */
 	err = parse_mtd_partitions(info->mtd, part_probe_types,
 	                           &info->parts, 0);
-	if (err < 0)
-		return err;
 
 #ifdef CONFIG_MTD_OF_PARTS
-	if (err == 0) {
+	if (err <= 0)
 		err = of_mtd_parse_partitions(&dev->dev, info->mtd,
 		                              dp, &info->parts);
-		if (err < 0)
-			return err;
-	}
 #endif
 
-	if (err == 0) {
+	if (err <= 0)
 		err = parse_obsolete_partitions(dev, info, dp);
-		if (err < 0)
-			return err;
-	}
 
 	if (err > 0)
 		add_mtd_partitions(info->mtd, info->parts, err);
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index b025dfe..72e9bd9 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -1054,16 +1054,11 @@ static int fsl_elbc_chip_probe(struct fsl_elbc_ctrl *ctrl,
 	/* First look for RedBoot table or partitions on the command
 	 * line, these take precedence over device tree information */
 	ret = parse_mtd_partitions(&priv->mtd, part_probe_types, &parts, 0);
-	if (ret < 0)
-		goto err;
 
 #ifdef CONFIG_MTD_OF_PARTS
-	if (ret == 0) {
+	if (ret <= 0)
 		ret = of_mtd_parse_partitions(priv->dev, &priv->mtd,
 		                              node, &parts);
-		if (ret < 0)
-			goto err;
-	}
 #endif
 
 	if (ret > 0)
-- 
1.5.4.rc4

^ permalink raw reply related

* Re: [PATCH] fs_enet: Remove unused fields in the fs_mii_bb_platform_info structure.
From: Laurent Pinchart @ 2008-02-28 12:49 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <200802151427.44321.laurentp@cse-semaphore.com>

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

On Friday 15 February 2008 14:27, Laurent Pinchart wrote:
> The mdio_port, mdio_bit, mdc_port and mdc_bit fields in the
> fs_mii_bb_platform_info structure are left-overs from the move to the Phy
> Abstraction Layer subsystem. They can be safely removed.
>
> Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
[snip]

Is there something wrong with the patch ?

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

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

^ permalink raw reply

* Re: [RFC 05/10] mn10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macroses
From: David Howells @ 2008-02-28 12:50 UTC (permalink / raw)
  To: gorcunov
  Cc: chris, linux-m68k, linux-m32r, jdike, linux-kernel, linuxppc-dev,
	paulus, geert, sam, takata, rth
In-Reply-To: <20080227210003.484325295@gmail.com>

gorcunov@gmail.com wrote:

> Subject: [RFC 05/10] mn10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macroses
> X-RedHat-Spam-Score: -1.005 
> 
> This patch includes page.h header into liker script that
> allow us to use PAGE_SIZE macro instead of numeric constant
> 
> Also PERCPU macro is used instead of explicit section definition
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

Acked-by: David Howells <dhowells@redhat.com>

^ permalink raw reply

* undefined references to __udivdi3 on powerpc
From: Olaf Hering @ 2008-02-28 13:37 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev


While debugging __divdi3 calls in drivers/crypto/hifn_795x.c (due to the
ndelay() delay call with a s64), I found even more breakage of that
sort. This is after a allnoconfig with ARCH=powerpc in 2.6.25-rc3,
plus CONFIG_MODULES=y and CONFIG_CRYPTO_DEV_HIFN_795X=y:

  LD      .tmp_vmlinux1
  kernel/built-in.o: In function `update_xtime_cache':
  (.text+0x221a0): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `update_xtime_cache':
  (.text+0x221c0): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `getnstimeofday':
  (.text+0x22330): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `getnstimeofday':
  (.text+0x22350): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `timekeeping_resume':
  timekeeping.c:(.text+0x226a0): undefined reference to `__udivdi3'
  timekeeping.c:(.text+0x22778): undefined reference to `__umoddi3'
  timekeeping.c:(.text+0x22798): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x22c7c): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x22c9c): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x230f8): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x23118): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `do_settimeofday':
  (.text+0x23520): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `timekeeping_init':
  (.init.text+0x1870): undefined reference to `__udivdi3'
  make[1]: *** [.tmp_vmlinux1] Error 1

But its not a regression, 2.6.24 allnoconfig does not link either on
powerpc32. 

How can this be fixed?

Olaf

^ permalink raw reply

* Re: 2.6.25-rc3 on mpc8548amc doesn't boot
From: Kumar Gala @ 2008-02-28 14:21 UTC (permalink / raw)
  To: maxime louvel; +Cc: linuxppc-embedded
In-Reply-To: <dda529d0802280031o23fb8de1ya5de2db876013e0b@mail.gmail.com>


On Feb 28, 2008, at 2:31 AM, maxime louvel wrote:

> Hi,
>
> I have a question for submitting my changes:
> As I said I have commented a few line in arch/powerpc/boot/Makefile
> #$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
> #$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
> #$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
> #$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
> #$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=40
>
> I guess that shouldn't be integrated in my patch, should I ?
> For what I have found on websearch that should come from my gcc  
> version (3.4.3 with specific stuff).
> But still I needed that...

I thought Josh published a patch to work around the toolchain issues  
people had.

But yes, this shouldn't be part of the patch :)

- k

^ permalink raw reply

* Re: 2.6.25-rc3 on mpc8548amc doesn't boot
From: Kumar Gala @ 2008-02-28 14:23 UTC (permalink / raw)
  To: maxime louvel; +Cc: linuxppc-embedded
In-Reply-To: <dda529d0802272356p5db9066s5a9aaa336e74ab81@mail.gmail.com>


On Feb 28, 2008, at 1:56 AM, maxime louvel wrote:

> Hi,
>
> I wanted first to check how the kernel is behaving, with a few tests.
> Then what is the best solution to do this ?
> A patch from the 2.6.25-rc3 vanilla kernel ?

2.6.25-rc3 is fine.  The best solution is against my git-tree (git:// 
git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git).

-k

^ permalink raw reply

* Re: TQM5200 2.6-denx SM501 voyager enabling problem.
From: Martin Krause @ 2008-02-28 15:01 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <BLU106-W20B00A907B0D9DAD5014E2CA1D0@phx.gbl>

Hi Pedro,

Pedro Luis D. L. <carcadiz <at> hotmail.com> writes:
> Hello,
> I'm working right now with a TQM5200 microcontroller on a STX5200 board.
> I'm having problems to enable SM501 video output using 2.6-denx kernel. The 

Have you tried to contact TQ-Components (the manufacturer of the TQM5200 
board)? Under the email address support@tqc.de you should get help for
hardware and software questions to all of their products.

Regards,
Martin

^ permalink raw reply

* RE: TQM5200 2.6-denx SM501 voyager enabling problem.
From: Pedro Luis D. L. @ 2008-02-28 15:31 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <loom.20080228T145124-686@post.gmane.org>


Martin Krause  wrote:


> Hi Pedro,
>=20
> Pedro Luis D. L.  hotmail.com> writes:
>> Hello,
>> I'm working right now with a TQM5200 microcontroller on a STX5200 board.
>> I'm having problems to enable SM501 video output using 2.6-denx kernel. =
The=20
>=20
> Have you tried to contact TQ-Components (the manufacturer of the TQM5200=
=20
> board)? Under the email address support@tqc.de you should get help for
> hardware and software questions to all of their products.
>=20
> Regards,
> Martin

Hi Martin,

Well, that sounds like a very reasonable suggestion. I think I should give =
it a try. Maybe my bad experience with other providers pushed me to ask in =
this list before. But you're right!

Regards,
Pedro.
=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

_________________________________________________________________
Tecnolog=EDa, moda, motor, viajes,=85suscr=EDbete a nuestros boletines para=
 estar siempre a la =FAltima
Guapos y guapas, clips musicales y estrenos de cine. =

^ permalink raw reply

* [PATCH] fs_enet: Don't call NAPI functions when NAPI is not used.
From: Laurent Pinchart @ 2008-02-28 15:36 UTC (permalink / raw)
  To: linuxppc-dev list

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

fs_enet_close() calls napi_disable() unconditionally. This patch skips the
call when use_napi isn't set.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
---
 drivers/net/fs_enet/fs_enet-main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index c83bd65..1801ce3 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)
 
 	netif_stop_queue(dev);
 	netif_carrier_off(dev);
-	napi_disable(&fep->napi);
+	if (fep->fpi->use_napi)
+		napi_disable(&fep->napi);
 	phy_stop(fep->phydev);
 
 	spin_lock_irqsave(&fep->lock, flags);
-- 
1.5.0

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

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

^ permalink raw reply related

* Re: undefined references to __udivdi3 on powerpc
From: Segher Boessenkool @ 2008-02-28 15:40 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20080228133718.GA8383@aepfle.de>

> While debugging __divdi3 calls in drivers/crypto/hifn_795x.c (due to 
> the
> ndelay() delay call with a s64), I found even more breakage of that
> sort. This is after a allnoconfig with ARCH=powerpc in 2.6.25-rc3,
> plus CONFIG_MODULES=y and CONFIG_CRYPTO_DEV_HIFN_795X=y:

I cannot reproduce this, but my tree has

	time: prevent the loop in timespec_add_ns() from being optimised away

which is in -mm now.  Could you try that patch?


Segher

^ permalink raw reply

* RE: FW: [PATCH] Xilinx: BSP: Updated ML405 to match hardware used for testing
From: John Linn @ 2008-02-28 16:07 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <20080228110153.00eb5e1d.sfr@canb.auug.org.au>

I think I found my problem that mangled the messages.  I really meant to
send both messages to the embedded ppc list rather than this more
general list.

Thanks,
John

-----Original Message-----
From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]=20
Sent: Wednesday, February 27, 2008 5:02 PM
To: John Linn
Cc: linuxppc-dev@ozlabs.org; git-dev
Subject: Re: FW: [PATCH] Xilinx: BSP: Updated ML405 to match hardware
used for testing

Hi John,

n Wed, 27 Feb 2008 16:15:18 -0700 "John Linn" <John.Linn@xilinx.com>
wrote:
>
> The default config file for the ML405 and the xparameters*.h file
> were updated to match the hardware used for testing. The platform
> data in virtex_devices.c was updated for the LL TEMAC driver
> which now uses the dcr_host field to determine if it should use
> DCR for the DMA.
>=20
> Signed-off-by: John Linn <john.linn>

This was badly wrapped as well.

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

^ permalink raw reply

* [PATCH 0/3] hotplug memory remove updates
From: Badari Pulavarty @ 2008-02-28 16:43 UTC (permalink / raw)
  To: linuxppc-dev

Hi Paul,

Here are the hotplug memory remove updates for 2.6.25-rc2-mm1.

[PATCH 1/3] ppc64-specific remove htab bolted mapping support
[PATCH 2/3] generic __remove_pages() support
[PATCH 3/3] ppc64-specific memory notifier support

As you can see PATCH 1,3 are ppc64-specific. PATCH 1 was already
reviewed by you. Could you please review PATCH 3 and let me know,
if I missing something ?

I would like to submit these for -mm inclusion after your review.

Thanks,
Badari

^ permalink raw reply

* [PATCH 1/3] ppc64-specific remove htab bolted mapping support
From: Badari Pulavarty @ 2008-02-28 16:44 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1204217028.28696.10.camel@dyn9047017100.beaverton.ibm.com>

For memory remove, we need to clean up htab mappings for the
section of the memory we are removing.

This patch implements support for removing htab bolted mappings
for ppc64 lpar. Other sub-archs, may need to implement similar
functionality for the hotplug memory remove to work. 

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/mm/hash_utils_64.c       |   26 ++++++++++++++++++++++++++
 arch/powerpc/platforms/pseries/lpar.c |   15 +++++++++++++++
 include/asm-powerpc/machdep.h         |    2 ++
 include/asm-powerpc/sparsemem.h       |    1 +
 5 files changed, 44 insertions(+), 4 deletions(-)

Index: linux-2.6.25-rc2/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- linux-2.6.25-rc2.orig/arch/powerpc/mm/hash_utils_64.c	2008-02-15 12:57:20.000000000 -0800
+++ linux-2.6.25-rc2/arch/powerpc/mm/hash_utils_64.c	2008-02-27 12:59:53.000000000 -0800
@@ -191,6 +191,26 @@ int htab_bolt_mapping(unsigned long vsta
 	return ret < 0 ? ret : 0;
 }
 
+static int htab_remove_mapping(unsigned long vstart, unsigned long vend,
+		      int psize, int ssize)
+{
+	unsigned long vaddr;
+	unsigned int step, shift;
+
+	shift = mmu_psize_defs[psize].shift;
+	step = 1 << shift;
+
+	if (!ppc_md.hpte_removebolted) {
+		printk("Sub-arch doesn't implement hpte_removebolted\n");
+		return -EINVAL;
+	}
+
+	for (vaddr = vstart; vaddr < vend; vaddr += step)
+		ppc_md.hpte_removebolted(vaddr, psize, ssize);
+
+	return 0;
+}
+
 static int __init htab_dt_scan_seg_sizes(unsigned long node,
 					 const char *uname, int depth,
 					 void *data)
@@ -429,6 +449,12 @@ void create_section_mapping(unsigned lon
 			_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
 			mmu_linear_psize, mmu_kernel_ssize));
 }
+
+int remove_section_mapping(unsigned long start, unsigned long end)
+{
+	return htab_remove_mapping(start, end, mmu_linear_psize,
+				mmu_kernel_ssize);
+}
 #endif /* CONFIG_MEMORY_HOTPLUG */
 
 static inline void make_bl(unsigned int *insn_addr, void *func)
Index: linux-2.6.25-rc2/include/asm-powerpc/sparsemem.h
===================================================================
--- linux-2.6.25-rc2.orig/include/asm-powerpc/sparsemem.h	2008-02-15 12:57:20.000000000 -0800
+++ linux-2.6.25-rc2/include/asm-powerpc/sparsemem.h	2008-02-27 12:59:53.000000000 -0800
@@ -15,6 +15,7 @@
 
 #ifdef CONFIG_MEMORY_HOTPLUG
 extern void create_section_mapping(unsigned long start, unsigned long end);
+extern int remove_section_mapping(unsigned long start, unsigned long end);
 #ifdef CONFIG_NUMA
 extern int hot_add_scn_to_nid(unsigned long scn_addr);
 #else
Index: linux-2.6.25-rc2/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- linux-2.6.25-rc2.orig/arch/powerpc/platforms/pseries/lpar.c	2008-02-15 12:57:20.000000000 -0800
+++ linux-2.6.25-rc2/arch/powerpc/platforms/pseries/lpar.c	2008-02-27 12:59:53.000000000 -0800
@@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate
 	BUG_ON(lpar_rc != H_SUCCESS);
 }
 
+static void pSeries_lpar_hpte_removebolted(unsigned long ea,
+					   int psize, int ssize)
+{
+	unsigned long slot, vsid, va;
+
+	vsid = get_kernel_vsid(ea, ssize);
+	va = hpt_va(ea, vsid, ssize);
+
+	slot = pSeries_lpar_hpte_find(va, psize, ssize);
+	BUG_ON(slot == -1);
+
+	pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0);
+}
+
 /* Flag bits for H_BULK_REMOVE */
 #define HBR_REQUEST	0x4000000000000000UL
 #define HBR_RESPONSE	0x8000000000000000UL
@@ -597,6 +611,7 @@ void __init hpte_init_lpar(void)
 	ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
 	ppc_md.hpte_insert	= pSeries_lpar_hpte_insert;
 	ppc_md.hpte_remove	= pSeries_lpar_hpte_remove;
+	ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted;
 	ppc_md.flush_hash_range	= pSeries_lpar_flush_hash_range;
 	ppc_md.hpte_clear_all   = pSeries_lpar_hptab_clear;
 }
Index: linux-2.6.25-rc2/include/asm-powerpc/machdep.h
===================================================================
--- linux-2.6.25-rc2.orig/include/asm-powerpc/machdep.h	2008-02-15 12:57:20.000000000 -0800
+++ linux-2.6.25-rc2/include/asm-powerpc/machdep.h	2008-02-27 12:59:53.000000000 -0800
@@ -68,6 +68,8 @@ struct machdep_calls {
 				       unsigned long vflags,
 				       int psize, int ssize);
 	long		(*hpte_remove)(unsigned long hpte_group);
+	void            (*hpte_removebolted)(unsigned long ea,
+					       int psize, int ssize);
 	void		(*flush_hash_range)(unsigned long number, int local);
 
 	/* special for kexec, to be called in real mode, linar mapping is

^ 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