* Re: [PATCH 22/27] drivers/i2c/of: don't use deprecated field in of_platform_driver
From: Sean MacLennan @ 2010-03-12 17:31 UTC (permalink / raw)
To: Grant Likely
Cc: alsa-devel, gregkh, linux-ide, James.Bottomley, linux-i2c,
sparclinux, jeremy.kerr, sfr, linux-scsi, jgarzik,
microblaze-uclinux, devicetree-discuss, ben-linux, monstr,
linuxppc-dev, netdev, broonie, linux-kernel, akpm, dwmw2, davem
In-Reply-To: <20100311182349.13103.39322.stgit@angua>
On Thu, 11 Mar 2010 11:23:49 -0700
Grant Likely <grant.likely@secretlab.ca> wrote:
> .name, .match_table and .owner are duplicated in both
> of_platform_driver and device_driver, so the of_platform_driver
> copies will be removed soon.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
i2c-ibm_iic
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
^ permalink raw reply
* Re: [PATCH 12/27] drivers/mtd/of: don't use deprecated field in of_platform_driver
From: Sean MacLennan @ 2010-03-12 17:31 UTC (permalink / raw)
To: Grant Likely
Cc: alsa-devel, gregkh, linux-ide, James.Bottomley, linux-i2c,
sparclinux, jeremy.kerr, sfr, linux-scsi, jgarzik,
microblaze-uclinux, devicetree-discuss, ben-linux, monstr,
linuxppc-dev, netdev, broonie, linux-kernel, akpm, dwmw2, davem
In-Reply-To: <20100311182253.13103.92479.stgit@angua>
On Thu, 11 Mar 2010 11:22:54 -0700
Grant Likely <grant.likely@secretlab.ca> wrote:
> .name, .match_table and .owner are duplicated in both
> of_platform_driver and device_driver, so the of_platform_driver
> copies will be removed soon.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
NDFC
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
^ permalink raw reply
* Re: [PATCH v2 (resend #3)] hvc_console: Fix race between hvc_close and hvc_remove
From: Greg KH @ 2010-03-12 15:52 UTC (permalink / raw)
To: Amit Shah; +Cc: Rusty Russell, linux-kernel, linuxppc-dev, torvalds, Alan Cox
In-Reply-To: <1268374995-20722-1-git-send-email-amit.shah@redhat.com>
On Fri, Mar 12, 2010 at 11:53:15AM +0530, Amit Shah wrote:
> Alan pointed out a race in the code where hvc_remove is invoked. The
> recent virtio_console work is the first user of hvc_remove().
>
> Alan describes it thus:
>
> The hvc_console assumes that a close and remove call can't occur at the
> same time.
>
> In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
> itself....
>
> So this can happen
>
> hvc_close hvc_remove
> hung up ? - no
> lock
> tty = hp->tty
> unlock
> lock
> hp->tty = NULL
> unlock
> notify del
> kref_put the hvc struct
> close completes
> tty is destroyed
> tty_hangup dead tty
> tty->ops will be NULL
> NULL->...
>
> This patch adds some tty krefs and also converts to using tty_vhangup().
>
> Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
> CC: linuxppc-dev@ozlabs.org
> CC: Rusty Russell <rusty@rustcorp.com.au>
> ---
>
> Linus, sending to you this time as I didn't receive any response from
> Ben or Greg for the previous submissions.
It's in my "to-apply" queue. Which I was ignoring due to the -rc1
merge, and then I've been busy with -stable stuff and a conference this
week. I'll get to it soon.
thanks for your patience,
greg k-h
^ permalink raw reply
* Re: [PATCH 25/37] drivers/infiniband: use .dev.of_node instead of .node in struct of_device
From: Alexander Schmidt @ 2010-03-12 13:30 UTC (permalink / raw)
To: Roland Dreier
Cc: alsa-devel, broonie, linuxppc-dev, James.Bottomley, linux-i2c,
sparclinux, jeremy.kerr, sfr, linux-scsi, jgarzik,
microblaze-uclinux, devicetree-discuss, Christoph Raisch,
ben-linux, monstr, linux-ide, netdev, gregkh, linux-kernel, akpm,
dwmw2, davem
In-Reply-To: <adavdd2d41q.fsf@roland-alpha.cisco.com>
On Thu, 11 Mar 2010 11:57:53 -0800
Roland Dreier <rdreier@cisco.com> wrote:
> Seems fine... adding EHCA guys just to make sure.
>
> > .node is being removed
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
^ permalink raw reply
* Re: Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?)
From: Grant Likely @ 2010-03-12 12:14 UTC (permalink / raw)
To: Németh Márton; +Cc: linuxppc-dev, David Gibson
In-Reply-To: <4B99DE95.8010304@freemail.hu>
2010/3/11 N=E9meth M=E1rton <nm127@freemail.hu>:
> Hi,
>
> thank you for the comments, I reworked the Freescale MPC5554 device tree
> accordingly. I'm listening for comments on this draft.
>
> Regards,
>
> =A0 =A0 =A0 =A0M=E1rton N=E9meth
>
> ---
> From: M=E1rton N=E9meth <nm127@freemail.hu>
>
> Add device tree for Freescale MPC5554.
>
> Signed-off-by: M=E1rton N=E9meth <nm127@freemail.hu>
> ---
> diff -uprN linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts linux/arch=
/powerpc/boot/dts/mpc5554.dts
> --- linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts 1970-01-01 01:00:=
00.000000000 +0100
> +++ linux/arch/powerpc/boot/dts/mpc5554.dts =A0 =A0 2010-03-12 07:22:37.0=
00000000 +0100
> @@ -0,0 +1,189 @@
> +/*
> + * Freescale MPC5554 Device Tree Source
> + *
> + * Based on MPC5553/5554 Microcontroller Reference Manual, Rev. 4.0, 04/=
2007
> + * http://www.freescale.com/files/32bit/doc/ref_manual/MPC5553_MPC5554_R=
M.pdf
> + *
> + * Copyright 2010 M=E1rton N=E9meth
> + * M=E1rton N=E9meth <nm127@freemail.hu>
> + *
> + * This program is free software; you can redistribute =A0it and/or modi=
fy it
> + * under =A0the terms of =A0the GNU General =A0Public License as publish=
ed by the
> + * Free Software Foundation; =A0either version 2 of the =A0License, or (=
at your
> + * option) any later version.
> + */
> +
> +/dts-v1/;
> +
> +/ {
> + =A0 =A0 =A0 model =3D "MPC5554";
> + =A0 =A0 =A0 compatible =3D "fsl,MPC5554EVB"; =A0 =A0 =A0 =A0 =A0// Free=
scale MPC5554 Evaluation Board
> + =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 #size-cells =3D <1>;
also need: interrupt-parent =3D <&intc>;
I describe why later...
> +
> + =A0 =A0 =A0 cpus {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <0>;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpu@0 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 device_type =3D "cpu";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "PowerPC,555=
4";
I'd rather see the same convention used here as for all the other
compatible values in this file. ie:
compatible =3D "fsl,mpc5554-e200z6", "fsl,powerpc-e200z6";
Dave, what do you think?
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 d-cache-line-size =3D <32>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i-cache-line-size =3D <32>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 d-cache-size =3D <0x8000>; =
=A0 =A0 =A0 =A0// L1, 32KiB
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i-cache-size =3D <0x8000>; =
=A0 =A0 =A0 =A0// L1, 32KiB
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 timebase-frequency =3D <0>;=
=A0 =A0 =A0 // from bootloader
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bus-frequency =3D <0>; =A0 =
=A0 =A0 =A0 =A0 =A0// from bootloader
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 clock-frequency =3D <0>; =
=A0 =A0 =A0 =A0 =A0// from bootloader
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> + =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 memory@40000000 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 device_type =3D "memory";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x40000000 0x10000>; =A0 =A0 // 32=
KiB internal SRAM
> + =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 xbar@fff04000 { =A0 =A0 =A0 =A0 // System Bus Crossbar Swit=
ch (XBAR)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc5554-xbar";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 // The full memory range is covered by XBAR
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ranges =3D <>;
An empty ranges property looks like this:
ranges;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bridge@fff00000 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc5554=
-pbridge-b";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ranges =3D <0 0xe0000000 0x=
20000000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0xfff00000 0x4000>=
;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ecsm@fff40000 { =A0 =A0 =A0=
=A0 // Error Correction Status Module (ECSM)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =
=3D "fsl,mpc5554-ecsm";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x=
fff40000 0x4000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 edma@fff44000 { =A0 =A0 =A0=
=A0 // Enhanced DMA Controller (eDMA)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =
=3D "fsl,mpc5554-edma";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x=
fff44000 0x4000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 intc@fff48000 { =A0 =A0 =A0=
=A0 // Interrupt Controller (INTC)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =
=3D "fsl,mpc5554-intc";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x=
fff48000 0x4000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
Need a label on this node so that the rest of the tree can find it,
and it needs the interrupt-controller and #interrupt-cells properties:
intc: intc@fff48000 { // Interrupt
Controller (INTC)
compatible =3D "fsl,mpc5554-intc";
interrupt-controller;
#interrupt-cells =3D <2>;
reg =3D <0xfff48000 0x4000>;
};
I've set #interrupt-cells to 2 which is fairly typical on fsl parts,
but that may or may not make sense. You need to decide how each
device is going to specify it's interrupt line. Often the first cell
is the hardware interrupt number, and the second cell encodes the
sense (high, low, edge). Conversely, PCI interrupts only use
#interrupt-cells =3D <1> because all PCI irqs use the active low sense.
Then, each device in the tree should have an 'interrupts =3D < [hwirq#]
[sense]>;' property.
Otherwise, starting to look pretty good.
g.
^ permalink raw reply
* [PATCH] irq: move some interrupt arch_* functions into struct irq_chip.
From: Ian Campbell @ 2010-03-12 9:45 UTC (permalink / raw)
To: linux-kernel
Cc: Jeremy Fitzhardinge, Ian Campbell, x86, linuxppc-dev, Ingo Molnar,
Paul Mackerras, Eric W. Biederman, H. Peter Anvin,
Thomas Gleixner, Yinghai Lu
In-Reply-To: <1268387091.10129.5973.camel@zakaz.uk.xensource.com>
Move arch_init_copy_chip_data and arch_free_chip_data into function
pointers in struct irq_chip since they operate on irq_desc->chip_data.
arch_init_chip_data cannot be moved into struct irq_chip at this time
because irq_desc->chip is not known at the time the irq_desc is
setup. For now rename arch_init_chip_data to arch_init_irq_desc (for
PowerPC, the only other user, whose usage better matches the new name)
and on x86 convert arch_init_chip_data to x86_init_chip_data and
call this whenever a new struct irq_desc is allocated.
I've retained the chip_data behaviour for uv_irq although it isn't
clear to me if these interrupt types support migration or how closely
related to the APIC modes they really are. If it weren't for this the
x86_{init,copy,free}_chip_data functions could be static to
io_apic.c.
I've tested by booting on a 64 bit system, but it's not clear to me
what actions I need to take to actually exercise some of these code
paths.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Michael Ellerman <michael@ellerman.id.au> [PowerPC rename portion]
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: x86@kernel.org
Cc: linuxppc-dev@ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/kernel/irq.c | 2 +-
arch/x86/include/asm/hw_irq.h | 11 +++++++-
arch/x86/kernel/apic/io_apic.c | 58 +++++++++++++++++++++++++++++++++++++---
arch/x86/kernel/uv_irq.c | 5 +++
include/linux/interrupt.h | 2 +-
include/linux/irq.h | 12 +++++---
kernel/irq/handle.c | 2 +-
kernel/irq/numa_migrate.c | 12 +++++++-
kernel/softirq.c | 3 +-
9 files changed, 91 insertions(+), 16 deletions(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 64f6f20..002d87f 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1088,7 +1088,7 @@ int arch_early_irq_init(void)
return 0;
}
-int arch_init_chip_data(struct irq_desc *desc, int node)
+int arch_init_irq_desc(struct irq_desc *desc, int node)
{
desc->status |= IRQ_NOREQUEST;
return 0;
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index a929c9e..1bc7063 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -20,9 +20,9 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/smp.h>
+#include <linux/irq.h>
#include <asm/atomic.h>
-#include <asm/irq.h>
#include <asm/sections.h>
/* Interrupt handlers registered during init_IRQ */
@@ -61,6 +61,15 @@ extern void init_VISWS_APIC_irqs(void);
extern void setup_IO_APIC(void);
extern void disable_IO_APIC(void);
+extern int x86_init_chip_data(struct irq_desc *desc, int node);
+
+#ifdef CONFIG_SPARSE_IRQ
+extern void x86_copy_chip_data(struct irq_desc *old_desc,
+ struct irq_desc *desc, int node);
+extern void x86_free_chip_data(struct irq_desc *old_desc,
+ struct irq_desc *desc);
+#endif
+
struct io_apic_irq_attr {
int ioapic;
int ioapic_pin;
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index e4e0ddc..12e5cf4 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -211,7 +211,7 @@ static struct irq_cfg *get_one_free_irq_cfg(int node)
return cfg;
}
-int arch_init_chip_data(struct irq_desc *desc, int node)
+int x86_init_chip_data(struct irq_desc *desc, int node)
{
struct irq_cfg *cfg;
@@ -287,8 +287,8 @@ static void free_irq_2_pin(struct irq_cfg *old_cfg, struct irq_cfg *cfg)
old_cfg->irq_2_pin = NULL;
}
-void arch_init_copy_chip_data(struct irq_desc *old_desc,
- struct irq_desc *desc, int node)
+void x86_copy_chip_data(struct irq_desc *old_desc,
+ struct irq_desc *desc, int node)
{
struct irq_cfg *cfg;
struct irq_cfg *old_cfg;
@@ -312,7 +312,7 @@ static void free_irq_cfg(struct irq_cfg *old_cfg)
kfree(old_cfg);
}
-void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc)
+void x86_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc)
{
struct irq_cfg *old_cfg, *cfg;
@@ -336,6 +336,11 @@ struct irq_cfg *irq_cfg(unsigned int irq)
return irq < nr_irqs ? irq_cfgx + irq : NULL;
}
+int x86_init_chip_data(struct irq_desc *desc, int node)
+{
+ return 0;
+}
+
#endif
struct io_apic {
@@ -1520,6 +1525,7 @@ static void __init setup_IO_APIC_irqs(void)
printk(KERN_INFO "can not get irq_desc for %d\n", irq);
continue;
}
+ x86_init_chip_data(desc, node);
cfg = desc->chip_data;
add_pin_to_irq_node(cfg, node, apic_id, pin);
/*
@@ -1570,6 +1576,7 @@ void setup_IO_APIC_irq_extra(u32 gsi)
printk(KERN_INFO "can not get irq_desc for %d\n", irq);
return;
}
+ x86_init_chip_data(desc, node);
cfg = desc->chip_data;
add_pin_to_irq_node(cfg, node, apic_id, pin);
@@ -2739,6 +2746,11 @@ static struct irq_chip ioapic_chip __read_mostly = {
.set_affinity = set_ioapic_affinity_irq,
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
static struct irq_chip ir_ioapic_chip __read_mostly = {
@@ -2754,6 +2766,11 @@ static struct irq_chip ir_ioapic_chip __read_mostly = {
#endif
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
static inline void init_IO_APIC_traps(void)
@@ -3261,6 +3278,7 @@ unsigned int create_irq_nr(unsigned int irq_want, int node)
printk(KERN_INFO "can not get irq_desc for %d\n", new);
continue;
}
+ x86_init_chip_data(desc_new, node);
cfg_new = desc_new->chip_data;
if (cfg_new->vector != 0)
@@ -3466,6 +3484,11 @@ static struct irq_chip msi_chip = {
.set_affinity = set_msi_irq_affinity,
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
static struct irq_chip msi_ir_chip = {
@@ -3479,6 +3502,11 @@ static struct irq_chip msi_ir_chip = {
#endif
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
/*
@@ -3638,6 +3666,11 @@ static struct irq_chip dmar_msi_type = {
.set_affinity = dmar_msi_set_affinity,
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
int arch_setup_dmar_msi(unsigned int irq)
@@ -3695,6 +3728,11 @@ static struct irq_chip ir_hpet_msi_type = {
#endif
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
static struct irq_chip hpet_msi_type = {
@@ -3706,6 +3744,11 @@ static struct irq_chip hpet_msi_type = {
.set_affinity = hpet_msi_set_affinity,
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
int arch_setup_hpet_msi(unsigned int irq, unsigned int id)
@@ -3792,6 +3835,11 @@ static struct irq_chip ht_irq_chip = {
.set_affinity = set_ht_irq_affinity,
#endif
.retrigger = ioapic_retrigger_irq,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
@@ -3919,6 +3967,7 @@ static int __io_apic_set_pci_routing(struct device *dev, int irq,
printk(KERN_INFO "can not get irq_desc %d\n", irq);
return 0;
}
+ x86_init_chip_data(desc, node);
pin = irq_attr->ioapic_pin;
trigger = irq_attr->trigger;
@@ -4313,6 +4362,7 @@ void __init pre_init_apic_IRQ0(void)
phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid);
#endif
desc = irq_to_desc_alloc_node(0, 0);
+ x86_init_chip_data(desc, 0);
setup_local_APIC();
diff --git a/arch/x86/kernel/uv_irq.c b/arch/x86/kernel/uv_irq.c
index ece73d8..df2c6d6 100644
--- a/arch/x86/kernel/uv_irq.c
+++ b/arch/x86/kernel/uv_irq.c
@@ -55,6 +55,11 @@ struct irq_chip uv_irq_chip = {
.eoi = uv_ack_apic,
.end = uv_noop,
.set_affinity = uv_set_irq_affinity,
+
+#ifdef CONFIG_SPARSE_IRQ
+ .copy_chip_data = x86_copy_chip_data,
+ .free_chip_data = x86_free_chip_data,
+#endif
};
/*
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 75f3f00..cc4cd22 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -611,6 +611,6 @@ struct irq_desc;
extern int early_irq_init(void);
extern int arch_probe_nr_irqs(void);
extern int arch_early_irq_init(void);
-extern int arch_init_chip_data(struct irq_desc *desc, int node);
+extern int arch_init_irq_desc(struct irq_desc *desc, int node);
#endif
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 707ab12..558bd2d 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -131,6 +131,14 @@ struct irq_chip {
void (*bus_lock)(unsigned int irq);
void (*bus_sync_unlock)(unsigned int irq);
+ /* for move_irq_desc */
+#ifdef CONFIG_SPARSE_IRQ
+ void (*copy_chip_data)(struct irq_desc *old_desc,
+ struct irq_desc *desc, int node);
+ void (*free_chip_data)(struct irq_desc *old_desc,
+ struct irq_desc *desc);
+#endif
+
/* Currently used only by UML, might disappear one day.*/
#ifdef CONFIG_IRQ_RELEASE_METHOD
void (*release)(unsigned int irq, void *dev_id);
@@ -208,10 +216,6 @@ struct irq_desc {
const char *name;
} ____cacheline_internodealigned_in_smp;
-extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
- struct irq_desc *desc, int node);
-extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);
-
#ifndef CONFIG_SPARSE_IRQ
extern struct irq_desc irq_desc[NR_IRQS];
#endif
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 76d5a67..168e2f8 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -120,7 +120,6 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)
BUG_ON(1);
}
init_desc_masks(desc);
- arch_init_chip_data(desc, node);
}
/*
@@ -228,6 +227,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)
BUG_ON(1);
}
init_one_irq_desc(irq, desc, node);
+ arch_init_irq_desc(desc, node);
set_irq_desc(irq, desc);
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c
index 963559d..9ea09c9 100644
--- a/kernel/irq/numa_migrate.c
+++ b/kernel/irq/numa_migrate.c
@@ -47,7 +47,8 @@ static bool init_copy_one_irq_desc(int irq, struct irq_desc *old_desc,
lockdep_set_class(&desc->lock, &irq_desc_lock_class);
init_copy_kstat_irqs(old_desc, desc, node, nr_cpu_ids);
init_copy_desc_masks(old_desc, desc);
- arch_init_copy_chip_data(old_desc, desc, node);
+ if (desc->chip->copy_chip_data)
+ desc->chip->copy_chip_data(old_desc, desc, node);
return true;
}
@@ -55,7 +56,8 @@ static void free_one_irq_desc(struct irq_desc *old_desc, struct irq_desc *desc)
{
free_kstat_irqs(old_desc, desc);
free_desc_masks(old_desc, desc);
- arch_free_chip_data(old_desc, desc);
+ if (desc->chip->free_chip_data)
+ desc->chip->free_chip_data(old_desc, desc);
}
static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
@@ -107,9 +109,15 @@ out_unlock:
struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
{
+
/* those static or target node is -1, do not move them */
if (desc->irq < NR_IRQS_LEGACY || node == -1)
return desc;
+ /* IRQ chip does not support movement */
+ if (desc->chip_data &&
+ (desc->chip->copy_chip_data == NULL ||
+ desc->chip->free_chip_data == NULL))
+ return desc;
if (desc->node != node)
desc = __real_move_irq_desc(desc, node);
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 7c1a67e..3f4b80e 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -895,8 +895,7 @@ int __init __weak arch_early_irq_init(void)
{
return 0;
}
-
-int __weak arch_init_chip_data(struct irq_desc *desc, int node)
+int __weak arch_init_irq_desc(struct irq_desc *desc, int node)
{
return 0;
}
--
1.5.6.5
^ permalink raw reply related
* [GITPULL+PATCH 0/2] irq: move some interrupt arch_* functions into struct irq_chip.
From: Ian Campbell @ 2010-03-12 9:44 UTC (permalink / raw)
To: linux-kernel
Cc: Jeremy Fitzhardinge, x86@kernel.org, linuxppc-dev@ozlabs.org,
Ingo Molnar, Paul Mackerras, H. Peter Anvin, Thomas Gleixner,
Yinghai Lu
This small series ensures that struct irq_desc->chip_data is available
for alternative irq_chip implementations.
There is an outstanding issue wrt when/how the chip_data field is
initialised. I am continuing to investigate this but the solution is not
turning out as easy/low-impact as expected.
Since last time I've dropped the renaming portion of the series since it
was basically wrong, the functions I'd implicated as ioapic specific are
not at all.
Ian.
The following changes since commit 1ebbdcc83e75697c0d75eb091df172b7d93c84c1:
Ingo Molnar (1):
Merge branch 'perf/urgent'
are available in the git repository at:
git://xenbits.xensource.com/people/ianc/linux-2.6.git for-x86/irq
Ian Campbell (2):
irq: move some interrupt arch_* functions into struct irq_chip.
x86: irq_desc->chip_data is always correct whether or not SPARSE_IRQ is enabled.
arch/powerpc/kernel/irq.c | 2 +-
arch/x86/include/asm/hw_irq.h | 11 ++++++-
arch/x86/kernel/apic/io_apic.c | 61 ++++++++++++++++++++++++++++++++++-----
arch/x86/kernel/uv_irq.c | 5 +++
include/linux/interrupt.h | 2 +-
include/linux/irq.h | 12 +++++--
kernel/irq/handle.c | 2 +-
kernel/irq/numa_migrate.c | 12 ++++++-
kernel/softirq.c | 3 +-
9 files changed, 90 insertions(+), 20 deletions(-)
^ permalink raw reply
* Re: Problem with PCI bus rescan on 460EX
From: Kenji Kaneshige @ 2010-03-12 9:22 UTC (permalink / raw)
To: Felix Radensky; +Cc: linux-pci, Alex Chiang, linuxppc-dev@ozlabs.org
In-Reply-To: <4B98A0CB.8090103@embedded-sol.com>
I'm not sure, but I guess pci_setup_bridge() didn't update IO base/limit
and Mem base/limit of the bridge (0000:00:02.0) because of the following
lines.
static void pci_setup_bridge(struct pci_bus *bus)
{
struct pci_dev *bridge = bus->self;
struct resource *res;
struct pci_bus_region region;
u32 l, bu, lu, io_upper16;
if (pci_is_enabled(bridge)) <===============================
return; <===============================
dev_info(&bridge->dev, "PCI bridge to [bus %02x-%02x]\n",
bus->secondary, bus->subordinate);
...
It seems the bridge was already enabled by pci_assign_unassigned_resources()
at boot time. Does removing those lines make any change?
Thanks,
Kenji Kaneshige
Felix Radensky wrote:
> Hi Alex,
>
> Resending, previous attempt was erroneously send as HTML.
>
> Thanks a lot for replying.
>
> Alex Chiang wrote:
>> * Felix Radensky <felix@embedded-sol.com>:
>>
>>> The problem arises when device is plugged in after boot. After doing
>>> echo 1 > /sys/bus/pci/rescan
>>> the device is identified, but bridge memory window is not allocated,
>>> and reads from device memory regions return 0xffffffff. Below is
>>> relevant output:
>>>
>>
>> Do you need firmware support on your platform for hotplug?
>>
> I don't think so, but I've added powerpc guys to CC to make sure.
>> Can you please send full dmesg during successful boot, full dmesg
>> log during unsuccessful rescan, and contents of /proc/iomem and
>> /proc/ioports during success and failure cases?
>>
>> Be sure you have PCI_CONFIG_DEBUG turned on.
>>
> Attached. I really appreciate your help. Thanks a lot.
>
> Felix.
>
^ permalink raw reply
* Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
From: Jean Delvare @ 2010-03-12 8:26 UTC (permalink / raw)
To: Grant Likely
Cc: alsa-devel, Mark Brown, linux-ide, James.Bottomley, linux-i2c,
sparclinux, jeremy.kerr, sfr, linux-scsi, jgarzik,
microblaze-uclinux, devicetree-discuss, ben-linux, timur, lrg,
monstr, linuxppc-dev, netdev, gregkh, linux-kernel, akpm, dwmw2,
davem
In-Reply-To: <fa686aa41003111322wc1f15b2hd3f653af060f56bf@mail.gmail.com>
On Thu, 11 Mar 2010 14:22:37 -0700, Grant Likely wrote:
> On Thu, Mar 11, 2010 at 12:34 PM, Mark Brown
> <broonie@opensource.wolfsonmicro.com> wrote:
> > On Thu, Mar 11, 2010 at 11:06:50AM -0700, Grant Likely wrote:
> >> .node is being removed
> >>
> >> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> >
> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >
> > but please ensure that Liam and especially Timur also check this (both
> > CCed).
> >
> > For enormous patch serieses like this it's really nice if you can ensure
> > that each person is only CCed on the patches that they need to review.
> > Much less stuff in the inbox.
>
> Yeah, sorry about that (and to everyone receiving this thread, I'm
> really sorry. I won't do it again). I've already been yelled at for
> that. What happened is that on a previous series I was yelled at for
> not sending all patches to everyone (so that the patches could be
> reviewed in context). So, naturally, I made sure to include everyone
> on the whole series this time.... doh.
>
> Next time I post I'll constrain it to small chunks.
A good compromise IMHO is to send only the pieces they really have to
see and ack to each person, and provide a pointer to somewhere the full
series can be seen and downloaded for the interested.
--
Jean Delvare
^ permalink raw reply
* [PATCH] powerpc: do not call printk when CONFIG_PRINTK is not defined
From: Németh Márton @ 2010-03-12 6:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <4B93674B.4090708@freemail.hu>
From: Márton Németh <nm127@freemail.hu>
When printk() is disabled (CONFIG_PRINTK) at menu item
General setup
-> Configure standard kernel features (for small systems)
-> Enable support for printk
then there should be no printk() calls at all.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
Just a typo was fixed in the title.
---
diff -upr linux-2.6.33.orig/arch/powerpc/kernel/head_fsl_booke.S linux/arch/powerpc/kernel/head_fsl_booke.S
--- linux-2.6.33.orig/arch/powerpc/kernel/head_fsl_booke.S 2010-02-24 19:52:17.000000000 +0100
+++ linux/arch/powerpc/kernel/head_fsl_booke.S 2010-03-07 09:28:05.000000000 +0100
@@ -887,13 +887,17 @@ KernelSPE:
lwz r3,_MSR(r1)
oris r3,r3,MSR_SPE@h
stw r3,_MSR(r1) /* enable use of SPE after return */
+#ifdef CONFIG_PRINTK
lis r3,87f@h
ori r3,r3,87f@l
mr r4,r2 /* current */
lwz r5,_NIP(r1)
bl printk
+#endif
b ret_from_except
+#ifdef CONFIG_PRINTK
87: .string "SPE used in kernel (task=%p, pc=%x) \n"
+#endif
.align 4,0
#endif /* CONFIG_SPE */
^ permalink raw reply
* Re: Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?)
From: Németh Márton @ 2010-03-12 6:26 UTC (permalink / raw)
To: David Gibson, Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20100311062331.GI11655@yookeroo>
Hi,
thank you for the comments, I reworked the Freescale MPC5554 device tree
accordingly. I'm listening for comments on this draft.
Regards,
Márton Németh
---
From: Márton Németh <nm127@freemail.hu>
Add device tree for Freescale MPC5554.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -uprN linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts linux/arch/powerpc/boot/dts/mpc5554.dts
--- linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts 1970-01-01 01:00:00.000000000 +0100
+++ linux/arch/powerpc/boot/dts/mpc5554.dts 2010-03-12 07:22:37.000000000 +0100
@@ -0,0 +1,189 @@
+/*
+ * Freescale MPC5554 Device Tree Source
+ *
+ * Based on MPC5553/5554 Microcontroller Reference Manual, Rev. 4.0, 04/2007
+ * http://www.freescale.com/files/32bit/doc/ref_manual/MPC5553_MPC5554_RM.pdf
+ *
+ * Copyright 2010 Márton Németh
+ * Márton Németh <nm127@freemail.hu>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+
+/ {
+ model = "MPC5554";
+ compatible = "fsl,MPC5554EVB"; // Freescale MPC5554 Evaluation Board
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ device_type = "cpu";
+ compatible = "PowerPC,5554";
+ reg = <0>;
+ d-cache-line-size = <32>;
+ i-cache-line-size = <32>;
+ d-cache-size = <0x8000>; // L1, 32KiB
+ i-cache-size = <0x8000>; // L1, 32KiB
+ timebase-frequency = <0>; // from bootloader
+ bus-frequency = <0>; // from bootloader
+ clock-frequency = <0>; // from bootloader
+ };
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000>; // 32KiB internal SRAM
+ };
+
+ xbar@fff04000 { // System Bus Crossbar Switch (XBAR)
+ compatible = "fsl,mpc5554-xbar";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ // The full memory range is covered by XBAR
+ ranges = <>;
+ reg = <0xfff04000 0x4000>;
+
+ flash@0 { // read-only FLASH
+ compatible = "fsl,mpc5554-flash";
+ reg = <0x00000000 0x200000>; // 2MiB internal FLASH
+ };
+
+ bridge@c3f00000 {
+ compatible = "fsl,mpc5554-pbridge-a";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xc0000000 0x20000000>;
+ reg = <0xc3f00000 0x4000>;
+
+ fmpll@3f80000 { // Frequency Modulated PLL
+ compatible = "fsl,mpc5554-fmpll";
+ reg = <0x03f80000 0x4000>;
+ };
+
+ flashconfig@3f88000 { // Flash Configuration
+ compatible = "fsl,mpc5554-flashconfig";
+ reg = <0x03f88000 0x4000>;
+ };
+
+ siu@3f89000 { // System Integration Unit
+ compatible = "fsl,mpc5554-siu";
+ reg = <0x03f90000 0x4000>;
+ };
+
+ emios@3fa0000 { // Modular Timer System
+ compatible = "fsl,mpc5554-emios";
+ reg = <0x03fa0000 0x4000>;
+ };
+
+ etpu@3fc0000 { // Enhanced Time Processing Unit
+ compatible = "fsl,mpc5554-etpu";
+ reg = <0x03fc0000 0x4000>;
+ };
+
+ etpudata@3fc8000 { // eTPU Shared Data Memory (Parameter RAM)
+ compatible = "fsl,mpc5554-etpudata";
+ reg = <0x03fc8000 0x4000>;
+ };
+
+ etpudata@3fcc000 { // eTPU Shared Data Memory (Parameter RAM) mirror
+ compatible = "fsl,mpc5554-etpudata";
+ reg = <0x03fcc000 0x4000>;
+ };
+
+ etpucode@3fd0000 { // eTPU Shared Code RAM
+ compatible = "fsl,mpc5554-etpucode";
+ reg = <0x03fd0000 0x4000>;
+ };
+ };
+
+ bridge@fff00000 {
+ compatible = "fsl,mpc5554-pbridge-b";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xe0000000 0x20000000>;
+ reg = <0xfff00000 0x4000>;
+
+ ecsm@fff40000 { // Error Correction Status Module (ECSM)
+ compatible = "fsl,mpc5554-ecsm";
+ reg = <0xfff40000 0x4000>;
+ };
+
+ edma@fff44000 { // Enhanced DMA Controller (eDMA)
+ compatible = "fsl,mpc5554-edma";
+ reg = <0xfff44000 0x4000>;
+ };
+
+ intc@fff48000 { // Interrupt Controller (INTC)
+ compatible = "fsl,mpc5554-intc";
+ reg = <0xfff48000 0x4000>;
+ };
+
+ eqadc@fff80000 { // Enhanced Queued Analog-to-Digital Converter (eQADC)
+ compatible = "fsl,mpc5554-eqacd";
+ reg = <0xfff80000 0x4000>;
+ };
+
+ dspi@fff90000 { // Deserial Serial Peripheral Interface (DSPI_A)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0xfff90000 0x4000>;
+ };
+
+ dspi@fff94000 { // Deserial Serial Peripheral Interface (DSPI_B)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0xfff94000 0x4000>;
+ };
+
+ dspi@fff98000 { // Deserial Serial Peripheral Interface (DSPI_C)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0xfff98000 0x4000>;
+ };
+
+ dspi@fff9c000 { // Deserial Serial Peripheral Interface (DSPI_D)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0xfff9c000 0x4000>;
+ };
+
+ sci@fffb0000 { // Serial Communications Interface (SCI_A)
+ compatible = "fsl,mpc5554-sci";
+ reg = <0xfffb0000 0x4000>;
+ };
+
+ sci@fffb4000 { // Serial Communications Interface (SCI_B)
+ compatible = "fsl,mpc5554-sci";
+ reg = <0xfffb4000 0x4000>;
+ };
+
+ can@fffc0000 { // Controller Area Network (FlexCAN_A)
+ compatible = "fsl,mpc5554-flexcan";
+ reg = <0xfffc0000 0x4000>;
+ };
+
+ can@fffc4000 { // Controller Area Network (FlexCAN_B)
+ compatible = "fsl,mpc5554-flexcan";
+ reg = <0xfffc4000 0x4000>;
+ };
+
+ can@fffc8000 { // Controller Area Network (FlexCAN_C)
+ compatible = "fsl,mpc5554-flexcan";
+ reg = <0xfffc8000 0x4000>;
+ };
+
+ bam@ffffc000 { // Boot Assist Module (BAM)
+ compatible = "fsl,mpc5554-bam";
+ reg = <0xffffc000 0x4000>;
+ };
+
+ };
+
+ };
+
+};
^ permalink raw reply
* [PATCH v2 (resend #3)] hvc_console: Fix race between hvc_close and hvc_remove
From: Amit Shah @ 2010-03-12 6:23 UTC (permalink / raw)
To: linux-kernel
Cc: Rusty Russell, linuxppc-dev, greg, Amit Shah, torvalds, Alan Cox
In-Reply-To: <1268019497-6164-1-git-send-email-amit.shah@redhat.com>
Alan pointed out a race in the code where hvc_remove is invoked. The
recent virtio_console work is the first user of hvc_remove().
Alan describes it thus:
The hvc_console assumes that a close and remove call can't occur at the
same time.
In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
itself....
So this can happen
hvc_close hvc_remove
hung up ? - no
lock
tty = hp->tty
unlock
lock
hp->tty = NULL
unlock
notify del
kref_put the hvc struct
close completes
tty is destroyed
tty_hangup dead tty
tty->ops will be NULL
NULL->...
This patch adds some tty krefs and also converts to using tty_vhangup().
Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linuxppc-dev@ozlabs.org
CC: Rusty Russell <rusty@rustcorp.com.au>
---
Linus, sending to you this time as I didn't receive any response from
Ben or Greg for the previous submissions.
drivers/char/hvc_console.c | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 4c3b59b..7e94b3c 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -312,6 +312,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
spin_lock_irqsave(&hp->lock, flags);
/* Check and then increment for fast path open. */
if (hp->count++ > 0) {
+ tty_kref_get(tty);
spin_unlock_irqrestore(&hp->lock, flags);
hvc_kick();
return 0;
@@ -319,7 +320,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
tty->driver_data = hp;
- hp->tty = tty;
+ hp->tty = tty_kref_get(tty);
spin_unlock_irqrestore(&hp->lock, flags);
@@ -336,6 +337,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
spin_lock_irqsave(&hp->lock, flags);
hp->tty = NULL;
spin_unlock_irqrestore(&hp->lock, flags);
+ tty_kref_put(tty);
tty->driver_data = NULL;
kref_put(&hp->kref, destroy_hvc_struct);
printk(KERN_ERR "hvc_open: request_irq failed with rc %d.\n", rc);
@@ -363,13 +365,18 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
return;
hp = tty->driver_data;
+
spin_lock_irqsave(&hp->lock, flags);
+ tty_kref_get(tty);
if (--hp->count == 0) {
/* We are done with the tty pointer now. */
hp->tty = NULL;
spin_unlock_irqrestore(&hp->lock, flags);
+ /* Put the ref obtained in hvc_open() */
+ tty_kref_put(tty);
+
if (hp->ops->notifier_del)
hp->ops->notifier_del(hp, hp->data);
@@ -389,6 +396,7 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
spin_unlock_irqrestore(&hp->lock, flags);
}
+ tty_kref_put(tty);
kref_put(&hp->kref, destroy_hvc_struct);
}
@@ -424,10 +432,11 @@ static void hvc_hangup(struct tty_struct *tty)
spin_unlock_irqrestore(&hp->lock, flags);
if (hp->ops->notifier_hangup)
- hp->ops->notifier_hangup(hp, hp->data);
+ hp->ops->notifier_hangup(hp, hp->data);
while(temp_open_count) {
--temp_open_count;
+ tty_kref_put(tty);
kref_put(&hp->kref, destroy_hvc_struct);
}
}
@@ -592,7 +601,7 @@ int hvc_poll(struct hvc_struct *hp)
}
/* No tty attached, just skip */
- tty = hp->tty;
+ tty = tty_kref_get(hp->tty);
if (tty == NULL)
goto bail;
@@ -672,6 +681,8 @@ int hvc_poll(struct hvc_struct *hp)
tty_flip_buffer_push(tty);
}
+ if (tty)
+ tty_kref_put(tty);
return poll_mask;
}
@@ -807,7 +818,7 @@ int hvc_remove(struct hvc_struct *hp)
struct tty_struct *tty;
spin_lock_irqsave(&hp->lock, flags);
- tty = hp->tty;
+ tty = tty_kref_get(hp->tty);
if (hp->index < MAX_NR_HVC_CONSOLES)
vtermnos[hp->index] = -1;
@@ -819,18 +830,18 @@ int hvc_remove(struct hvc_struct *hp)
/*
* We 'put' the instance that was grabbed when the kref instance
* was initialized using kref_init(). Let the last holder of this
- * kref cause it to be removed, which will probably be the tty_hangup
+ * kref cause it to be removed, which will probably be the tty_vhangup
* below.
*/
kref_put(&hp->kref, destroy_hvc_struct);
/*
- * This function call will auto chain call hvc_hangup. The tty should
- * always be valid at this time unless a simultaneous tty close already
- * cleaned up the hvc_struct.
+ * This function call will auto chain call hvc_hangup.
*/
- if (tty)
- tty_hangup(tty);
+ if (tty) {
+ tty_vhangup(tty);
+ tty_kref_put(tty);
+ }
return 0;
}
EXPORT_SYMBOL_GPL(hvc_remove);
--
1.6.2.5
^ permalink raw reply related
* Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64
From: Benjamin Herrenschmidt @ 2010-03-12 6:19 UTC (permalink / raw)
To: prasad
Cc: Michael Neuling, shaggy, Frederic Weisbecker, David Gibson,
linuxppc-dev, paulus, Alan Stern, Roland McGrath
In-Reply-To: <20100308181448.GA5538@in.ibm.com>
> Index: linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h
> ===================================================================
> --- /dev/null
> +++ linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h
> @@ -0,0 +1,54 @@
> +#ifndef _PPC64_HW_BREAKPOINT_H
> +#define _PPC64_HW_BREAKPOINT_H
> +
> +#ifdef __KERNEL__
> +#define __ARCH_HW_BREAKPOINT_H
> +#ifdef CONFIG_PPC64
> +
> +struct arch_hw_breakpoint {
> + u8 len; /* length of the target symbol */
I don't understand the usage of the word "symbol" above, can you
explain ?
> + int type;
> + unsigned long address;
> +};
> +
> +#include <linux/kdebug.h>
> +#include <asm/reg.h>
> +#include <asm/system.h>
> +
> +/* Total number of available HW breakpoint registers */
> +#define HBP_NUM 1
> +
> +struct perf_event;
> +struct pmu;
> +struct perf_sample_data;
> +
> +#define HW_BREAKPOINT_ALIGN 0x7
> +/* Maximum permissible length of any HW Breakpoint */
> +#define HW_BREAKPOINT_LEN 0x8
That's a lot of server-only hard wired assumptions... I suppose the
DABR emulation of BookE will catch but do you intend to provide
proper BookE support at some stage ?
> +static inline void hw_breakpoint_disable(void)
> +{
> + set_dabr(0);
> +}
How much of these set_dabr() I see here are going to interact with
ptrace ? Is there some exclusion going on between ptrace and perf
event use of the DABR or none at all ? Or are you replacing the ptrace
bits ?
> +/*
> + * Install a perf counter breakpoint.
> + *
> + * We seek a free debug address register and use it for this
> + * breakpoint.
> + *
> + * Atomic: we hold the counter->ctx->lock and we only handle variables
> + * and registers local to this cpu.
> + */
> +int arch_install_hw_breakpoint(struct perf_event *bp)
> +{
> + struct arch_hw_breakpoint *info = counter_arch_bp(bp);
> + struct perf_event **slot = &__get_cpu_var(bp_per_reg);
> +
> + if (!*slot)
> + *slot = bp;
> + else {
> + WARN_ONCE(1, "Can't find any breakpoint slot");
> + return -EBUSY;
> + }
> +
> + set_dabr(info->address | info->type | DABR_TRANSLATION);
> + return 0;
> +}
Under which circumstances will the upper layer call that more than
once ? If it's a legit thing to do, then the WARN_ONCE() is a heavy
hammer here. I wouldn't even printk.... or only pr_debug() if it's
really worth it.
Or is that something that should just not happen ?
I would also use this coding style which is more compact and avoids
the horrible (!*slot) :
/* Check if the slot is busy */
if (*slot)
return -EBUSY;
set_dabr(...);
> +/*
> + * Uninstall the breakpoint contained in the given counter.
> + *
> + * First we search the debug address register it uses and then we disable
> + * it.
> + *
> + * Atomic: we hold the counter->ctx->lock and we only handle variables
> + * and registers local to this cpu.
> + */
> +void arch_uninstall_hw_breakpoint(struct perf_event *bp)
> +{
> + struct perf_event **slot = &__get_cpu_var(bp_per_reg);
> +
> + if (*slot == bp)
> + *slot = NULL;
> + else {
> + WARN_ONCE(1, "Can't find the breakpoint slot");
> + return;
> + }
> + set_dabr(0);
> +}
Similar coding style issues... That one might be worth the warning
as I suppose the core should -really- not try to uninstall a bp that
hasn't been installed in the first place.
> +/*
> + * Validate the arch-specific HW Breakpoint register settings
> + */
> +int arch_validate_hwbkpt_settings(struct perf_event *bp,
> + struct task_struct *tsk)
> +{
> + int is_kernel, ret = -EINVAL;
> + struct arch_hw_breakpoint *info = counter_arch_bp(bp);
> +
> + if (!bp)
> + return ret;
> +
> + switch (bp->attr.bp_type) {
> + case HW_BREAKPOINT_R:
> + info->type = DABR_DATA_READ;
> + break;
> + case HW_BREAKPOINT_W:
> + info->type = DABR_DATA_WRITE;
> + break;
> + case HW_BREAKPOINT_R | HW_BREAKPOINT_W:
> + info->type = (DABR_DATA_READ | DABR_DATA_WRITE);
> + break;
> + default:
> + return ret;
> + }
I'm not -too- fan of the above, I suppose I would have written it a bit
differently using if's but that's not a big deal... however:
> + /* TODO: Check for a valid triggered function */
> + /* if (!bp->triggered)
> + return -EINVAL; */
What is that ? Is the patch incomplete ? Don't leave commented out code
in there. If you think there's a worthwhile improvement, then add a
comment with maybe a bit more explanations, and make it clear that the
patch is still useful without the code, but don't just leave commented
out code like that without a good reason. A good reason would be some
optional debug stuff for example, but then an ifdef is preferrable to
comments.
> + is_kernel = is_kernel_addr(bp->attr.bp_addr);
> + if ((tsk && is_kernel) || (!tsk && !is_kernel))
> + return -EINVAL;
> +
> + info->address = bp->attr.bp_addr;
> + info->len = bp->attr.bp_len;
> +
> + /*
> + * Since breakpoint length can be a maximum of HW_BREAKPOINT_LEN(8)
> + * and breakpoint addresses are aligned to nearest double-word
> + * HW_BREAKPOINT_ALIGN by rounding off to the lower address, the
> + * 'symbolsize' should satisfy the check below.
> + */
> + if (info->len >
> + (HW_BREAKPOINT_LEN - (info->address & HW_BREAKPOINT_ALIGN)))
> + return -EINVAL;
> + return 0;
> +}
> +
> +/*
> + * Handle debug exception notifications.
> + */
> +int __kprobes hw_breakpoint_handler(struct die_args *args)
> +{
> + int rc = NOTIFY_STOP;
> + struct perf_event *bp;
> + struct pt_regs *regs = args->regs;
> + unsigned long dar = regs->dar;
> + int cpu, is_kernel, stepped = 1;
> + struct arch_hw_breakpoint *info;
> +
> + /* Disable breakpoints during exception handling */
> + set_dabr(0);
> + cpu = get_cpu();
So there's something a bit weird here. set_dabr() will clear the DABR on
the local CPU, and you do that before you disable preempt. So you may
have preempted and be on another CPU, is that allright ? IE. Are you
dealing with that original CPU still having the DABR active and you now
clearing a different one ?
> + /*
> + * The counter may be concurrently released but that can only
> + * occur from a call_rcu() path. We can then safely fetch
> + * the breakpoint, use its callback, touch its counter
> + * while we are in an rcu_read_lock() path.
> + */
> + rcu_read_lock();
> +
> + bp = per_cpu(bp_per_reg, cpu);
> + if (!bp)
> + goto out;
So this is the bp_per_reg of a different CPU if you had migrated
earlier. So you -did- hit the BP on, let's say CPU 0, but since you are
now on CPU 1 you won't handle it ? Weird...
> + info = counter_arch_bp(bp);
> + is_kernel = is_kernel_addr(bp->attr.bp_addr);
> +
> + /*
> + * Verify if dar lies within the address range occupied by the symbol
> + * being watched to filter extraneous exceptions.
> + */
> + if (!((bp->attr.bp_addr <= dar) &&
> + (dar <= (bp->attr.bp_addr + bp->attr.bp_len))))
> + /*
> + * This exception is triggered not because of a memory access on
> + * the monitored variable but in the double-word address range
> + * in which it is contained. We will consume this exception,
> + * considering it as 'noise'.
> + */
> + goto restore_bp;
> +
> + /*
> + * Return early after invoking user-callback function without restoring
> + * DABR if the breakpoint is from ptrace which always operates in
> + * one-shot mode
> + */
> + if (bp->overflow_handler == ptrace_triggered) {
> + perf_bp_event(bp, regs);
> + rc = NOTIFY_DONE;
> + goto out;
> + }
> +
> + /*
> + * Do not emulate user-space instructions from kernel-space,
> + * instead single-step them.
> + */
> + if (!is_kernel) {
> + current->thread.last_hit_ubp = bp;
> + regs->msr |= MSR_SE;
> + goto out;
> + }
So what is this ? When you hit a bp, you switch to single step ? Out of
curiosity, why ?
> + stepped = emulate_step(regs, regs->nip);
> + /* emulate_step() could not execute it, single-step them */
> + if (stepped == 0) {
> + regs->msr |= MSR_SE;
> + per_cpu(last_hit_bp, cpu) = bp;
> + goto out;
> + }
> + /*
> + * As a policy, the callback is invoked in a 'trigger-after-execute'
> + * fashion
> + */
> + perf_bp_event(bp, regs);
> +
> +restore_bp:
> + set_dabr(info->address | info->type | DABR_TRANSLATION);
So in my preempt case, you hit the DABR on CPU 0, migrated to CPU 1
before you get into this function, and now you are modifying CPU 1
DABR...
I think we need to change the asm so that you are called with interrupts
off from handle_page_fault() or so.
Basicallym in do_hash_page, make the andis 0xa450 go out of line, check
for DSISR_DABRMATCH specifically, and in this case go to an entirely
different function than handle_page_fault->do_page_fault(), something
like handle_dabr_fault->do_dabr() which uses DISABLE_INTS instead
of ENABLE_INTS :-)
We also need the same fix in 32-bit I suppose.
Note while looking at it that it looks like we have a similar issue with
program checks. We fixed it on 32-bit but not on 64-bit. We should keep
interrupts masked basically when going progranm_check_exception(). It
will unmask them if/when needed.
> +out:
> + rcu_read_unlock();
> + put_cpu();
> + return rc;
> +}
> +
> +/*
> + * Handle single-step exceptions following a DABR hit.
> + */
> +int __kprobes single_step_dabr_instruction(struct die_args *args)
> +{
> + struct pt_regs *regs = args->regs;
> + int cpu = get_cpu();
> + int ret = NOTIFY_DONE;
> + siginfo_t info;
> + struct perf_event *bp = NULL, *kernel_bp, *user_bp;
> + struct arch_hw_breakpoint *bp_info;
> +
> + /*
> + * Identify the cause of single-stepping and find the corresponding
> + * breakpoint structure
> + */
> + user_bp = current->thread.last_hit_ubp;
> + kernel_bp = per_cpu(last_hit_bp, cpu);
> + if (user_bp) {
> + bp = user_bp;
> + current->thread.last_hit_ubp = NULL;
> + } else if (kernel_bp) {
> + bp = kernel_bp;
> + per_cpu(last_hit_bp, cpu) = NULL;
> + }
Hopefully you don't have this problem here, so you probably don't need
get/put_cpu() but that won't hurt, since single_step should hopefully
always have interrupts off.
> + /*
> + * Check if we are single-stepping as a result of a
> + * previous HW Breakpoint exception
> + */
> + if (!bp)
> + goto out;
> +
> + bp_info = counter_arch_bp(bp);
> +
> + /*
> + * We shall invoke the user-defined callback function in the single
> + * stepping handler to confirm to 'trigger-after-execute' semantics
> + */
> + perf_bp_event(bp, regs);
> +
> + /*
> + * Do not disable MSR_SE if the process was already in
> + * single-stepping mode. We cannot reliable detect single-step mode
> + * for kernel-space breakpoints, so this cannot work along with other
> + * debuggers (like KGDB, xmon) which may be single-stepping kernel code.
> + */
> + if (!(user_bp && test_thread_flag(TIF_SINGLESTEP)))
> + regs->msr &= ~MSR_SE;
> +
> + /* Deliver signal to user-space */
> + if (user_bp) {
> + info.si_signo = SIGTRAP;
> + info.si_errno = 0;
> + info.si_code = TRAP_HWBKPT;
> + info.si_addr = (void __user *)bp_info->address;
> + force_sig_info(SIGTRAP, &info, current);
> + }
> +
> + set_dabr(bp_info->address | bp_info->type | DABR_TRANSLATION);
> + ret = NOTIFY_STOP;
> +out:
> + put_cpu();
> + return ret;
> +}
> +
> +/*
> + * Handle debug exception notifications.
> + */
> +int __kprobes hw_breakpoint_exceptions_notify(
> + struct notifier_block *unused, unsigned long val, void *data)
> +{
> + int ret = NOTIFY_DONE;
> +
> + switch (val) {
> + case DIE_DABR_MATCH:
> + ret = hw_breakpoint_handler(data);
> + break;
> + case DIE_SSTEP:
> + ret = single_step_dabr_instruction(data);
> + break;
> + }
> +
> + return ret;
> +}
> +
> +/*
> + * Release the user breakpoints used by ptrace
> + */
> +void flush_ptrace_hw_breakpoint(struct task_struct *tsk)
> +{
> + struct thread_struct *t = &tsk->thread;
> +
> + unregister_hw_breakpoint(t->ptrace_bps[0]);
> + t->ptrace_bps[0] = NULL;
> +}
Ok, so I see that you call that on context switch. But where do you
re-install the breakpoint for the "new" process ?
See below...
> +void hw_breakpoint_pmu_read(struct perf_event *bp)
> +{
> + /* TODO */
> +}
> +
> +void hw_breakpoint_pmu_unthrottle(struct perf_event *bp)
> +{
> + /* TODO */
> +}
> +
> +
> Index: linux-2.6.ppc64_test/arch/powerpc/Kconfig
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/Kconfig
> +++ linux-2.6.ppc64_test/arch/powerpc/Kconfig
> @@ -140,6 +140,7 @@ config PPC
> select HAVE_SYSCALL_WRAPPERS if PPC64
> select GENERIC_ATOMIC64 if PPC32
> select HAVE_PERF_EVENTS
> + select HAVE_HW_BREAKPOINT if PPC64
Why 64-bit only ? ppc32 has DABR too. In fact BookE also provides DABR
emulation.
Also, all your PPC64 stuff are going to show up on BookE 64-bit which
might not be what you wanted...
> config EARLY_PRINTK
> bool
> Index: linux-2.6.ppc64_test/arch/powerpc/kernel/Makefile
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/kernel/Makefile
> +++ linux-2.6.ppc64_test/arch/powerpc/kernel/Makefile
> @@ -33,7 +33,7 @@ obj-y := cputable.o ptrace.o syscalls
> obj-y += vdso32/
> obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \
> signal_64.o ptrace32.o \
> - paca.o nvram_64.o firmware.o
> + paca.o nvram_64.o firmware.o hw_breakpoint.o
> obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o
> obj64-$(CONFIG_RELOCATABLE) += reloc_64.o
> obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o
> Index: linux-2.6.ppc64_test/arch/powerpc/include/asm/reg.h
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/include/asm/reg.h
> +++ linux-2.6.ppc64_test/arch/powerpc/include/asm/reg.h
> @@ -180,6 +180,7 @@
> #define CTRL_TE 0x00c00000 /* thread enable */
> #define CTRL_RUNLATCH 0x1
> #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
> +#define HBP_NUM 1 /* Number of physical HW breakpoint registers */
The above is not quite right. First you already define that in
hw_breakpoint.h. Then, this is too short an identifier for such a
generic file. Finally, it should not be in reg.h since it can vary
from processor to processor. If you want to do things properly, then
add some kind of info about the debug capabilities to cputable.
Please sync with Shaggy so it makes sense on BookE as well.
> #define DABR_TRANSLATION (1UL << 2)
> #define DABR_DATA_WRITE (1UL << 1)
> #define DABR_DATA_READ (1UL << 0)
> Index: linux-2.6.ppc64_test/arch/powerpc/mm/fault.c
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/mm/fault.c
> +++ linux-2.6.ppc64_test/arch/powerpc/mm/fault.c
> @@ -137,6 +137,12 @@ int __kprobes do_page_fault(struct pt_re
> error_code &= 0x48200000;
> else
> is_write = error_code & DSISR_ISSTORE;
> +
> + if (error_code & DSISR_DABRMATCH) {
> + /* DABR match */
> + do_dabr(regs, address, error_code);
> + return 0;
> + }
Now that's interesting. I have the feeling that the moving up of this
might actually be a bug fix :-) But it's still wrong due to interrupts
being enabled as I explained earlier. We probably want to make it a
different path out of head_*.S
> #else
> is_write = error_code & ESR_DST;
> #endif /* CONFIG_4xx || CONFIG_BOOKE */
> @@ -151,14 +157,6 @@ int __kprobes do_page_fault(struct pt_re
> if (!user_mode(regs) && (address >= TASK_SIZE))
> return SIGSEGV;
>
> -#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
> - if (error_code & DSISR_DABRMATCH) {
> - /* DABR match */
> - do_dabr(regs, address, error_code);
> - return 0;
> - }
> -#endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/
> -
> if (in_atomic() || mm == NULL) {
> if (!user_mode(regs))
> return SIGSEGV;
> Index: linux-2.6.ppc64_test/arch/powerpc/include/asm/processor.h
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/include/asm/processor.h
> +++ linux-2.6.ppc64_test/arch/powerpc/include/asm/processor.h
> @@ -209,6 +209,12 @@ struct thread_struct {
> #ifdef CONFIG_PPC64
> unsigned long start_tb; /* Start purr when proc switched in */
> unsigned long accum_tb; /* Total accumilated purr for process */
> + struct perf_event *ptrace_bps[HBP_NUM];
So you should probably call that MAX_HW_BREAKPOINTS and reflect the fact
that it can be bigger. Or you have a pointer to some optional ptrace
BP structure that handle what is needed, and can be allocated lazily
by ptrace only when needed rather than always carrying this around in
the thread_struct.
> + /*
> + * Point to the hw-breakpoint last. Helps safe pre-emption and
> + * hw-breakpoint re-enablement.
> + */
> + struct perf_event *last_hit_ubp;
The comment doesn't make much sense. Preemption doesn't seem quite right
to me unless I missed something and the comment is either too much or
not enough to understand what this is for.
> #endif
> unsigned long dabr; /* Data address breakpoint register */
> #ifdef CONFIG_ALTIVEC
> Index: linux-2.6.ppc64_test/arch/powerpc/kernel/ptrace.c
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/kernel/ptrace.c
> +++ linux-2.6.ppc64_test/arch/powerpc/kernel/ptrace.c
> @@ -32,6 +32,8 @@
> #ifdef CONFIG_PPC32
> #include <linux/module.h>
> #endif
> +#include <linux/hw_breakpoint.h>
> +#include <linux/perf_event.h>
>
> #include <asm/uaccess.h>
> #include <asm/page.h>
> @@ -763,9 +765,32 @@ void user_disable_single_step(struct tas
> clear_tsk_thread_flag(task, TIF_SINGLESTEP);
> }
>
> +void ptrace_triggered(struct perf_event *bp, int nmi,
> + struct perf_sample_data *data, struct pt_regs *regs)
> +{
> + struct perf_event_attr attr;
> +
> + /*
> + * Disable the breakpoint request here since ptrace has defined a
> + * one-shot behaviour for breakpoint exceptions in PPC64.
> + * The SIGTRAP signal is generated automatically for us in do_dabr().
> + * We don't have to do anything about that here
> + */
> + attr = bp->attr;
> + attr.disabled = true;
> + modify_user_hw_breakpoint(bp, &attr);
> +}
> +
> int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
> unsigned long data)
> {
> +#ifdef CONFIG_PPC64
> + int ret;
> + struct thread_struct *thread = &(task->thread);
> + struct perf_event *bp;
> + struct perf_event_attr attr;
> +#endif /* CONFIG_PPC64 */
> +
> /* For ppc64 we support one DABR and no IABR's at the moment (ppc64).
> * For embedded processors we support one DAC and no IAC's at the
> * moment.
> @@ -793,6 +818,60 @@ int ptrace_set_debugreg(struct task_stru
> /* Ensure breakpoint translation bit is set */
> if (data && !(data & DABR_TRANSLATION))
> return -EIO;
> +#ifdef CONFIG_PPC64
> + bp = thread->ptrace_bps[0];
> + if (data == 0) {
> + if (bp) {
> + unregister_hw_breakpoint(bp);
> + thread->ptrace_bps[0] = NULL;
> + }
> + return 0;
> + }
> + if (bp) {
> + attr = bp->attr;
> + attr.bp_addr = data & ~HW_BREAKPOINT_ALIGN;
> +
> + switch (data & (DABR_DATA_WRITE | DABR_DATA_READ)) {
> + case DABR_DATA_READ:
> + attr.bp_type = HW_BREAKPOINT_R;
> + break;
> + case DABR_DATA_WRITE:
> + attr.bp_type = HW_BREAKPOINT_W;
> + break;
> + case (DABR_DATA_WRITE | DABR_DATA_READ):
> + attr.bp_type = HW_BREAKPOINT_R | HW_BREAKPOINT_W;
> + break;
> + }
> + ret = modify_user_hw_breakpoint(bp, &attr);
> + if (ret)
> + return ret;
> + thread->ptrace_bps[0] = bp;
> + thread->dabr = data;
> + return 0;
> + }
> +
> + /* Create a new breakpoint request if one doesn't exist already */
> + hw_breakpoint_init(&attr);
> + attr.bp_addr = data & ~HW_BREAKPOINT_ALIGN;
> + switch (data & (DABR_DATA_WRITE | DABR_DATA_READ)) {
> + case DABR_DATA_READ:
> + attr.bp_type = HW_BREAKPOINT_R;
> + break;
> + case DABR_DATA_WRITE:
> + attr.bp_type = HW_BREAKPOINT_W;
> + break;
> + case (DABR_DATA_WRITE | DABR_DATA_READ):
> + attr.bp_type = HW_BREAKPOINT_R | HW_BREAKPOINT_W;
> + break;
> + }
> + thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr,
> + ptrace_triggered, task);
> + if (IS_ERR(bp)) {
> + thread->ptrace_bps[0] = NULL;
> + return PTR_ERR(bp);
> + }
> +
> +#endif /* CONFIG_PPC64 */
>
> /* Move contents to the DABR register */
> task->thread.dabr = data;
> Index: linux-2.6.ppc64_test/arch/powerpc/kernel/process.c
> ===================================================================
> --- linux-2.6.ppc64_test.orig/arch/powerpc/kernel/process.c
> +++ linux-2.6.ppc64_test/arch/powerpc/kernel/process.c
> @@ -48,6 +48,7 @@
> #include <asm/machdep.h>
> #include <asm/time.h>
> #include <asm/syscalls.h>
> +#include <asm/hw_breakpoint.h>
> #ifdef CONFIG_PPC64
> #include <asm/firmware.h>
> #endif
> @@ -459,8 +460,11 @@ struct task_struct *__switch_to(struct t
> #ifdef CONFIG_PPC_ADV_DEBUG_REGS
> switch_booke_debug_regs(&new->thread);
> #else
> +/* For PPC64, we use the hw-breakpoint interfaces that would schedule DABR */
> +#ifndef CONFIG_PPC64
> if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
> set_dabr(new->thread.dabr);
> +#endif /* CONFIG_PPC64 */
> #endif
>
>
> @@ -479,6 +483,7 @@ struct task_struct *__switch_to(struct t
> old_thread->accum_tb += (current_tb - start_tb);
> new_thread->start_tb = current_tb;
> }
> + flush_ptrace_hw_breakpoint(current);
> #endif
>
> local_irq_save(flags);
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* [PATCH] mpc52xx_lpbfifo: flag DMA irqs as enabled after requesting them
From: Roman Fietze @ 2010-03-12 5:58 UTC (permalink / raw)
To: linuxppc-dev
Hello,
This patch avoids unbalanced enable/disable messages for the DMA
interrupts when running the 5200 platform SCLPC/BestComm driver in DMA
mode.
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
=2D--
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/p=
latforms/52xx/mpc52xx_lpbfifo.c
index 929d017..d4f8be3 100644
=2D-- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -481,6 +481,8 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struc=
t of_device_id *match)
if (rc)
goto err_bcom_rx_irq;
=20
+ lpbfifo.dma_irqs_enabled =3D 1;
+
/* Request the Bestcomm transmit (memory --> fifo) task and IRQ */
lpbfifo.bcom_tx_task =3D
bcom_gen_bd_tx_init(2, res.start + LPBFIFO_REG_FIFO_DATA,
=2D-=20
1.7.0.1
Roman
=2D-=20
Roman Fietze Telemotive AG B=FCro M=FChlhausen
Breitwiesen 73347 M=FChlhausen
Tel.: +49(0)7335/18493-45 http://www.telemotive.de
^ permalink raw reply
* RE: Linus' kernel tree over ads5121-rev4
From: Chen Hongjun-R66092 @ 2010-03-12 0:26 UTC (permalink / raw)
To: CTAG / Moisés Domínguez; +Cc: linuxppc-dev
In-Reply-To: <DCD09CE7A7B046EA9AD832CD4648A26E@ctag>
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]
Pls make sure that you have the following enrionment variable in uboot bootargs.
diufb=15M
B.R,
Hongjun
________________________________
From: linuxppc-dev-bounces+hong-jun.chen=freescale.com@lists.ozlabs.org [mailto:linuxppc-dev-bounces+hong-jun.chen=freescale.com@lists.ozlabs.org] On Behalf Of CTAG / Moisés Domínguez
Sent: Thursday, March 11, 2010 8:54 PM
To: linuxppc-dev@lists.ozlabs.org
Subject: Linus' kernel tree over ads5121-rev4
Hi,
I am started with freescale LTIB but I decided to make a clone of Linus' kernel tree mainly to have the latest and fixed mscan driver.
Linux is uncompressed and starts right, but when DIU driver probe function is called (exactly when first framebuffer device is registered) linux restarts. This behaviour repeats indefinitely.
(same behaviour with denx kernel tree).
I am using .dts that comes in the Linus'kernel tree. Maybe this .dts board revision dependent?
I updated u-boot to with the denx one but similar results.
Maybe basic questions. Sorry for that.
Regards, Moises.
[-- Attachment #2: Type: text/html, Size: 5861 bytes --]
^ permalink raw reply
* Re: Problem with PCI bus rescan on 460EX
From: Benjamin Herrenschmidt @ 2010-03-11 21:49 UTC (permalink / raw)
To: Felix Radensky; +Cc: linux-pci, Alex Chiang, linuxppc-dev@ozlabs.org
In-Reply-To: <4B996375.3010103@embedded-sol.com>
On Thu, 2010-03-11 at 23:41 +0200, Felix Radensky wrote:
> I'm fine with creating a minimal hotplug driver. The device I'm
> dealing with
> partially implements Compact PCI hotplug. It generates ENUM#
> interrupt, but
> Hotswap Control register layout does not completely follow the
> standard.
>
> Should I use drivers/pci/hotplug/cpci_hotplug_core.c as a base, or do
> you have
> something more simple in mind ?
I don't have anything special in mind, but you may need to look at how
the pseries hotplug driver does to get those fixups and resource
management things done. That driver is mostly a horrible mess, though I
did clean quite a bit of it up recently...
The main thing of interest to you is pcibios_add_pci_devices() which
is called to probe below an existing bridge. It's currently in
arch/powerpc/platforms/pseries/pci_dlpar.c but we could move it or some
of it to our common code if needed. You also may safely ignore the eeh_*
bits on ppc32
Cheers,
Ben.
^ permalink raw reply
* Re: madness, was Re: [PATCH 2/2] Macintosh: fix coding style issues in adb.c This is a patch to the adb.c file that cleans up many warnings found by the checkpatch.pl tool
From: Benjamin Herrenschmidt @ 2010-03-11 21:45 UTC (permalink / raw)
To: fthain
Cc: Michael Beardsworth, monstr, linux-kernel, linuxppc-dev, geert,
Nick Savage
In-Reply-To: <alpine.LNX.2.00.1003101428460.4583@nippy.intranet>
On Wed, 2010-03-10 at 14:48 +1100, fthain@telegraphics.com.au wrote:
> On Tue, 9 Mar 2010, Michael Beardsworth wrote:
>
> > - /* If a probe is in progress or we are sleeping, wait for it to complete */
> > + /* If a probe is in progress or we are sleeping, wait until complete */
>
> If you must "fix" what aint broke, please try not to damage it. I'm sorry
> if your VT52 is limited to 80 cols, but IMNSHO this sort of effort is
> misguided.
>
> Maybe I could point out again (I do this periodically) that checkpatch.pl
> is great but code that fails it is NOT always wrong.
>
> "Check patch" is a good idea but "check existing code" is a waste of
> everyone's time.
Amen !
Cheers,
Ben.
^ permalink raw reply
* Re: Problem with PCI bus rescan on 460EX
From: Felix Radensky @ 2010-03-11 21:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-pci, Alex Chiang, linuxppc-dev@ozlabs.org
In-Reply-To: <1268339578.22204.708.camel@pasglop>
Hi Ben,
Benjamin Herrenschmidt wrote:
> Yes, we need to do a resource allocation pass, setup DMA, etc... and
> that is not done in that manual rescan case I suppose. I have to look.
>
> Part of the problem is that there is no "proper" hooks in the generic
> PCI code that I know of for that, but I'll have to double check the
> code, things might have changed.
>
> For boot time, we do this after we scan busses and before we add the
> devices to sysfs. For hotplug, our hotplug drivers do something similar.
> But that "rescan" sysfs hook seems to go directly into drivers/pci
> causing a rescan but without a change to re-allocate resources etc...
>
> You may be better off implementing a minimum hotplug driver I suppose...
>
> Cheers,
> Ben.
>
>
I'm fine with creating a minimal hotplug driver. The device I'm dealing with
partially implements Compact PCI hotplug. It generates ENUM# interrupt, but
Hotswap Control register layout does not completely follow the standard.
Should I use drivers/pci/hotplug/cpci_hotplug_core.c as a base, or do
you have
something more simple in mind ?
Thanks a lot.
Felix.
^ permalink raw reply
* Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 21:22 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, linux-ide, James.Bottomley, linux-i2c, sparclinux,
jeremy.kerr, sfr, linux-scsi, jgarzik, microblaze-uclinux,
devicetree-discuss, ben-linux, timur, lrg, monstr, linuxppc-dev,
netdev, gregkh, linux-kernel, akpm, dwmw2, davem
In-Reply-To: <20100311193458.GA13289@opensource.wolfsonmicro.com>
On Thu, Mar 11, 2010 at 12:34 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Thu, Mar 11, 2010 at 11:06:50AM -0700, Grant Likely wrote:
>> .node is being removed
>>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> but please ensure that Liam and especially Timur also check this (both
> CCed).
>
> For enormous patch serieses like this it's really nice if you can ensure
> that each person is only CCed on the patches that they need to review.
> Much less stuff in the inbox.
Yeah, sorry about that (and to everyone receiving this thread, I'm
really sorry. I won't do it again). I've already been yelled at for
that. What happened is that on a previous series I was yelled at for
not sending all patches to everyone (so that the patches could be
reviewed in context). So, naturally, I made sure to include everyone
on the whole series this time.... doh.
Next time I post I'll constrain it to small chunks.
Thanks for the review.
g.
^ permalink raw reply
* [git pull] driver bug fixes and mpc5200 defconfig updates
From: Grant Likely @ 2010-03-11 21:11 UTC (permalink / raw)
To: linuxppc-dev, Linux Kernel Mailing List, spi-devel-general
Cc: David Miller, Scott Ellis
Hi Linus,
Here are some driver bug fixes, and the requisite powerpc-mpc5200
defconfig updates. The defconfig updates would normally go through
Ben's tree, but since that is the only change I have that would go
through his tree I'm hoping that it is okay to have it here.
Cheers,
g.
The following changes since commit 57d54889cd00db2752994b389ba714138652e60c:
Linus Torvalds (1):
Linux 2.6.34-rc1
are available in the git repository at:
git://git.secretlab.ca/git/linux-2.6 merge
David Miller (1):
uartlite: Fix build on sparc.
Grant Likely (1):
powerpc/52xx: update defconfigs
Scott Ellis (2):
spi/omap2_mcspi: fix NULL pointer dereference
spi/omap2_mcspi: Use transaction speed if provided
arch/powerpc/configs/52xx/cm5200_defconfig | 24 ++--
arch/powerpc/configs/52xx/lite5200b_defconfig | 28 +++--
arch/powerpc/configs/52xx/motionpro_defconfig | 25 +++--
arch/powerpc/configs/52xx/pcm030_defconfig | 27 +++---
arch/powerpc/configs/52xx/tqm5200_defconfig | 28 +++---
arch/powerpc/configs/mpc5200_defconfig | 134 ++++++++++++++++---------
drivers/serial/uartlite.c | 10 +-
drivers/spi/omap2_mcspi.c | 18 ++-
8 files changed, 177 insertions(+), 117 deletions(-)
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: Problem with PCI bus rescan on 460EX
From: Benjamin Herrenschmidt @ 2010-03-11 20:32 UTC (permalink / raw)
To: Felix Radensky; +Cc: linux-pci, Alex Chiang, linuxppc-dev@ozlabs.org
In-Reply-To: <4B989F9B.8060708@embedded-sol.com>
On Thu, 2010-03-11 at 09:45 +0200, Felix Radensky wrote:
> Hi Alex,
>
> Thanks a lot for replying.
>
> Alex Chiang wrote:
> > * Felix Radensky <felix@embedded-sol.com>:
> >
> > > The problem arises when device is plugged in after boot. After doing
> > > echo 1 > /sys/bus/pci/rescan
> > > the device is identified, but bridge memory window is not allocated,
> > > and reads from device memory regions return 0xffffffff. Below is
> > > relevant output:
> > >
> >
> > Do you need firmware support on your platform for hotplug?
> >
> I don't think so, but I've added powerpc guys to CC to make sure.
> > Can you please send full dmesg during successful boot, full dmesg
> > log during unsuccessful rescan, and contents of /proc/iomem and
> > /proc/ioports during success and failure cases?
> >
> > Be sure you have PCI_CONFIG_DEBUG turned on.
> >
> Attached. I really appreciate your help. Thanks a lot.
Yes, we need to do a resource allocation pass, setup DMA, etc... and
that is not done in that manual rescan case I suppose. I have to look.
Part of the problem is that there is no "proper" hooks in the generic
PCI code that I know of for that, but I'll have to double check the
code, things might have changed.
For boot time, we do this after we scan busses and before we add the
devices to sysfs. For hotplug, our hotplug drivers do something similar.
But that "rescan" sysfs hook seems to go directly into drivers/pci
causing a rescan but without a change to re-allocate resources etc...
You may be better off implementing a minimum hotplug driver I suppose...
Cheers,
Ben.
> Felix .
> plain text document attachment (failure.txt)
> Linux version 2.6.33 (felix@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 09:35:52 IST 2010
> Found legacy serial port 0 for /plb/opb/serial@ef600300
> mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
> Found legacy serial port 1 for /plb/opb/serial@ef600400
> mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
> Found legacy serial port 2 for /plb/opb/serial@ef600500
> mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
> Found legacy serial port 3 for /plb/opb/serial@ef600600
> mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
> Top of RAM: 0x30000000, Total RAM: 0x30000000
> Memory hole size: 0MB
> Zone PFN ranges:
> DMA 0x00000000 -> 0x00030000
> Normal 0x00030000 -> 0x00030000
> Movable zone start PFN for each node
> early_node_map[1] active PFN ranges
> 0: 0x00000000 -> 0x00030000
> On node 0 totalpages: 196608
> free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
> DMA zone: 1536 pages used for memmap
> DMA zone: 0 pages reserved
> DMA zone: 195072 pages, LIFO batch:31
> MMU: Allocated 1088 bytes of context maps for 255 contexts
> Built 1 zonelists in Zone order, mobility grouping on. Total pages: 195072
> Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 console=ttyS0,115200
> PID hash table entries: 4096 (order: 2, 16384 bytes)
> Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k data, 128k bss, 144k init)
> Kernel virtual memory layout:
> * 0xfffdf000..0xfffff000 : fixmap
> * 0xfde00000..0xfe000000 : consistent mem
> * 0xfde00000..0xfde00000 : early ioremap
> * 0xf1000000..0xfde00000 : vmalloc & ioremap
> SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> Hierarchical RCU implementation.
> NR_IRQS:512 nr_irqs:512
> UIC0 (32 IRQ sources) at DCR 0xc0
> UIC1 (32 IRQ sources) at DCR 0xd0
> alloc irq_desc for 30 on node 0
> alloc kstat_irqs on node 0
> irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
> UIC2 (32 IRQ sources) at DCR 0xe0
> alloc irq_desc for 16 on node 0
> alloc kstat_irqs on node 0
> irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
> UIC3 (32 IRQ sources) at DCR 0xf0
> alloc irq_desc for 17 on node 0
> alloc kstat_irqs on node 0
> irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
> time_init: decrementer frequency = 1000.000012 MHz
> time_init: processor frequency = 1000.000012 MHz
> clocksource: timebase mult[400000] shift[22] registered
> clockevent: decrementer mult[80000019] shift[31] cpu[0]
> Mount-cache hash table entries: 512
> NET: Registered protocol family 16
> alloc irq_desc for 18 on node 0
> alloc kstat_irqs on node 0
> irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
> 256k L2-cache enabled
> PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
> MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
> MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
> IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
> Removing ISA hole at 0x0000000c0ee00000
> 4xx PCI DMA offset set to 0x00000000
> /plb/pci@c0ec00000: Legacy ISA memory support enabled
> PCI: Probing PCI hardware
> pci_bus 0000:00: scanning bus
> pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
> pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
> pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
> pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
> pci 0000:00:02.0: supports D1 D2
> pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
> pci 0000:00:02.0: PME# disabled
> pci_bus 0000:00: fixups for bus
> pci 0000:00:02.0: scanning behind bridge, config 000000, pass 0
> pci 0000:00:02.0: bus configuration invalid, reconfiguring
> pci 0000:00:02.0: scanning behind bridge, config 000000, pass 1
> pci_bus 0000:01: scanning bus
> pci_bus 0000:01: fixups for bus
> pci 0000:00:02.0: PCI bridge to [bus 01-ff]
> pci 0000:00:02.0: bridge window [io 0x0000-0x0fff]
> pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff]
> pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff 64bit pref]
> pci_bus 0000:01: bus scan returning with max=01
> pci_bus 0000:00: bus scan returning with max=01
> pci 0000:00:02.0: disabling bridge window [io 0x0000-0x0fff] to [bus 01-01] (unused)
> pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff pref] to [bus 01-01] (unused)
> pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff] to [bus 01-01] (unused)
> pci 0000:00:02.0: PCI bridge to [bus 01-01]
> pci 0000:00:02.0: bridge window [io disabled]
> pci 0000:00:02.0: bridge window [mem disabled]
> pci 0000:00:02.0: bridge window [mem pref disabled]
> pci 0000:00:02.0: enabling bus mastering
> pci_bus 0000:00: resource 0 [io 0x0000-0xffff]
> pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
> pci_bus 0000:01: resource 0 [??? 0-4095 flags 0x0]
> pci_bus 0000:01: resource 1 [??? 55834574848-55835623423 flags 0x0]
> pci_bus 0000:01: resource 2 [??? 55834574848-55835623423 flags 0x0]
> bio: create slab <bio-0> at 0
> SCSI subsystem initialized
> usbcore: registered new interface driver usbfs
> usbcore: registered new interface driver hub
> usbcore: registered new device driver usb
> Switching to clocksource timebase
> NET: Registered protocol family 2
> IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
> TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
> TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
> TCP: Hash tables configured (established 131072 bind 65536)
> TCP reno registered
> UDP hash table entries: 512 (order: 1, 8192 bytes)
> UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
> NET: Registered protocol family 1
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> RPC: Registered tcp NFSv4.1 backchannel transport module.
> pci 0000:00:02.0: calling quirk_cardbus_legacy+0x0/0x54
> pci 0000:00:02.0: calling quirk_usb_early_handoff+0x0/0x6cc
> PCI: CLS 0 bytes, default 32
> alloc irq_desc for 19 on node 0
> alloc kstat_irqs on node 0
> irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 19
> alloc irq_desc for 20 on node 0
> alloc kstat_irqs on node 0
> irq: irq 1 on host /interrupt-controller0 mapped to virtual irq 20
> alloc irq_desc for 29 on node 0
> alloc kstat_irqs on node 0
> irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 29
> alloc irq_desc for 21 on node 0
> alloc kstat_irqs on node 0
> irq: irq 30 on host /interrupt-controller1 mapped to virtual irq 21
> JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
> msgmni has been set to 1515
> io scheduler noop registered
> io scheduler deadline registered
> io scheduler cfq registered (default)
> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
> serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
> console [ttyS0] enabled
> serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
> serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
> serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
> 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
> 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
> 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
> 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
> brd: module loaded
> 4e4000000.nor_flash2: Found 1 x16 devices at 0x0 in 16-bit bank
> 4e4000000.nor_flash2: Found 1 x16 devices at 0x2000000 in 16-bit bank
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> erase region 0: offset=0x0,size=0x8000,blocks=4
> erase region 1: offset=0x20000,size=0x20000,blocks=255
> erase region 2: offset=0x2000000,size=0x8000,blocks=4
> erase region 3: offset=0x2020000,size=0x20000,blocks=255
> RedBoot partition parsing not available
> Creating 1 MTD partitions on "4e4000000.nor_flash2":
> 0x000000000000-0x000004000000 : "data"
> 4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
> 4cc000000.nor_flash: Found 1 x16 devices at 0x2000000 in 16-bit bank
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> erase region 0: offset=0x0,size=0x8000,blocks=4
> erase region 1: offset=0x20000,size=0x20000,blocks=255
> erase region 2: offset=0x2000000,size=0x8000,blocks=4
> erase region 3: offset=0x2020000,size=0x20000,blocks=255
> RedBoot partition parsing not available
> Creating 7 MTD partitions on "4cc000000.nor_flash":
> 0x000000000000-0x0000001e0000 : "kernel"
> 0x0000001e0000-0x000000200000 : "dtb"
> 0x000000200000-0x000001600000 : "ramdisk"
> 0x000001600000-0x000001a00000 : "jffs2"
> 0x000001a00000-0x000003f60000 : "user"
> 0x000003f60000-0x000003fa0000 : "u-boot env"
> 0x000003fa0000-0x000004000000 : "u-boot"
> NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
> Scanning device for bad blocks
> Bad eraseblock 806 at 0x0000064c0000
> Bad eraseblock 807 at 0x0000064e0000
> Bad eraseblock 2209 at 0x000011420000
> Bad eraseblock 3294 at 0x000019bc0000
> Bad eraseblock 4010 at 0x00001f540000
> Bad eraseblock 4748 at 0x000025180000
> Bad eraseblock 5082 at 0x000027b40000
> Bad eraseblock 5083 at 0x000027b60000
> Bad eraseblock 5716 at 0x00002ca80000
> Bad eraseblock 5772 at 0x00002d180000
> Bad eraseblock 6362 at 0x000031b40000
> Bad eraseblock 6680 at 0x000034300000
> Bad eraseblock 6740 at 0x000034a80000
> Bad eraseblock 6796 at 0x000035180000
> Creating 2 MTD partitions on "4e0000000.ndfc.nand":
> 0x000000000000-0x000000100000 : "u-boot"
> 0x000000000000-0x000003f00000 : "user"
> PPC 4xx OCP EMAC driver, version 3.54
> alloc irq_desc for 22 on node 0
> alloc kstat_irqs on node 0
> irq: irq 6 on host /interrupt-controller2 mapped to virtual irq 22
> alloc irq_desc for 23 on node 0
> alloc kstat_irqs on node 0
> irq: irq 7 on host /interrupt-controller2 mapped to virtual irq 23
> alloc irq_desc for 24 on node 0
> alloc kstat_irqs on node 0
> irq: irq 3 on host /interrupt-controller2 mapped to virtual irq 24
> alloc irq_desc for 25 on node 0
> alloc kstat_irqs on node 0
> irq: irq 4 on host /interrupt-controller2 mapped to virtual irq 25
> alloc irq_desc for 26 on node 0
> alloc kstat_irqs on node 0
> irq: irq 5 on host /interrupt-controller2 mapped to virtual irq 26
> MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
> ZMII /plb/opb/emac-zmii@ef600d00 initialized
> RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
> TAH /plb/opb/emac-tah@ef601350 initialized
> TAH /plb/opb/emac-tah@ef601450 initialized
> alloc irq_desc for 27 on node 0
> alloc kstat_irqs on node 0
> irq: irq 16 on host /interrupt-controller2 mapped to virtual irq 27
> alloc irq_desc for 28 on node 0
> alloc kstat_irqs on node 0
> irq: irq 20 on host /interrupt-controller2 mapped to virtual irq 28
> /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
> eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:99:88:77:66:55
> eth0: found Generic MII PHY (0x00)
> alloc irq_desc for 31 on node 0
> alloc kstat_irqs on node 0
> irq: irq 17 on host /interrupt-controller2 mapped to virtual irq 31
> alloc irq_desc for 32 on node 0
> alloc kstat_irqs on node 0
> irq: irq 21 on host /interrupt-controller2 mapped to virtual irq 32
> /plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
> eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:99:88:77:66:56
> eth1: found Generic MII PHY (0x10)
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> alloc irq_desc for 33 on node 0
> alloc kstat_irqs on node 0
> irq: irq 29 on host /interrupt-controller2 mapped to virtual irq 33
> ppc-of-ehci 4bffd0400.ehci: OF EHCI
> ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
> ppc-of-ehci 4bffd0400.ehci: irq 33, io mem 0x4bffd0400
> ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
> usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> usb usb1: Product: OF EHCI
> usb usb1: Manufacturer: Linux 2.6.33 ehci_hcd
> usb usb1: SerialNumber: PPC-OF USB
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 1 port detected
> Initializing USB Mass Storage driver...
> usbcore: registered new interface driver usb-storage
> USB Mass Storage support registered.
> usbcore: registered new interface driver libusual
> i2c /dev entries driver
> alloc irq_desc for 34 on node 0
> alloc kstat_irqs on node 0
> irq: irq 2 on host /interrupt-controller0 mapped to virtual irq 34
> at24 0-0051: 65536 byte 24c512 EEPROM (writable)
> at24 0-0053: 256 byte spd EEPROM (read-only)
> ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
> alloc irq_desc for 35 on node 0
> alloc kstat_irqs on node 0
> irq: irq 3 on host /interrupt-controller0 mapped to virtual irq 35
> ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
> rtc-ds1307 5-0068: rtc core: registered ds1338 as rtc0
> rtc-ds1307 5-0068: 56 bytes nvram
> pca954x 1-0070: registered 8 virtual busses for I2C switch pca9548
> pca954x 2-0071: registered 8 virtual busses for I2C switch pca9548
> pca954x 3-0072: registered 8 virtual busses for I2C switch pca9548
> TCP cubic registered
> NET: Registered protocol family 17
> 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
> All bugs added by David S. Miller <davem@redhat.com>
> rtc-ds1307 5-0068: setting system clock to 2000-02-28 11:43:27 UTC (951738207)
> eth0: link is down
> IP-Config: Complete:
> device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=10.0.0.138,
> host=smbe460, domain=, nis-domain=(none),
> bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
> Looking up port of RPC 100003/2 on 10.0.0.10
> eth0: link is up, 100 FDX, pause enabled
> Looking up port of RPC 100005/1 on 10.0.0.10
> VFS: Mounted root (nfs filesystem) on device 0:13.
> Freeing unused kernel memory: 144k init
> pci_bus 0000:00: scanning bus
> pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
> pci_bus 0000:01: scanning bus
> pci 0000:01:00.0: found [1575:0002] class 00ff00 header type 00
> pci 0000:01:00.0: reg 10: [mem 0x00000000-0x000fffff]
> pci 0000:01:00.0: reg 14: [mem 0x00000000-0x03ffffff]
> pci 0000:01:00.0: reg 18: [mem 0x00000000-0x03ffffff]
> pci 0000:01:00.0: reg 1c: [mem 0x00000000-0x00003fff]
> pci 0000:01:00.0: calling pcibios_fixup_resources+0x0/0xf4
> pci 0000:01:00.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
> pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x200
> pci_bus 0000:01: bus scan returning with max=01
> pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
> pci_bus 0000:00: bus scan returning with max=01
> pci 0000:00:02.0: disabling bridge window [io 0x0000-0x0fff] to [bus 01-01] (unused)
> pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff pref] to [bus 01-01] (unused)
> pci 0000:00:02.0: BAR 8: assigned [mem 0xd80000000-0xd89ffffff]
> pci 0000:01:00.0: BAR 1: assigned [mem 0xd80000000-0xd83ffffff]
> pci 0000:01:00.0: BAR 1: set to [mem 0xd80000000-0xd83ffffff] (PCI address [0x80000000-0x83ffffff]
> pci 0000:01:00.0: BAR 2: assigned [mem 0xd84000000-0xd87ffffff]
> pci 0000:01:00.0: BAR 2: set to [mem 0xd84000000-0xd87ffffff] (PCI address [0x84000000-0x87ffffff]
> pci 0000:01:00.0: BAR 0: assigned [mem 0xd88000000-0xd880fffff]
> pci 0000:01:00.0: BAR 0: set to [mem 0xd88000000-0xd880fffff] (PCI address [0x88000000-0x880fffff]
> pci 0000:01:00.0: BAR 3: assigned [mem 0xd88100000-0xd88103fff]
> pci 0000:01:00.0: BAR 3: set to [mem 0xd88100000-0xd88103fff] (PCI address [0x88100000-0x88103fff]
>
> # cat /proc/iomem
>
> 4bffd0400-4bffd048f : ehci_hcd
> 4cc000000-4cfffffff : 4cc000000.nor_flash
> 4e4000000-4e7ffffff : 4e4000000.nor_flash2
> 4ef600300-4ef600307 : serial
> 4ef600400-4ef600407 : serial
> 4ef600500-4ef600507 : serial
> 4ef600600-4ef600607 : serial
> d80000000-dffffffff : /plb/pci@c0ec00000
> d80000000-d89ffffff : PCI Bus 0000:01
> d80000000-d83ffffff : 0000:01:00.0
> d84000000-d87ffffff : 0000:01:00.0
> d88000000-d880fffff : 0000:01:00.0
> d88100000-d88103fff : 0000:01:00.0
>
> # cat /proc/ioports
> 00000000-0000ffff : /plb/pci@c0ec00000
> 00000000-00000fff : Legacy IO
> plain text document attachment (success.txt)
> Linux version 2.6.33 (felix@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 09:35:52 IST 2010
> Found legacy serial port 0 for /plb/opb/serial@ef600300
> mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
> Found legacy serial port 1 for /plb/opb/serial@ef600400
> mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
> Found legacy serial port 2 for /plb/opb/serial@ef600500
> mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
> Found legacy serial port 3 for /plb/opb/serial@ef600600
> mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
> Top of RAM: 0x30000000, Total RAM: 0x30000000
> Memory hole size: 0MB
> Zone PFN ranges:
> DMA 0x00000000 -> 0x00030000
> Normal 0x00030000 -> 0x00030000
> Movable zone start PFN for each node
> early_node_map[1] active PFN ranges
> 0: 0x00000000 -> 0x00030000
> On node 0 totalpages: 196608
> free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
> DMA zone: 1536 pages used for memmap
> DMA zone: 0 pages reserved
> DMA zone: 195072 pages, LIFO batch:31
> MMU: Allocated 1088 bytes of context maps for 255 contexts
> Built 1 zonelists in Zone order, mobility grouping on. Total pages: 195072
> Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 console=ttyS0,115200
> PID hash table entries: 4096 (order: 2, 16384 bytes)
> Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k data, 128k bss, 144k init)
> Kernel virtual memory layout:
> * 0xfffdf000..0xfffff000 : fixmap
> * 0xfde00000..0xfe000000 : consistent mem
> * 0xfde00000..0xfde00000 : early ioremap
> * 0xf1000000..0xfde00000 : vmalloc & ioremap
> SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> Hierarchical RCU implementation.
> NR_IRQS:512 nr_irqs:512
> UIC0 (32 IRQ sources) at DCR 0xc0
> UIC1 (32 IRQ sources) at DCR 0xd0
> alloc irq_desc for 30 on node 0
> alloc kstat_irqs on node 0
> irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
> UIC2 (32 IRQ sources) at DCR 0xe0
> alloc irq_desc for 16 on node 0
> alloc kstat_irqs on node 0
> irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
> UIC3 (32 IRQ sources) at DCR 0xf0
> alloc irq_desc for 17 on node 0
> alloc kstat_irqs on node 0
> irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
> time_init: decrementer frequency = 1000.000012 MHz
> time_init: processor frequency = 1000.000012 MHz
> clocksource: timebase mult[400000] shift[22] registered
> clockevent: decrementer mult[80000019] shift[31] cpu[0]
> Mount-cache hash table entries: 512
> NET: Registered protocol family 16
> alloc irq_desc for 18 on node 0
> alloc kstat_irqs on node 0
> irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
> 256k L2-cache enabled
> PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
> MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
> MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
> IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
> Removing ISA hole at 0x0000000c0ee00000
> 4xx PCI DMA offset set to 0x00000000
> /plb/pci@c0ec00000: Legacy ISA memory support enabled
> PCI: Probing PCI hardware
> pci_bus 0000:00: scanning bus
> pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
> pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
> pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
> pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
> pci 0000:00:02.0: supports D1 D2
> pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
> pci 0000:00:02.0: PME# disabled
> pci_bus 0000:00: fixups for bus
> pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
> pci_bus 0000:01: scanning bus
> pci 0000:01:00.0: found [1575:0002] class 00ff00 header type 00
> pci 0000:01:00.0: reg 10: [mem 0x88000000-0x880fffff]
> pci 0000:01:00.0: reg 14: [mem 0x80000000-0x83ffffff]
> pci 0000:01:00.0: reg 18: [mem 0x84000000-0x87ffffff]
> pci 0000:01:00.0: reg 1c: [mem 0x88100000-0x88103fff]
> pci 0000:01:00.0: calling pcibios_fixup_resources+0x0/0xf4
> pci 0000:01:00.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
> pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x200
> pci_bus 0000:01: fixups for bus
> pci 0000:00:02.0: PCI bridge to [bus 01-01]
> pci_bus 0000:01: bus scan returning with max=01
> pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
> pci_bus 0000:00: bus scan returning with max=01
> pci 0000:00:02.0: BAR 8: assigned [mem 0xd80000000-0xd89ffffff]
> pci 0000:01:00.0: BAR 1: assigned [mem 0xd80000000-0xd83ffffff]
> pci 0000:01:00.0: BAR 1: set to [mem 0xd80000000-0xd83ffffff] (PCI address [0x80000000-0x83ffffff]
> pci 0000:01:00.0: BAR 2: assigned [mem 0xd84000000-0xd87ffffff]
> pci 0000:01:00.0: BAR 2: set to [mem 0xd84000000-0xd87ffffff] (PCI address [0x84000000-0x87ffffff]
> pci 0000:01:00.0: BAR 0: assigned [mem 0xd88000000-0xd880fffff]
> pci 0000:01:00.0: BAR 0: set to [mem 0xd88000000-0xd880fffff] (PCI address [0x88000000-0x880fffff]
> pci 0000:01:00.0: BAR 3: assigned [mem 0xd88100000-0xd88103fff]
> pci 0000:01:00.0: BAR 3: set to [mem 0xd88100000-0xd88103fff] (PCI address [0x88100000-0x88103fff]
> pci 0000:00:02.0: PCI bridge to [bus 01-01]
> pci 0000:00:02.0: bridge window [io disabled]
> pci 0000:00:02.0: bridge window [mem 0xd80000000-0xd89ffffff]
> pci 0000:00:02.0: bridge window [mem pref disabled]
> pci 0000:00:02.0: enabling device (0084 -> 0086)
> pci_bus 0000:00: resource 0 [io 0x0000-0xffff]
> pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
> pci_bus 0000:01: resource 1 [mem 0xd80000000-0xd89ffffff]
> bio: create slab <bio-0> at 0
> SCSI subsystem initialized
> usbcore: registered new interface driver usbfs
> usbcore: registered new interface driver hub
> usbcore: registered new device driver usb
> Switching to clocksource timebase
> NET: Registered protocol family 2
> IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
> TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
> TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
> TCP: Hash tables configured (established 131072 bind 65536)
> TCP reno registered
> UDP hash table entries: 512 (order: 1, 8192 bytes)
> UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
> NET: Registered protocol family 1
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> RPC: Registered tcp NFSv4.1 backchannel transport module.
> pci 0000:00:02.0: calling quirk_cardbus_legacy+0x0/0x54
> pci 0000:00:02.0: calling quirk_usb_early_handoff+0x0/0x6cc
> pci 0000:01:00.0: calling quirk_cardbus_legacy+0x0/0x54
> pci 0000:01:00.0: calling quirk_usb_early_handoff+0x0/0x6cc
> PCI: CLS 0 bytes, default 32
> alloc irq_desc for 19 on node 0
> alloc kstat_irqs on node 0
> irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 19
> alloc irq_desc for 20 on node 0
> alloc kstat_irqs on node 0
> irq: irq 1 on host /interrupt-controller0 mapped to virtual irq 20
> alloc irq_desc for 29 on node 0
> alloc kstat_irqs on node 0
> irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 29
> alloc irq_desc for 21 on node 0
> alloc kstat_irqs on node 0
> irq: irq 30 on host /interrupt-controller1 mapped to virtual irq 21
> JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
> msgmni has been set to 1515
> io scheduler noop registered
> io scheduler deadline registered
> io scheduler cfq registered (default)
> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
> serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
> console [ttyS0] enabled
> serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
> serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
> serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
> 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
> 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
> 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
> 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
> brd: module loaded
> 4e4000000.nor_flash2: Found 1 x16 devices at 0x0 in 16-bit bank
> 4e4000000.nor_flash2: Found 1 x16 devices at 0x2000000 in 16-bit bank
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> erase region 0: offset=0x0,size=0x8000,blocks=4
> erase region 1: offset=0x20000,size=0x20000,blocks=255
> erase region 2: offset=0x2000000,size=0x8000,blocks=4
> erase region 3: offset=0x2020000,size=0x20000,blocks=255
> RedBoot partition parsing not available
> Creating 1 MTD partitions on "4e4000000.nor_flash2":
> 0x000000000000-0x000004000000 : "data"
> 4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
> 4cc000000.nor_flash: Found 1 x16 devices at 0x2000000 in 16-bit bank
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> erase region 0: offset=0x0,size=0x8000,blocks=4
> erase region 1: offset=0x20000,size=0x20000,blocks=255
> erase region 2: offset=0x2000000,size=0x8000,blocks=4
> erase region 3: offset=0x2020000,size=0x20000,blocks=255
> RedBoot partition parsing not available
> Creating 7 MTD partitions on "4cc000000.nor_flash":
> 0x000000000000-0x0000001e0000 : "kernel"
> 0x0000001e0000-0x000000200000 : "dtb"
> 0x000000200000-0x000001600000 : "ramdisk"
> 0x000001600000-0x000001a00000 : "jffs2"
> 0x000001a00000-0x000003f60000 : "user"
> 0x000003f60000-0x000003fa0000 : "u-boot env"
> 0x000003fa0000-0x000004000000 : "u-boot"
> NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
> Scanning device for bad blocks
> Bad eraseblock 806 at 0x0000064c0000
> Bad eraseblock 807 at 0x0000064e0000
> Bad eraseblock 2209 at 0x000011420000
> Bad eraseblock 3294 at 0x000019bc0000
> Bad eraseblock 4010 at 0x00001f540000
> Bad eraseblock 4748 at 0x000025180000
> Bad eraseblock 5082 at 0x000027b40000
> Bad eraseblock 5083 at 0x000027b60000
> Bad eraseblock 5716 at 0x00002ca80000
> Bad eraseblock 5772 at 0x00002d180000
> Bad eraseblock 6362 at 0x000031b40000
> Bad eraseblock 6680 at 0x000034300000
> Bad eraseblock 6740 at 0x000034a80000
> Bad eraseblock 6796 at 0x000035180000
> Creating 2 MTD partitions on "4e0000000.ndfc.nand":
> 0x000000000000-0x000000100000 : "u-boot"
> 0x000000000000-0x000003f00000 : "user"
> PPC 4xx OCP EMAC driver, version 3.54
> alloc irq_desc for 22 on node 0
> alloc kstat_irqs on node 0
> irq: irq 6 on host /interrupt-controller2 mapped to virtual irq 22
> alloc irq_desc for 23 on node 0
> alloc kstat_irqs on node 0
> irq: irq 7 on host /interrupt-controller2 mapped to virtual irq 23
> alloc irq_desc for 24 on node 0
> alloc kstat_irqs on node 0
> irq: irq 3 on host /interrupt-controller2 mapped to virtual irq 24
> alloc irq_desc for 25 on node 0
> alloc kstat_irqs on node 0
> irq: irq 4 on host /interrupt-controller2 mapped to virtual irq 25
> alloc irq_desc for 26 on node 0
> alloc kstat_irqs on node 0
> irq: irq 5 on host /interrupt-controller2 mapped to virtual irq 26
> MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
> ZMII /plb/opb/emac-zmii@ef600d00 initialized
> RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
> TAH /plb/opb/emac-tah@ef601350 initialized
> TAH /plb/opb/emac-tah@ef601450 initialized
> alloc irq_desc for 27 on node 0
> alloc kstat_irqs on node 0
> irq: irq 16 on host /interrupt-controller2 mapped to virtual irq 27
> alloc irq_desc for 28 on node 0
> alloc kstat_irqs on node 0
> irq: irq 20 on host /interrupt-controller2 mapped to virtual irq 28
> /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
> eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:99:88:77:66:55
> eth0: found Generic MII PHY (0x00)
> alloc irq_desc for 31 on node 0
> alloc kstat_irqs on node 0
> irq: irq 17 on host /interrupt-controller2 mapped to virtual irq 31
> alloc irq_desc for 32 on node 0
> alloc kstat_irqs on node 0
> irq: irq 21 on host /interrupt-controller2 mapped to virtual irq 32
> /plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
> eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:99:88:77:66:56
> eth1: found Generic MII PHY (0x10)
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> alloc irq_desc for 33 on node 0
> alloc kstat_irqs on node 0
> irq: irq 29 on host /interrupt-controller2 mapped to virtual irq 33
> ppc-of-ehci 4bffd0400.ehci: OF EHCI
> ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
> ppc-of-ehci 4bffd0400.ehci: irq 33, io mem 0x4bffd0400
> ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
> usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> usb usb1: Product: OF EHCI
> usb usb1: Manufacturer: Linux 2.6.33 ehci_hcd
> usb usb1: SerialNumber: PPC-OF USB
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 1 port detected
> Initializing USB Mass Storage driver...
> usbcore: registered new interface driver usb-storage
> USB Mass Storage support registered.
> usbcore: registered new interface driver libusual
> i2c /dev entries driver
> alloc irq_desc for 34 on node 0
> alloc kstat_irqs on node 0
> irq: irq 2 on host /interrupt-controller0 mapped to virtual irq 34
> at24 0-0051: 65536 byte 24c512 EEPROM (writable)
> at24 0-0053: 256 byte spd EEPROM (read-only)
> ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
> alloc irq_desc for 35 on node 0
> alloc kstat_irqs on node 0
> irq: irq 3 on host /interrupt-controller0 mapped to virtual irq 35
> ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
> rtc-ds1307 5-0068: rtc core: registered ds1338 as rtc0
> rtc-ds1307 5-0068: 56 bytes nvram
> pca954x 1-0070: registered 8 virtual busses for I2C switch pca9548
> pca954x 2-0071: registered 8 virtual busses for I2C switch pca9548
> pca954x 3-0072: registered 8 virtual busses for I2C switch pca9548
> TCP cubic registered
> NET: Registered protocol family 17
> 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
> All bugs added by David S. Miller <davem@redhat.com>
> rtc-ds1307 5-0068: setting system clock to 2000-02-28 11:41:36 UTC (951738096)
> eth0: link is down
> IP-Config: Complete:
> device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=10.0.0.138,
> host=smbe460, domain=, nis-domain=(none),
> bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
> Looking up port of RPC 100003/2 on 10.0.0.10
> eth0: link is up, 100 FDX, pause enabled
> Looking up port of RPC 100005/1 on 10.0.0.10
> VFS: Mounted root (nfs filesystem) on device 0:13.
> Freeing unused kernel memory: 144k init
>
> # cat /proc/iomem
>
> 4bffd0400-4bffd048f : ehci_hcd
> 4cc000000-4cfffffff : 4cc000000.nor_flash
> 4e4000000-4e7ffffff : 4e4000000.nor_flash2
> 4ef600300-4ef600307 : serial
> 4ef600400-4ef600407 : serial
> 4ef600500-4ef600507 : serial
> 4ef600600-4ef600607 : serial
> d80000000-dffffffff : /plb/pci@c0ec00000
> d80000000-d89ffffff : PCI Bus 0000:01
> d80000000-d83ffffff : 0000:01:00.0
> d84000000-d87ffffff : 0000:01:00.0
> d88000000-d880fffff : 0000:01:00.0
> d88100000-d88103fff : 0000:01:00.0
>
> # cat /proc/ioports
>
> 00000000-0000ffff : /plb/pci@c0ec00000
> 00000000-00000fff : Legacy IO
^ permalink raw reply
* Re: [PATCH 25/37] drivers/infiniband: use .dev.of_node instead of .node in struct of_device
From: Roland Dreier @ 2010-03-11 19:57 UTC (permalink / raw)
To: Grant Likely
Cc: alsa-devel, broonie, linux-ide, James.Bottomley, linux-i2c,
sparclinux, jeremy.kerr, sfr, linux-scsi, jgarzik,
microblaze-uclinux, devicetree-discuss, Christoph Raisch,
ben-linux, monstr, linuxppc-dev, netdev, gregkh, linux-kernel,
akpm, dwmw2, davem
In-Reply-To: <20100311180605.4824.3613.stgit@angua>
Seems fine... adding EHCA guys just to make sure.
> .node is being removed
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> drivers/infiniband/hw/ehca/ehca_main.c | 11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
> index 129a6be..2639185 100644
> --- a/drivers/infiniband/hw/ehca/ehca_main.c
> +++ b/drivers/infiniband/hw/ehca/ehca_main.c
> @@ -291,8 +291,9 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
> };
>
> ehca_gen_dbg("Probing adapter %s...",
> - shca->ofdev->node->full_name);
> - loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
> + shca->ofdev->dev.of_node->full_name);
> + loc_code = of_get_property(shca->ofdev->dev.of_node, "ibm,loc-code",
> + NULL);
> if (loc_code)
> ehca_gen_dbg(" ... location lode=%s", loc_code);
>
> @@ -720,16 +721,16 @@ static int __devinit ehca_probe(struct of_device *dev,
> int ret, i, eq_size;
> unsigned long flags;
>
> - handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
> + handle = of_get_property(dev->dev.of_node, "ibm,hca-handle", NULL);
> if (!handle) {
> ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
> - dev->node->full_name);
> + dev->dev.of_node->full_name);
> return -ENODEV;
> }
>
> if (!(*handle)) {
> ehca_gen_err("Wrong eHCA handle for adapter: %s.",
> - dev->node->full_name);
> + dev->dev.of_node->full_name);
> return -ENODEV;
> }
>
>
> --
Roland Dreier <rolandd@cisco.com>
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
^ permalink raw reply
* Re: [PATCH 1/2] powerpc: Partition hibernation support
From: Nathan Fontenot @ 2010-03-11 19:59 UTC (permalink / raw)
To: Brian King; +Cc: linuxppc-dev
In-Reply-To: <201002240002.o1O02OBe031005@d03av05.boulder.ibm.com>
Brian King wrote:
> Enables support for HMC initiated partition hibernation. This is
> a firmware assisted hibernation, since the firmware handles writing
> the memory out to disk, along with other partition information,
> so we just mimic suspend to ram.
>
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
>
> arch/powerpc/Kconfig | 2
> arch/powerpc/include/asm/hvcall.h | 1
> arch/powerpc/include/asm/machdep.h | 1
> arch/powerpc/include/asm/rtas.h | 10 +
> arch/powerpc/kernel/rtas.c | 118 ++++++++++-----
> arch/powerpc/platforms/pseries/Makefile | 1
> arch/powerpc/platforms/pseries/hotplug-cpu.c | 6
> arch/powerpc/platforms/pseries/suspend.c | 209 +++++++++++++++++++++++++++
> 8 files changed, 312 insertions(+), 36 deletions(-)
>
> diff -puN /dev/null arch/powerpc/platforms/pseries/suspend.c
> --- /dev/null 2009-12-15 17:58:07.000000000 -0600
> +++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/suspend.c 2010-02-23 16:29:25.000000000 -0600
> @@ -0,0 +1,209 @@
-- snip --
> +
> +static SYSDEV_ATTR(hibernate, S_IWUSR, NULL, store_hibernate);
> +
> +static struct sysdev_class suspend_sysdev_class = {
> + .name = "power",
> +};
> +
> +static struct platform_suspend_ops pseries_suspend_ops = {
> + .valid = suspend_valid_only_mem,
> + .begin = pseries_suspend_begin,
> + .prepare_late = pseries_prepare_late,
> + .enter = pseries_suspend_enter,
> +};
> +
> +/**
> + * pseries_suspend_sysfs_register - Register with sysfs
> + *
> + * Return value:
> + * 0 on success / other on failure
> + **/
> +static int pseries_suspend_sysfs_register(struct sys_device *sysdev)
> +{
> + int rc;
> +
> + if ((rc = sysdev_class_register(&suspend_sysdev_class)))
> + return rc;
> +
> + sysdev->id = 0;
> + sysdev->cls = &suspend_sysdev_class;
> +
> + if ((rc = sysdev_register(sysdev)))
> + goto class_unregister;
> + if ((rc = sysdev_create_file(sysdev, &attr_hibernate)))
> + goto fail;
> +
Could you just do a sysdev_class_create_file(&suspend_sysdev_class, &attr_hibernate)
call to create the hibernate file instead of the sysdev_register() and
sysdev_create_file()? I think this may make it a bit nicer since the file created
will be /sys/devices/system/power/hibernate instead of
/sys/devices/system/power/power0/hibernate.
-Nathan
> + return 0;
> +
> +fail:
> + sysdev_unregister(sysdev);
> +class_unregister:
> + sysdev_class_unregister(&suspend_sysdev_class);
> + return rc;
> +}
> +
^ permalink raw reply
* Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
From: Mark Brown @ 2010-03-11 19:34 UTC (permalink / raw)
To: Grant Likely
Cc: alsa-devel, linux-ide, James.Bottomley, linux-i2c, sparclinux,
jeremy.kerr, sfr, linux-scsi, jgarzik, microblaze-uclinux,
devicetree-discuss, ben-linux, timur, lrg, monstr, linuxppc-dev,
netdev, gregkh, linux-kernel, akpm, dwmw2, davem
In-Reply-To: <20100311180649.4824.10368.stgit@angua>
On Thu, Mar 11, 2010 at 11:06:50AM -0700, Grant Likely wrote:
> .node is being removed
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
but please ensure that Liam and especially Timur also check this (both
CCed).
For enormous patch serieses like this it's really nice if you can ensure
that each person is only CCed on the patches that they need to review.
Much less stuff in the inbox.
> ---
>
> sound/soc/fsl/mpc8610_hpcd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
> index ef67d1c..d7e1b9a 100644
> --- a/sound/soc/fsl/mpc8610_hpcd.c
> +++ b/sound/soc/fsl/mpc8610_hpcd.c
> @@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
> static int mpc8610_hpcd_probe(struct of_device *ofdev,
> const struct of_device_id *match)
> {
> - struct device_node *np = ofdev->node;
> + struct device_node *np = ofdev->dev.of_node;
> struct device_node *codec_np = NULL;
> struct device_node *guts_np = NULL;
> struct device_node *dma_np = NULL;
>
^ permalink raw reply
* Re: [PATCH 21/37] drivers/ata: use .dev.of_node instead of .node in struct of_device
From: David Miller @ 2010-03-11 18:38 UTC (permalink / raw)
To: sshtylyov
Cc: alsa-devel, gregkh, linux-ide, James.Bottomley, linux-i2c,
sparclinux, jeremy.kerr, sfr, linux-scsi, jgarzik,
microblaze-uclinux, devicetree-discuss, ben-linux, monstr,
linuxppc-dev, netdev, broonie, linux-kernel, akpm, dwmw2
In-Reply-To: <4B9936F2.3020105@ru.mvista.com>
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Thu, 11 Mar 2010 21:31:14 +0300
> Should probably have been 2 patches instead of one, as drivers/ata/
> and drivers/ide/ are different subsystems...
No, he should consolidate these changes _MORE_ not less.
The patch set is already too large to review at it is!
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox