LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 4/8] 8xx: Fixup DAR from buggy dcbX instructions.
From: Joakim Tjernlund @ 2009-10-14 21:10 UTC (permalink / raw)
  To: Scott Wood; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <4AD63301.6090307@freescale.com>


Scott Wood <scottwood@freescale.com> wrote on 14/10/2009 22:22:25:
>
> Joakim Tjernlund wrote:
> > Scott Wood <scottwood@freescale.com> wrote on 14/10/2009 21:23:02:
> >> Joakim Tjernlund wrote:
> >>> BTW, you could add a test and printk in do_page_fault on address 0x000000f0.
> >>> if that ever hits there is a problem with dcbX fixup.
> >> It doesn't get any 0xf0 faults.
> >>
> >> FWIW, I'm not seeing the segfault any more, but I still get the lockup.
> >
> > Have you reverted
> >  8xx: start using dcbX instructions in various copy routines ?
> >
> > After that you could stick a
> >  b DataAccess
> >
> >  directly in the DTLB error handler to skip and dcbX fixups.
>
> With that, I don't see the hard lockup, but things get stuck during

You needed both to loose the hard lockup? I would think
it should be enough to revert the "various copy routines" stuff?
I figure that these routines aren't working in 8xx for other reasons
since they haven't been used on 8xx since at least early 2.4.

> bootup with everything idle.  I see this even if I revert everything but
> the "invalidate non present TLBs" patch, and I was seeing similar things
> sometimes with the other tlbil_va hacks.

OK, something else is up.

>
> I think there's something else going on in the 2.6 8xx code that needs
> to be fixed before we can tell what the impact of these patches is.
> I'll look into it.

Great because I am really out of ideas. Perhaps back down to 2.6.30 and test
from there?

^ permalink raw reply

* Re: i2c-powermac fails
From: Jean Delvare @ 2009-10-14 21:02 UTC (permalink / raw)
  To: Tim Shepard; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <20091013114948.03608b7f@hyperion.delvare>

Hi all,

On Tue, 13 Oct 2009 11:49:48 +0200, Jean Delvare wrote:
> I2C bus being setup too fast sounds more likely. It might be worth
> adding an arbitrary delay after initialization, just to see if it
> helps. Not sure where though, as I'm not familiar with the Powermac
> initialization steps. Maybe right before i2c_add_adapter() in
> i2c_powermac_probe?

Tim, can you please give a try to this patch? Obviously your machine
will take 5 additional seconds to boot, and this isn't meant as a real
fix, but if it helps, this will be an interesting hint for further
debugging attempts.

--- kernel32.orig/drivers/macintosh/therm_adt746x.c
+++ kernel32/drivers/macintosh/therm_adt746x.c
@@ -380,6 +380,7 @@ static int probe_thermostat(struct i2c_c
 	if (thermostat)
 		return 0;
 
+	msleep(5000);
 	th = kzalloc(sizeof(struct thermostat), GFP_KERNEL);
 	if (!th)
 		return -ENOMEM;


-- 
Jean Delvare

^ permalink raw reply

* Re: [PATCH 4/8] 8xx: Fixup DAR from buggy dcbX instructions.
From: Scott Wood @ 2009-10-14 20:22 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <OF22DCA2B2.1ADC3BC0-ONC125764F.006DE50F-C125764F.006E305A@transmode.se>

Joakim Tjernlund wrote:
> Scott Wood <scottwood@freescale.com> wrote on 14/10/2009 21:23:02:
>> Joakim Tjernlund wrote:
>>> BTW, you could add a test and printk in do_page_fault on address 0x000000f0.
>>> if that ever hits there is a problem with dcbX fixup.
>> It doesn't get any 0xf0 faults.
>>
>> FWIW, I'm not seeing the segfault any more, but I still get the lockup.
> 
> Have you reverted
>  8xx: start using dcbX instructions in various copy routines ?
> 
> After that you could stick a
>  b DataAccess
> 
>  directly in the DTLB error handler to skip and dcbX fixups.

With that, I don't see the hard lockup, but things get stuck during 
bootup with everything idle.  I see this even if I revert everything but 
the "invalidate non present TLBs" patch, and I was seeing similar things 
sometimes with the other tlbil_va hacks.

I think there's something else going on in the 2.6 8xx code that needs 
to be fixed before we can tell what the impact of these patches is. 
I'll look into it.

-Scott

^ permalink raw reply

* Re: UBIFS problem on MPC8536DS
From: Felix Radensky @ 2009-10-14 20:12 UTC (permalink / raw)
  To: Scott Wood
  Cc: linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org,
	Adrian Hunter
In-Reply-To: <4AD614E4.6030005@freescale.com>

Hi, Scott

Scott Wood wrote:
> Felix Radensky wrote:
>> Yes, NAND and NOR are on the same local bus controller.
>>
>> Maybe powerpc folks can provide some insight here.
>> Is it possible that simultaneous access to NOR and NAND
>> on MPC8536 can result in NAND timeouts ?
>
> I've heard other reports of such problems with eLBC, but was unable to 
> reproduce it myself last time I tried.  Could you reduce this down to 
> a minimal set of specific reproduction instructions (e.g. eliminate 
> UBI if possible, or else explain how to set up UBI)?
>
> -Scott
>
I use u-boot-2009.08 and linux-2.6.31 compiled with ELDK 4.2
UBI (under Device Drivers->MTD->UBI) and UBIFS
(under File Systems->Miscellaneous filesystems) should be enabled
in kernel configuration. I use the following configuration options 
(default ones):

CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set
# UBI debugging options
# CONFIG_MTD_UBI_DEBUG is not set
# CONFIG_JFFS2_RUBIN is not set
CONFIG_UBIFS_FS=y
# CONFIG_UBIFS_FS_XATTR is not set
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
# CONFIG_UBIFS_FS_DEBUG is not set

Root file system is mounted over NFS (also ELDK 4.2). udev is not used.
mtd-utils (which include ubi tools) are from latest 
git://git.infradead.org/mtd-utils.git

I've added the following eLBC node to mpc8536ds.dts

    localbus@ffe05000 {
        #address-cells = <2>;
        #size-cells = <1>;
        compatible = "fsl,mpc8536-elbc", "fsl,elbc", "simple-bus";
        reg = <0xffe05000 0x1000>;
        interrupts = <19 2>;
        interrupt-parent = <&mpic>;

        ranges = <0x0 0x0 0xe8000000 0x08000000
              0x1 0x0 0xe8000000 0x08000000
              0x2 0x0 0xffa00000 0x00040000
              0x3 0x0 0xffdf0000 0x00008000
              0x4 0x0 0xffa40000 0x00040000
              0x5 0x0 0xffa80000 0x00040000
              0x6 0x0 0xffac0000 0x00040000>;

        nor@0,0 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "cfi-flash";
            reg = <0x0 0x0 0x8000000>;
            bank-width = <2>;
            device-width = <1>;

            partition@0 {
                label = "ramdisk";
                reg = <0x0 0x03000000>;
                read-only;
            };

            partition@3000000 {
                label = "diagnostics";
                reg = <0x03000000 0x00e00000>;
                read-only;
            };

            partition@3e00000 {
                label = "dink";
                reg = <0x03e00000 0x00200000>;
                read-only;
            };

            partition@4000000 {
                label = "kernel";
                reg = <0x04000000 0x00400000>;
                read-only;
            };

            partition@4400000 {
                label = "jffs2";
                reg = <0x04400000 0x03b00000>;
            };

            partition@7f00000 {
                label = "dtb";
                reg = <0x07f00000 0x00080000>;
                read-only;
            };

            partition@7f80000 {
                label = "u-boot";
                reg = <0x07f80000 0x00080000>;
                read-only;
            };
        };

        nand@2,0 {
            compatible = "fsl,mpc8536-fcm-nand",
                     "fsl,elbc-fcm-nand";
            reg = <0x2 0x0 0x40000>;
        };

        nand@4,0 {
            compatible = "fsl,mpc8536-fcm-nand",
                     "fsl,elbc-fcm-nand";
            reg = <0x4 0x0 0x40000>;
        };

        nand@5,0 {
            compatible = "fsl,mpc8536-fcm-nand",
                     "fsl,elbc-fcm-nand";
            reg = <0x5 0x0 0x40000>;
        };

        nand@6,0 {
            compatible = "fsl,mpc8536-fcm-nand",
                     "fsl,elbc-fcm-nand";
            reg = <0x6 0x0 0x40000>;
        };

        board-control@3,0 {
            compatible = "fsl,mpc8536ds-fpga-pixis";
            reg = <0x3 0x0 0x8000>;
        };
    };

I use the script below to reproduce the problem. rfs.tar.bz2 is 350MiB.

nand_dev=mtd7
nand_num=7
nor_dev=mtd4

flash_eraseall /dev/$nand_dev || exit 1
ubiformat /dev/$nand_dev || exit 1
ubictrl_major=`cat /sys/class/misc/ubi_ctrl/dev | cut -d: -f1`
ubictrl_minor=`cat /sys/class/misc/ubi_ctrl/dev | cut -d: -f2`
rm -f /dev/ubi_ctrl
mknod /dev/ubi_ctrl c $ubictrl_major $ubictrl_minor
ubiattach /dev/ubi_ctrl -m $nand_num  || exit 1
ubi0_major=`cat /sys/class/ubi/ubi0/dev | cut -d: -f1`
ubi0_minor=`cat /sys/class/ubi/ubi0/dev | cut -d: -f2`
rm -f /dev/ubi0
mknod /dev/ubi0 c $ubi0_major $ubi0_minor
ubimkvol /dev/ubi0 -N rootfs -s 800MiB  || exit 1
mkdir /mnt/rfs
mount -t ubifs ubi0:rootfs /mnt/rfs  || exit 1
tar xf /root/rfs.tar.bz2 -C /mnt/rfs
flash_eraseall /dev/$nor_dev || exit 1

Felix.

^ permalink raw reply

* Re: [PATCH 4/8] 8xx: Fixup DAR from buggy dcbX instructions.
From: Joakim Tjernlund @ 2009-10-14 20:03 UTC (permalink / raw)
  To: Scott Wood; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <4AD62516.6090301@freescale.com>

Scott Wood <scottwood@freescale.com> wrote on 14/10/2009 21:23:02:
> Joakim Tjernlund wrote:
> > BTW, you could add a test and printk in do_page_fault on address 0x000000f0.
> > if that ever hits there is a problem with dcbX fixup.
>
> It doesn't get any 0xf0 faults.
>
> FWIW, I'm not seeing the segfault any more, but I still get the lockup.

Have you reverted
 8xx: start using dcbX instructions in various copy routines ?

After that you could stick a
 b DataAccess

 directly in the DTLB error handler to skip and dcbX fixups.

^ permalink raw reply

