Skip to contentSkip to conversation

Add Linux ASMP support for MPC8641D]

PATCH RESEND Siva Prasad 1 participant 1 message Mar 28, 2007 1 message not in the archive

lore
Share & tools
lore

Siva Prasad

author NAK
#1 lore raw
In reply to a message not in the archive

Hi,

I also noticed that you have a defined all the PCI devices in the tree, but CONFIG_PCI is actually not set. Is it really required to define the tree when it is not really used.

* In 8641D running in ASMP mode, does this patch support PCI?

* Does the same uImage built will work for both the Cores, or Core0 is expected to boot different image with PCI enabled, and Core1 this image?

Thanks
Siva

Date: Thu, 22 Mar 2007 21:55:30 -0600 (CST)
From: Milton Miller <[email protected]>
Subject: Re: [Fwd: [PATCH Resend 01/02] Add Linux ASMP support for

	MPC8641D]

To: Jon Loeliger <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>

Review

Quoted 4 lines · Jon Loeliger
(quoted diff) +4 -0
+	cpus {
+		#cpus =3D <1>;
+		#address-cells =3D <1>;
+=09

#cpus is not needed, please remove.

Quoted 1 line
(quoted diff) +1 -0
+		mpic: pic at 40000 {

..

Review

Quoted 2 lines
(quoted diff) +2 -0
+			compatible =3D "chrp,open-pic";
+			device_type =3D "open-pic";

Since its shared, we could add another type here to let us know. [and yes, the interrupts property here needs to become something else, probably with ranges in its name].

Review

Quoted 7 lines

=20

(quoted diff) +3 -0
 	/* Alloc mpic structure and per isu has 16 INT entries. */
 	mpic1 =3D mpic_alloc(np, res.start,
+#ifdef CONFIG_ASMP
+			MPIC_PRIMARY | MPIC_BIG_ENDIAN,
+#else
 			MPIC_PRIMARY | MPIC_WANTS_RESET |

MPIC_BIG_ENDIAN,

Quoted 1 line

+#endif

How about:
+#ifndef CONFIG_ASMP
+ MPIC_WANTS_RESET |=20
+#endif
MPIC_PRIMARY | MPIC_BIG_ENDIAN,

Just a suggestion.

arch/powerpc/sysdev/mpic.c static void mpic_set_affinity(unsigned int irq,

Quoted 5 lines
arch/powerpc/sysdev/mpic.c +0 -0
index bcfb900..739d8bf 100644
@@ -707,9 +707,15 @@ static void mpic_set_affinity(unsigned int irq,

cpumask_t cpumask)

Quoted 4 lines
arch/powerpc/sysdev/mpic.c +0 -0
 	cpumask_t tmp;

=20

arch/powerpc/sysdev/mpic.c +0 -1
 	cpus_and(tmp, cpumask, cpu_online_map);
-

arch/powerpc/sysdev/mpic.c

Quoted 10 lines
arch/powerpc/sysdev/mpic.c +8 -1
+#ifdef CONFIG_ASMP
+	unsigned int pir;
+	pir =3D mfspr(SPRN_PIR);
+	mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION),
+			1 << pir);
+#else
 	mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION),
-		       mpic_physmask(cpus_addr(tmp)[0]));=09
+		       mpic_physmask(cpus_addr(tmp)[0]));
+#endif

NAK.
Don't use mfspr in mpic.c. =20
set hard_smp_processor_id() instead, mpic_physmask already uses it.

drivers/net/gianfar.c

Quoted 13 lines
drivers/net/gianfar.c +0 -0
index 1f83988..7ec67d9 100644
@@ -692,11 +692,21 @@ int startup_gfar(struct net_device *dev)

=20
priv->tx_bd_base =3D (struct txbd8 *) vaddr;
=20

drivers/net/gianfar.c +5 -0
+#ifdef CONFIG_ASMP
+	unsigned int pir;
+	pir =3D mfspr(SPRN_PIR);
+	/* enet DMA only understands physical addresses */
+	gfar_write(&regs->tbase0, ((unsigned int)addr + 0x10000000 *

pir));

drivers/net/gianfar.c

Quoted 3 lines
drivers/net/gianfar.c +3 -0
+
+	/* Start the rx descriptor ring where the tx ring leaves off */
+	addr =3D addr + sizeof (struct txbd8) * priv->tx_ring_size +

0x10000000 * pir;

Quoted 1 line

+#else

Hard coded memory layout? In a driver? Really?

Use the dma_mapping api.

Store your kernel to physical offset in a memory location. Have the dma_mapping api add this offset.

milton

------------------------------