LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: make U4 PCIe work (#2)
From: Benjamin Herrenschmidt @ 2006-10-06  5:40 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev list

The Maple support code was missing code for U4/CPC945 PCIe. This adds
it, enabling it to work on tigerwood boards, and possibly also js21
using SLOF. Also disable an obsolete firmware workaround.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Index: linux-work/arch/powerpc/platforms/maple/pci.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/maple/pci.c	2006-10-05 16:00:29.000000000 +1000
+++ linux-work/arch/powerpc/platforms/maple/pci.c	2006-10-06 15:38:38.000000000 +1000
@@ -8,7 +8,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#define DEBUG
+#undef DEBUG
 
 #include <linux/kernel.h>
 #include <linux/pci.h>
@@ -16,6 +16,7 @@
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/irq.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
@@ -33,7 +34,7 @@
 #define DBG(x...)
 #endif
 
-static struct pci_controller *u3_agp, *u3_ht;
+static struct pci_controller *u3_agp, *u3_ht, *u4_pcie;
 
 static int __init fixup_one_level_bus_range(struct device_node *node, int higher)
 {
@@ -287,6 +288,113 @@ static struct pci_ops u3_ht_pci_ops =
 	u3_ht_write_config
 };
 
+static unsigned int u4_pcie_cfa0(u8 devfn, u8 off)
+{
+	return (1 << ((unsigned int)PCI_SLOT(devfn))) 	|
+		(((unsigned int)PCI_FUNC(devfn)) << 8) |
+		((((unsigned int)(off)) >> 8) << 28) 	|
+		(((unsigned int)(off)) & 0xfcu);
+}
+
+static unsigned int u4_pcie_cfa1(u8 bus, u8 devfn, u8 off)
+{
+        return (((unsigned int)(bus)) << 16)		|
+		(((unsigned int)(devfn)) << 8)		|
+		((((unsigned int)(off)) >> 8) << 28)	|
+		(((unsigned int)(off)) & 0xfcU)| 1u;
+}
+
+static volatile void __iomem *u4_pcie_cfg_access(struct pci_controller* hose,
+                                        u8 bus, u8 dev_fn, int offset)
+{
+        unsigned int caddr;
+
+        if (bus == hose->first_busno)
+                caddr = u4_pcie_cfa0(dev_fn, offset);
+        else
+                caddr = u4_pcie_cfa1(bus, dev_fn, offset);
+
+        /* Uninorth will return garbage if we don't read back the value ! */
+        do {
+                out_le32(hose->cfg_addr, caddr);
+        } while (in_le32(hose->cfg_addr) != caddr);
+
+        offset &= 0x03;
+        return hose->cfg_data + offset;
+}
+
+static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
+                               int offset, int len, u32 *val)
+{
+        struct pci_controller *hose;
+        volatile void __iomem *addr;
+
+        hose = pci_bus_to_host(bus);
+        if (hose == NULL)
+                return PCIBIOS_DEVICE_NOT_FOUND;
+        if (offset >= 0x1000)
+                return  PCIBIOS_BAD_REGISTER_NUMBER;
+        addr = u4_pcie_cfg_access(hose, bus->number, devfn, offset);
+        if (!addr)
+                return PCIBIOS_DEVICE_NOT_FOUND;
+        /*
+         * Note: the caller has already checked that offset is
+         * suitably aligned and that len is 1, 2 or 4.
+         */
+        switch (len) {
+        case 1:
+                *val = in_8(addr);
+                break;
+        case 2:
+                *val = in_le16(addr);
+                break;
+        default:
+                *val = in_le32(addr);
+                break;
+        }
+        return PCIBIOS_SUCCESSFUL;
+}
+static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
+                                int offset, int len, u32 val)
+{
+        struct pci_controller *hose;
+        void __iomem *addr;
+
+        hose = pci_bus_to_host(bus);
+        if (hose == NULL)
+                return PCIBIOS_DEVICE_NOT_FOUND;
+        if (offset >= 0x1000)
+                return  PCIBIOS_BAD_REGISTER_NUMBER;
+        addr = u4_pcie_cfg_access(hose, bus->number, devfn, offset);
+        if (!addr)
+                return PCIBIOS_DEVICE_NOT_FOUND;
+        /*
+         * Note: the caller has already checked that offset is
+         * suitably aligned and that len is 1, 2 or 4.
+         */
+        switch (len) {
+        case 1:
+                out_8(addr, val);
+                (void) in_8(addr);
+                break;
+        case 2:
+                out_le16(addr, val);
+                (void) in_le16(addr);
+                break;
+        default:
+                out_le32(addr, val);
+                (void) in_le32(addr);
+                break;
+        }
+        return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops u4_pcie_pci_ops =
+{
+        u4_pcie_read_config,
+        u4_pcie_write_config
+};
+
 static void __init setup_u3_agp(struct pci_controller* hose)
 {
 	/* On G5, we move AGP up to high bus number so we don't need
@@ -307,6 +415,26 @@ static void __init setup_u3_agp(struct p
 	u3_agp = hose;
 }
 
+static void __init setup_u4_pcie(struct pci_controller* hose)
+{
+        /* We currently only implement the "non-atomic" config space, to
+         * be optimised later.
+         */
+        hose->ops = &u4_pcie_pci_ops;
+        hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000);
+        hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000);
+
+        /* The bus contains a bridge from root -> device, we need to
+         * make it visible on bus 0 so that we pick the right type
+         * of config cycles. If we didn't, we would have to force all
+         * config cycles to be type 1. So we override the "bus-range"
+         * property here
+         */
+        hose->first_busno = 0x00;
+        hose->last_busno = 0xff;
+        u4_pcie = hose;
+}
+
 static void __init setup_u3_ht(struct pci_controller* hose)
 {
 	hose->ops = &u3_ht_pci_ops;
@@ -354,6 +482,10 @@ static int __init add_bridge(struct devi
 		setup_u3_ht(hose);
 		disp_name = "U3-HT";
 		primary = 1;
+        } else if (device_is_compatible(dev, "u4-pcie")) {
+                setup_u4_pcie(hose);
+                disp_name = "U4-PCIE";
+                primary = 0;
 	}
 	printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n",
 		disp_name, hose->first_busno, hose->last_busno);
@@ -361,7 +493,6 @@ static int __init add_bridge(struct devi
 	/* Interpret the "ranges" property */
 	/* This also maps the I/O region and sets isa_io/mem_base */
 	pci_process_bridge_OF_ranges(hose, dev, primary);
-	pci_setup_phb_io(hose, primary);
 
 	/* Fixup "bus-range" OF property */
 	fixup_bus_range(dev);
@@ -376,8 +507,17 @@ void __init maple_pcibios_fixup(void)
 
 	DBG(" -> maple_pcibios_fixup\n");
 
-	for_each_pci_dev(dev)
-		pci_read_irq_line(dev);
+	for_each_pci_dev(dev) {
+		/* Fixup IRQ for PCIe host */
+		if (u4_pcie != NULL && dev->bus->number == 0 &&
+		    pci_bus_to_host(dev->bus) == u4_pcie) {
+			printk(KERN_DEBUG "Fixup U4 PCIe IRQ\n");
+			dev->irq = irq_create_mapping(NULL, 1);
+			if (dev->irq != NO_IRQ)
+				set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
+		} else
+			pci_read_irq_line(dev);
+	}
 
 	DBG(" <- maple_pcibios_fixup\n");
 }
@@ -388,8 +528,10 @@ static void __init maple_fixup_phb_resou
 	
 	list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
 		unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
+
 		hose->io_resource.start += offset;
 		hose->io_resource.end += offset;
+
 		printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
 		       hose->global_number,
 		       (unsigned long long)hose->io_resource.start,
@@ -431,6 +573,19 @@ void __init maple_pci_init(void)
 	if (ht && add_bridge(ht) != 0)
 		of_node_put(ht);
 
+        /*
+         * We need to call pci_setup_phb_io for the HT bridge first
+         * so it gets the I/O port numbers starting at 0, and we
+         * need to call it for the AGP bridge after that so it gets
+         * small positive I/O port numbers.
+         */
+        if (u3_ht)
+                pci_setup_phb_io(u3_ht, 1);
+        if (u3_agp)
+                pci_setup_phb_io(u3_agp, 0);
+        if (u4_pcie)
+                pci_setup_phb_io(u4_pcie, 0);
+
 	/* Fixup the IO resources on our host bridges as the common code
 	 * does it only for childs of the host bridges
 	 */
@@ -465,8 +620,11 @@ int maple_pci_get_legacy_ide_irq(struct 
 		return defirq;
 
 	np = pci_device_to_OF_node(pdev);
-	if (np == NULL)
+	if (np == NULL) {
+		printk("Failed to locate OF node for IDE %s\n",
+		       pci_name(pdev));
 		return defirq;
+	}
 	irq = irq_of_parse_and_map(np, channel & 0x1);
 	if (irq == NO_IRQ) {
 		printk("Failed to map onboard IDE interrupt for channel %d\n",
@@ -479,6 +637,9 @@ int maple_pci_get_legacy_ide_irq(struct 
 /* XXX: To remove once all firmwares are ok */
 static void fixup_maple_ide(struct pci_dev* dev)
 {
+	if (!machine_is(maple))
+		return;
+
 #if 0 /* Enable this to enable IDE port 0 */
 	{
 		u8 v;
@@ -495,7 +656,7 @@ static void fixup_maple_ide(struct pci_d
 	dev->resource[4].start = 0xcc00;
 	dev->resource[4].end = 0xcc10;
 #endif
-#if 1 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */
+#if 0 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */
 	{
 		struct pci_dev *apicdev;
 		u32 v;

^ permalink raw reply

* Re: 440SP External Interrupt IRQ
From: Stefan Roese @ 2006-10-06  4:46 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <20061006034949.17839.qmail@web33407.mail.mud.yahoo.com>

Jeff,

On Friday 06 October 2006 05:49, Jeff Stevens wrote:
> I am trying to figure out the PCI IRQ mapping on a
> 440SP processor in linux-2.6.17.9.  I have a board
> that is based off of the Luan development board, and I
> am not sure which IRQ corresponds to each external
> IRQ[0:5] pins on the processor.  Where can I find this
> information?

In your schematics. Sorry but it's that simple.

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH] powerpc: irq change build breaks
From: Benjamin Herrenschmidt @ 2006-10-06  4:22 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Andrew Morton, linux-arch, arnd, linux-kernel, linuxppc-dev,
	Linus Torvalds, paulus
In-Reply-To: <20061005203110.4c3022ce@localhost.localdomain>

On Thu, 2006-10-05 at 20:31 -0500, Olof Johansson wrote:
> Fix up some of the buildbreaks from the irq handler changes.
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
> 
> On Thu, 5 Oct 2006 16:35:02 -0700 (PDT) Linus Torvalds <torvalds@osdl.org> wrote:
> 
> 
> > Any fall-out from this should be both obvious and pretty trivial to fix 
> > up.
> > 
> 
> Here's a pass of fixes from building all defconfigs under arch/powerpc
> + grep of generic_handle_irq callers.
> 
> 
> 
>  arch/powerpc/platforms/85xx/mpc85xx_ads.c  |    2 +-
>  arch/powerpc/platforms/85xx/mpc85xx_cds.c  |    2 +-
>  arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |    2 +-
>  arch/powerpc/platforms/cell/interrupt.c    |    2 +-
>  arch/powerpc/platforms/chrp/setup.c        |    2 +-
>  arch/powerpc/platforms/powermac/pic.c      |    2 +-
>  arch/powerpc/sysdev/qe_lib/qe_ic.c         |    4 ++--
>  arch/powerpc/sysdev/tsi108_pci.c           |    2 +-
>  drivers/macintosh/via-cuda.c               |    2 +-
>  sound/oss/dmasound/dmasound_awacs.c        |    4 ++--
>  10 files changed, 12 insertions(+), 12 deletions(-)
> 
> 
> 
> Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> +++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> @@ -72,7 +72,7 @@ static void cpm2_cascade(unsigned int ir
>  	int cascade_irq;
>  
>  	while ((cascade_irq = cpm2_get_irq(regs)) >= 0) {
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  	}
>  	desc->chip->eoi(irq);
>  }
> Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> +++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> @@ -138,7 +138,7 @@ static void mpc85xx_8259_cascade(unsigne
>  	unsigned int cascade_irq = i8259_irq(regs);
>  
>  	if (cascade_irq != NO_IRQ)
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  
>  	desc->chip->eoi(irq);
>  }
> Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> +++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> @@ -58,7 +58,7 @@ static void mpc86xx_8259_cascade(unsigne
>  {
>  	unsigned int cascade_irq = i8259_irq(regs);
>  	if (cascade_irq != NO_IRQ)
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  	desc->chip->eoi(irq);
>  }
>  #endif	/* CONFIG_PCI */
> Index: linux-2.6/arch/powerpc/platforms/cell/interrupt.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/cell/interrupt.c
> +++ linux-2.6/arch/powerpc/platforms/cell/interrupt.c
> @@ -121,7 +121,7 @@ static void iic_ioexc_cascade(unsigned i
>  					irq_linear_revmap(iic_host,
>  							  base | cascade);
>  				if (cirq != NO_IRQ)
> -					generic_handle_irq(cirq, regs);
> +					generic_handle_irq(cirq);
>  			}
>  		/* post-ack level interrupts */
>  		ack = bits & ~IIC_ISR_EDGE_MASK;
> Index: linux-2.6/arch/powerpc/platforms/chrp/setup.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/chrp/setup.c
> +++ linux-2.6/arch/powerpc/platforms/chrp/setup.c
> @@ -340,7 +340,7 @@ static void chrp_8259_cascade(unsigned i
>  {
>  	unsigned int cascade_irq = i8259_irq(regs);
>  	if (cascade_irq != NO_IRQ)
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  	desc->chip->eoi(irq);
>  }
>  
> Index: linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/sysdev/qe_lib/qe_ic.c
> +++ linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
> @@ -343,7 +343,7 @@ void fastcall qe_ic_cascade_low(unsigned
>  
>  	chip->mask_ack(irq);
>  	if (cascade_irq != NO_IRQ)
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  	chip->unmask(irq);
>  }
>  
> @@ -359,7 +359,7 @@ void fastcall qe_ic_cascade_high(unsigne
>  
>  	chip->mask_ack(irq);
>  	if (cascade_irq != NO_IRQ)
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  	chip->unmask(irq);
>  }
>  
> Index: linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/sysdev/tsi108_pci.c
> +++ linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
> @@ -410,6 +410,6 @@ void tsi108_irq_cascade(unsigned int irq
>  {
>  	unsigned int cascade_irq = get_pci_source();
>  	if (cascade_irq != NO_IRQ)
> -		generic_handle_irq(cascade_irq, regs);
> +		generic_handle_irq(cascade_irq);
>  	desc->chip->eoi(irq);
>  }
> Index: linux-2.6/arch/powerpc/platforms/powermac/pic.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/powermac/pic.c
> +++ linux-2.6/arch/powerpc/platforms/powermac/pic.c
> @@ -227,7 +227,7 @@ static irqreturn_t gatwick_action(int cp
>  			continue;
>  		irq += __ilog2(bits);
>  		spin_unlock_irqrestore(&pmac_pic_lock, flags);
> -		__do_IRQ(irq, regs);
> +		__do_IRQ(irq);
>  		spin_lock_irqsave(&pmac_pic_lock, flags);
>  		rc = IRQ_HANDLED;
>  	}
> Index: linux-2.6/drivers/macintosh/via-cuda.c
> ===================================================================
> --- linux-2.6.orig/drivers/macintosh/via-cuda.c
> +++ linux-2.6/drivers/macintosh/via-cuda.c
> @@ -437,7 +437,7 @@ cuda_poll(void)
>       * disable_irq(), would that work on m68k ? --BenH
>       */
>      local_irq_save(flags);
> -    cuda_interrupt(0, NULL, NULL);
> +    cuda_interrupt(0, NULL);
>      local_irq_restore(flags);
>  }
>  
> Index: linux-2.6/sound/oss/dmasound/dmasound_awacs.c
> ===================================================================
> --- linux-2.6.orig/sound/oss/dmasound/dmasound_awacs.c
> +++ linux-2.6/sound/oss/dmasound/dmasound_awacs.c
> @@ -465,7 +465,7 @@ tas_dmasound_init(void)
>  			val = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio_headphone_detect, 0);
>  			pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio_headphone_detect, val | 0x80);
>  			/* Trigger it */
> -  			headphone_intr(0,NULL,NULL);
> +  			headphone_intr(0, NULL);
>    		}
>    	}
>    	if (!gpio_headphone_irq) {
> @@ -1499,7 +1499,7 @@ static int awacs_sleep_notify(struct pmu
>  				write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol);
>  				msleep(150);
>  				tas_leave_sleep(); /* Stub for now */
> -				headphone_intr(0,NULL,NULL);
> +				headphone_intr(0, NULL);
>  				break;
>  			case AWACS_DACA:
>  				msleep(10); /* Check this !!! */
> -
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [POWERPC] fix iseries/smp.c for irq breakage
From: Stephen Rothwell @ 2006-10-06  3:55 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/platforms/iseries/irq.c |    7 ++-----
 arch/powerpc/platforms/iseries/smp.c |    6 ++++--
 arch/powerpc/platforms/iseries/smp.h |    6 ++++++
 3 files changed, 12 insertions(+), 7 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index e324468..44c2456 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -43,10 +43,7 @@ #include <asm/iseries/it_lp_queue.h>
 #include "irq.h"
 #include "pci.h"
 #include "call_pci.h"
-
-#if defined(CONFIG_SMP)
-extern void iSeries_smp_message_recv(struct pt_regs *);
-#endif
+#include "smp.h"
 
 #ifdef CONFIG_PCI
 
@@ -315,7 +312,7 @@ unsigned int iSeries_get_irq(struct pt_r
 #ifdef CONFIG_SMP
 	if (get_lppaca()->int_dword.fields.ipi_cnt) {
 		get_lppaca()->int_dword.fields.ipi_cnt = 0;
-		iSeries_smp_message_recv(regs);
+		iSeries_smp_message_recv();
 	}
 #endif /* CONFIG_SMP */
 	if (hvlpevent_is_pending())
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c
index 2eb095e..aee5908 100644
--- a/arch/powerpc/platforms/iseries/smp.c
+++ b/arch/powerpc/platforms/iseries/smp.c
@@ -43,9 +43,11 @@ #include <asm/machdep.h>
 #include <asm/cputable.h>
 #include <asm/system.h>
 
+#include "smp.h"
+
 static unsigned long iSeries_smp_message[NR_CPUS];
 
-void iSeries_smp_message_recv(struct pt_regs *regs)
+void iSeries_smp_message_recv(void)
 {
 	int cpu = smp_processor_id();
 	int msg;
@@ -55,7 +57,7 @@ void iSeries_smp_message_recv(struct pt_
 
 	for (msg = 0; msg < 4; msg++)
 		if (test_and_clear_bit(msg, &iSeries_smp_message[cpu]))
-			smp_message_recv(msg, regs);
+			smp_message_recv(msg);
 }
 
 static inline void smp_iSeries_do_message(int cpu, int msg)
diff --git a/arch/powerpc/platforms/iseries/smp.h b/arch/powerpc/platforms/iseries/smp.h
new file mode 100644
index 0000000..d501f7d
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/smp.h
@@ -0,0 +1,6 @@
+#ifndef _PLATFORMS_ISERIES_SMP_H
+#define _PLATFORMS_ISERIES_SMP_H
+
+extern void iSeries_smp_message_recv(void);
+
+#endif	/* _PLATFORMS_ISERIES_SMP_H */
-- 
1.4.2.1

^ permalink raw reply related

* [POWERPC] fix viocons for irq breakage
From: Stephen Rothwell @ 2006-10-06  3:54 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/char/viocons.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index a362ee9..6d2e314 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -947,7 +947,7 @@ #ifdef CONFIG_MAGIC_SYSRQ
 				 */
 				continue;
 			} else if (vio_sysrq_pressed) {
-				handle_sysrq(cevent->data[index], NULL, tty);
+				handle_sysrq(cevent->data[index], tty);
 				vio_sysrq_pressed = 0;
 				/*
 				 * continue because we don't want to add
-- 
1.4.2.1

^ permalink raw reply related

* [POWERPC] update iseries_defconfig
From: Stephen Rothwell @ 2006-10-06  3:53 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

This make sure that an iseries_defconfig does not inlude
other platforms.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/configs/iseries_defconfig |   86 ++++++++++++++++++++++++++------
 1 files changed, 69 insertions(+), 17 deletions(-)

Iseries_defconfig will not build without this.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index d58f82f..b500550 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:22:57 2006
+# Linux kernel version: 2.6.19-rc1
+# Fri Oct  6 13:25:04 2006
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -22,6 +22,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -52,10 +53,11 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 CONFIG_IKCONFIG=y
@@ -64,7 +66,9 @@ # CONFIG_CPUSETS is not set
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -73,12 +77,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -97,6 +101,7 @@ CONFIG_STOP_MACHINE=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 
 #
@@ -115,13 +120,18 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # Platform support
 #
-# CONFIG_PPC_MULTIPLATFORM is not set
-CONFIG_PPC_ISERIES=y
+CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_APUS is not set
+# CONFIG_PPC_PSERIES is not set
+CONFIG_PPC_ISERIES=y
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_MAPLE is not set
+# CONFIG_PPC_PASEMI is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
-# CONFIG_UDBG_RTAS_CONSOLE is not set
+# CONFIG_PPC_IBM_CELL_BLADE is not set
+# CONFIG_U3_DART is not set
 # CONFIG_PPC_RTAS is not set
 # CONFIG_MMIO_NVRAM is not set
 CONFIG_IBMVIO=y
@@ -147,12 +157,15 @@ # CONFIG_BINFMT_MISC is not set
 CONFIG_FORCE_MAX_ZONEORDER=13
 CONFIG_IOMMU_VMERGE=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+# CONFIG_KEXEC is not set
+# CONFIG_CRASH_DUMP is not set
 CONFIG_IRQ_ALL_CPUS=y
 CONFIG_LPARCFG=y
 # CONFIG_NUMA is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -179,6 +192,7 @@ # CONFIG_PPC_INDIRECT_PCI is not set
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -206,6 +220,7 @@ # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
+CONFIG_XFRM_SUB_POLICY=y
 CONFIG_NET_KEY=m
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -224,10 +239,12 @@ CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
 
 #
 # IP: Virtual Server Configuration
@@ -247,6 +264,7 @@ # CONFIG_NETFILTER_NETLINK is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
@@ -255,6 +273,7 @@ CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 # CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
 # CONFIG_NETFILTER_XT_MATCH_ESP is not set
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -294,7 +313,6 @@ CONFIG_IP_NF_MATCH_IPRANGE=m
 CONFIG_IP_NF_MATCH_TOS=m
 CONFIG_IP_NF_MATCH_RECENT=m
 CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
 # CONFIG_IP_NF_MATCH_AH is not set
 CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_OWNER=m
@@ -319,7 +337,6 @@ CONFIG_IP_NF_NAT_AMANDA=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
 CONFIG_IP_NF_TARGET_TTL=m
 CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
@@ -351,7 +368,6 @@ # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
 
@@ -433,6 +449,7 @@ # SCSI device support
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+CONFIG_SCSI_NETLINK=y
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -454,12 +471,14 @@ CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_ISCSI_ATTRS is not set
-# CONFIG_SCSI_SAS_ATTRS is not set
+CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_SAS_LIBSAS=m
+CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
 
 #
 # SCSI low-level drivers
@@ -472,10 +491,11 @@ # CONFIG_SCSI_AACRAID is not set
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-# CONFIG_ATA is not set
 # CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -486,16 +506,22 @@ # CONFIG_SCSI_IPS is not set
 CONFIG_SCSI_IBMVSCSI=m
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
 # Multi-device support (RAID and LVM)
 #
 CONFIG_MD=y
@@ -508,6 +534,7 @@ # CONFIG_MD_RAID456 is not set
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_DEBUG is not set
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
@@ -573,6 +600,7 @@ # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+CONFIG_PCNET32_NAPI=y
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
@@ -610,6 +638,7 @@ # CONFIG_SK98LIN is not set
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -649,6 +678,7 @@ CONFIG_PPP_BSDCOMP=m
 # CONFIG_PPP_MPPE is not set
 CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
+CONFIG_SLHC=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
@@ -671,6 +701,7 @@ #
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -774,12 +805,12 @@ # CONFIG_HWMON_VID is not set
 #
 # Misc devices
 #
+# CONFIG_TIFM_CORE is not set
 
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -893,6 +924,9 @@ # CONFIG_XFS_QUOTA is not set
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+CONFIG_GFS2_FS=m
+CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+CONFIG_GFS2_FS_LOCKING_DLM=m
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -929,12 +963,14 @@ # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
 # CONFIG_HUGETLBFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
-# CONFIG_CONFIGFS_FS is not set
+CONFIG_CONFIGFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -988,6 +1024,7 @@ # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
 # CONFIG_9P_FS is not set
+CONFIG_GENERIC_ACL=y
 
 #
 # Partition Types
@@ -1040,6 +1077,12 @@ # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 
 #
+# Distributed Lock Manager
+#
+CONFIG_DLM=m
+# CONFIG_DLM_DEBUG is not set
+
+#
 # iSeries device drivers
 #
 CONFIG_VIOCONS=y
@@ -1073,6 +1116,7 @@ #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
@@ -1091,6 +1135,7 @@ # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_FORCED_INLINING is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_STACKOVERFLOW=y
@@ -1109,6 +1154,10 @@ #
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_MD4=m
@@ -1118,9 +1167,12 @@ CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
-- 
1.4.2.1

^ permalink raw reply related

* 440SP External Interrupt IRQ
From: Jeff Stevens @ 2006-10-06  3:49 UTC (permalink / raw)
  To: linuxppc-embedded

I am trying to figure out the PCI IRQ mapping on a
440SP processor in linux-2.6.17.9.  I have a board
that is based off of the Luan development board, and I
am not sure which IRQ corresponds to each external
IRQ[0:5] pins on the processor.  Where can I find this
information?

Thanks,
   Jeff Stevens

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply

* Re: Simple script to build all configs
From: Olof Johansson @ 2006-10-06  3:34 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: linuxppc-dev
In-Reply-To: <200610061323.28758.jk@ozlabs.org>

On Fri, 6 Oct 2006 13:23:28 +1000 Jeremy Kerr <jk@ozlabs.org> wrote:

> 
> > Jeremy asked for it, so I figured more might have use for it. Simple
> > script to build all defconfigs for an arch.
> 
> Looks like I'll have someone to join me at reading school.
> 
> Olof - I think it was Michael who was asking about this?

You're so alike it's so hard to tell you apart sometimes. :-)

Yes, I can't read either.


-Olof

^ permalink raw reply

* Re: Simple script to build all configs
From: Jeremy Kerr @ 2006-10-06  3:23 UTC (permalink / raw)
  To: Olof Johansson, Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <20061005215334.46e813fc@pb15>


> Jeremy asked for it, so I figured more might have use for it. Simple
> script to build all defconfigs for an arch.

Looks like I'll have someone to join me at reading school.

Olof - I think it was Michael who was asking about this?


Jeremy

^ permalink raw reply

* Simple script to build all configs
From: Olof Johansson @ 2006-10-06  2:53 UTC (permalink / raw)
  To: linuxppc-dev

Jeremy asked for it, so I figured more might have use for it. Simple
script to build all defconfigs for an arch.

I use it with ARCH and CROSS_COMPILE set outside of the script, i.e. 
$ ARCH=powerpc ~/bin/buildall


I also pass in TARGET="vmlinux modules" in cases where default targets
don't build (very common on ARCH=ppc).



#!/bin/sh

export CC="ccache gcc"

make mrproper

for config in arch/$ARCH/configs/* ; do
	CONFIG=`basename $config`
	echo -n $ARCH.$CONFIG: ;
	yes "" | make $CONFIG >buildall.log 2>&1
	if make $TARGET -j 5 >>buildall.log 2>&1 ; then
		mv buildall.log $ARCH.$CONFIG.log.passed
		echo "	passed"
	else
		mv buildall.log $ARCH.$CONFIG.log.failed
		echo "	failed"
	fi
done

^ permalink raw reply

* Re: [PATCH] powerpc: fix fsl_soc build breaks
From: Vitaly Bordug @ 2006-10-06  2:35 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <20061005211648.0d550152@pb15>

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

On Thu, 5 Oct 2006 21:16:48 -0500
Olof Johansson wrote:

> Hrm, there's no way this ever built at time of merge. There's a
> missing } and the wrong type on phy_irq.
> 
> Also, another const for get_property().
> 
> 
>   CC      arch/powerpc/sysdev/fsl_soc.o
> arch/powerpc/sysdev/fsl_soc.c: In function 'fs_enet_of_init':
> arch/powerpc/sysdev/fsl_soc.c:625: error: assignment of read-only
> variable 'phy_irq' arch/powerpc/sysdev/fsl_soc.c:625: warning:
> assignment makes integer from pointer without a cast
> arch/powerpc/sysdev/fsl_soc.c:661: warning: assignment discards
> qualifiers from pointer target type
> arch/powerpc/sysdev/fsl_soc.c:684: error: subscripted value is
> neither array nor pointer arch/powerpc/sysdev/fsl_soc.c:687: error:
> subscripted value is neither array nor pointer
> arch/powerpc/sysdev/fsl_soc.c:722: warning: ISO C90 forbids mixed
> declarations and code arch/powerpc/sysdev/fsl_soc.c:728: error:
> invalid storage class for function 'cpm_uart_of_init'
> arch/powerpc/sysdev/fsl_soc.c:798: error: initializer element is not
> constant arch/powerpc/sysdev/fsl_soc.c:798: error: expected
> declaration or statement at end of input make[1]: ***
> [arch/powerpc/sysdev/fsl_soc.o] Error 1
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> 
> 
> ---
> 
> There are more issues with this file. Whitespace, if () {}; and other
> things. I'm just fixing the build breaks.
> 
> These were all introduced by patches fed upstream via git trees
> instead of list posts, as far as I can tell. Maybe posting patches is
> a better idea, more eyes on the code.
> 

All those were submitted in form of patches prior, and located issues addressed. I must mistype something with git-push,
so it didn't fed in very latest changes. Thanks for pointing it out and sorry for confusion.

--
Sincerely, Vitaly

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

^ permalink raw reply

* Re: [PATCH] linux,tce-size property is 32 bits
From: Jeremy Kerr @ 2006-10-06  2:27 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, Nathan Lynch, matthltc, Paul Mackerras
In-Reply-To: <20061005212200.26f648e2@pb15>


> No it didn't:

Wow, looks like I can't read :)

Acked-by: Jeremy Kerr <jk@ozlabs.org>


Jeremy

^ permalink raw reply

* Re: [PATCH] linux,tce-size property is 32 bits
From: Olof Johansson @ 2006-10-06  2:22 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: linuxppc-dev, Nathan Lynch, matthltc, Paul Mackerras
In-Reply-To: <200610061216.32315.jk@ozlabs.org>

On Fri, 6 Oct 2006 12:16:30 +1000 Jeremy Kerr <jk@ozlabs.org> wrote:

> 
> > AFAICT this was introduced by the "Constify & voidify get_property()"
> > series which went in post-2.6.18 so no backport for -stable is
> > needed.  Not sure about RHEL5.
> 
> That patch (954a46e2d5aec6f59976ddeb1d232b486e59b54a) did touch the 
> declaration of sizep, but only changed it from an unsigned long * to an 
> const unsigned long *.

No it didn't:

file:d67af2c657544ef5b0a6386a9c45a31de2fb4681 -> file:bbf2e34dc3582442a9e65c2a404c4e7ddd31619e
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -267,13 +267,12 @@ static void iommu_table_setparms(struct
 					struct iommu_table *tbl)
 {
 	struct device_node *node;
-	unsigned long *basep;
-	unsigned int *sizep;
+	const unsigned long *basep, *sizep;


-Olof

^ permalink raw reply

* [PATCH] powerpc: fix fsl_soc build breaks
From: Olof Johansson @ 2006-10-06  2:16 UTC (permalink / raw)
  To: galak, paulus; +Cc: linuxppc-dev, linux-kernel

Hrm, there's no way this ever built at time of merge. There's a missing } and
the wrong type on phy_irq.

Also, another const for get_property().


  CC      arch/powerpc/sysdev/fsl_soc.o
arch/powerpc/sysdev/fsl_soc.c: In function 'fs_enet_of_init':
arch/powerpc/sysdev/fsl_soc.c:625: error: assignment of read-only variable 'phy_irq'
arch/powerpc/sysdev/fsl_soc.c:625: warning: assignment makes integer from pointer without a cast
arch/powerpc/sysdev/fsl_soc.c:661: warning: assignment discards qualifiers from pointer target type
arch/powerpc/sysdev/fsl_soc.c:684: error: subscripted value is neither array nor pointer
arch/powerpc/sysdev/fsl_soc.c:687: error: subscripted value is neither array nor pointer
arch/powerpc/sysdev/fsl_soc.c:722: warning: ISO C90 forbids mixed declarations and code
arch/powerpc/sysdev/fsl_soc.c:728: error: invalid storage class for function 'cpm_uart_of_init'
arch/powerpc/sysdev/fsl_soc.c:798: error: initializer element is not constant
arch/powerpc/sysdev/fsl_soc.c:798: error: expected declaration or statement at end of input
make[1]: *** [arch/powerpc/sysdev/fsl_soc.o] Error 1


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


---

There are more issues with this file. Whitespace, if () {}; and other
things. I'm just fixing the build breaks.

These were all introduced by patches fed upstream via git trees instead
of list posts, as far as I can tell. Maybe posting patches is a better
idea, more eyes on the code.


Index: linux-2.6/arch/powerpc/sysdev/fsl_soc.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/fsl_soc.c
+++ linux-2.6/arch/powerpc/sysdev/fsl_soc.c
@@ -567,7 +567,7 @@ static int __init fs_enet_of_init(void)
 		struct resource r[4];
 		struct device_node *phy, *mdio;
 		struct fs_platform_info fs_enet_data;
-		const unsigned int *id, *phy_addr, phy_irq;
+		const unsigned int *id, *phy_addr, *phy_irq;
 		const void *mac_addr;
 		const phandle *ph;
 		const char *model;
@@ -641,7 +641,7 @@ static int __init fs_enet_of_init(void)
 
 		if (strstr(model, "FCC")) {
 			int fcc_index = *id - 1;
-			unsigned char* mdio_bb_prop;
+			const unsigned char *mdio_bb_prop;
 
 			fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0);
 			fs_enet_data.rx_ring = 32;
@@ -708,8 +708,9 @@ static int __init fs_enet_of_init(void)
 			ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
 						     sizeof(struct
 							    fs_platform_info));
-		if (ret)
-			goto unreg;
+			if (ret)
+				goto unreg;
+		}
 	}
 	return 0;
 

^ permalink raw reply

* Re: Problem with initrd
From: Yoshio Kashiwagi @ 2006-10-06  1:33 UTC (permalink / raw)
  To: Glenn.G.Hart, linuxppc-embedded
In-Reply-To: <OF1D5D325D.8937E77C-ON852571FD.005C0832-852571FD.005CF8D2@ct.wec.com>

Glenn-San,

Are you developing by the custom-made hardware of V4FX12?
If the 16-bit memory controller is used, it may have a problem in the
memory controller.

Can you try the memory controller of http://www.xilinx.com/mpmc2?
I confirmed that the 16-bit memory controller of MPMC2 worked correctly
by Linux. Or I can send the ramdisk image for 2.6.17.3 kernel which I
am using to you.

Yoshio kashiwagi - Nissin Systems

^ permalink raw reply

* Re: [PATCH] linux,tce-size property is 32 bits
From: Jeremy Kerr @ 2006-10-06  2:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nathan Lynch, matthltc, Paul Mackerras
In-Reply-To: <20061005143244.GJ24705@localdomain>


> AFAICT this was introduced by the "Constify & voidify get_property()"
> series which went in post-2.6.18 so no backport for -stable is
> needed.  Not sure about RHEL5.

That patch (954a46e2d5aec6f59976ddeb1d232b486e59b54a) did touch the 
declaration of sizep, but only changed it from an unsigned long * to an 
const unsigned long *.

Looking at the git log, it's been an unsigned long from the beginning 
(ie, being moved from arch/ppc64). You may need to check the stable and 
RHEL trees explicitly.

Regards,


Jeremy

^ permalink raw reply

* [PATCH] powerpc: irq change build breaks
From: Olof Johansson @ 2006-10-06  1:31 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, linux-arch, arnd, linux-kernel, linuxppc-dev,
	paulus
In-Reply-To: <Pine.LNX.4.64.0610051632250.3952@g5.osdl.org>


Fix up some of the buildbreaks from the irq handler changes.


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

---

On Thu, 5 Oct 2006 16:35:02 -0700 (PDT) Linus Torvalds <torvalds@osdl.org> wrote:


> Any fall-out from this should be both obvious and pretty trivial to fix 
> up.
> 

Here's a pass of fixes from building all defconfigs under arch/powerpc
+ grep of generic_handle_irq callers.



 arch/powerpc/platforms/85xx/mpc85xx_ads.c  |    2 +-
 arch/powerpc/platforms/85xx/mpc85xx_cds.c  |    2 +-
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |    2 +-
 arch/powerpc/platforms/cell/interrupt.c    |    2 +-
 arch/powerpc/platforms/chrp/setup.c        |    2 +-
 arch/powerpc/platforms/powermac/pic.c      |    2 +-
 arch/powerpc/sysdev/qe_lib/qe_ic.c         |    4 ++--
 arch/powerpc/sysdev/tsi108_pci.c           |    2 +-
 drivers/macintosh/via-cuda.c               |    2 +-
 sound/oss/dmasound/dmasound_awacs.c        |    4 ++--
 10 files changed, 12 insertions(+), 12 deletions(-)



Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -72,7 +72,7 @@ static void cpm2_cascade(unsigned int ir
 	int cascade_irq;
 
 	while ((cascade_irq = cpm2_get_irq(regs)) >= 0) {
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 	}
 	desc->chip->eoi(irq);
 }
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -138,7 +138,7 @@ static void mpc85xx_8259_cascade(unsigne
 	unsigned int cascade_irq = i8259_irq(regs);
 
 	if (cascade_irq != NO_IRQ)
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 
 	desc->chip->eoi(irq);
 }
Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -58,7 +58,7 @@ static void mpc86xx_8259_cascade(unsigne
 {
 	unsigned int cascade_irq = i8259_irq(regs);
 	if (cascade_irq != NO_IRQ)
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 	desc->chip->eoi(irq);
 }
 #endif	/* CONFIG_PCI */
Index: linux-2.6/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/interrupt.c
+++ linux-2.6/arch/powerpc/platforms/cell/interrupt.c
@@ -121,7 +121,7 @@ static void iic_ioexc_cascade(unsigned i
 					irq_linear_revmap(iic_host,
 							  base | cascade);
 				if (cirq != NO_IRQ)
-					generic_handle_irq(cirq, regs);
+					generic_handle_irq(cirq);
 			}
 		/* post-ack level interrupts */
 		ack = bits & ~IIC_ISR_EDGE_MASK;
Index: linux-2.6/arch/powerpc/platforms/chrp/setup.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/chrp/setup.c
+++ linux-2.6/arch/powerpc/platforms/chrp/setup.c
@@ -340,7 +340,7 @@ static void chrp_8259_cascade(unsigned i
 {
 	unsigned int cascade_irq = i8259_irq(regs);
 	if (cascade_irq != NO_IRQ)
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 	desc->chip->eoi(irq);
 }
 
Index: linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -343,7 +343,7 @@ void fastcall qe_ic_cascade_low(unsigned
 
 	chip->mask_ack(irq);
 	if (cascade_irq != NO_IRQ)
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 	chip->unmask(irq);
 }
 
@@ -359,7 +359,7 @@ void fastcall qe_ic_cascade_high(unsigne
 
 	chip->mask_ack(irq);
 	if (cascade_irq != NO_IRQ)
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 	chip->unmask(irq);
 }
 
Index: linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/tsi108_pci.c
+++ linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
@@ -410,6 +410,6 @@ void tsi108_irq_cascade(unsigned int irq
 {
 	unsigned int cascade_irq = get_pci_source();
 	if (cascade_irq != NO_IRQ)
-		generic_handle_irq(cascade_irq, regs);
+		generic_handle_irq(cascade_irq);
 	desc->chip->eoi(irq);
 }
Index: linux-2.6/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/pic.c
+++ linux-2.6/arch/powerpc/platforms/powermac/pic.c
@@ -227,7 +227,7 @@ static irqreturn_t gatwick_action(int cp
 			continue;
 		irq += __ilog2(bits);
 		spin_unlock_irqrestore(&pmac_pic_lock, flags);
-		__do_IRQ(irq, regs);
+		__do_IRQ(irq);
 		spin_lock_irqsave(&pmac_pic_lock, flags);
 		rc = IRQ_HANDLED;
 	}
Index: linux-2.6/drivers/macintosh/via-cuda.c
===================================================================
--- linux-2.6.orig/drivers/macintosh/via-cuda.c
+++ linux-2.6/drivers/macintosh/via-cuda.c
@@ -437,7 +437,7 @@ cuda_poll(void)
      * disable_irq(), would that work on m68k ? --BenH
      */
     local_irq_save(flags);
-    cuda_interrupt(0, NULL, NULL);
+    cuda_interrupt(0, NULL);
     local_irq_restore(flags);
 }
 
Index: linux-2.6/sound/oss/dmasound/dmasound_awacs.c
===================================================================
--- linux-2.6.orig/sound/oss/dmasound/dmasound_awacs.c
+++ linux-2.6/sound/oss/dmasound/dmasound_awacs.c
@@ -465,7 +465,7 @@ tas_dmasound_init(void)
 			val = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio_headphone_detect, 0);
 			pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio_headphone_detect, val | 0x80);
 			/* Trigger it */
-  			headphone_intr(0,NULL,NULL);
+  			headphone_intr(0, NULL);
   		}
   	}
   	if (!gpio_headphone_irq) {
@@ -1499,7 +1499,7 @@ static int awacs_sleep_notify(struct pmu
 				write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol);
 				msleep(150);
 				tas_leave_sleep(); /* Stub for now */
-				headphone_intr(0,NULL,NULL);
+				headphone_intr(0, NULL);
 				break;
 			case AWACS_DACA:
 				msleep(10); /* Check this !!! */

^ permalink raw reply

* Re: [PATCH] powerpc: make U4 PCIe work
From: Benjamin Herrenschmidt @ 2006-10-05 23:37 UTC (permalink / raw)
  To: Nathan Lynch; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20061005225258.GP24705@localdomain>

On Thu, 2006-10-05 at 17:52 -0500, Nathan Lynch wrote:
> Benjamin Herrenschmidt wrote:
> > 
> > At this point, the patch should go in as it is.
> 
> At the very least, please fix those macros; I already pointed out the
> bug to you.

Ah yes, missed that bit of your mail. Interesting.

Ben.

^ permalink raw reply

* Re: [PATCH] powerpc: make U4 PCIe work
From: Nathan Lynch @ 2006-10-05 22:52 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <1160087213.22232.76.camel@localhost.localdomain>

Benjamin Herrenschmidt wrote:
> 
> At this point, the patch should go in as it is.

At the very least, please fix those macros; I already pointed out the
bug to you.

^ permalink raw reply

* Re: [PATCH] powerpc: make U4 PCIe work
From: Benjamin Herrenschmidt @ 2006-10-05 22:26 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <0B8F6C29-A29A-4084-B9AB-9BCC9A1A4038@kernel.crashing.org>

On Thu, 2006-10-05 at 20:45 +0200, Segher Boessenkool wrote:
> > +        if (bus == hose->first_busno) {
> > +                caddr = U4_PCIE_CFA0(dev_fn, offset);
> > +        } else
> > +                caddr = U4_PCIE_CFA1(bus, dev_fn, offset);
> 
> Please fold CFA0 and CFA1 into one inline function, much
> cleaner.

I like it this way. That's how PowerMac does it too btw.

> You also should check (at init time) whether indirect config
> access mode is actually enabled -- or just enable it yourself.

Care to send a patch ?

> > +        /* Uninorth will return garbage if we don't read back the  
> > value ! */
> > +        do {
> > +                out_le32(hose->cfg_addr, caddr);
> > +        } while (in_le32(hose->cfg_addr) != caddr);
> 
> Not an issue on U4, kill this.

I'd rather keep it for now. A matter of testing. It's harmless anyway.
Not like config space accesses had to be fast...

> > +static int u4_pcie_read_config(struct pci_bus *bus, unsigned int  
> > devfn,
> > +                               int offset, int len, u32 *val)
> > +{
> > +        struct pci_controller *hose;
> > +        volatile void __iomem *addr;
> > +
> > +        hose = pci_bus_to_host(bus);
> > +        if (hose == NULL)
> > +                return PCIBIOS_DEVICE_NOT_FOUND;
> 
> Is this check needed?  Can this code ever be called if hose would
> be 0?  The variable isn't actually used anywhere else in this
> function either.

What are you talking about ? Of course hose is used.

> > +        struct pci_controller *hose;
> > +        volatile void __iomem *addr;
> 
> No need for the volatile, the inXX()/outXX() things should handle
> this just fine.

They can. Are you commenting just for the sake of it or what ? Feel free
to send a patch removing it in all them in all the pci accessors, we'd
hade those for ages.

> > +        /* The bus contains a bridge from root -> device, we need to
> > +         * make it visible on bus 0 so that we pick the right type
> > +         * of config cycles. If we didn't, we would have to force all
> > +         * config cycles to be type 1. So we override the "bus-range"
> > +         * property here
> > +         */
> > +        hose->first_busno = 0x00;
> > +        hose->last_busno = 0xff;
> 
> I don't understand the comment, nor the need for this code.  Is this
> just old garbage ported over from PowerMac?

It comes over from PowerMac indeed, wrong bus-range property there. It
doesn't harm to have it here, I'm not sure what PIBS puts in there.

> > +	for_each_pci_dev(dev) {
> > +		/* Fixup IRQ for PCIe host */
> > +		if (u4_pcie != NULL && dev->bus->number == 0 &&
> > +		    pci_bus_to_host(dev->bus) == u4_pcie) {
> > +			printk(KERN_DEBUG "Fixup U4 PCIe IRQ\n");
> > +			dev->irq = irq_create_mapping(NULL, 1);
> > +			if (dev->irq != NO_IRQ)
> > +				set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
> 
> Please do this in the platform code for boards that actually need
> it, by fixing up the interrupt tree in the device tree.  MPIC IRQ1
> is the PCIe error interrupt only btw, I wonder if this code does
> the right thing at all?

Well, this is the platform code for boards based on U3/U4, so what ? No
OF tree I've seen so far can provide the irq for the host bridge because
none has a node for it (or rather for the p2p bridge that is visible
below attu). If yours is different, then feel free to send me a
device-tree (that I've asked from you how many monthes ago ?). This is
Maple board support, I'm adding code for Maple/Tigerwood.

It's the right interrupt to use with the PCIe port driver.

> > +        /*
> > +         * We need to call pci_setup_phb_io for the HT bridge first
> > +         * so it gets the I/O port numbers starting at 0, and we
> > +         * need to call it for the AGP bridge after that so it gets
> > +         * small positive I/O port numbers.
> > +         */
> 
> Comment out of date (doesn't mention PCIe).  Oh and when do we
> finally get real PCI domain support ;-)

Comment a bit out of date but the principle is still there, I want PCIe
to get the same non-overlapping bus numbers as AGP did for various
resaons (one is to have X work).
 
> > +	if (!machine_is(maple))
> > +		return;
> 
> So the IDE wart fixup is now only executed on "real" Maples?  Or
> all 970-based non-Apple boxes?  The naming starts to be confusing,
> maybe the maple platform should be en-masse renamed to "ppc970" or
> such.

The whole platform is called maple so what ? We just make sure we don't
call the code below when booting on pseries or whatever else.

At this point, the patch should go in as it is.

Ben.

^ permalink raw reply

* Gabe Johnson is out of the office.
From: Gabe.Johnson @ 2006-10-05 22:02 UTC (permalink / raw)
  To: linuxppc-embedded


I will be out of the office starting  10/05/2006 and will not return until
10/10/2006.

Getting married and in London for the honeymoon.  I will respond to your
message when I return.

^ permalink raw reply

* Re: [PATCH] powerpc: make U4 PCIe work
From: Benjamin Herrenschmidt @ 2006-10-05 22:10 UTC (permalink / raw)
  To: Nathan Lynch; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20061005170458.GL24705@localdomain>


> Do the changes to fixup_maple_ide have anything to do with the rest of
> the patch?  It's not clear from your description.  And with that last
> hunk the function now appears to do nothing.

Hrm... I could split that indeed. The last bits to fixup_maple_ide()
should no longer be necessary. They used to work around broken PIBS but
that should have been fixed a long time ago.

> Could we consider merging the powermac and maple pci code into a
> common location that would be used by both platforms?  There's quite a
> bit of code duplication going on here...

A bit but not exactly... I may do it but just not right now.

Ben.

^ permalink raw reply

* Re: linux-2.6 system ACE driver - need help
From: agnel juni @ 2006-10-05 21:58 UTC (permalink / raw)
  To: Grenier, Jim, linuxppc-embedded

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

Hello Jim,

Thanks for your reply.

I did try the option you have propsed. Though didn't help me its good to know.

The driver behaves the same way when put in polling mode also.

thanks very much
Junita

----- Original Message ----
From: "Grenier, Jim" <James.Grenier@adc.com>
To: linuxppc-embedded@ozlabs.org
Sent: Tuesday, 3 October, 2006 3:31:03 PM
Subject: linux-2.6 system ACE driver - need help

> Hi Jeff,
> 
> Thanks for your reply.
> 
> > Does it work for you in polling mode?  If not, you probably have a
> problem with the way you are accessing the system ace - cache,
> endianess, byte alignment, etc.  If it does work in polling, the usual
> suspects are interrupt masking errors or some low level problems with
> your IRQ signals.  Since you know the size of a sector and the size of
> the sysace buffers, how many interrupts do you get per sector read?
Do
> you see extras or not enough?
> 
> I heard from Ameet Patil that this driver is not tested in poilling
mode and it failed when we tried also.
> Thats when we moved to interrupt mode. 
> 
> I did check for the endianess...byte alignment etc.It looks ok to me.
> 
> I am using a 64 MB flash. And the sector sice is 512K.When the kernel
boots up I see 128 interrupts getting registered. (I think its from
alloc_disk(16) function in adapter.c )
> 
> Seems like the driver has issues with completing the request.
> 
> We are having issues while mouting the device. It is erratic, that
sometimes we are able to mount/list files, copy files.
> 
> But sometimes the kernel crashes and gives a Ooops message like :
> 
> /*********************************************************/
> 
> # ls /mnt/Oops: kernel access of bad area, sig: 11 [#1]
> NIP: C00556B8 LR: C00557E4 CTR: 00000000
> REGS: dfec1e08 TRAP: 0300   Not tainted  (2.6.16.2)
> MSR: 00021000 <ME>  CR: 22128828  XER: 00000000
> DAR: 30303030, DSISR: 00800000
> TASK GPR00: 00100100 DFEC1EB8 DFF6C030 C0258C60 DFF7BE10 00000018
DF4E9000 C0256D60
> GPR08: 30303030 00200200 DF4E9154 30303030 22128888 00100400 1FFB9700
00000000
> GPR16: 00000001 FFFFFFFF 00000000 007FFF00 1FFB3604 1FF63CE0 1FFCEF78
C01F0000
> GPR24: C0240000 00100100 C0240000 00000000 DFF7BE10 00000018 00000000
C0258C60
> NIP [C00556B8] free_block+0xa8/0x148
> LR [C00557E4] drain_array_locked+0x8c/0xd8
> Call Trace:
> [DFEC1EB8] [DFCA9490] 0xdfca9490 (unreliable)
> [DFEC1ED8] [C00557E4] drain_array_locked+0x8c/0xd8
> [DFEC1EF0] [C0056F80] cache_reap+0x74/0x18c
> [DFEC1F28] [C002B578] run_workqueue+0x9c/0x110
> [DFEC1F48] [C002B6E4] worker_thread+0xf8/0x13c
> [DFEC1FC0] [C002F6F0] kthread+0xf4/0x130
> [DFEC1FF0] [C000413C] kernel_thread+0x44/0x60
> Instruction dump:
> 7cfbfa14 3c000010 80e70014 3d2a4000 60000100 5529c9f4 7d295a14
80c9001c
> 3d200020 61290200 81060004 81660000 <91680000> 910b0004 3966001c
90060000
> BUG: events/0/4, lock held at task exit time!
>  [c01f5d60] {cache_chain_mutex}
> .. held by:          events/0:    4 [dff6c030, 110]
> ... acquired at:               cache_reap+0x1c/0x18c
> /*******************************************************************/
>
>
> We are able to do this after modiifying the file
xsysace_compactflash.c and xsysace_intr.c  to reset the controller( It
was commented out by applying the patch).
> 
> The data in the CF looks sane.
>
> Please advise.
>
> Thanks for your help.
>
>
> Thanks
> Junita

I have run into a problem with random crashes with System ACE on a
custom board.
It turned out that sometimes the System ACE chip would generate an extra
interrupt
after a write operation completed. The ISR in the driver is dumb and
assumes a transfer
just completed. This messed up the empty read/write queue for the
device.

I was working on a 2.4.17 kernel, so I don't know if it applies to you.
The quick fix was to ignore these extra interrupts. I changed the line
in xsysace_intr.c from:

    if (StatusReg & XSA_SR_DATABUFRDY_MASK) {

to:

    if ( (StatusReg & XSA_SR_DATABUFRDY_MASK) &&
                    (XSysAce_mGetControlReg(AcePtr->BaseAddress) &
                     XSA_CR_DATARDYIRQ_MASK) ) {

With this change, the driver will generate a transfer complete event
only if a transfer was in progress.

Hope this helps.

Jim Grenier


_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded







		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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

^ permalink raw reply

* Re: [PATCH] powerpc: Enable DEEPNAP power savings mode on 970MP
From: Michael Buesch @ 2006-10-05 19:25 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <20061004234141.749b13fb@localhost.localdomain>

On Thursday 05 October 2006 06:41, Olof Johansson wrote:
> Hi,
> 
> Without this patch, on an idle system I get:
> 
> cpu-power-0:21.638
> cpu-power-1:27.102
> cpu-power-2:29.343
> cpu-power-3:25.784
> Total: 103.8W
> 
> With this patch:
> 
> cpu-power-0:11.730
> cpu-power-1:17.185
> cpu-power-2:18.547
> cpu-power-3:17.528
> Total: 65.0W
> 
> If I lower HZ to 100, I can get it as low as:
> 
> cpu-power-0:10.938
> cpu-power-1:16.021
> cpu-power-2:17.245
> cpu-power-3:16.145
> Total: 60.2W
> 
> Another (older) Quad G5 went from 54W to 39W at HZ=250.
> 
> Coming back out of Deep Nap takes 40-70 cycles longer than coming back
> from just Nap (which already takes quite a while). I don't think it'll
> be a performance issue (interrupt latency on an idle system), but in
> case someone does measurements feel free to report them.
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>

Acked-by: Michael Buesch <mb@bu3sch.de>

I am running DEEPNAP on my Quad since quite some time and I
did not see any problems.
It saves quite a bit of power (I think it was about 20W for me when
I measured it)
That's really worth it.

-- 
Greetings Michael.

^ permalink raw reply

* [PATCH] spufs: change ppc_rtas declaration to weak
From: Geoff Levand @ 2006-10-05 18:35 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, Arnd Bergmann

The symbol ppc_rtas is defined as weak, but the declaration is missing the
weak attribute specifier.  The improper declaration causes problems when
linking the ppc_rtas reference in spu_syscall_table[] (spu_callbacks.c)
when RTAS support is not enabled.

Fixes this powerpc build error with CONFIG_SPU_FS=y, CONFIG_PPC_RTAS=n:

 arch/powerpc/platforms/built-in.o: undefined reference to `ppc_rtas'


Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>

---

I did a test build with pseries_defconfig and verified the proper routine is
linked in.  No run time test done.


Index: cell--common--5/include/asm-powerpc/syscalls.h
===================================================================
--- cell--common--5.orig/include/asm-powerpc/syscalls.h
+++ cell--common--5/include/asm-powerpc/syscalls.h
@@ -37,7 +37,7 @@
 asmlinkage int sys_ipc(uint call, int first, unsigned long second,
 		long third, void __user *ptr, long fifth);
 asmlinkage long ppc64_personality(unsigned long personality);
-asmlinkage int ppc_rtas(struct rtas_args __user *uargs);
+asmlinkage int ppc_rtas(struct rtas_args __user *uargs) __attribute__((weak));
 asmlinkage time_t sys64_time(time_t __user * tloc);
 asmlinkage long ppc_newuname(struct new_utsname __user * name);
 

^ 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