* Re: [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
From: Grant Likely @ 2009-10-14 19:32 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: John Bonesio, netdev, linuxppc-dev, davem
In-Reply-To: <4AD62247.4020102@grandegger.com>

On Wed, Oct 14, 2009 at 1:11 PM, Wolfgang Grandegger <wg@grandegger.com> wr=
ote:
> Grant Likely wrote:
>> From: John Bonesio <bones@secretlab.ca>
>>
>> The MDIO bus cannot be accessed at interrupt context, but on an FEC
>> error, the fec_mpc52xx driver reset function also tries to reset the
>> PHY. =A0Since the error is detected at IRQ context, and the PHY function=
s
>> try to sleep, the kernel ends up panicking.
>>
>> Resetting the PHY on an FEC error isn't even necessary. =A0This patch
>> solves the problem by removing the PHY reset entirely.
>
> There is also no need to free and re-allocate the RX buffers in
> mpc52xx_fec_reset().

Write and test a patch for me!  :-)

g.

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

^ permalink raw reply

* Re: [PATCH] therm_adt746x: Don't access non-existing register
From: Tim Shepard @ 2009-10-14 18:59 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Colin Leroy, linuxppc-dev, Paul Mackerras
In-Reply-To: <20091014173132.2894d0fd@hyperion.delvare>


Jean,

I tried one reboot with your patch, failed as usual.
(Patch sounds like a good idea though.)

			-Tim Shepard
			 shep@alum.mit.edu



tree<11>$ git describe
v2.6.31.1-6-g0b193bc
tree<12>$ git diff HEAD^ HEAD
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 0554dae..bf9ed2d 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -366,7 +366,7 @@ static int probe_thermostat(struct i2c_client *client,
        i2c_set_clientdata(client, th);
        th->clt = client;
 
-       rc = read_reg(th, 0);
+       rc = read_reg(th, CONFIG_REG);
        if (rc < 0) {
                dev_err(&client->dev, "Thermostat failed to read config!\n");
                kfree(th);
tree<13>$ dmesg | head
Using PowerMac machine description
Total memory = 1536MB; using 4096kB for hash table (at cfc00000)
Linux version 2.6.31.1-00006-g0b193bc (shep@tree) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #9 Wed Oct 14 13:41:40 EDT 2009
Found UniNorth memory controller & host bridge @ 0xf8000000 revision: 0xd9
Mapped at 0xff7c0000
Found a Intrepid mac-io controller, rev: 0, mapped at 0xff740000
Processor NAP mode on idle enabled.
PowerMac motherboard: PowerBook G4 15"
console [udbg0] enabled
Found UniNorth PCI host bridge at 0x00000000f0000000. Firmware bus number: 0->1
tree<14>$ dmesg | grep adt
adt746x: version 1 (supported)
adt746x: Thermostat bus: 0, address: 0x2e, limit_adjust: 0, fan_speed: -1
therm_adt746x 7-002e: Thermostat failed to read config!
tree<15>$ 

^ permalink raw reply related

* Re: [PATCH 4/8] 8xx: Fixup DAR from buggy dcbX instructions.
From: Scott Wood @ 2009-10-14 19:23 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <OF64D89B73.6073827F-ONC125764F.00687BC4-C125764F.0068D4DC@transmode.se>

Joakim Tjernlund wrote:
> BTW, you could add a test and printk in do_page_fault on address 0x000000f0.
> if that ever hits there is a problem with dcbX fixup.

It doesn't get any 0xf0 faults.

FWIW, I'm not seeing the segfault any more, but I still get the lockup.

-Scott

^ permalink raw reply

* Re: [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
From: Wolfgang Grandegger @ 2009-10-14 19:11 UTC (permalink / raw)
  To: Grant Likely; +Cc: John Bonesio, netdev, linuxppc-dev, davem
In-Reply-To: <20091014174224.29221.18830.stgit@angua>

Grant Likely wrote:
> From: John Bonesio <bones@secretlab.ca>
> 
> The MDIO bus cannot be accessed at interrupt context, but on an FEC
> error, the fec_mpc52xx driver reset function also tries to reset the
> PHY.  Since the error is detected at IRQ context, and the PHY functions
> try to sleep, the kernel ends up panicking.
> 
> Resetting the PHY on an FEC error isn't even necessary.  This patch
> solves the problem by removing the PHY reset entirely.

There is also no need to free and re-allocate the RX buffers in
mpc52xx_fec_reset().

Wolfgang.

^ permalink raw reply

* Re: [PATCH 4/8] 8xx: Fixup DAR from buggy dcbX instructions.
From: Joakim Tjernlund @ 2009-10-14 19:05 UTC (permalink / raw)
  To: Scott Wood; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <20091014172003.GD21215@loki.buserror.net>

Scott Wood <scottwood@freescale.com> wrote on 14/10/2009 19:20:03:
>
> On Sun, Oct 11, 2009 at 06:35:08PM +0200, Joakim Tjernlund wrote:
> > This is an assembler version to fixup DAR not being set
> > by dcbX, icbi instructions. There are two versions, one
> > uses selfmodifing code, the other uses a
> > jump table but is much bigger(default).
> > ---
> >  arch/powerpc/kernel/head_8xx.S |  146 +++++++++++++++++++++++++++++++++++++++-
> >  1 files changed, 145 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
> > index 093176c..9839e79 100644
> > --- a/arch/powerpc/kernel/head_8xx.S
> > +++ b/arch/powerpc/kernel/head_8xx.S
> > @@ -494,7 +494,8 @@ DataTLBError:
> >
> >     mfspr   r10, SPRN_DAR
> >     cmpwi   cr0, r10, 0x00f0
> > -   beq-   2f   /* must be a buggy dcbX, icbi insn. */
> > +   beq-   FixDAR   /* must be a buggy dcbX, icbi insn. */
> > +DARFix:   /* Return from dcbx instruction bug workaround, r10 holds value of DAR */
>
> Both FixDAR and DARFix?  Could we make the labels a little clearer?

Yes, need to come up with better names :)

>
> > +/* This is the procedure to calculate the data EA for buggy dcbx,dcbi instructions
> > + * by decoding the registers used by the dcbx instruction and adding them.
> > + * DAR is set to the calculated address and r10 also holds the EA on exit.
> > + */
>
> How often does this happen?  Could we just do it in C code after saving all
> the registers, and avoid the self modifying stuff (or the big switch
> statement equivalent)?

I had some problems with the C-version. I got lots of extra TLB errors for the same address
so I am not confident it will work in the long run.

BTW, you could add a test and printk in do_page_fault on address 0x000000f0.
if that ever hits there is a problem with dcbX fixup.

^ permalink raw reply

* Re: [PATCH 3/6] powerpc: Remove get_irq_desc()
From: Grant Likely @ 2009-10-14 19:02 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <a78e4bb1b3a65314dd4bd0c253a0abf242bd34a6.1255499081.git.michael@ellerman.id.au>

On Tue, Oct 13, 2009 at 11:44 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> get_irq_desc() is a powerpc-specific version of irq_to_desc(). That
> is reason enough to remove it, but it also doesn't know about sparse
> irq_desc support which irq_to_desc() does (when we enable it).
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> =A0arch/powerpc/include/asm/irq.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =
=A0 =A02 -
> =A0arch/powerpc/kernel/crash.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =
=A0 =A02 +-
> =A0arch/powerpc/kernel/irq.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
| =A0 28 ++++++++++++----------
> =A0arch/powerpc/platforms/512x/mpc5121_ads_cpld.c =A0| =A0 =A02 +-
> =A0arch/powerpc/platforms/52xx/media5200.c =A0 =A0 =A0 =A0 | =A0 =A02 +-
> =A0arch/powerpc/platforms/82xx/pq2ads-pci-pic.c =A0 =A0| =A0 =A02 +-
> =A0arch/powerpc/platforms/85xx/socrates_fpga_pic.c | =A0 =A02 +-
> =A0arch/powerpc/platforms/86xx/gef_pic.c =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +=
-
> =A0arch/powerpc/platforms/cell/beat_interrupt.c =A0 =A0| =A0 =A02 +-
> =A0arch/powerpc/platforms/cell/spider-pic.c =A0 =A0 =A0 =A0| =A0 =A04 +-
> =A0arch/powerpc/platforms/iseries/irq.c =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A02=
 +-
> =A0arch/powerpc/platforms/powermac/pic.c =A0 =A0 =A0 =A0 =A0 | =A0 =A08 +=
++---
> =A0arch/powerpc/platforms/pseries/xics.c =A0 =A0 =A0 =A0 =A0 | =A0 =A08 +=
++---
> =A0arch/powerpc/sysdev/cpm1.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
| =A0 =A02 +-
> =A0arch/powerpc/sysdev/cpm2_pic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =
=A0 10 +++++---
> =A0arch/powerpc/sysdev/fsl_msi.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =
=A0 =A02 +-
> =A0arch/powerpc/sysdev/i8259.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =
=A0 =A04 +-
> =A0arch/powerpc/sysdev/ipic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
| =A0 =A02 +-
> =A0arch/powerpc/sysdev/mpc8xx_pic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =
=A02 +-
> =A0arch/powerpc/sysdev/mpic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
| =A0 18 +++++++-------
> =A0arch/powerpc/sysdev/mv64x60_pic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =
=A02 +-
> =A0arch/powerpc/sysdev/qe_lib/qe_ic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =
=A04 +-
> =A0arch/powerpc/sysdev/tsi108_pci.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =
=A02 +-
> =A0arch/powerpc/sysdev/uic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
| =A0 =A06 ++--
> =A0arch/powerpc/sysdev/xilinx_intc.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =
=A02 +-
> =A025 files changed, 62 insertions(+), 60 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/ir=
q.h
> index b83fcc8..03dc28c 100644
> --- a/arch/powerpc/include/asm/irq.h
> +++ b/arch/powerpc/include/asm/irq.h
> @@ -17,8 +17,6 @@
> =A0#include <asm/atomic.h>
>
>
> -#define get_irq_desc(irq) (&irq_desc[(irq)])
> -
> =A0/* Define a way to iterate across irqs. */
> =A0#define for_each_irq(i) \
> =A0 =A0 =A0 =A0for ((i) =3D 0; (i) < NR_IRQS; ++(i))
> diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
> index 0a8439a..6f4613d 100644
> --- a/arch/powerpc/kernel/crash.c
> +++ b/arch/powerpc/kernel/crash.c
> @@ -373,7 +373,7 @@ void default_machine_crash_shutdown(struct pt_regs *r=
egs)
> =A0 =A0 =A0 =A0hard_irq_disable();
>
> =A0 =A0 =A0 =A0for_each_irq(i) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct irq_desc *desc =3D irq_desc + i;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(i);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (desc->status & IRQ_INPROGRESS)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc->chip->eoi(i);
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index e5d1211..6563221 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -190,7 +190,7 @@ int show_interrupts(struct seq_file *p, void *v)
> =A0 =A0 =A0 =A0}
>
> =A0 =A0 =A0 =A0if (i < NR_IRQS) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D get_irq_desc(i);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D irq_to_desc(i);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_lock_irqsave(&desc->lock, flags);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0action =3D desc->action;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!action || !action->handler)
> @@ -230,23 +230,25 @@ skip:
> =A0#ifdef CONFIG_HOTPLUG_CPU
> =A0void fixup_irqs(cpumask_t map)
> =A0{
> + =A0 =A0 =A0 struct irq_desc *desc;
> =A0 =A0 =A0 =A0unsigned int irq;
> =A0 =A0 =A0 =A0static int warned;
>
> =A0 =A0 =A0 =A0for_each_irq(irq) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpumask_t mask;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (irq_desc[irq].status & IRQ_PER_CPU)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D irq_to_desc(irq);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (desc && desc->status & IRQ_PER_CPU)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue;
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpumask_and(&mask, irq_desc[irq].affinity, =
&map);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpumask_and(&mask, desc->affinity, &map);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (any_online_cpu(mask) =3D=3D NR_CPUS) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printk("Breaking affinity =
for irq %i\n", irq);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mask =3D map;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (irq_desc[irq].chip->set_affinity)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_desc[irq].chip->set_aff=
inity(irq, &mask);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (irq_desc[irq].action && !(warned++=
))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (desc->chip->set_affinity)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc->chip->set_affinity(ir=
q, &mask);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (desc->action && !(warned++))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printk("Cannot set affinit=
y for irq %i\n", irq);
> =A0 =A0 =A0 =A0}
>
> @@ -273,7 +275,7 @@ static inline void handle_one_irq(unsigned int irq)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return;
> =A0 =A0 =A0 =A0}
>
> - =A0 =A0 =A0 desc =3D irq_desc + irq;
> + =A0 =A0 =A0 desc =3D irq_to_desc(irq);
> =A0 =A0 =A0 =A0saved_sp_limit =3D current->thread.ksp_limit;
>
> =A0 =A0 =A0 =A0irqtp->task =3D curtp->task;
> @@ -535,7 +537,7 @@ struct irq_host *irq_alloc_host(struct device_node *o=
f_node,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0smp_wmb();
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Clear norequest flags *=
/
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 get_irq_desc(i)->status &=
=3D ~IRQ_NOREQUEST;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_to_desc(i)->status &=3D=
 ~IRQ_NOREQUEST;
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Legacy flags are left t=
o default at this point,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * one can then use irq_cr=
eate_mapping() to
> @@ -602,7 +604,7 @@ static int irq_setup_virq(struct irq_host *host, unsi=
gned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_hw_number_t hw=
irq)
> =A0{
> =A0 =A0 =A0 =A0/* Clear IRQ_NOREQUEST flag */
> - =A0 =A0 =A0 get_irq_desc(virq)->status &=3D ~IRQ_NOREQUEST;
> + =A0 =A0 =A0 irq_to_desc(virq)->status &=3D ~IRQ_NOREQUEST;
>
> =A0 =A0 =A0 =A0/* map it */
> =A0 =A0 =A0 =A0smp_wmb();
> @@ -732,7 +734,7 @@ unsigned int irq_create_of_mapping(struct device_node=
 *controller,
>
> =A0 =A0 =A0 =A0/* Set type if specified and different than the current on=
e */
> =A0 =A0 =A0 =A0if (type !=3D IRQ_TYPE_NONE &&
> - =A0 =A0 =A0 =A0 =A0 type !=3D (get_irq_desc(virq)->status & IRQF_TRIGGE=
R_MASK))
> + =A0 =A0 =A0 =A0 =A0 type !=3D (irq_to_desc(virq)->status & IRQF_TRIGGER=
_MASK))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0set_irq_type(virq, type);
> =A0 =A0 =A0 =A0return virq;
> =A0}
> @@ -804,7 +806,7 @@ void irq_dispose_mapping(unsigned int virq)
> =A0 =A0 =A0 =A0irq_map[virq].hwirq =3D host->inval_irq;
>
> =A0 =A0 =A0 =A0/* Set some flags */
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_NOREQUEST;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_NOREQUEST;
>
> =A0 =A0 =A0 =A0/* Free it */
> =A0 =A0 =A0 =A0irq_free_virt(virq, 1);
> @@ -1001,7 +1003,7 @@ void irq_early_init(void)
> =A0 =A0 =A0 =A0unsigned int i;
>
> =A0 =A0 =A0 =A0for (i =3D 0; i < NR_IRQS; i++)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 get_irq_desc(i)->status |=3D IRQ_NOREQUEST;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_to_desc(i)->status |=3D IRQ_NOREQUEST;
> =A0}
>
> =A0/* We need to create the radix trees late */
> @@ -1064,7 +1066,7 @@ static int virq_debug_show(struct seq_file *m, void=
 *private)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"chip name", "host name");
>
> =A0 =A0 =A0 =A0for (i =3D 1; i < NR_IRQS; i++) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D get_irq_desc(i);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D irq_to_desc(i);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_lock_irqsave(&desc->lock, flags);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (desc->action && desc->action->handler)=
 {
> diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerp=
c/platforms/512x/mpc5121_ads_cpld.c
> index a6ce805..cd70ee1 100644
> --- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
> +++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
> @@ -132,7 +132,7 @@ static int
> =A0cpld_pic_host_map(struct irq_host *h, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_hw_number_t h=
w)
> =A0{
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &cpld_pic, handle_level_irq=
);
> =A0 =A0 =A0 =A0return 0;
> =A0}
> diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platf=
orms/52xx/media5200.c
> index 68e4f16..4780203 100644
> --- a/arch/powerpc/platforms/52xx/media5200.c
> +++ b/arch/powerpc/platforms/52xx/media5200.c
> @@ -114,7 +114,7 @@ void media5200_irq_cascade(unsigned int virq, struct =
irq_desc *desc)
> =A0static int media5200_irq_map(struct irq_host *h, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_hw_number_t h=
w)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
>
> =A0 =A0 =A0 =A0pr_debug("%s: h=3D%p, virq=3D%i, hwirq=3D%i\n", __func__, =
h, virq, (int)hw);
> =A0 =A0 =A0 =A0set_irq_chip_data(virq, &media5200_irq);
> diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/=
platforms/82xx/pq2ads-pci-pic.c
> index 7ee979f..a682331 100644
> --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> @@ -107,7 +107,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, st=
ruct irq_desc *desc)
> =A0static int pci_pic_host_map(struct irq_host *h, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_hw_number_t hw=
)
> =A0{
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_data(virq, h->host_data);
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &pq2ads_pci_ic, handle_leve=
l_irq);
> =A0 =A0 =A0 =A0return 0;
> diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/power=
pc/platforms/85xx/socrates_fpga_pic.c
> index 60edf63..e59920a 100644
> --- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
> +++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
> @@ -245,7 +245,7 @@ static int socrates_fpga_pic_host_map(struct irq_host=
 *h, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_hw_number_t hwirq)
> =A0{
> =A0 =A0 =A0 =A0/* All interrupts are LEVEL sensitive */
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &socrates_fpga_pic_chip,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0handle_fasteoi_irq);
>
> diff --git a/arch/powerpc/platforms/86xx/gef_pic.c b/arch/powerpc/platfor=
ms/86xx/gef_pic.c
> index 50d0a2b..978d6cb 100644
> --- a/arch/powerpc/platforms/86xx/gef_pic.c
> +++ b/arch/powerpc/platforms/86xx/gef_pic.c
> @@ -163,7 +163,7 @@ static int gef_pic_host_map(struct irq_host *h, unsig=
ned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_hw_number_t hwirq)
> =A0{
> =A0 =A0 =A0 =A0/* All interrupts are LEVEL sensitive */
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &gef_pic_chip, handle_level=
_irq);
>
> =A0 =A0 =A0 =A0return 0;
> diff --git a/arch/powerpc/platforms/cell/beat_interrupt.c b/arch/powerpc/=
platforms/cell/beat_interrupt.c
> index 7225484..4a2bbff 100644
> --- a/arch/powerpc/platforms/cell/beat_interrupt.c
> +++ b/arch/powerpc/platforms/cell/beat_interrupt.c
> @@ -136,7 +136,7 @@ static void beatic_pic_host_unmap(struct irq_host *h,=
 unsigned int virq)
> =A0static int beatic_pic_host_map(struct irq_host *h, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_hw_number=
_t hw)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0int64_t err;
>
> =A0 =A0 =A0 =A0err =3D beat_construct_and_connect_irq_plug(virq, hw);
> diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/plat=
forms/cell/spider-pic.c
> index 4e56556..9dd63c5 100644
> --- a/arch/powerpc/platforms/cell/spider-pic.c
> +++ b/arch/powerpc/platforms/cell/spider-pic.c
> @@ -102,7 +102,7 @@ static void spider_ack_irq(unsigned int virq)
>
> =A0 =A0 =A0 =A0/* Reset edge detection logic if necessary
> =A0 =A0 =A0 =A0 */
> - =A0 =A0 =A0 if (get_irq_desc(virq)->status & IRQ_LEVEL)
> + =A0 =A0 =A0 if (irq_to_desc(virq)->status & IRQ_LEVEL)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return;
>
> =A0 =A0 =A0 =A0/* Only interrupts 47 to 50 can be set to edge */
> @@ -119,7 +119,7 @@ static int spider_set_irq_type(unsigned int virq, uns=
igned int type)
> =A0 =A0 =A0 =A0struct spider_pic *pic =3D spider_virq_to_pic(virq);
> =A0 =A0 =A0 =A0unsigned int hw =3D irq_map[virq].hwirq;
> =A0 =A0 =A0 =A0void __iomem *cfg =3D spider_get_irq_config(pic, hw);
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0u32 old_mask;
> =A0 =A0 =A0 =A0u32 ic;
>
> diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platform=
s/iseries/irq.c
> index 94f4447..f8446ea 100644
> --- a/arch/powerpc/platforms/iseries/irq.c
> +++ b/arch/powerpc/platforms/iseries/irq.c
> @@ -214,7 +214,7 @@ void __init iSeries_activate_IRQs()
> =A0 =A0 =A0 =A0unsigned long flags;
>
> =A0 =A0 =A0 =A0for_each_irq (irq) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(irq)=
;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(irq);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (desc && desc->chip && desc->chip->star=
tup) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_lock_irqsave(&desc->l=
ock, flags);
> diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platfor=
ms/powermac/pic.c
> index d212006..484d21e 100644
> --- a/arch/powerpc/platforms/powermac/pic.c
> +++ b/arch/powerpc/platforms/powermac/pic.c
> @@ -152,12 +152,12 @@ static unsigned int pmac_startup_irq(unsigned int v=
irq)
> =A0 =A0 =A0 =A0 unsigned long bit =3D 1UL << (src & 0x1f);
> =A0 =A0 =A0 =A0 int i =3D src >> 5;
>
> - =A0 =A0 =A0 spin_lock_irqsave(&pmac_pic_lock, flags);
> - =A0 =A0 =A0 if ((irq_desc[virq].status & IRQ_LEVEL) =3D=3D 0)
> + =A0 =A0 =A0 spin_lock_irqsave(&pmac_pic_lock, flags);
> + =A0 =A0 =A0 if ((irq_to_desc(virq)->status & IRQ_LEVEL) =3D=3D 0)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out_le32(&pmac_irq_hw[i]->ack, bit);
> =A0 =A0 =A0 =A0 __set_bit(src, ppc_cached_irq_mask);
> =A0 =A0 =A0 =A0 __pmac_set_irq_mask(src, 0);
> - =A0 =A0 =A0 spin_unlock_irqrestore(&pmac_pic_lock, flags);
> + =A0 =A0 =A0 spin_unlock_irqrestore(&pmac_pic_lock, flags);
>
> =A0 =A0 =A0 =A0return 0;
> =A0}
> @@ -285,7 +285,7 @@ static int pmac_pic_host_match(struct irq_host *h, st=
ruct device_node *node)
> =A0static int pmac_pic_host_map(struct irq_host *h, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_hw_number_t h=
w)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0int level;
>
> =A0 =A0 =A0 =A0if (hw >=3D max_irqs)
> diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platfor=
ms/pseries/xics.c
> index 419f8a6..75935ae 100644
> --- a/arch/powerpc/platforms/pseries/xics.c
> +++ b/arch/powerpc/platforms/pseries/xics.c
> @@ -156,7 +156,7 @@ static int get_irq_server(unsigned int virq, unsigned=
 int strict_check)
> =A0 =A0 =A0 =A0cpumask_t cpumask;
> =A0 =A0 =A0 =A0cpumask_t tmp =3D CPU_MASK_NONE;
>
> - =A0 =A0 =A0 cpumask_copy(&cpumask, irq_desc[virq].affinity);
> + =A0 =A0 =A0 cpumask_copy(&cpumask, irq_to_desc(virq)->affinity);
> =A0 =A0 =A0 =A0if (!distribute_irqs)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return default_server;
>
> @@ -419,7 +419,7 @@ static int xics_host_map(struct irq_host *h, unsigned=
 int virq,
> =A0 =A0 =A0 =A0/* Insert the interrupt mapping into the radix tree for fa=
st lookup */
> =A0 =A0 =A0 =A0irq_radix_revmap_insert(xics_host, virq, hw);
>
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, xics_irq_chip, handle_faste=
oi_irq);
> =A0 =A0 =A0 =A0return 0;
> =A0}
> @@ -843,7 +843,7 @@ void xics_migrate_irqs_away(void)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* We need to get IPIs still. */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (irq =3D=3D XICS_IPI || irq =3D=3D XICS=
_IRQ_SPURIOUS)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D irq_to_desc(virq);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* We only need to migrate enabled IRQS */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (desc =3D=3D NULL || desc->chip =3D=3D =
NULL
> @@ -872,7 +872,7 @@ void xics_migrate_irqs_away(void)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 virq, cpu);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Reset affinity to all cpus */
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpumask_setall(irq_desc[virq].affinity);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpumask_setall(irq_to_desc(virq)->affinity)=
;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc->chip->set_affinity(virq, cpu_all_mas=
k);
> =A0unlock:
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_unlock_irqrestore(&desc->lock, flags)=
;
> diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c
> index 82424cd..5235373 100644
> --- a/arch/powerpc/sysdev/cpm1.c
> +++ b/arch/powerpc/sysdev/cpm1.c
> @@ -102,7 +102,7 @@ static int cpm_pic_host_map(struct irq_host *h, unsig=
ned int virq,
> =A0{
> =A0 =A0 =A0 =A0pr_debug("cpm_pic_host_map(%d, 0x%lx)\n", virq, hw);
>
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &cpm_pic, handle_fasteoi_ir=
q);
> =A0 =A0 =A0 =A0return 0;
> =A0}
> diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pi=
c.c
> index 78f1f7c..722cf72 100644
> --- a/arch/powerpc/sysdev/cpm2_pic.c
> +++ b/arch/powerpc/sysdev/cpm2_pic.c
> @@ -115,11 +115,13 @@ static void cpm2_ack(unsigned int virq)
>
> =A0static void cpm2_end_irq(unsigned int virq)
> =A0{
> + =A0 =A0 =A0 struct irq_desc *desc;
> =A0 =A0 =A0 =A0int =A0 =A0 bit, word;
> =A0 =A0 =A0 =A0unsigned int irq_nr =3D virq_to_hw(virq);
>
> - =A0 =A0 =A0 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRES=
S))
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 && irq_desc[irq_nr].action)=
 {
> + =A0 =A0 =A0 desc =3D irq_to_desc(irq_nr);
> + =A0 =A0 =A0 if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 && desc->action) {
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bit =3D irq_to_siubit[irq_nr];
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0word =3D irq_to_siureg[irq_nr];
> @@ -138,7 +140,7 @@ static void cpm2_end_irq(unsigned int virq)
> =A0static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type=
)
> =A0{
> =A0 =A0 =A0 =A0unsigned int src =3D virq_to_hw(virq);
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0unsigned int vold, vnew, edibit;
>
> =A0 =A0 =A0 =A0if (flow_type =3D=3D IRQ_TYPE_NONE)
> @@ -210,7 +212,7 @@ static int cpm2_pic_host_map(struct irq_host *h, unsi=
gned int virq,
> =A0{
> =A0 =A0 =A0 =A0pr_debug("cpm2_pic_host_map(%d, 0x%lx)\n", virq, hw);
>
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &cpm2_pic, handle_level_irq=
);
> =A0 =A0 =A0 =A0return 0;
> =A0}
> diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.=
c
> index da38a1f..7174374 100644
> --- a/arch/powerpc/sysdev/fsl_msi.c
> +++ b/arch/powerpc/sysdev/fsl_msi.c
> @@ -55,7 +55,7 @@ static int fsl_msi_host_map(struct irq_host *h, unsigne=
d int virq,
> =A0{
> =A0 =A0 =A0 =A0struct irq_chip *chip =3D &fsl_msi_chip;
>
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_TYPE_EDGE_FALLING;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_TYPE_EDGE_FALLING;
>
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, chip, handle_edge_irq);
>
> diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c
> index a96584a..78ed945 100644
> --- a/arch/powerpc/sysdev/i8259.c
> +++ b/arch/powerpc/sysdev/i8259.c
> @@ -175,12 +175,12 @@ static int i8259_host_map(struct irq_host *h, unsig=
ned int virq,
>
> =A0 =A0 =A0 =A0/* We block the internal cascade */
> =A0 =A0 =A0 =A0if (hw =3D=3D 2)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_NOREQUE=
ST;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_NOREQUES=
T;
>
> =A0 =A0 =A0 =A0/* We use the level handler only for now, we might want to
> =A0 =A0 =A0 =A0 * be more cautious here but that works for now
> =A0 =A0 =A0 =A0 */
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, &i8259_pic, handle_level_ir=
q);
> =A0 =A0 =A0 =A0return 0;
> =A0}
> diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
> index cb7689c..f042c1d 100644
> --- a/arch/powerpc/sysdev/ipic.c
> +++ b/arch/powerpc/sysdev/ipic.c
> @@ -605,7 +605,7 @@ static int ipic_set_irq_type(unsigned int virq, unsig=
ned int flow_type)
> =A0{
> =A0 =A0 =A0 =A0struct ipic *ipic =3D ipic_from_irq(virq);
> =A0 =A0 =A0 =A0unsigned int src =3D ipic_irq_to_hw(virq);
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0unsigned int vold, vnew, edibit;
>
> =A0 =A0 =A0 =A0if (flow_type =3D=3D IRQ_TYPE_NONE)
> diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8x=
x_pic.c
> index 5d2d552..0117958 100644
> --- a/arch/powerpc/sysdev/mpc8xx_pic.c
> +++ b/arch/powerpc/sysdev/mpc8xx_pic.c
> @@ -72,7 +72,7 @@ static void mpc8xx_end_irq(unsigned int virq)
>
> =A0static int mpc8xx_set_irq_type(unsigned int virq, unsigned int flow_ty=
pe)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
>
> =A0 =A0 =A0 =A0desc->status &=3D ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
> =A0 =A0 =A0 =A0desc->status |=3D flow_type & IRQ_TYPE_SENSE_MASK;
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 30c44e6..4fd57ab 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -572,7 +572,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
> =A0 =A0 =A0 =A0cpumask_t mask;
> =A0 =A0 =A0 =A0int cpuid;
>
> - =A0 =A0 =A0 cpumask_copy(&mask, irq_desc[virt_irq].affinity);
> + =A0 =A0 =A0 cpumask_copy(&mask, irq_to_desc(virt_irq)->affinity);
> =A0 =A0 =A0 =A0if (cpus_equal(mask, CPU_MASK_ALL)) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0static int irq_rover;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0static DEFINE_SPINLOCK(irq_rover_lock);
> @@ -621,7 +621,7 @@ static struct mpic *mpic_find(unsigned int irq)
> =A0 =A0 =A0 =A0if (irq < NUM_ISA_INTERRUPTS)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return NULL;
>
> - =A0 =A0 =A0 return irq_desc[irq].chip_data;
> + =A0 =A0 =A0 return irq_to_desc(irq)->chip_data;
> =A0}
>
> =A0/* Determine if the linux irq is an IPI */
> @@ -648,14 +648,14 @@ static inline u32 mpic_physmask(u32 cpumask)
> =A0/* Get the mpic structure from the IPI number */
> =A0static inline struct mpic * mpic_from_ipi(unsigned int ipi)
> =A0{
> - =A0 =A0 =A0 return irq_desc[ipi].chip_data;
> + =A0 =A0 =A0 return irq_to_desc(ipi)->chip_data;
> =A0}
> =A0#endif
>
> =A0/* Get the mpic structure from the irq number */
> =A0static inline struct mpic * mpic_from_irq(unsigned int irq)
> =A0{
> - =A0 =A0 =A0 return irq_desc[irq].chip_data;
> + =A0 =A0 =A0 return irq_to_desc(irq)->chip_data;
> =A0}
>
> =A0/* Send an EOI */
> @@ -735,7 +735,7 @@ static void mpic_unmask_ht_irq(unsigned int irq)
>
> =A0 =A0 =A0 =A0mpic_unmask_irq(irq);
>
> - =A0 =A0 =A0 if (irq_desc[irq].status & IRQ_LEVEL)
> + =A0 =A0 =A0 if (irq_to_desc(irq)->status & IRQ_LEVEL)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mpic_ht_end_irq(mpic, src);
> =A0}
>
> @@ -745,7 +745,7 @@ static unsigned int mpic_startup_ht_irq(unsigned int =
irq)
> =A0 =A0 =A0 =A0unsigned int src =3D mpic_irq_to_hw(irq);
>
> =A0 =A0 =A0 =A0mpic_unmask_irq(irq);
> - =A0 =A0 =A0 mpic_startup_ht_interrupt(mpic, src, irq_desc[irq].status);
> + =A0 =A0 =A0 mpic_startup_ht_interrupt(mpic, src, irq_to_desc(irq)->stat=
us);
>
> =A0 =A0 =A0 =A0return 0;
> =A0}
> @@ -755,7 +755,7 @@ static void mpic_shutdown_ht_irq(unsigned int irq)
> =A0 =A0 =A0 =A0struct mpic *mpic =3D mpic_from_irq(irq);
> =A0 =A0 =A0 =A0unsigned int src =3D mpic_irq_to_hw(irq);
>
> - =A0 =A0 =A0 mpic_shutdown_ht_interrupt(mpic, src, irq_desc[irq].status)=
;
> + =A0 =A0 =A0 mpic_shutdown_ht_interrupt(mpic, src, irq_to_desc(irq)->sta=
tus);
> =A0 =A0 =A0 =A0mpic_mask_irq(irq);
> =A0}
>
> @@ -772,7 +772,7 @@ static void mpic_end_ht_irq(unsigned int irq)
> =A0 =A0 =A0 =A0 * latched another edge interrupt coming in anyway
> =A0 =A0 =A0 =A0 */
>
> - =A0 =A0 =A0 if (irq_desc[irq].status & IRQ_LEVEL)
> + =A0 =A0 =A0 if (irq_to_desc(irq)->status & IRQ_LEVEL)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mpic_ht_end_irq(mpic, src);
> =A0 =A0 =A0 =A0mpic_eoi(mpic);
> =A0}
> @@ -856,7 +856,7 @@ int mpic_set_irq_type(unsigned int virq, unsigned int=
 flow_type)
> =A0{
> =A0 =A0 =A0 =A0struct mpic *mpic =3D mpic_from_irq(virq);
> =A0 =A0 =A0 =A0unsigned int src =3D mpic_irq_to_hw(virq);
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0unsigned int vecpri, vold, vnew;
>
> =A0 =A0 =A0 =A0DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%=
x)\n",
> diff --git a/arch/powerpc/sysdev/mv64x60_pic.c b/arch/powerpc/sysdev/mv64=
x60_pic.c
> index 2aa4ed0..485b924 100644
> --- a/arch/powerpc/sysdev/mv64x60_pic.c
> +++ b/arch/powerpc/sysdev/mv64x60_pic.c
> @@ -213,7 +213,7 @@ static int mv64x60_host_map(struct irq_host *h, unsig=
ned int virq,
> =A0{
> =A0 =A0 =A0 =A0int level1;
>
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
>
> =A0 =A0 =A0 =A0level1 =3D (hwirq & MV64x60_LEVEL1_MASK) >> MV64x60_LEVEL1=
_OFFSET;
> =A0 =A0 =A0 =A0BUG_ON(level1 > MV64x60_LEVEL1_GPP);
> diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_=
lib/qe_ic.c
> index 3faa42e..fc09874 100644
> --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
> +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
> @@ -189,7 +189,7 @@ static inline void qe_ic_write(volatile __be32 =A0__i=
omem * base, unsigned int reg
>
> =A0static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
> =A0{
> - =A0 =A0 =A0 return irq_desc[virq].chip_data;
> + =A0 =A0 =A0 return irq_to_desc(virq)->chip_data;
> =A0}
>
> =A0#define virq_to_hw(virq) =A0 =A0 =A0 ((unsigned int)irq_map[virq].hwir=
q)
> @@ -263,7 +263,7 @@ static int qe_ic_host_map(struct irq_host *h, unsigne=
d int virq,
> =A0 =A0 =A0 =A0chip =3D &qe_ic->hc_irq;
>
> =A0 =A0 =A0 =A0set_irq_chip_data(virq, qe_ic);
> - =A0 =A0 =A0 get_irq_desc(virq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 irq_to_desc(virq)->status |=3D IRQ_LEVEL;
>
> =A0 =A0 =A0 =A0set_irq_chip_and_handler(virq, chip, handle_level_irq);
>
> diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi10=
8_pci.c
> index cf244a4..02f6009 100644
> --- a/arch/powerpc/sysdev/tsi108_pci.c
> +++ b/arch/powerpc/sysdev/tsi108_pci.c
> @@ -398,7 +398,7 @@ static int pci_irq_host_map(struct irq_host *h, unsig=
ned int virq,
> =A0 =A0 =A0 =A0DBG("%s(%d, 0x%lx)\n", __func__, virq, hw);
> =A0 =A0 =A0 =A0if ((virq >=3D 1) && (virq <=3D 4)){
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq =3D virq + IRQ_PCI_INTAD_BASE - 1;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 get_irq_desc(irq)->status |=3D IRQ_LEVEL;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_to_desc(irq)->status |=3D IRQ_LEVEL;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0set_irq_chip(irq, &tsi108_pci_irq);
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0return 0;
> diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
> index 466ce9a..cf97935 100644
> --- a/arch/powerpc/sysdev/uic.c
> +++ b/arch/powerpc/sysdev/uic.c
> @@ -57,7 +57,7 @@ struct uic {
>
> =A0static void uic_unmask_irq(unsigned int virq)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0struct uic *uic =3D get_irq_chip_data(virq);
> =A0 =A0 =A0 =A0unsigned int src =3D uic_irq_to_hw(virq);
> =A0 =A0 =A0 =A0unsigned long flags;
> @@ -101,7 +101,7 @@ static void uic_ack_irq(unsigned int virq)
>
> =A0static void uic_mask_ack_irq(unsigned int virq)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0struct uic *uic =3D get_irq_chip_data(virq);
> =A0 =A0 =A0 =A0unsigned int src =3D uic_irq_to_hw(virq);
> =A0 =A0 =A0 =A0unsigned long flags;
> @@ -129,7 +129,7 @@ static int uic_set_irq_type(unsigned int virq, unsign=
ed int flow_type)
> =A0{
> =A0 =A0 =A0 =A0struct uic *uic =3D get_irq_chip_data(virq);
> =A0 =A0 =A0 =A0unsigned int src =3D uic_irq_to_hw(virq);
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
> =A0 =A0 =A0 =A0unsigned long flags;
> =A0 =A0 =A0 =A0int trigger, polarity;
> =A0 =A0 =A0 =A0u32 tr, pr, mask;
> diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xili=
nx_intc.c
> index 40edad5..ab74371 100644
> --- a/arch/powerpc/sysdev/xilinx_intc.c
> +++ b/arch/powerpc/sysdev/xilinx_intc.c
> @@ -79,7 +79,7 @@ static void xilinx_intc_mask(unsigned int virq)
>
> =A0static int xilinx_intc_set_type(unsigned int virq, unsigned int flow_t=
ype)
> =A0{
> - =A0 =A0 =A0 struct irq_desc *desc =3D get_irq_desc(virq);
> + =A0 =A0 =A0 struct irq_desc *desc =3D irq_to_desc(virq);
>
> =A0 =A0 =A0 =A0desc->status &=3D ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
> =A0 =A0 =A0 =A0desc->status |=3D flow_type & IRQ_TYPE_SENSE_MASK;
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>



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

^ permalink raw reply

* Re: [PATCH 1/6] powerpc: Make NR_IRQS a CONFIG option
From: Grant Likely @ 2009-10-14 18:59 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <a6fc612b826ff12628e62601203d565df00c6436.1255499081.git.michael@ellerman.id.au>

On Tue, Oct 13, 2009 at 11:44 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> The irq_desc array consumes quite a lot of space, and for systems
> that don't need or can't have 512 irqs it's just wasted space.
>
> The first 16 are reserved for ISA, so the minimum of 32 is really
> 16 - and no one has asked for more than 512 so leave that as the
> maximum.

Does it really make sense to have this as a user twiddlable value?
Especially when many users just don't have the background to know what
an appropriate value is here and will get it wrong?  I believe your
sparse IRQ patch has a bigger impact anyway on systems where memory is
tight.

g.

>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
> =A0arch/powerpc/Kconfig =A0 =A0 =A0 =A0 =A0 | =A0 10 ++++++++++
> =A0arch/powerpc/include/asm/irq.h | =A0 =A04 ++--
> =A02 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 10a0a54..2230e75 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -56,6 +56,16 @@ config IRQ_PER_CPU
> =A0 =A0 =A0 =A0bool
> =A0 =A0 =A0 =A0default y
>
> +config NR_IRQS
> + =A0 =A0 =A0 int "Number of virtual interrupt numbers"
> + =A0 =A0 =A0 range 32 512
> + =A0 =A0 =A0 default "512"
> + =A0 =A0 =A0 help
> + =A0 =A0 =A0 =A0 This defines the number of virtual interrupt numbers th=
e kernel
> + =A0 =A0 =A0 =A0 can manage. Virtual interrupt numbers are what you see =
in
> + =A0 =A0 =A0 =A0 /proc/interrupts. If you configure your system to have =
too few,
> + =A0 =A0 =A0 =A0 drivers will fail to load or worse - handle with care.
> +
> =A0config STACKTRACE_SUPPORT
> =A0 =A0 =A0 =A0bool
> =A0 =A0 =A0 =A0default y
> diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/ir=
q.h
> index bbcd1aa..b83fcc8 100644
> --- a/arch/powerpc/include/asm/irq.h
> +++ b/arch/powerpc/include/asm/irq.h
> @@ -34,8 +34,8 @@ extern atomic_t ppc_n_lost_interrupts;
> =A0*/
> =A0#define NO_IRQ_IGNORE =A0 =A0 =A0 =A0 =A0((unsigned int)-1)
>
> -/* Total number of virq in the platform (make it a CONFIG_* option ? */
> -#define NR_IRQS =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0512
> +/* Total number of virq in the platform */
> +#define NR_IRQS =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0CONFIG_NR_IRQS
>
> =A0/* Number of irqs reserved for the legacy controller */
> =A0#define NUM_ISA_INTERRUPTS =A0 =A0 16
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>



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

^ permalink raw reply

* Re: [PATCH 0/8] Fix 8xx MMU/TLB.
From: Joakim Tjernlund @ 2009-10-14 18:46 UTC (permalink / raw)
  To: Scott Wood; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <20091014172351.GE21215@loki.buserror.net>

Scott Wood <scottwood@freescale.com> wrote on 14/10/2009 19:23:51:
>
> On Sun, Oct 11, 2009 at 06:35:04PM +0200, Joakim Tjernlund wrote:
> > This is the latest batch of mu 8xx MMU/TLB rework.
> > I think this is complete now and will relax with
> > other work the next few days. I hope I can get some
> > testing from Scott and Rex during this time.
>
> I applied this stack plus "Remove DIRTY pte handling in DTLB Error" (fixing
> up conflicts again, as well as the noted build errors), and got this:

Sorry about the build problems, will fixup.

Don't know what is causing the error though, works just fine on 2.4 :(

Assuming you fixup this error:
 arch/powerpc/kernel/head_8xx.S:577: undefined reference to `DARfix'
with a "b DARFix" I can only guess and I don't have a good guess even :(

You could back out
8xx: start using dcbX instructions in various copy routines
to see if it is the dcbX insn that is causing the error.


>
> INIT: version 2.85 booting
> Mounting /proc and /sys
> Starting the hotplug events dispatcher udevd
> udevd[177]: add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/60-pcmcia.rules:4
> udevd[177]: add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/60-pcmcia.rules:10
> udevd[177]: add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/60-pcmcia.rules:14
> Synthesizing initial hotplug events
> /etc/rc.d/init.d/udev: line 41:   187 Segmentation fault      udevsettle --timeout=300

This looks like the first error?

> Setting the hostname to 8xx
> Running depmod
> WARNING: Couldn't open directory /lib/modules/2.6.31-08384-g2cb4b47-dirty: No
> such file or directory
> FATAL: Could not open /lib/modules/2.6.31-08384-g2cb4b47-dirty/
> modules.dep.tempfor writing: No such file or directory
> Mounting filesystems
> BUG: soft lockup - CPU#0 stuck for 61s! [cat:265]

Perhaps it is looping on the same TLB Error, caused by dcbX insn?

> NIP: c000f160 LR: c000f160 CTR: 00000007
> REGS: c3919c70 TRAP: 0901   Not tainted  (2.6.31-08384-g2cb4b47-dirty)
> MSR: 00009032 <EE,ME,IR,DR>  CR: 88008424  XER: 00000000
> TASK = c3944bd0[265] 'cat' THREAD: c3918000
> GPR00: c000f160 c3919d20 c3944bd0 00000000 100180fc 00000000 00000000 00000001
> GPR08: c393e700 00000000 03ca9d21 00000001 48000428
> NIP [c000f160] do_page_fault+0x188/0x49c
> LR [c000f160] do_page_fault+0x188/0x49c
> Call Trace:
> [c3919d20] [c000f160] do_page_fault+0x188/0x49c (unreliable)
> [c3919dd0] [c000e3f0] handle_page_fault+0xc/0x80
> [c3919e90] [c008910c] seq_read+0x2a4/0x558
> [c3919ee0] [c00ab7c0] proc_reg_read+0x4c/0x70
> [c3919ef0] [c006f47c] vfs_read+0xb4/0x158
> [c3919f10] [c006f78c] sys_read+0x4c/0x90
> [c3919f40] [c000dfc0] ret_from_syscall+0x0/0x38
> Instruction dump:
> 2f990000 419e01f0 801f0014 700a0002 418201f8 7c1900d0 541e0ffe 7fe4fb78
> 7f85e378 7fc6f378 7f63db78 4804c31d <70690003> 7c601b78 40820230 70690004
>
> -Scott
>
>

^ permalink raw reply

* Re: [PATCH 6/6] powerpc: Enable sparse irq_descs on powerpc
From: Grant Likely @ 2009-10-14 18:44 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <91cec5c64da4ca31a025fc7c45d9f1b93c8b98da.1255499081.git.michael@ellerman.id.au>

On Tue, Oct 13, 2009 at 11:45 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Defining CONFIG_SPARSE_IRQ enables generic code that gets rid of the
> static irq_desc array, and replaces it with an array of pointers to
> irq_descs.
>
> It also allows node local allocation of irq_descs, however we
> currently don't have the information available to do that, so we just
> allocate them on all on node 0.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Why not make sparse IRQs manditory for all platforms?  Is there a
performance concern with doing so?  From a maintenance perspective,
I'd rather see IRQ descs manged in one way only to keep the code
simple.

Cheers,
g.

> ---
> =A0arch/powerpc/Kconfig =A0 =A0 =A0 =A0 =A0 =A0| =A0 13 ++++++++++++
> =A0arch/powerpc/include/asm/irq.h =A0| =A0 =A03 ++
> =A0arch/powerpc/kernel/irq.c =A0 =A0 =A0 | =A0 40 +++++++++++++++++++++++=
+++++++++------
> =A0arch/powerpc/kernel/ppc_ksyms.c | =A0 =A01 -
> =A0arch/powerpc/kernel/setup_64.c =A0| =A0 =A05 ----
> =A05 files changed, 49 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 2230e75..825d889 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -388,6 +388,19 @@ config IRQ_ALL_CPUS
> =A0 =A0 =A0 =A0 =A0CPU. =A0Generally saying Y is safe, although some prob=
lems have been
> =A0 =A0 =A0 =A0 =A0reported with SMP Power Macintoshes with this option e=
nabled.
>
> +config SPARSE_IRQ
> + =A0 =A0 =A0 bool "Support sparse irq numbering"
> + =A0 =A0 =A0 default y
> + =A0 =A0 =A0 help
> + =A0 =A0 =A0 =A0 This enables support for sparse irqs. This is useful fo=
r distro
> + =A0 =A0 =A0 =A0 kernels that want to define a high CONFIG_NR_CPUS value=
 but still
> + =A0 =A0 =A0 =A0 want to have low kernel memory footprint on smaller mac=
hines.
> +
> + =A0 =A0 =A0 =A0 ( Sparse IRQs can also be beneficial on NUMA boxes, as =
they spread
> + =A0 =A0 =A0 =A0 =A0 out the irq_desc[] array in a more NUMA-friendly wa=
y. )
> +
> + =A0 =A0 =A0 =A0 If you don't know what to do here, say Y.
> +
> =A0config NUMA
> =A0 =A0 =A0 =A0bool "NUMA support"
> =A0 =A0 =A0 =A0depends on PPC64
> diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/ir=
q.h
> index 03dc28c..c85a32f 100644
> --- a/arch/powerpc/include/asm/irq.h
> +++ b/arch/powerpc/include/asm/irq.h
> @@ -38,6 +38,9 @@ extern atomic_t ppc_n_lost_interrupts;
> =A0/* Number of irqs reserved for the legacy controller */
> =A0#define NUM_ISA_INTERRUPTS =A0 =A0 16
>
> +/* Same thing, used by the generic IRQ code */
> +#define NR_IRQS_LEGACY =A0 =A0 =A0 =A0 NUM_ISA_INTERRUPTS
> +
> =A0/* This type is the placeholder for a hardware interrupt number. It ha=
s to
> =A0* be big enough to enclose whatever representation is used by a given
> =A0* platform.
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 63e27d5..eba5392 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -85,7 +85,10 @@ extern int tau_interrupts(int);
> =A0#endif /* CONFIG_PPC32 */
>
> =A0#ifdef CONFIG_PPC64
> +
> +#ifndef CONFIG_SPARSE_IRQ
> =A0EXPORT_SYMBOL(irq_desc);
> +#endif
>
> =A0int distribute_irqs =3D 1;
>
> @@ -613,8 +616,16 @@ void irq_set_virq_count(unsigned int count)
> =A0static int irq_setup_virq(struct irq_host *host, unsigned int virq,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_hw_number_t hw=
irq)
> =A0{
> + =A0 =A0 =A0 struct irq_desc *desc;
> +
> + =A0 =A0 =A0 desc =3D irq_to_desc_alloc_node(virq, 0);
> + =A0 =A0 =A0 if (!desc) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_debug("irq: -> allocating desc failed\n"=
);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto error;
> + =A0 =A0 =A0 }
> +
> =A0 =A0 =A0 =A0/* Clear IRQ_NOREQUEST flag */
> - =A0 =A0 =A0 irq_to_desc(virq)->status &=3D ~IRQ_NOREQUEST;
> + =A0 =A0 =A0 desc->status &=3D ~IRQ_NOREQUEST;
>
> =A0 =A0 =A0 =A0/* map it */
> =A0 =A0 =A0 =A0smp_wmb();
> @@ -623,11 +634,14 @@ static int irq_setup_virq(struct irq_host *host, un=
signed int virq,
>
> =A0 =A0 =A0 =A0if (host->ops->map(host, virq, hwirq)) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pr_debug("irq: -> mapping failed, freeing\=
n");
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_free_virt(virq, 1);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -1;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto error;
> =A0 =A0 =A0 =A0}
>
> =A0 =A0 =A0 =A0return 0;
> +
> +error:
> + =A0 =A0 =A0 irq_free_virt(virq, 1);
> + =A0 =A0 =A0 return -1;
> =A0}
>
> =A0unsigned int irq_create_direct_mapping(struct irq_host *host)
> @@ -1008,12 +1022,24 @@ void irq_free_virt(unsigned int virq, unsigned in=
t count)
> =A0 =A0 =A0 =A0spin_unlock_irqrestore(&irq_big_lock, flags);
> =A0}
>
> -void irq_early_init(void)
> +int arch_early_irq_init(void)
> =A0{
> - =A0 =A0 =A0 unsigned int i;
> + =A0 =A0 =A0 struct irq_desc *desc;
> + =A0 =A0 =A0 int i;
>
> - =A0 =A0 =A0 for (i =3D 0; i < NR_IRQS; i++)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 irq_to_desc(i)->status |=3D IRQ_NOREQUEST;
> + =A0 =A0 =A0 for (i =3D 0; i < NR_IRQS; i++) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D irq_to_desc(i);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (desc)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc->status |=3D IRQ_NOREQ=
UEST;
> + =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 return 0;
> +}
> +
> +int arch_init_chip_data(struct irq_desc *desc, int node)
> +{
> + =A0 =A0 =A0 desc->status |=3D IRQ_NOREQUEST;
> + =A0 =A0 =A0 return 0;
> =A0}
>
> =A0/* We need to create the radix trees late */
> diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ks=
yms.c
> index c8b27bb..07115d6 100644
> --- a/arch/powerpc/kernel/ppc_ksyms.c
> +++ b/arch/powerpc/kernel/ppc_ksyms.c
> @@ -162,7 +162,6 @@ EXPORT_SYMBOL(screen_info);
>
> =A0#ifdef CONFIG_PPC32
> =A0EXPORT_SYMBOL(timer_interrupt);
> -EXPORT_SYMBOL(irq_desc);
> =A0EXPORT_SYMBOL(tb_ticks_per_jiffy);
> =A0EXPORT_SYMBOL(cacheable_memcpy);
> =A0EXPORT_SYMBOL(cacheable_memzero);
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_6=
4.c
> index 797ea95..8e5ec92 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -357,11 +357,6 @@ void __init setup_system(void)
> =A0 =A0 =A0 =A0 */
> =A0 =A0 =A0 =A0initialize_cache_info();
>
> - =A0 =A0 =A0 /*
> - =A0 =A0 =A0 =A0* Initialize irq remapping subsystem
> - =A0 =A0 =A0 =A0*/
> - =A0 =A0 =A0 irq_early_init();
> -
> =A0#ifdef CONFIG_PPC_RTAS
> =A0 =A0 =A0 =A0/*
> =A0 =A0 =A0 =A0 * Initialize RTAS if available
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>



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

^ permalink raw reply

* Re: [PATCH 5/6] powerpc: Rearrange and fix show_interrupts() for sparse irq_descs
From: Grant Likely @ 2009-10-14 18:37 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <1dec053fee540bd474f88d4850d4ab213ea7215d.1255499081.git.michael@ellerman.id.au>

On Tue, Oct 13, 2009 at 11:45 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Move the default case out of the if, ie. when we're just displaying
> an irq. And consolidate all the odd cases at the top, ie. printing
> the header and footer.
>
> And in the process cope with sparse irq_descs.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Looks reasonable to me
Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> =A0arch/powerpc/kernel/irq.c | =A0 64 ++++++++++++++++++++++++++---------=
----------
> =A01 files changed, 37 insertions(+), 27 deletions(-)
>
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index baa49eb..63e27d5 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -187,33 +187,7 @@ int show_interrupts(struct seq_file *p, void *v)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0for_each_online_cpu(j)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0seq_printf(p, "CPU%d =A0 =
=A0 =A0 ", j);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0seq_putc(p, '\n');
> - =A0 =A0 =A0 }
> -
> - =A0 =A0 =A0 if (i < NR_IRQS) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D irq_to_desc(i);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 spin_lock_irqsave(&desc->lock, flags);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 action =3D desc->action;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!action || !action->handler)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto skip;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, "%3d: ", i);
> -#ifdef CONFIG_SMP
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 for_each_online_cpu(j)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, "%10u ", ksta=
t_irqs_cpu(i, j));
> -#else
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, "%10u ", kstat_irqs(i));
> -#endif /* CONFIG_SMP */
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (desc->chip)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, " %s ", desc-=
>chip->typename);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 else
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_puts(p, " =A0None =A0 =
=A0 =A0");
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, "%s", (desc->status & IRQ_LEV=
EL) ? "Level " : "Edge =A0");
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, " =A0 =A0%s", action->name);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (action =3D action->next; action; actio=
n =3D action->next)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, ", %s", actio=
n->name);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_putc(p, '\n');
> -skip:
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 spin_unlock_irqrestore(&desc->lock, flags);
> - =A0 =A0 =A0 } else if (i =3D=3D NR_IRQS) {
> + =A0 =A0 =A0 } else if (i =3D=3D nr_irqs) {
> =A0#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (tau_initialized){
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0seq_puts(p, "TAU: ");
> @@ -223,7 +197,43 @@ skip:
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> =A0#endif /* CONFIG_PPC32 && CONFIG_TAU_INT*/
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0seq_printf(p, "BAD: %10u\n", ppc_spurious_=
interrupts);
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0;
> =A0 =A0 =A0 =A0}
> +
> + =A0 =A0 =A0 desc =3D irq_to_desc(i);
> + =A0 =A0 =A0 if (!desc)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0;
> +
> + =A0 =A0 =A0 spin_lock_irqsave(&desc->lock, flags);
> +
> + =A0 =A0 =A0 action =3D desc->action;
> + =A0 =A0 =A0 if (!action || !action->handler)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto skip;
> +
> + =A0 =A0 =A0 seq_printf(p, "%3d: ", i);
> +#ifdef CONFIG_SMP
> + =A0 =A0 =A0 for_each_online_cpu(j)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)=
);
> +#else
> + =A0 =A0 =A0 seq_printf(p, "%10u ", kstat_irqs(i));
> +#endif /* CONFIG_SMP */
> +
> + =A0 =A0 =A0 if (desc->chip)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, " %s ", desc->chip->typename)=
;
> + =A0 =A0 =A0 else
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_puts(p, " =A0None =A0 =A0 =A0");
> +
> + =A0 =A0 =A0 seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " :=
 "Edge =A0");
> + =A0 =A0 =A0 seq_printf(p, " =A0 =A0%s", action->name);
> +
> + =A0 =A0 =A0 for (action =3D action->next; action; action =3D action->ne=
xt)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 seq_printf(p, ", %s", action->name);
> + =A0 =A0 =A0 seq_putc(p, '\n');
> +
> +skip:
> + =A0 =A0 =A0 spin_unlock_irqrestore(&desc->lock, flags);
> +
> =A0 =A0 =A0 =A0return 0;
> =A0}
>
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>



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

^ permalink raw reply

* Re: [PATCH 4/6] powerpc: Make virq_debug_show() cope with sparse irq_descs
From: Grant Likely @ 2009-10-14 18:34 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <a9e38f55dcc6487125ca1ab1f455b58d565fd397.1255499081.git.michael@ellerman.id.au>

On Tue, Oct 13, 2009 at 11:44 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

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

> ---
> =A0arch/powerpc/kernel/irq.c | =A0 =A05 ++++-
> =A01 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 6563221..baa49eb 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -1065,8 +1065,11 @@ static int virq_debug_show(struct seq_file *m, voi=
d *private)
> =A0 =A0 =A0 =A0seq_printf(m, "%-5s =A0%-7s =A0%-15s =A0%s\n", "virq", "hw=
irq",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"chip name", "host name");
>
> - =A0 =A0 =A0 for (i =3D 1; i < NR_IRQS; i++) {
> + =A0 =A0 =A0 for (i =3D 1; i < nr_irqs; i++) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc =3D irq_to_desc(i);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!desc)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 continue;
> +
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_lock_irqsave(&desc->lock, flags);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (desc->action && desc->action->handler)=
 {
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>



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

^ permalink raw reply

* Re: [PATCH 2/6] powerpc/pseries: Use irq_has_action() in eeh_disable_irq()
From: Grant Likely @ 2009-10-14 18:33 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <1dc0d81f3202c61cbd1bb1508cb3a2ed04dc036a.1255499081.git.michael@ellerman.id.au>

On Tue, Oct 13, 2009 at 11:44 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Rather than open-coding our own check, use irq_has_action()
> to check if an irq has an action - ie. is "in use".
>
> irq_has_action() doesn't take the descriptor lock, but it
> shouldn't matter - we're just using it as an indicator
> that the irq is in use. disable_irq_nosync() will take
> the descriptor lock before doing anything also.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Looks good to me
Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> =A0arch/powerpc/platforms/pseries/eeh_driver.c | =A0 18 +----------------=
-
> =A01 files changed, 1 insertions(+), 17 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/p=
latforms/pseries/eeh_driver.c
> index 0e8db67..ef8e454 100644
> --- a/arch/powerpc/platforms/pseries/eeh_driver.c
> +++ b/arch/powerpc/platforms/pseries/eeh_driver.c
> @@ -63,22 +63,6 @@ static void print_device_node_tree(struct pci_dn *pdn,=
 int dent)
> =A0}
> =A0#endif
>
> -/**
> - * irq_in_use - return true if this irq is being used
> - */
> -static int irq_in_use(unsigned int irq)
> -{
> - =A0 =A0 =A0 int rc =3D 0;
> - =A0 =A0 =A0 unsigned long flags;
> - =A0 struct irq_desc *desc =3D irq_desc + irq;
> -
> - =A0 =A0 =A0 spin_lock_irqsave(&desc->lock, flags);
> - =A0 =A0 =A0 if (desc->action)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 rc =3D 1;
> - =A0 =A0 =A0 spin_unlock_irqrestore(&desc->lock, flags);
> - =A0 =A0 =A0 return rc;
> -}
> -
> =A0/**
> =A0* eeh_disable_irq - disable interrupt for the recovering device
> =A0*/
> @@ -93,7 +77,7 @@ static void eeh_disable_irq(struct pci_dev *dev)
> =A0 =A0 =A0 =A0if (dev->msi_enabled || dev->msix_enabled)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return;
>
> - =A0 =A0 =A0 if (!irq_in_use(dev->irq))
> + =A0 =A0 =A0 if (!irq_has_action(dev->irq))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return;
>
> =A0 =A0 =A0 =A0PCI_DN(dn)->eeh_mode |=3D EEH_MODE_IRQ_DISABLED;
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>



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

^ permalink raw reply

* Re: MPC5200B and USB
From: Grant Likely @ 2009-10-14 18:21 UTC (permalink / raw)
  To: FIXED-TERM Seeh Thomas (BEG/EMS1); +Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <6E9D235B18CE694399D781F05D9C42E7A035ADDD@SI-MBX11.de.bosch.com>

On Wed, Oct 14, 2009 at 6:57 AM, FIXED-TERM Seeh Thomas (BEG/EMS1)
<fixed-term.Thomas.Seeh@de.bosch.com> wrote:
> Hello everyone,
>
> I'm working on a project to get USB ready on a MPC5200B based board.
> On this board I'm not using Linux (but MQX), but my question is not related
> to Linux.
> It's more specific to USB and OHCI.
> I will communicate with a Mass Storage Device and therefor the control
> transfer works fine.
> The Mass Storage Device has two endpoints for bulk transfer, one IN (from
> device to host) and
> one OUT (from host to device).
>
> If I want to communicate with the device should I have two endpoints on the
> host side too?

Sounds like you need to brush up on how USB works.  The host
controller can talk to any endpoint on any device, and it schedules
the transfers for them.  There are no host-side endpoints like there
are on the device.

This question is very off-topic for this list.  You should refer to
the USB standards documentation or look for a USB specific mailing
list.  Please don't ask non-Linux questions on a Linux mailing list.

g.

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

^ permalink raw reply

* Re: UBIFS problem on MPC8536DS
From: Scott Wood @ 2009-10-14 18:13 UTC (permalink / raw)
  To: Felix Radensky
  Cc: linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org,
	Adrian Hunter
In-Reply-To: <4AD60EF4.4080306@embedded-sol.com>

Felix Radensky wrote:
> Yes, NAND and NOR are on the same local bus controller.
> 
> Maybe powerpc folks can provide some insight here.
> Is it possible that simultaneous access to NOR and NAND
> on MPC8536 can result in NAND timeouts ?

I've heard other reports of such problems with eLBC, but was unable to 
reproduce it myself last time I tried.  Could you reduce this down to a 
minimal set of specific reproduction instructions (e.g. eliminate UBI if 
possible, or else explain how to set up UBI)?

-Scott

^ permalink raw reply

* Re: UBIFS problem on MPC8536DS
From: Felix Radensky @ 2009-10-14 17:48 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org
In-Reply-To: <4AD5FFE7.7080703@nokia.com>



Adrian Hunter wrote:
> Felix Radensky wrote:
>> Adrian Hunter wrote:
>>> Felix Radensky wrote:
>>>> Hi,
>>>>
>>>> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
>>>> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
>>>> on NAND flash, and starting erase of NOR flash partition right after 
>>>> that.
>>>>
>>>> If I don't start  NOR erase, everything works fine. Also, If I run 
>>>> sync after
>>>> tar, no problem occurs.  The NOR flash is 32MB  Spansion, NAND is
>>>> 4GB Samsung.
>>>>
>>>> The error messages are as follows:
>>>>
>>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB 
>>>> 5812:12288, written 0 bytes
>>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
>>>> UBI: recover PEB 5812, move data to PEB 19400
>>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 
>>>> 5812:512, read 512 bytes
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
>>>> 19400:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19400
>>>> UBI: try again
>>>> UBI: recover PEB 5812, move data to PEB 19401
>>>> UBI: run torture test for PEB 19400
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
>>>> 19401:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19401
>>>> UBI: try again
>>>> UBI: recover PEB 5812, move data to PEB 19402
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
>>>> 19402:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19402
>>>> UBI: try again
>>>> UBI: recover PEB 5812, move data to PEB 19403
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 
>>>> 19403:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19403
>>>> UBI warning: ubi_ro_mode: switch to read-only mode
>>>> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522 
>>>> bytes to LEB 389:10240, error -5
>>>> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode, 
>>>> error -5
>>>> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode 
>>>> 30708, error -5
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes 
>>>> in jhead 2, error -30
>>>> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode 
>>>> 29486, error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes 
>>>> in jhead 2, error -30
>>>> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode 
>>>> 30070, error -30
>>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB 
>>>> 5022:88064, written 0 bytes
>>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
>>>> UBI: recover PEB 5022, move data to PEB 19404
>>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 
>>>> 5022:512, read 512 bytes
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19404
>>>> UBI: try again
>>>> UBI: recover PEB 5022, move data to PEB 19405
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19405
>>>> UBI: try again
>>>> UBI: recover PEB 5022, move data to PEB 19406
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19406
>>>> UBI: try again
>>>> UBI: recover PEB 5022, move data to PEB 19407
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19407
>>>> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048 
>>>> bytes to LEB 788:86016
>>>> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync 
>>>> write-buffer, error -30
>>>> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode, 
>>>> error -30
>>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB 
>>>> 5817:26624, written 0 bytes
>>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
>>>> UBI: recover PEB 5817, move data to PEB 19408
>>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 
>>>> 5817:512, read 512 bytes
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19408
>>>> UBI: try again
>>>> UBI: recover PEB 5817, move data to PEB 19409
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19409
>>>> UBI: try again
>>>> UBI: recover PEB 5817, move data to PEB 19410
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19410
>>>> UBI: try again
>>>> UBI: recover PEB 5817, move data to PEB 19411
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19411
>>>> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048 
>>>> bytes to LEB 385:24576
>>>> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync 
>>>> write-buffer, error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes 
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709, 
>>>> error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes 
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710, 
>>>> error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes 
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698, 
>>>> error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes 
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711, 
>>>> error -30
>>>>
>>>> I'd appreciate any hints on what can cause this. Is it a hardware 
>>>> problem, mtd layer problem
>>>> or UBI problem ?
>>> It sounds like you are saying one MTD partition somehow affects another.
>>> You should check the MTD partitions are set up correctly.  Are you using
>>> tools that make assumptions about which mtd partition is which?
>>>
>>> How do you erase the NOR flash?  Is the device node (/dev/mtd...) 
>>> correct?
>> I can also reproduce the problem by reading from NOR, i.e.
>>
>> dd if=/dev/mtd4 of=/dev/null
> 
> I doubt the problem is in UBI or UBIFS, and plenty of people use multiple
> MTD partitions with no problem.
> 
> Do the NAND and NOR use the same memory controller?
> 
> I don't think I can be much help I'm afraid.
> 

Yes, NAND and NOR are on the same local bus controller.

Maybe powerpc folks can provide some insight here.
Is it possible that simultaneous access to NOR and NAND
on MPC8536 can result in NAND timeouts ?

Felix.

^ permalink raw reply

* [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
From: Grant Likely @ 2009-10-14 17:43 UTC (permalink / raw)
  To: linuxppc-dev, netdev, davem; +Cc: John Bonesio

From: John Bonesio <bones@secretlab.ca>

The MDIO bus cannot be accessed at interrupt context, but on an FEC
error, the fec_mpc52xx driver reset function also tries to reset the
PHY.  Since the error is detected at IRQ context, and the PHY functions
try to sleep, the kernel ends up panicking.

Resetting the PHY on an FEC error isn't even necessary.  This patch
solves the problem by removing the PHY reset entirely.

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

v2: fixed stupid misspelling of John's email address.  No changes to content.

 drivers/net/fec_mpc52xx.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index c40113f..66dace6 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -759,12 +759,6 @@ static void mpc52xx_fec_reset(struct net_device *dev)
 
 	mpc52xx_fec_hw_init(dev);
 
-	if (priv->phydev) {
-		phy_stop(priv->phydev);
-		phy_write(priv->phydev, MII_BMCR, BMCR_RESET);
-		phy_start(priv->phydev);
-	}
-
 	bcom_fec_rx_reset(priv->rx_dmatsk);
 	bcom_fec_tx_reset(priv->tx_dmatsk);
 

^ permalink raw reply related

* [PATCH] net/fec_mpc52xx: Fix kernel panic on FEC error
From: Grant Likely @ 2009-10-14 17:40 UTC (permalink / raw)
  To: linuxppc-dev, netdev, davem; +Cc: John Bonesio

From: John Bonesio <bonesio@secretlab.ca>

The MDIO bus cannot be accessed at interrupt context, but on an FEC
error, the fec_mpc52xx driver reset function also tries to reset the
PHY.  Since the error is detected at IRQ context, and the PHY functions
try to sleep, the kernel ends up panicking.

Resetting the PHY on an FEC error isn't even necessary.  This patch
solves the problem by removing the PHY reset entirely.

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

Hi David,

This patch is a bug fix that definitely needs to go in for 2.6.32.
I'll also be asking Greg to pick it up for the stable tree once it
is in mainline.

Thanks,
g.

 drivers/net/fec_mpc52xx.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index c40113f..66dace6 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -759,12 +759,6 @@ static void mpc52xx_fec_reset(struct net_device *dev)
 
 	mpc52xx_fec_hw_init(dev);
 
-	if (priv->phydev) {
-		phy_stop(priv->phydev);
-		phy_write(priv->phydev, MII_BMCR, BMCR_RESET);
-		phy_start(priv->phydev);
-	}
-
 	bcom_fec_rx_reset(priv->rx_dmatsk);
 	bcom_fec_tx_reset(priv->tx_dmatsk);
 

^ permalink raw reply related

* Re: [PATCH 0/8] Fix 8xx MMU/TLB.
From: Scott Wood @ 2009-10-14 17:23 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <1255278912-8042-1-git-send-email-Joakim.Tjernlund@transmode.se>

On Sun, Oct 11, 2009 at 06:35:04PM +0200, Joakim Tjernlund wrote:
> This is the latest batch of mu 8xx MMU/TLB rework.
> I think this is complete now and will relax with
> other work the next few days. I hope I can get some
> testing from Scott and Rex during this time.

I applied this stack plus "Remove DIRTY pte handling in DTLB Error" (fixing
up conflicts again, as well as the noted build errors), and got this:

INIT: version 2.85 booting
Mounting /proc and /sys
Starting the hotplug events dispatcher udevd
udevd[177]: add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/60-pcmcia.rules:4
udevd[177]: add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/60-pcmcia.rules:10
udevd[177]: add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/60-pcmcia.rules:14
Synthesizing initial hotplug events
/etc/rc.d/init.d/udev: line 41:   187 Segmentation fault      udevsettle --timeout=300
Setting the hostname to 8xx
Running depmod
WARNING: Couldn't open directory /lib/modules/2.6.31-08384-g2cb4b47-dirty: No such file or directory
FATAL: Could not open /lib/modules/2.6.31-08384-g2cb4b47-dirty/modules.dep.tempfor writing: No such file or directory
Mounting filesystems
BUG: soft lockup - CPU#0 stuck for 61s! [cat:265]
NIP: c000f160 LR: c000f160 CTR: 00000007
REGS: c3919c70 TRAP: 0901   Not tainted  (2.6.31-08384-g2cb4b47-dirty)
MSR: 00009032 <EE,ME,IR,DR>  CR: 88008424  XER: 00000000
TASK = c3944bd0[265] 'cat' THREAD: c3918000
GPR00: c000f160 c3919d20 c3944bd0 00000000 100180fc 00000000 00000000 00000001
GPR08: c393e700 00000000 03ca9d21 00000001 48000428
NIP [c000f160] do_page_fault+0x188/0x49c
LR [c000f160] do_page_fault+0x188/0x49c
Call Trace:
[c3919d20] [c000f160] do_page_fault+0x188/0x49c (unreliable)
[c3919dd0] [c000e3f0] handle_page_fault+0xc/0x80
[c3919e90] [c008910c] seq_read+0x2a4/0x558
[c3919ee0] [c00ab7c0] proc_reg_read+0x4c/0x70
[c3919ef0] [c006f47c] vfs_read+0xb4/0x158
[c3919f10] [c006f78c] sys_read+0x4c/0x90
[c3919f40] [c000dfc0] ret_from_syscall+0x0/0x38
Instruction dump:
2f990000 419e01f0 801f0014 700a0002 418201f8 7c1900d0 541e0ffe 7fe4fb78
7f85e378 7fc6f378 7f63db78 4804c31d <70690003> 7c601b78 40820230 70690004

-Scott

^ permalink raw reply

* Re: [PATCH 4/8] 8xx: Fixup DAR from buggy dcbX instructions.
From: Scott Wood @ 2009-10-14 17:20 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: Rex Feany, linuxppc-dev@ozlabs.org
In-Reply-To: <1255278912-8042-5-git-send-email-Joakim.Tjernlund@transmode.se>

On Sun, Oct 11, 2009 at 06:35:08PM +0200, Joakim Tjernlund wrote:
> This is an assembler version to fixup DAR not being set
> by dcbX, icbi instructions. There are two versions, one
> uses selfmodifing code, the other uses a
> jump table but is much bigger(default).
> ---
>  arch/powerpc/kernel/head_8xx.S |  146 +++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 145 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
> index 093176c..9839e79 100644
> --- a/arch/powerpc/kernel/head_8xx.S
> +++ b/arch/powerpc/kernel/head_8xx.S
> @@ -494,7 +494,8 @@ DataTLBError:
>  
>  	mfspr	r10, SPRN_DAR
>  	cmpwi	cr0, r10, 0x00f0
> -	beq-	2f	/* must be a buggy dcbX, icbi insn. */
> +	beq-	FixDAR	/* must be a buggy dcbX, icbi insn. */
> +DARFix:	/* Return from dcbx instruction bug workaround, r10 holds value of DAR */

Both FixDAR and DARFix?  Could we make the labels a little clearer?

> +/* This is the procedure to calculate the data EA for buggy dcbx,dcbi instructions
> + * by decoding the registers used by the dcbx instruction and adding them.
> + * DAR is set to the calculated address and r10 also holds the EA on exit.
> + */

How often does this happen?  Could we just do it in C code after saving all
the registers, and avoid the self modifying stuff (or the big switch
statement equivalent)?

-Scott

^ permalink raw reply

* Re: MPC5200B panics with high ethernet rx traffic
From: Grant Likely @ 2009-10-14 17:07 UTC (permalink / raw)
  To: Asier Llano Palacios; +Cc: linuxppc-dev
In-Reply-To: <1255538154.26753.13.camel@allano>

On Wed, Oct 14, 2009 at 10:35 AM, Asier Llano Palacios <a.llano@ziv.es> wrote:
> Hi,
>
> I've found a very simple way to create a kernel panic, that's happening
> to our MPC5200B based boards. The issue was that when our boards
> received a burst of ethernet packets had a kernel panic.

This looks familiar.  Look in drivers/net/fec_mpc52xx.c and find the
function mpc52xx_fec_reset().  Remove the calls to phy_stop(),
phy_write() and phy_start().  See if that helps.

g.

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

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox