* RE: [PATCH/RFC] Booting Xilinx ML510 board using SystemACE
From: Alon Ziv @ 2009-11-19 12:57 UTC (permalink / raw)
To: Stephen Neuendorffer, linuxppc-dev; +Cc: John Linn
In-Reply-To: <56a3f016-525a-4eb2-9a0f-1477ea2eee91@VA3EHSMHS019.ehs.local>
Hi,
On Monday, November 16, 2009, Stephen wrote:
> There are at least two other ways that you might be able to reset a
> board:
> 1) Internally through the ICAP device.
> 2) Through a GPIO connected externally to the reset logic.
>=20
Unfortunately none of these is relevant for the specific board in
question (Xilinx ML510 reference system)...
> Probably it would be best to have a mechanism in the device tree which
> references the reset mechanism?
I am sorely lacking in expertise for this :(, and wouldn't even know
where to begin... Is it possible at all to add custom information into
the device tree? And even if yes--how will platform code bind to the
reset mechanism?
> [...] In any event, you probably don't want a driver to
> eplicitly reference the plaform code. If you want to do it explicitly
> like this, it would better to have the plaform code reference the
driver
> mechanism.
I don't see how this can be done: if the driver is to publish some
"driver_reset_system" function to the platform code, it needs _some_
mechanism for telling this fact to the system... And such a mechanism
won't look all that different from my callback, IMO (except it may be
slightly prettied up).
Of course, one obvious thing that must be done is move this code out of
arch/powerpc/platforms/44x/virtex.c and into (e.g.)
arch/powerpc/kernel/setup-common.c, and add some
"set_machine_restart_function" wrapper to access it more cleanly (also
defining this function as a null function when inapplicable). If this
satisfies your standards, I can easily post an updated patch :)
-az
*************************************************************************=
*********************
IMPORTANT: The contents of this email and any attachments are confidentia=
l. They are intended for the=20
named recipient(s) only.
If you have received this email in error, please notify the system manage=
r or the sender immediately and do=20
not disclose the contents to anyone or make copies thereof.
^ permalink raw reply
* RE: Bug in drivers/serial/of_serial.c?
From: Alon Ziv @ 2009-11-19 12:47 UTC (permalink / raw)
To: Arnd Bergmann, linuxppc-dev
In-Reply-To: <200911160909.08433.arnd@arndb.de>
Hi,
On Monday, November 16, 2009, Arnd wrote:
> > - { .type =3D "serial", .compatible =3D "ns16550", .data =3D (=
void
*)PORT_16550, },
> > + { .type =3D "serial", .compatible =3D "ns16550", .data =3D (=
void
*)PORT_16550A, },
>=20
> Does not seem logical. If the device claims compatibility with
ns16550, we should
> not automatically assume it's an ns16550a. Why not add another line
for=20
>=20
Unfortunately, there is no way to change what the device claims--it's
encoded into the OpenFirmware tree by the EDK tools.
And, in any case, the device is actually not lying: it _is_ compatible
with NS16550--just with a non-buggy one. Unfortunately the kernel
driver for 8250-class UARTs makes the conservative choice to assume any
16550 is one of the (early, buggy) revisions where the FIFO was
non-functional; any 16550 with working UART is classed as a 16550A.
-az
*************************************************************************=
*********************
IMPORTANT: The contents of this email and any attachments are confidentia=
l. They are intended for the=20
named recipient(s) only.
If you have received this email in error, please notify the system manage=
r or the sender immediately and do=20
not disclose the contents to anyone or make copies thereof.
^ permalink raw reply
* [patch] powerpc: Fixup last users of irq_chip->typename - V2
From: Thomas Gleixner @ 2009-11-19 9:44 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, Ingo Molnar, LKML
In-Reply-To: <alpine.LFD.2.00.0911182141060.24119@localhost.localdomain>
The typename member of struct irq_chip was kept for migration purposes
and is obsolete since more than 2 years. Fix up the leftovers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
---
arch/powerpc/kernel/irq.c | 6 +++---
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 2 +-
arch/powerpc/platforms/52xx/media5200.c | 2 +-
arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +-
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 8 ++++----
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 1 -
arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +-
arch/powerpc/platforms/86xx/gef_pic.c | 2 +-
arch/powerpc/platforms/cell/axon_msi.c | 2 +-
arch/powerpc/platforms/cell/beat_interrupt.c | 2 +-
arch/powerpc/platforms/cell/interrupt.c | 4 ++--
arch/powerpc/platforms/cell/spider-pic.c | 2 +-
arch/powerpc/platforms/iseries/irq.c | 2 +-
arch/powerpc/platforms/powermac/pic.c | 2 +-
arch/powerpc/platforms/ps3/interrupt.c | 2 +-
arch/powerpc/platforms/pseries/xics.c | 4 ++--
arch/powerpc/sysdev/cpm1.c | 2 +-
arch/powerpc/sysdev/cpm2_pic.c | 2 +-
arch/powerpc/sysdev/fsl_msi.c | 2 +-
arch/powerpc/sysdev/i8259.c | 2 +-
arch/powerpc/sysdev/ipic.c | 4 ++--
arch/powerpc/sysdev/mpc8xx_pic.c | 2 +-
arch/powerpc/sysdev/mpic.c | 6 +++---
arch/powerpc/sysdev/mpic_pasemi_msi.c | 2 +-
arch/powerpc/sysdev/mpic_u3msi.c | 2 +-
arch/powerpc/sysdev/qe_lib/qe_ic.c | 2 +-
arch/powerpc/sysdev/tsi108_pci.c | 2 +-
arch/powerpc/sysdev/uic.c | 2 +-
arch/powerpc/sysdev/xilinx_intc.c | 4 ++--
29 files changed, 39 insertions(+), 40 deletions(-)
Index: linux-2.6-tip/arch/powerpc/kernel/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6-tip/arch/powerpc/kernel/irq.c
@@ -203,7 +203,7 @@ int show_interrupts(struct seq_file *p,
seq_printf(p, "%10u ", kstat_irqs(i));
#endif /* CONFIG_SMP */
if (desc->chip)
- seq_printf(p, " %s ", desc->chip->typename);
+ seq_printf(p, " %s ", desc->chip->name);
else
seq_puts(p, " None ");
seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge ");
@@ -1071,8 +1071,8 @@ static int virq_debug_show(struct seq_fi
seq_printf(m, "%5d ", i);
seq_printf(m, "0x%05lx ", virq_to_hw(i));
- if (desc->chip && desc->chip->typename)
- p = desc->chip->typename;
+ if (desc->chip && desc->chip->name)
+ p = desc->chip->name;
else
p = none;
seq_printf(m, "%-15s ", p);
Index: linux-2.6-tip/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
+++ linux-2.6-tip/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -79,7 +79,7 @@ cpld_unmask_irq(unsigned int irq)
}
static struct irq_chip cpld_pic = {
- .typename = " CPLD PIC ",
+ .name = " CPLD PIC ",
.mask = cpld_mask_irq,
.ack = cpld_mask_irq,
.unmask = cpld_unmask_irq,
Index: linux-2.6-tip/arch/powerpc/platforms/52xx/media5200.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/52xx/media5200.c
+++ linux-2.6-tip/arch/powerpc/platforms/52xx/media5200.c
@@ -74,7 +74,7 @@ static void media5200_irq_mask(unsigned
}
static struct irq_chip media5200_irq_chip = {
- .typename = "Media5200 FPGA",
+ .name = "Media5200 FPGA",
.unmask = media5200_irq_unmask,
.mask = media5200_irq_mask,
.mask_ack = media5200_irq_mask,
Index: linux-2.6-tip/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ linux-2.6-tip/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -149,7 +149,7 @@ static int mpc52xx_gpt_irq_set_type(unsi
}
static struct irq_chip mpc52xx_gpt_irq_chip = {
- .typename = "MPC52xx GPT",
+ .name = "MPC52xx GPT",
.unmask = mpc52xx_gpt_irq_unmask,
.mask = mpc52xx_gpt_irq_mask,
.ack = mpc52xx_gpt_irq_ack,
Index: linux-2.6-tip/arch/powerpc/platforms/52xx/mpc52xx_pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -220,7 +220,7 @@ static int mpc52xx_extirq_set_type(unsig
}
static struct irq_chip mpc52xx_extirq_irqchip = {
- .typename = "MPC52xx External",
+ .name = "MPC52xx External",
.mask = mpc52xx_extirq_mask,
.unmask = mpc52xx_extirq_unmask,
.ack = mpc52xx_extirq_ack,
@@ -258,7 +258,7 @@ static void mpc52xx_main_unmask(unsigned
}
static struct irq_chip mpc52xx_main_irqchip = {
- .typename = "MPC52xx Main",
+ .name = "MPC52xx Main",
.mask = mpc52xx_main_mask,
.mask_ack = mpc52xx_main_mask,
.unmask = mpc52xx_main_unmask,
@@ -291,7 +291,7 @@ static void mpc52xx_periph_unmask(unsign
}
static struct irq_chip mpc52xx_periph_irqchip = {
- .typename = "MPC52xx Peripherals",
+ .name = "MPC52xx Peripherals",
.mask = mpc52xx_periph_mask,
.mask_ack = mpc52xx_periph_mask,
.unmask = mpc52xx_periph_unmask,
@@ -335,7 +335,7 @@ static void mpc52xx_sdma_ack(unsigned in
}
static struct irq_chip mpc52xx_sdma_irqchip = {
- .typename = "MPC52xx SDMA",
+ .name = "MPC52xx SDMA",
.mask = mpc52xx_sdma_mask,
.unmask = mpc52xx_sdma_unmask,
.ack = mpc52xx_sdma_ack,
Index: linux-2.6-tip/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
@@ -69,7 +69,6 @@ static void pq2ads_pci_unmask_irq(unsign
}
static struct irq_chip pq2ads_pci_ic = {
- .typename = "PQ2 ADS PCI",
.name = "PQ2 ADS PCI",
.end = pq2ads_pci_unmask_irq,
.mask = pq2ads_pci_mask_irq,
Index: linux-2.6-tip/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
@@ -232,7 +232,7 @@ static int socrates_fpga_pic_set_type(un
}
static struct irq_chip socrates_fpga_pic_chip = {
- .typename = " FPGA-PIC ",
+ .name = " FPGA-PIC ",
.ack = socrates_fpga_pic_ack,
.mask = socrates_fpga_pic_mask,
.mask_ack = socrates_fpga_pic_mask_ack,
Index: linux-2.6-tip/arch/powerpc/platforms/86xx/gef_pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/86xx/gef_pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/86xx/gef_pic.c
@@ -149,7 +149,7 @@ static void gef_pic_unmask(unsigned int
}
static struct irq_chip gef_pic_chip = {
- .typename = "gefp",
+ .name = "gefp",
.mask = gef_pic_mask,
.mask_ack = gef_pic_mask_ack,
.unmask = gef_pic_unmask,
Index: linux-2.6-tip/arch/powerpc/platforms/cell/axon_msi.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/cell/axon_msi.c
+++ linux-2.6-tip/arch/powerpc/platforms/cell/axon_msi.c
@@ -312,7 +312,7 @@ static struct irq_chip msic_irq_chip = {
.mask = mask_msi_irq,
.unmask = unmask_msi_irq,
.shutdown = unmask_msi_irq,
- .typename = "AXON-MSI",
+ .name = "AXON-MSI",
};
static int msic_host_map(struct irq_host *h, unsigned int virq,
Index: linux-2.6-tip/arch/powerpc/platforms/cell/beat_interrupt.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/cell/beat_interrupt.c
+++ linux-2.6-tip/arch/powerpc/platforms/cell/beat_interrupt.c
@@ -110,7 +110,7 @@ static void beatic_end_irq(unsigned int
}
static struct irq_chip beatic_pic = {
- .typename = " CELL-BEAT ",
+ .name = " CELL-BEAT ",
.unmask = beatic_unmask_irq,
.mask = beatic_mask_irq,
.eoi = beatic_end_irq,
Index: linux-2.6-tip/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/cell/interrupt.c
+++ linux-2.6-tip/arch/powerpc/platforms/cell/interrupt.c
@@ -88,7 +88,7 @@ static void iic_eoi(unsigned int irq)
}
static struct irq_chip iic_chip = {
- .typename = " CELL-IIC ",
+ .name = " CELL-IIC ",
.mask = iic_mask,
.unmask = iic_unmask,
.eoi = iic_eoi,
@@ -133,7 +133,7 @@ static void iic_ioexc_cascade(unsigned i
static struct irq_chip iic_ioexc_chip = {
- .typename = " CELL-IOEX",
+ .name = " CELL-IOEX",
.mask = iic_mask,
.unmask = iic_unmask,
.eoi = iic_ioexc_eoi,
Index: linux-2.6-tip/arch/powerpc/platforms/cell/spider-pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/cell/spider-pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/cell/spider-pic.c
@@ -168,7 +168,7 @@ static int spider_set_irq_type(unsigned
}
static struct irq_chip spider_pic = {
- .typename = " SPIDER ",
+ .name = " SPIDER ",
.unmask = spider_unmask_irq,
.mask = spider_mask_irq,
.ack = spider_ack_irq,
Index: linux-2.6-tip/arch/powerpc/platforms/iseries/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/iseries/irq.c
+++ linux-2.6-tip/arch/powerpc/platforms/iseries/irq.c
@@ -273,7 +273,7 @@ static void iseries_end_IRQ(unsigned int
}
static struct irq_chip iseries_pic = {
- .typename = "iSeries irq controller",
+ .name = "iSeries irq controller",
.startup = iseries_startup_IRQ,
.shutdown = iseries_shutdown_IRQ,
.unmask = iseries_enable_IRQ,
Index: linux-2.6-tip/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/powermac/pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/powermac/pic.c
@@ -195,7 +195,7 @@ static int pmac_retrigger(unsigned int v
}
static struct irq_chip pmac_pic = {
- .typename = " PMAC-PIC ",
+ .name = " PMAC-PIC ",
.startup = pmac_startup_irq,
.mask = pmac_mask_irq,
.ack = pmac_ack_irq,
Index: linux-2.6-tip/arch/powerpc/platforms/ps3/interrupt.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/ps3/interrupt.c
+++ linux-2.6-tip/arch/powerpc/platforms/ps3/interrupt.c
@@ -152,7 +152,7 @@ static void ps3_chip_eoi(unsigned int vi
*/
static struct irq_chip ps3_irq_chip = {
- .typename = "ps3",
+ .name = "ps3",
.mask = ps3_chip_mask,
.unmask = ps3_chip_unmask,
.eoi = ps3_chip_eoi,
Index: linux-2.6-tip/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/pseries/xics.c
+++ linux-2.6-tip/arch/powerpc/platforms/pseries/xics.c
@@ -388,7 +388,7 @@ static int xics_set_affinity(unsigned in
}
static struct irq_chip xics_pic_direct = {
- .typename = " XICS ",
+ .name = " XICS ",
.startup = xics_startup,
.mask = xics_mask_irq,
.unmask = xics_unmask_irq,
@@ -397,7 +397,7 @@ static struct irq_chip xics_pic_direct =
};
static struct irq_chip xics_pic_lpar = {
- .typename = " XICS ",
+ .name = " XICS ",
.startup = xics_startup,
.mask = xics_mask_irq,
.unmask = xics_unmask_irq,
Index: linux-2.6-tip/arch/powerpc/sysdev/cpm1.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/cpm1.c
+++ linux-2.6-tip/arch/powerpc/sysdev/cpm1.c
@@ -77,7 +77,7 @@ static void cpm_end_irq(unsigned int irq
}
static struct irq_chip cpm_pic = {
- .typename = " CPM PIC ",
+ .name = " CPM PIC ",
.mask = cpm_mask_irq,
.unmask = cpm_unmask_irq,
.eoi = cpm_end_irq,
Index: linux-2.6-tip/arch/powerpc/sysdev/cpm2_pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/cpm2_pic.c
+++ linux-2.6-tip/arch/powerpc/sysdev/cpm2_pic.c
@@ -182,7 +182,7 @@ static int cpm2_set_irq_type(unsigned in
}
static struct irq_chip cpm2_pic = {
- .typename = " CPM2 SIU ",
+ .name = " CPM2 SIU ",
.mask = cpm2_mask_irq,
.unmask = cpm2_unmask_irq,
.ack = cpm2_ack,
Index: linux-2.6-tip/arch/powerpc/sysdev/fsl_msi.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/fsl_msi.c
+++ linux-2.6-tip/arch/powerpc/sysdev/fsl_msi.c
@@ -47,7 +47,7 @@ static struct irq_chip fsl_msi_chip = {
.mask = mask_msi_irq,
.unmask = unmask_msi_irq,
.ack = fsl_msi_end_irq,
- .typename = " FSL-MSI ",
+ .name = " FSL-MSI ",
};
static int fsl_msi_host_map(struct irq_host *h, unsigned int virq,
Index: linux-2.6-tip/arch/powerpc/sysdev/i8259.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/i8259.c
+++ linux-2.6-tip/arch/powerpc/sysdev/i8259.c
@@ -135,7 +135,7 @@ static void i8259_unmask_irq(unsigned in
}
static struct irq_chip i8259_pic = {
- .typename = " i8259 ",
+ .name = " i8259 ",
.mask = i8259_mask_irq,
.disable = i8259_mask_irq,
.unmask = i8259_unmask_irq,
Index: linux-2.6-tip/arch/powerpc/sysdev/ipic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/ipic.c
+++ linux-2.6-tip/arch/powerpc/sysdev/ipic.c
@@ -660,7 +660,7 @@ static int ipic_set_irq_type(unsigned in
/* level interrupts and edge interrupts have different ack operations */
static struct irq_chip ipic_level_irq_chip = {
- .typename = " IPIC ",
+ .name = " IPIC ",
.unmask = ipic_unmask_irq,
.mask = ipic_mask_irq,
.mask_ack = ipic_mask_irq,
@@ -668,7 +668,7 @@ static struct irq_chip ipic_level_irq_ch
};
static struct irq_chip ipic_edge_irq_chip = {
- .typename = " IPIC ",
+ .name = " IPIC ",
.unmask = ipic_unmask_irq,
.mask = ipic_mask_irq,
.mask_ack = ipic_mask_irq_and_ack,
Index: linux-2.6-tip/arch/powerpc/sysdev/mpc8xx_pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/mpc8xx_pic.c
+++ linux-2.6-tip/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -94,7 +94,7 @@ static int mpc8xx_set_irq_type(unsigned
}
static struct irq_chip mpc8xx_pic = {
- .typename = " MPC8XX SIU ",
+ .name = " MPC8XX SIU ",
.unmask = mpc8xx_unmask_irq,
.mask = mpc8xx_mask_irq,
.ack = mpc8xx_ack,
Index: linux-2.6-tip/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/mpic.c
+++ linux-2.6-tip/arch/powerpc/sysdev/mpic.c
@@ -1062,19 +1062,19 @@ struct mpic * __init mpic_alloc(struct d
mpic->name = name;
mpic->hc_irq = mpic_irq_chip;
- mpic->hc_irq.typename = name;
+ mpic->hc_irq.name = name;
if (flags & MPIC_PRIMARY)
mpic->hc_irq.set_affinity = mpic_set_affinity;
#ifdef CONFIG_MPIC_U3_HT_IRQS
mpic->hc_ht_irq = mpic_irq_ht_chip;
- mpic->hc_ht_irq.typename = name;
+ mpic->hc_ht_irq.name = name;
if (flags & MPIC_PRIMARY)
mpic->hc_ht_irq.set_affinity = mpic_set_affinity;
#endif /* CONFIG_MPIC_U3_HT_IRQS */
#ifdef CONFIG_SMP
mpic->hc_ipi = mpic_ipi_chip;
- mpic->hc_ipi.typename = name;
+ mpic->hc_ipi.name = name;
#endif /* CONFIG_SMP */
mpic->flags = flags;
Index: linux-2.6-tip/arch/powerpc/sysdev/mpic_pasemi_msi.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/mpic_pasemi_msi.c
+++ linux-2.6-tip/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -60,7 +60,7 @@ static struct irq_chip mpic_pasemi_msi_c
.eoi = mpic_end_irq,
.set_type = mpic_set_irq_type,
.set_affinity = mpic_set_affinity,
- .typename = "PASEMI-MSI ",
+ .name = "PASEMI-MSI ",
};
static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)
Index: linux-2.6-tip/arch/powerpc/sysdev/mpic_u3msi.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/mpic_u3msi.c
+++ linux-2.6-tip/arch/powerpc/sysdev/mpic_u3msi.c
@@ -42,7 +42,7 @@ static struct irq_chip mpic_u3msi_chip =
.eoi = mpic_end_irq,
.set_type = mpic_set_irq_type,
.set_affinity = mpic_set_affinity,
- .typename = "MPIC-U3MSI",
+ .name = "MPIC-U3MSI",
};
static u64 read_ht_magic_addr(struct pci_dev *pdev, unsigned int pos)
Index: linux-2.6-tip/arch/powerpc/sysdev/qe_lib/qe_ic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ linux-2.6-tip/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -237,7 +237,7 @@ static void qe_ic_mask_irq(unsigned int
}
static struct irq_chip qe_ic_irq_chip = {
- .typename = " QEIC ",
+ .name = " QEIC ",
.unmask = qe_ic_unmask_irq,
.mask = qe_ic_mask_irq,
.mask_ack = qe_ic_mask_irq,
Index: linux-2.6-tip/arch/powerpc/sysdev/tsi108_pci.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/tsi108_pci.c
+++ linux-2.6-tip/arch/powerpc/sysdev/tsi108_pci.c
@@ -376,7 +376,7 @@ static void tsi108_pci_irq_end(u_int irq
*/
static struct irq_chip tsi108_pci_irq = {
- .typename = "tsi108_PCI_int",
+ .name = "tsi108_PCI_int",
.mask = tsi108_pci_irq_disable,
.ack = tsi108_pci_irq_ack,
.end = tsi108_pci_irq_end,
Index: linux-2.6-tip/arch/powerpc/sysdev/uic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/uic.c
+++ linux-2.6-tip/arch/powerpc/sysdev/uic.c
@@ -177,7 +177,7 @@ static int uic_set_irq_type(unsigned int
}
static struct irq_chip uic_irq_chip = {
- .typename = " UIC ",
+ .name = " UIC ",
.unmask = uic_unmask_irq,
.mask = uic_mask_irq,
.mask_ack = uic_mask_ack_irq,
Index: linux-2.6-tip/arch/powerpc/sysdev/xilinx_intc.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/sysdev/xilinx_intc.c
+++ linux-2.6-tip/arch/powerpc/sysdev/xilinx_intc.c
@@ -106,7 +106,7 @@ static void xilinx_intc_level_unmask(uns
}
static struct irq_chip xilinx_intc_level_irqchip = {
- .typename = "Xilinx Level INTC",
+ .name = "Xilinx Level INTC",
.mask = xilinx_intc_mask,
.mask_ack = xilinx_intc_mask,
.unmask = xilinx_intc_level_unmask,
@@ -133,7 +133,7 @@ static void xilinx_intc_edge_ack(unsigne
}
static struct irq_chip xilinx_intc_edge_irqchip = {
- .typename = "Xilinx Edge INTC",
+ .name = "Xilinx Edge INTC",
.mask = xilinx_intc_mask,
.unmask = xilinx_intc_edge_unmask,
.ack = xilinx_intc_edge_ack,
^ permalink raw reply
* watchdog exception on 8548CDS during cpu_idle
From: Ming Lei @ 2009-11-18 23:53 UTC (permalink / raw)
To: linuxppc-dev@lists.ozlabs.org
I used the vanilla linux 2.6.30 and compiled with mpc85xx_defconfig(enable =
CONFIG_BOOK_WDT) and then ran on 8548CDS and soon after I saw the prompt I =
hit this watchdog.
=20
bash-2.04# PowerPC Book-E Watchdog Exception
NIP: c000b740 LR: c00088dc CTR: c000b6b0
REGS: cfffbf10 TRAP: 3202 Not tainted (2.6.30)
MSR: 00029000 <EE,ME,CE> CR: 28028048 XER: 20000000
TASK =3D c04f4458[0] 'swapper' THREAD: c052c000
GPR00: c000b6b0 c052df90 c04f4458 00800000 80804080 0000001d c053af48 00069=
000=20
GPR08: ffffffff 00000000 08954400 00000000 002167ee 7f652f31 0ffad800 0fff0=
000=20
GPR16: 00000000 00000000 00000000 00000000 00000000 f30a620b 0ff50450 00000=
000=20
GPR24: 00000000 00000000 c053506c c0534fa0 c0534fa0 c052c034 00000008 c052c=
000=20
NIP [c000b740] e500_idle+0x90/0x94
LR [c00088dc] cpu_idle+0x98/0xec
Call Trace:
[c052df90] [c000889c] cpu_idle+0x58/0xec (unreliable)
[c052dfb0] [c00023ec] rest_init+0x5c/0x70
[c052dfc0] [c04c16f4] start_kernel+0x22c/0x290
[c052dff0] [c0000398] skpinv+0x2b0/0x2ec
Instruction dump:
7c90faa6 548402ce 7c841b78 4c00012c 7c90fba6 4c00012c 7ce000a6 64e70004=20
60e78000 7c0004ac 7ce00124 4c00012c <48000000> 812b00a0 912b0090 39600000=20
Have anyone seen this before? Why the EE bit is on in the stack trace? I pu=
t show_regs in watchdog exception handler in traps.c. I verified that EE is=
off when entering the watchdog exception handler. Can I trust this stack t=
race?
Thanks
Ming
^ permalink raw reply
* Re: spi_mpc8xxx.c: chip select polarity problem
From: Anton Vorontsov @ 2009-11-18 23:29 UTC (permalink / raw)
To: Torsten Fleischer; +Cc: linuxppc-dev
In-Reply-To: <200911181720.06390.to-fleischer@t-online.de>
On Wed, Nov 18, 2009 at 05:20:06PM +0100, Torsten Fleischer wrote:
[...]
> > Oh. On the other hand, we can postpone the gpio_direction_output()
> > call, and still require that the platform code (or firmware)
> > should be responsible for setting a sane default values on the
> > chip selects.
> >
>
> How about that?
Looks great, thanks!
Few minor issues below.
> diff -u -r -N linux-2.6.31.6_orig//drivers/spi/spi_mpc8xxx.c linux-2.6.31.6/drivers/spi/spi_mpc8xxx.c
> --- linux-2.6.31.6_orig//drivers/spi/spi_mpc8xxx.c 2009-11-10 01:32:31.000000000 +0100
> +++ linux-2.6.31.6/drivers/spi/spi_mpc8xxx.c 2009-11-18 10:47:06.000000000 +0100
> @@ -114,6 +114,7 @@
> u32 rx_shift; /* RX data reg shift when in qe mode */
> u32 tx_shift; /* TX data reg shift when in qe mode */
> u32 hw_mode; /* Holds HW mode register settings */
> + int initialized;
> };
>
> static inline void mpc8xxx_spi_write_reg(__be32 __iomem *reg, u32 val)
> @@ -437,6 +438,7 @@
> cs = kzalloc(sizeof *cs, GFP_KERNEL);
> if (!cs)
> return -ENOMEM;
> + cs->initialized = 0;
No need for this, we allocated cs with kzalloc, which zeroes
the memory anyway.
> spi->controller_state = cs;
> }
> mpc8xxx_spi = spi_master_get_devdata(spi->master);
> @@ -503,15 +505,25 @@
>
> return ret;
> }
> +
> +static void mpc8xxx_spi_cs_init(struct spi_device *spi);
> +
> +
Whenever possible, please avoid forward declarations.
> static int mpc8xxx_spi_transfer(struct spi_device *spi,
> struct spi_message *m)
> {
> struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
> + struct spi_mpc8xxx_cs *cs = spi->controller_state;
> unsigned long flags;
>
> m->actual_length = 0;
> m->status = -EINPROGRESS;
>
> + if (cs && !cs->initialized) {
> + mpc8xxx_spi_cs_init(spi);
> + cs->initialized = 1;
> + }
> +
> spin_lock_irqsave(&mpc8xxx_spi->lock, flags);
> list_add_tail(&m->queue, &mpc8xxx_spi->queue);
> queue_work(mpc8xxx_spi->workqueue, &mpc8xxx_spi->work);
> @@ -671,6 +683,17 @@
> gpio_set_value(gpio, on ^ alow);
> }
>
> +static void mpc8xxx_spi_cs_init(struct spi_device *spi)
> +{
> + struct device *dev = spi->dev.parent;
> + struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data);
> + u16 cs = spi->chip_select;
> + int gpio = pinfo->gpios[cs];
> + bool on = (pinfo->alow_flags[cs] ^ !(spi->mode & SPI_CS_HIGH));
The outermost parenthesis aren't needed.
> +
> + gpio_direction_output(gpio, on);
gpio_direction_output() may fail, so spi_cs_init too.
I'd write it as 'return gpio_direction_outpit(..)', and in
mpc8xxx_spi_transfer something like this:
if (cs && !cs->initialized) {
int ret;
ret = mpc8xxx_spi_cs_init(spi);
if (ret) {
dev_dbg(&spi->dev, "cs_init failed: %d\n", ret);
return ret;
}
cs->initialized = 1;
}
Thanks!
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: [PATCH 00/10] Fix 8xx MMU/TLB
From: Joakim Tjernlund @ 2009-11-18 23:05 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org, Rex Feany
In-Reply-To: <4B046E02.9030606@freescale.com>
Scott Wood <scottwood@freescale.com> wrote on 18/11/2009 22:58:26:
>
> Joakim Tjernlund wrote:
> > Yeah, those are the ones that will trigger a dcbX TLB fault,
> > copy_tofrom_user would be my guess. Perhaps I missed something
> > in the conversions? That is, maybe some of these routines are plain wrong now for
> > 8xx due to some other bug?
> > A small test program in user space doing some dcbX insn could shed some light?
>
> Sorry, it looks like the rlwimi instruction I gave you was bad.
>
> It should be:
> rlwimi r11, r10, 12, 0xffc
> instead of:
> rlwimi r11, r10, 22, 0xffc
ah, great. You have no issues now?
I will fix and resubmit in a day or so.
Rex, were did you go? I have not heard from you for quite some time.
Jocke
^ permalink raw reply
* Re: [PATCH 00/10] Fix 8xx MMU/TLB
From: Scott Wood @ 2009-11-18 21:58 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linuxppc-dev@ozlabs.org, Rex Feany
In-Reply-To: <OFD94AE350.813F1695-ONC1257672.007719B8-C1257672.00778BD4@transmode.se>
Joakim Tjernlund wrote:
> Yeah, those are the ones that will trigger a dcbX TLB fault,
> copy_tofrom_user would be my guess. Perhaps I missed something
> in the conversions? That is, maybe some of these routines are plain wrong now for
> 8xx due to some other bug?
> A small test program in user space doing some dcbX insn could shed some light?
Sorry, it looks like the rlwimi instruction I gave you was bad.
It should be:
rlwimi r11, r10, 12, 0xffc
instead of:
rlwimi r11, r10, 22, 0xffc
-Scott
^ permalink raw reply
* Re: [PATCH 0/3] powerpc: Add support for FIT uImages
From: Peter Tyser @ 2009-11-18 21:51 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-kbuild
In-Reply-To: <1258577834-26006-1-git-send-email-ptyser@xes-inc.com>
On Wed, 2009-11-18 at 14:57 -0600, Peter Tyser wrote:
> These patches add support for creating the "new" FIT uImage type
> that U-Boot can use. Additional info about FIT images can be
> found in the doc/uImage.FIT/ directory of the U-Boot source.
> Here's a link to a howto which gives an overview of the format:
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=doc/uImage.FIT/howto.txt;h=8065e9e1d8d4d65a9b5fe0fce08d3709183d0ee4;hb=HEAD
>
> I've only added support for PowerPC, but the arm, avr32, blackfin,
> and sh arches could use the same framework in theory. The change
> is especially useful on PowerPC since it creates 1 FIT uImage that
> combines the functionality of an "old" uImage format, a device
> tree blob, and possibly a ramdisk.
>
> Peter Tyser (3):
> powerpc: Use scripts/mkuboot.sh instead of 'mkimage'
> powerpc: Add support for creating FIT uImages
> powerpc: Add support for ram filesystems in FIT uImages
>
> arch/powerpc/Makefile | 4 +-
> arch/powerpc/boot/.gitignore | 1 +
> arch/powerpc/boot/Makefile | 8 ++-
> arch/powerpc/boot/wrapper | 39 ++++++++++--
> scripts/mkits.sh | 144 ++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 189 insertions(+), 7 deletions(-)
> create mode 100755 scripts/mkits.sh
Just realized I missed /Documentation/powerpc/bootwrapper.txt in this
series. I'll wait for feedback and roll the documentation update and
any other requested changes into v2.
Sorry for the noise,
Peter
^ permalink raw reply
* Re: [PATCH 00/10] Fix 8xx MMU/TLB
From: Joakim Tjernlund @ 2009-11-18 21:45 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org, Rex Feany
In-Reply-To: <4B046248.7060101@freescale.com>
Scott Wood <scottwood@freescale.com> wrote on 18/11/2009 22:08:24:
>
> Joakim Tjernlund wrote:
> > Scott Wood <scottwood@freescale.com> wrote on 17/11/2009 01:40:11:
> >> No... I only meant that the ITLB pinning got rid of the boot hang.
> >>
> >> When I mentioned the EFAULTs before you said, "No surprise as the it
> >> seems like the DAR decoding is broken." I thought you meant you'd found
> >> a bug and fixed it in this respin.
> >
> > Oh, there seems to be a misunderstanding here :)
> > Lets go back a bit, you said some time ago:
> > /Quote
> >>> +3: lwz r11, 0(r11) /* Get the level 1 entry */
> >>> DO_8xx_CPU6(0x3b80, r3)
> >>> mtspr SPRN_MD_TWC, r11 /* Load pte table base address */
> >>> mfspr r11, SPRN_MD_TWC /* ....and get the pte address */
> >>> lwz r11, 0(r11) /* Get the pte */
> >>> /* concat physical page address(r11) and page offset(r10) */
> >>> rlwimi r11, r10, 0, 20, 31
> >> But r10 here contains SRR0 from above, and this is a data TLB error.
> >
> > Never mind that last one, forgot that you'd be wanting to load the
> > instruction. :-P
> >
> > But the rlwimi is what's causing the machine checks. I replaced it with:
> > rlwinm r11, r11, 0, 0x3ffff000
> > rlwimi r11, r10, 22, 0xffc
> >
> > and things seem to work. You could probably replace the rlwinm by
> > subtracting PAGE_OFFSET from swapper_pg_dir instead.
> > /End Quote
> >
> > I read this as now everything is working, but I guess I misunderstood?
> > You still have EFAULT here?
>
> Ah, that one -- I don't recall whether it was fully working back then, or
> whether I just didn't notice the EFAULTs and was commenting more on the machine
> checks going away.
>
> In the current patchset, it's "8xx: start using dcbX instructions in various
Yeah, those are the ones that will trigger a dcbX TLB fault,
copy_tofrom_user would be my guess. Perhaps I missed something
in the conversions? That is, maybe some of these routines are plain wrong now for
8xx due to some other bug?
A small test program in user space doing some dcbX insn could shed some light?
^ permalink raw reply
* Re: [PATCH 00/10] Fix 8xx MMU/TLB
From: Scott Wood @ 2009-11-18 21:08 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linuxppc-dev@ozlabs.org, Rex Feany
In-Reply-To: <OF735CB2F5.65B4E3F3-ONC1257671.002BB41C-C1257671.002C5E4F@transmode.se>
Joakim Tjernlund wrote:
> Scott Wood <scottwood@freescale.com> wrote on 17/11/2009 01:40:11:
>> No... I only meant that the ITLB pinning got rid of the boot hang.
>>
>> When I mentioned the EFAULTs before you said, "No surprise as the it
>> seems like the DAR decoding is broken." I thought you meant you'd found
>> a bug and fixed it in this respin.
>
> Oh, there seems to be a misunderstanding here :)
> Lets go back a bit, you said some time ago:
> /Quote
>>> +3: lwz r11, 0(r11) /* Get the level 1 entry */
>>> DO_8xx_CPU6(0x3b80, r3)
>>> mtspr SPRN_MD_TWC, r11 /* Load pte table base address */
>>> mfspr r11, SPRN_MD_TWC /* ....and get the pte address */
>>> lwz r11, 0(r11) /* Get the pte */
>>> /* concat physical page address(r11) and page offset(r10) */
>>> rlwimi r11, r10, 0, 20, 31
>> But r10 here contains SRR0 from above, and this is a data TLB error.
>
> Never mind that last one, forgot that you'd be wanting to load the
> instruction. :-P
>
> But the rlwimi is what's causing the machine checks. I replaced it with:
> rlwinm r11, r11, 0, 0x3ffff000
> rlwimi r11, r10, 22, 0xffc
>
> and things seem to work. You could probably replace the rlwinm by
> subtracting PAGE_OFFSET from swapper_pg_dir instead.
> /End Quote
>
> I read this as now everything is working, but I guess I misunderstood?
> You still have EFAULT here?
Ah, that one -- I don't recall whether it was fully working back then, or
whether I just didn't notice the EFAULTs and was commenting more on the machine
checks going away.
In the current patchset, it's "8xx: start using dcbX instructions in various
copy routines" that introduces the problem.
-Scott
^ permalink raw reply
* [PATCH 2/3] powerpc: Add support for creating FIT uImages
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild
In-Reply-To: <1258577834-26006-1-git-send-email-ptyser@xes-inc.com>
Recent U-Boot versions support booting a Flattened Image Tree (FIT)
image format. The FIT uImage format uses a tree structure to describe a
kernel image as well as supporting device tree blobs, ramdisks, etc.
The 'mkimage' and 'dtc' utilities convert this tree description into a
binary blob that bootloaders such as U-Boot can execute.
This patch adds support for automatically creating a U-Boot FIT image
using the "make uImage.fit.<boardname>" command where <boardname> is
one of arch/powerpc/boot/dts/<boardname>.dts. The resulting
arch/powerpc/boot/uImage.fit.<boardname> file will contain a kernel
image as well as a device tree blob. U-Boot versions compiled with FIT
support can directly boot this image using the "bootm" command.
Additional information about the FIT format and its uses can be found in
doc/uImage.FIT/howto.txt of U-Boot's source tree.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
arch/powerpc/Makefile | 4 +-
arch/powerpc/boot/.gitignore | 1 +
arch/powerpc/boot/Makefile | 5 ++-
arch/powerpc/boot/wrapper | 16 ++++++-
scripts/mkits.sh | 113 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 136 insertions(+), 3 deletions(-)
create mode 100755 scripts/mkits.sh
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 1a54a3b..459aed5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -158,7 +158,8 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
# Default to zImage, override when needed
all: zImage
-BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
+BOOT_TARGETS = zImage zImage.initrd uImage uImage.fit.% zImage% dtbImage% \
+ treeImage.% cuImage.% simpleImage.%
PHONY += $(BOOT_TARGETS)
@@ -185,6 +186,7 @@ define archhelp
@echo '* zImage - Build default images selected by kernel config'
@echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
@echo ' uImage - U-Boot native image format'
+ @echo ' uImage.fit.<dt> - U-Boot Flattened Image Tree image format'
@echo ' cuImage.<dt> - Backwards compatible U-Boot image for older'
@echo ' versions which do not support device trees'
@echo ' dtbImage.<dt> - zImage with an embedded device tree blob'
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
index 3d80c3e..a443f1c 100644
--- a/arch/powerpc/boot/.gitignore
+++ b/arch/powerpc/boot/.gitignore
@@ -19,6 +19,7 @@ kernel-vmlinux.strip.c
kernel-vmlinux.strip.gz
mktree
uImage
+uImage.fit.*
cuImage.*
dtbImage.*
treeImage.*
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 7bfc8ad..57e4eee 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -307,6 +307,9 @@ $(obj)/zImage.iseries: vmlinux
$(obj)/uImage: vmlinux $(wrapperbits)
$(call if_changed,wrap,uboot)
+$(obj)/uImage.fit.%: vmlinux $(obj)/%.dtb $(wrapperbits)
+ $(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb)
+
$(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
@@ -346,7 +349,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
# anything not in $(targets)
clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
- zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
+ uImage.* zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
zImage.iseries zImage.miboot zImage.pmac zImage.pseries \
simpleImage.* otheros.bld *.dtb
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 1ee9448..26a971e 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -46,6 +46,9 @@ CROSS=
# mkimage wrapper script
MKIMAGE=$srctree/scripts/mkuboot.sh
+# script to generate an .its file for uImage.fit.* images
+MKITS=$srctree/scripts/mkits.sh
+
# directory for object and other files used by this script
object=arch/powerpc/boot
objbin=$object
@@ -157,7 +160,7 @@ coff)
lds=$object/zImage.coff.lds
link_address='0x500000'
;;
-miboot|uboot)
+miboot|uboot|uboot.fit)
# miboot and U-boot want just the bare bits, not an ELF binary
ext=bin
objflags="-O binary"
@@ -273,6 +276,17 @@ uboot)
fi
exit 0
;;
+uboot.fit)
+ rm -f "$ofile"
+ ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
+ -d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
+ ${MKIMAGE} -f "$object/uImage.its" "$ofile"
+ rm "$object/uImage.its"
+ if [ -z "$cacheit" ]; then
+ rm -f "$vmz"
+ fi
+ exit 0
+ ;;
esac
addsec() {
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
new file mode 100755
index 0000000..a438cac
--- /dev/null
+++ b/scripts/mkits.sh
@@ -0,0 +1,113 @@
+#!/bin/bash
+#
+# Licensed under the terms of the GNU GPL License version 2 or later.
+#
+# Author: Peter Tyser <ptyser@xes-inc.com>
+#
+# U-Boot firmware supports the booting of images in the Flattened Image
+# Tree (FIT) format. The FIT format uses a device tree structure to
+# describe a kernel image, device tree blob, ramdisk, etc. This script
+# creates an Image Tree Source (.its file) which can be passed to the
+# 'mkimage' utility to generate an Image Tree Blob (.itb file). The .itb
+# file can then be booted by U-Boot (or other bootloaders which support
+# FIT images). See doc/uImage.FIT/howto.txt in U-Boot source code for
+# additional information on FIT images.
+#
+
+usage() {
+ echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \
+ "-v version -k kernel [-d dtb] -o its_file"
+ echo -e "\t-A ==> set architecture to 'arch'"
+ echo -e "\t-C ==> set compression type 'comp'"
+ echo -e "\t-a ==> set load address to 'addr' (hex)"
+ echo -e "\t-e ==> set entry point to 'entry' (hex)"
+ echo -e "\t-v ==> set kernel version to 'version'"
+ echo -e "\t-k ==> include kernel image 'kernel'"
+ echo -e "\t-d ==> include Device Tree Blob 'dtb'"
+ echo -e "\t-o ==> create output file 'its_file'"
+ exit 1
+}
+
+while getopts ":A:C:a:d:e:k:o:v:" OPTION
+do
+ case $OPTION in
+ A ) ARCH=$OPTARG;;
+ C ) COMPRESS=$OPTARG;;
+ a ) LOAD_ADDR=$OPTARG;;
+ d ) DTB=$OPTARG;;
+ e ) ENTRY_ADDR=$OPTARG;;
+ k ) KERNEL=$OPTARG;;
+ o ) OUTPUT=$OPTARG;;
+ v ) VERSION=$OPTARG;;
+ * ) echo "Invalid option passed to '$0' (options:$@)"
+ usage;;
+ esac
+done
+
+# Make sure user entered all required parameters
+if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
+ [ -z "${ENTRY_ADDR}" ] || [ -z "${VERSION}" ] || [ -z "${KERNEL}" ] || \
+ [ -z "${OUTPUT}" ]; then
+ usage
+fi
+
+# Device trees need the leading '0x' stripped for hex numbers
+LOAD_ADDR=`echo $LOAD_ADDR | sed 's/0x//'`
+ENTRY_ADDR=`echo $ENTRY_ADDR | sed 's/0x//'`
+
+# Create a default, fully populated DTS file
+DATA="/ {
+ description = \"Linux kernel ${VERSION}\";
+ #address-cells = <1>;
+
+ images {
+ kernel@1 {
+ description = \"Linux Kernel ${VERSION}\";
+ data = /incbin/(\"${KERNEL}\");
+ type = \"kernel\";
+ arch = \"${ARCH}\";
+ os = \"linux\";
+ compression = \"${COMPRESS}\";
+ load = <${LOAD_ADDR}>;
+ entry = <${ENTRY_ADDR}>;
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"sha1\";
+ };
+ };
+
+ fdt@1 { /* start fdt */
+ description = \"Flattened Device Tree blob\";
+ data = /incbin/(\"${DTB}\");
+ type = \"flat_dt\";
+ arch = \"${ARCH}\";
+ compression = \"none\";
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"sha1\";
+ };
+ }; /* end fdt */
+
+ configurations {
+ default = \"config@1\";
+ config@1 {
+ description = \"Default Linux kernel\";
+ kernel = \"kernel@1\";
+ fdt = \"fdt@1\";
+ ramdisk = \"ramdisk@1\";
+ };
+ };
+};"
+
+# Conditionally strip fdt information out of tree
+if [ -z "${DTB}" ]; then
+ DATA=`echo "$DATA" | sed '/start fdt/,/end fdt/d'`
+ DATA=`echo "$DATA" | sed '/fdt/d'`
+fi
+
+# Write .its file to disk
+echo "$DATA" > ${OUTPUT}
--
1.6.2.1
^ permalink raw reply related
* [PATCH 3/3] powerpc: Add support for ram filesystems in FIT uImages
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild
In-Reply-To: <1258577834-26006-1-git-send-email-ptyser@xes-inc.com>
The PowerPC architecture has the ability to embed the ramdisk located
at arch/powerpc/boot/ramdisk.image.gz into a bootable kernel image. If
the bootable kernel is in the Flattened Image Tree (FIT) format, the
ramdisk should be a node in the tree instead of being embedded directly
in the kernel executable.
A FIT uImage with a ram filesystem can be generated using the command:
"make uImage.fit.initrd.<boardname>" where <boardname> is one of
arch/powerpc/boot/dts/<boardname>.dts. The command will generate a FIT
uImage at arch/powerpc/boot/uImage.fit.initrd.<boardname> that contains
a kernel image, device tree blob, and a ram filesystem.
The ramdisk at arch/powerpc/boot/ramdisk.image.gz can either be an older
style "ramdisk" or a newer "ramfs" gzipped cpio archive.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
arch/powerpc/boot/Makefile | 3 +++
arch/powerpc/boot/wrapper | 20 ++++++++++++++++----
scripts/mkits.sh | 35 +++++++++++++++++++++++++++++++++--
3 files changed, 52 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 57e4eee..c2b6c25 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -310,6 +310,9 @@ $(obj)/uImage: vmlinux $(wrapperbits)
$(obj)/uImage.fit.%: vmlinux $(obj)/%.dtb $(wrapperbits)
$(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb)
+$(obj)/uImage.fit.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
+ $(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
+
$(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 26a971e..8027ef9 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -266,6 +266,9 @@ fi
# physical offset of kernel image
membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
+# Size of uncompressed kernel is needed to calculate ramdisk location in RAM
+kernsize=`${CROSS}objdump -p "$kernel" | grep -m 1 rwx | awk '{print $4}'`
+
case "$platform" in
uboot)
rm -f "$ofile"
@@ -278,8 +281,14 @@ uboot)
;;
uboot.fit)
rm -f "$ofile"
- ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
- -d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
+ if [ -n "$initrd" ]; then
+ ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
+ -d "$srctree/$dtb" -k "$srctree/$vmz" -r "$srctree/$initrd" \
+ -l $kernsize -o "$object/uImage.its"
+ else
+ ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
+ -d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
+ fi
${MKIMAGE} -f "$object/uImage.its" "$ofile"
rm "$object/uImage.its"
if [ -z "$cacheit" ]; then
@@ -300,8 +309,11 @@ if [ -z "$cacheit" ]; then
rm -f "$vmz"
fi
-if [ -n "$initrd" ]; then
- addsec $tmp "$initrd" $isection
+# FIT images have the initrd in the image tree structure
+if [ "$platform" != "uboot.fit" ]; then
+ if [ -n "$initrd" ]; then
+ addsec $tmp "$initrd" $isection
+ fi
fi
if [ -n "$dtb" ]; then
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index a438cac..88411dd 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -16,7 +16,8 @@
usage() {
echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \
- "-v version -k kernel [-d dtb] -o its_file"
+ "-v version -k kernel [-d dtb] [-r ramfs -l ramfs_addr]" \
+ "-o its_file"
echo -e "\t-A ==> set architecture to 'arch'"
echo -e "\t-C ==> set compression type 'comp'"
echo -e "\t-a ==> set load address to 'addr' (hex)"
@@ -24,11 +25,13 @@ usage() {
echo -e "\t-v ==> set kernel version to 'version'"
echo -e "\t-k ==> include kernel image 'kernel'"
echo -e "\t-d ==> include Device Tree Blob 'dtb'"
+ echo -e "\t-r ==> include initrd/initramfs 'ramfs'"
+ echo -e "\t-l ==> load initrd/initramfs at 'ramfs_addr'"
echo -e "\t-o ==> create output file 'its_file'"
exit 1
}
-while getopts ":A:C:a:d:e:k:o:v:" OPTION
+while getopts ":A:C:a:d:e:k:l:o:r:v:" OPTION
do
case $OPTION in
A ) ARCH=$OPTARG;;
@@ -37,7 +40,9 @@ do
d ) DTB=$OPTARG;;
e ) ENTRY_ADDR=$OPTARG;;
k ) KERNEL=$OPTARG;;
+ l ) RAMFS_ADDR=$OPTARG;;
o ) OUTPUT=$OPTARG;;
+ r ) RAMFS=$OPTARG;;
v ) VERSION=$OPTARG;;
* ) echo "Invalid option passed to '$0' (options:$@)"
usage;;
@@ -49,11 +54,14 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
[ -z "${ENTRY_ADDR}" ] || [ -z "${VERSION}" ] || [ -z "${KERNEL}" ] || \
[ -z "${OUTPUT}" ]; then
usage
+elif [ -n "${RAMFS}" ] && [ -z "${RAMFS_ADDR}" ]; then
+ usage
fi
# Device trees need the leading '0x' stripped for hex numbers
LOAD_ADDR=`echo $LOAD_ADDR | sed 's/0x//'`
ENTRY_ADDR=`echo $ENTRY_ADDR | sed 's/0x//'`
+RAMFS_ADDR=`echo $RAMFS_ADDR | sed 's/0x//'`
# Create a default, fully populated DTS file
DATA="/ {
@@ -92,6 +100,23 @@ DATA="/ {
};
}; /* end fdt */
+ ramdisk@1 { /* start ramdisk */
+ description = \"ramdisk\";
+ data = /incbin/(\"${RAMFS}\");
+ type = \"ramdisk\";
+ arch = \"${ARCH}\";
+ os = \"linux\";
+ load = <${RAMFS_ADDR}>;
+ compression = \"none\";
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"sha1\";
+ };
+ }; /* end ramdisk */
+ };
+
configurations {
default = \"config@1\";
config@1 {
@@ -103,6 +128,12 @@ DATA="/ {
};
};"
+# Conditionally strip ramfs information out of tree
+if [ -z "${RAMFS}" ]; then
+ DATA=`echo "$DATA" | sed '/start ramdisk/,/end ramdisk/d'`
+ DATA=`echo "$DATA" | sed '/ramdisk/d'`
+fi
+
# Conditionally strip fdt information out of tree
if [ -z "${DTB}" ]; then
DATA=`echo "$DATA" | sed '/start fdt/,/end fdt/d'`
--
1.6.2.1
^ permalink raw reply related
* [PATCH 1/3] powerpc: Use scripts/mkuboot.sh instead of 'mkimage'
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild
In-Reply-To: <1258577834-26006-1-git-send-email-ptyser@xes-inc.com>
mkuboot.sh provides a basic wrapper for the 'mkimage' utility. Using
mkuboot.sh provides clearer error reporting and allows a toolchain to
use its own 'mkimage' executable specified by ${CROSS_COMPILE}mkimage.
Additionally, this brings PowerPC in line with other architectures
which already call mkimage via mkuboot.sh.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
arch/powerpc/boot/wrapper | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index ac9e9a5..1ee9448 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -43,6 +43,9 @@ gzip=.gz
# cross-compilation prefix
CROSS=
+# mkimage wrapper script
+MKIMAGE=$srctree/scripts/mkuboot.sh
+
# directory for object and other files used by this script
object=arch/powerpc/boot
objbin=$object
@@ -263,7 +266,7 @@ membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
case "$platform" in
uboot)
rm -f "$ofile"
- mkimage -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
+ ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
$uboot_version -d "$vmz" "$ofile"
if [ -z "$cacheit" ]; then
rm -f "$vmz"
@@ -323,7 +326,7 @@ coff)
;;
cuboot*)
gzip -f -9 "$ofile"
- mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
+ ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
$uboot_version -d "$ofile".gz "$ofile"
;;
treeboot*)
--
1.6.2.1
^ permalink raw reply related
* [PATCH 0/3] powerpc: Add support for FIT uImages
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild
These patches add support for creating the "new" FIT uImage type
that U-Boot can use. Additional info about FIT images can be
found in the doc/uImage.FIT/ directory of the U-Boot source.
Here's a link to a howto which gives an overview of the format:
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=doc/uImage.FIT/howto.txt;h=8065e9e1d8d4d65a9b5fe0fce08d3709183d0ee4;hb=HEAD
I've only added support for PowerPC, but the arm, avr32, blackfin,
and sh arches could use the same framework in theory. The change
is especially useful on PowerPC since it creates 1 FIT uImage that
combines the functionality of an "old" uImage format, a device
tree blob, and possibly a ramdisk.
Peter Tyser (3):
powerpc: Use scripts/mkuboot.sh instead of 'mkimage'
powerpc: Add support for creating FIT uImages
powerpc: Add support for ram filesystems in FIT uImages
arch/powerpc/Makefile | 4 +-
arch/powerpc/boot/.gitignore | 1 +
arch/powerpc/boot/Makefile | 8 ++-
arch/powerpc/boot/wrapper | 39 ++++++++++--
scripts/mkits.sh | 144 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 189 insertions(+), 7 deletions(-)
create mode 100755 scripts/mkits.sh
^ permalink raw reply
* Re: [patch 06/13] powerpc: Fixup last users of irq_chip->typename
From: Thomas Gleixner @ 2009-11-18 20:41 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, Ingo Molnar, LKML
In-Reply-To: <20091118175523.GA12857@b07421-ec1.am.freescale.net>
On Wed, 18 Nov 2009, Scott Wood wrote:
> On Tue, Nov 17, 2009 at 10:50:53PM +0000, Thomas Gleixner wrote:
> > Index: linux-2.6/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> > ===================================================================
> > --- linux-2.6.orig/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> > +++ linux-2.6/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> > @@ -69,7 +69,7 @@ static void pq2ads_pci_unmask_irq(unsign
> > }
> >
> > static struct irq_chip pq2ads_pci_ic = {
> > - .typename = "PQ2 ADS PCI",
> > + .name = "PQ2 ADS PCI",
> > .name = "PQ2 ADS PCI",
> > .end = pq2ads_pci_unmask_irq,
> > .mask = pq2ads_pci_mask_irq,
>
> Duplicate ".name"...
Darn.
^ permalink raw reply
* Re: [PATCH 0/4] Merge OF dynamic patches
From: Nathan Fontenot @ 2009-11-18 20:16 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev, devicetree-discuss, microblaze-uclinux
In-Reply-To: <20091118104147.GD5166@pengutronix.de>
Wolfram Sang wrote:
> On Tue, Nov 17, 2009 at 03:04:02PM -0600, Nathan Fontenot wrote:
>> This set of patches merges the common dynamic device tree
>> updating routines of_attach_node() and of_detach_node() to
>> drivers/of/of_dynamic.c.
>>
>> Built and tested on powerpc, I have no access to build/test
>> this on microblaze.
>
> They look good, but I can't test them as they don't apply to test-devicetree.
> On which commit are they based?
I meant to base these on the test-devicetree branch but it appears that I did
not checkout the test-devicetree branch after cloning. I will rebase the patches
against the test-devicetree branch and re-send.
>
> It would be nice if you could also add a diffstat to every patch, this makes
> reviewing 'move-around'-patches a bit easier.
will do.
-Nathan Fontenot
^ permalink raw reply
* Re: [patch 3/3] [v2] powerpc: make the CMM memory hotplug aware
From: Robert Jennings @ 2009-11-18 18:59 UTC (permalink / raw)
To: akpm
Cc: mel, geralds, linuxppc-dev, paulus, brking, mingo, schwidefsky,
kamezawa.hiroyu
In-Reply-To: <200911172240.nAHMeHgE021202@imap1.linux-foundation.org>
The Collaborative Memory Manager (CMM) module allocates individual pages
over time that are not migratable. On a long running system this can
severely impact the ability to find enough pages to support a hotplug
memory remove operation.
This patch adds a memory isolation notifier and a memory hotplug notifier.
The memory isolation notifier will return the number of pages found
in the range specified. This is used to determine if all of the used
pages in a pageblock are owned by the balloon (or other entities in
the notifier chain). The hotplug notifier will free pages in the range
which is to be removed. The priority of this hotplug notifier is low
so that it will be called near last, this helps avoids removing loaned
pages in operations that fail due to other handlers.
CMM activity will be halted when hotplug remove operations are active
and resume activity after a delay period to allow the hypervisor time
to adjust.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Brian King <brking@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Gerald Schaefer <geralds@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
The pages used to track loaned pages should not be marked as MOVABLE, so
they need to be handled during a memory offline event.
Changes:
* The structures for recording loaned pages are not allocated as MOVABLE
* The structures for recording loaned pages are removed from sections
being taken offline by moving their contents to a newly allocated page.
arch/powerpc/platforms/pseries/cmm.c | 254 ++++++++++++++++++++++++++++++++++-
1 file changed, 248 insertions(+), 6 deletions(-)
Index: b/arch/powerpc/platforms/pseries/cmm.c
===================================================================
--- a/arch/powerpc/platforms/pseries/cmm.c
+++ b/arch/powerpc/platforms/pseries/cmm.c
@@ -38,19 +38,28 @@
#include <asm/mmu.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
+#include <linux/memory.h>
#include "plpar_wrappers.h"
#define CMM_DRIVER_VERSION "1.0.0"
#define CMM_DEFAULT_DELAY 1
+#define CMM_HOTPLUG_DELAY 5
#define CMM_DEBUG 0
#define CMM_DISABLE 0
#define CMM_OOM_KB 1024
#define CMM_MIN_MEM_MB 256
#define KB2PAGES(_p) ((_p)>>(PAGE_SHIFT-10))
#define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10))
+/*
+ * The priority level tries to ensure that this notifier is called as
+ * late as possible to reduce thrashing in the shared memory pool.
+ */
+#define CMM_MEM_HOTPLUG_PRI 1
+#define CMM_MEM_ISOLATE_PRI 15
static unsigned int delay = CMM_DEFAULT_DELAY;
+static unsigned int hotplug_delay = CMM_HOTPLUG_DELAY;
static unsigned int oom_kb = CMM_OOM_KB;
static unsigned int cmm_debug = CMM_DEBUG;
static unsigned int cmm_disabled = CMM_DISABLE;
@@ -65,6 +74,10 @@ MODULE_VERSION(CMM_DRIVER_VERSION);
module_param_named(delay, delay, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(delay, "Delay (in seconds) between polls to query hypervisor paging requests. "
"[Default=" __stringify(CMM_DEFAULT_DELAY) "]");
+module_param_named(hotplug_delay, hotplug_delay, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(delay, "Delay (in seconds) after memory hotplug remove "
+ "before loaning resumes. "
+ "[Default=" __stringify(CMM_HOTPLUG_DELAY) "]");
module_param_named(oom_kb, oom_kb, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(oom_kb, "Amount of memory in kb to free on OOM. "
"[Default=" __stringify(CMM_OOM_KB) "]");
@@ -92,6 +105,9 @@ static unsigned long oom_freed_pages;
static struct cmm_page_array *cmm_page_list;
static DEFINE_SPINLOCK(cmm_lock);
+static DEFINE_MUTEX(hotplug_mutex);
+static int hotplug_occurred; /* protected by the hotplug mutex */
+
static struct task_struct *cmm_thread_ptr;
/**
@@ -110,6 +126,17 @@ static long cmm_alloc_pages(long nr)
cmm_dbg("Begin request for %ld pages\n", nr);
while (nr) {
+ /* Exit if a hotplug operation is in progress or occurred */
+ if (mutex_trylock(&hotplug_mutex)) {
+ if (hotplug_occurred) {
+ mutex_unlock(&hotplug_mutex);
+ break;
+ }
+ mutex_unlock(&hotplug_mutex);
+ } else {
+ break;
+ }
+
addr = __get_free_page(GFP_NOIO | __GFP_NOWARN |
__GFP_NORETRY | __GFP_NOMEMALLOC);
if (!addr)
@@ -119,8 +146,9 @@ static long cmm_alloc_pages(long nr)
if (!pa || pa->index >= CMM_NR_PAGES) {
/* Need a new page for the page list. */
spin_unlock(&cmm_lock);
- npa = (struct cmm_page_array *)__get_free_page(GFP_NOIO | __GFP_NOWARN |
- __GFP_NORETRY | __GFP_NOMEMALLOC);
+ npa = (struct cmm_page_array *)__get_free_page(
+ GFP_NOIO | __GFP_NOWARN |
+ __GFP_NORETRY | __GFP_NOMEMALLOC);
if (!npa) {
pr_info("%s: Can not allocate new page list\n", __func__);
free_page(addr);
@@ -273,9 +301,28 @@ static int cmm_thread(void *dummy)
while (1) {
timeleft = msleep_interruptible(delay * 1000);
- if (kthread_should_stop() || timeleft) {
- loaned_pages_target = loaned_pages;
+ if (kthread_should_stop() || timeleft)
break;
+
+ if (mutex_trylock(&hotplug_mutex)) {
+ if (hotplug_occurred) {
+ hotplug_occurred = 0;
+ mutex_unlock(&hotplug_mutex);
+ cmm_dbg("Hotplug operation has occurred, "
+ "loaning activity suspended "
+ "for %d seconds.\n",
+ hotplug_delay);
+ timeleft = msleep_interruptible(hotplug_delay *
+ 1000);
+ if (kthread_should_stop() || timeleft)
+ break;
+ continue;
+ }
+ mutex_unlock(&hotplug_mutex);
+ } else {
+ cmm_dbg("Hotplug operation in progress, activity "
+ "suspended\n");
+ continue;
}
cmm_get_mpp();
@@ -405,6 +452,193 @@ static struct notifier_block cmm_reboot_
};
/**
+ * cmm_count_pages - Count the number of pages loaned in a particular range.
+ *
+ * @arg: memory_isolate_notify structure with address range and count
+ *
+ * Return value:
+ * 0 on success
+ **/
+static unsigned long cmm_count_pages(void *arg)
+{
+ struct memory_isolate_notify *marg = arg;
+ struct cmm_page_array *pa;
+ unsigned long start = (unsigned long)pfn_to_kaddr(marg->start_pfn);
+ unsigned long end = start + (marg->nr_pages << PAGE_SHIFT);
+ unsigned long idx;
+
+ spin_lock(&cmm_lock);
+ pa = cmm_page_list;
+ while (pa) {
+ if ((unsigned long)pa >= start && (unsigned long)pa < end)
+ marg->pages_found++;
+ for (idx = 0; idx < pa->index; idx++)
+ if (pa->page[idx] >= start && pa->page[idx] < end)
+ marg->pages_found++;
+ pa = pa->next;
+ }
+ spin_unlock(&cmm_lock);
+ return 0;
+}
+
+/**
+ * cmm_memory_isolate_cb - Handle memory isolation notifier calls
+ * @self: notifier block struct
+ * @action: action to take
+ * @arg: struct memory_isolate_notify data for handler
+ *
+ * Return value:
+ * NOTIFY_OK or notifier error based on subfunction return value
+ **/
+static int cmm_memory_isolate_cb(struct notifier_block *self,
+ unsigned long action, void *arg)
+{
+ int ret = 0;
+
+ if (action == MEM_ISOLATE_COUNT)
+ ret = cmm_count_pages(arg);
+
+ if (ret)
+ ret = notifier_from_errno(ret);
+ else
+ ret = NOTIFY_OK;
+
+ return ret;
+}
+
+static struct notifier_block cmm_mem_isolate_nb = {
+ .notifier_call = cmm_memory_isolate_cb,
+ .priority = CMM_MEM_ISOLATE_PRI
+};
+
+/**
+ * cmm_mem_going_offline - Unloan pages where memory is to be removed
+ * @arg: memory_notify structure with page range to be offlined
+ *
+ * Return value:
+ * 0 on success
+ **/
+static int cmm_mem_going_offline(void *arg)
+{
+ struct memory_notify *marg = arg;
+ unsigned long start_page = (unsigned long)pfn_to_kaddr(marg->start_pfn);
+ unsigned long end_page = start_page + (marg->nr_pages << PAGE_SHIFT);
+ struct cmm_page_array *pa_curr, *pa_last, *npa;
+ unsigned long idx;
+ unsigned long freed = 0;
+
+ cmm_dbg("Memory going offline, searching 0x%lx (%ld pages).\n",
+ start_page, marg->nr_pages);
+ spin_lock(&cmm_lock);
+
+ /* Search the page list for pages in the range to be offlined */
+ pa_last = pa_curr = cmm_page_list;
+ while (pa_curr) {
+ for (idx = (pa_curr->index - 1); (idx + 1) > 0; idx--) {
+ if ((pa_curr->page[idx] < start_page) ||
+ (pa_curr->page[idx] >= end_page))
+ continue;
+
+ plpar_page_set_active(__pa(pa_curr->page[idx]));
+ free_page(pa_curr->page[idx]);
+ freed++;
+ loaned_pages--;
+ totalram_pages++;
+ pa_curr->page[idx] = pa_last->page[--pa_last->index];
+ if (pa_last->index == 0) {
+ if (pa_curr == pa_last)
+ pa_curr = pa_last->next;
+ pa_last = pa_last->next;
+ free_page((unsigned long)cmm_page_list);
+ cmm_page_list = pa_last;
+ continue;
+ }
+ }
+ pa_curr = pa_curr->next;
+ }
+
+ /* Search for page list structures in the range to be offlined */
+ pa_last = NULL;
+ pa_curr = cmm_page_list;
+ while (pa_curr) {
+ if (((unsigned long)pa_curr >= start_page) &&
+ ((unsigned long)pa_curr < end_page)) {
+ npa = (struct cmm_page_array *)__get_free_page(
+ GFP_NOIO | __GFP_NOWARN |
+ __GFP_NORETRY | __GFP_NOMEMALLOC);
+ if (!npa) {
+ spin_unlock(&cmm_lock);
+ cmm_dbg("Failed to allocate memory for list "
+ "management. Memory hotplug "
+ "failed.\n");
+ return ENOMEM;
+ }
+ memcpy(npa, pa_curr, PAGE_SIZE);
+ if (pa_curr == cmm_page_list)
+ cmm_page_list = npa;
+ if (pa_last)
+ pa_last->next = npa;
+ free_page((unsigned long) pa_curr);
+ freed++;
+ pa_curr = npa;
+ }
+
+ pa_last = pa_curr;
+ pa_curr = pa_curr->next;
+ }
+
+ spin_unlock(&cmm_lock);
+ cmm_dbg("Released %ld pages in the search range.\n", freed);
+
+ return 0;
+}
+
+/**
+ * cmm_memory_cb - Handle memory hotplug notifier calls
+ * @self: notifier block struct
+ * @action: action to take
+ * @arg: struct memory_notify data for handler
+ *
+ * Return value:
+ * NOTIFY_OK or notifier error based on subfunction return value
+ *
+ **/
+static int cmm_memory_cb(struct notifier_block *self,
+ unsigned long action, void *arg)
+{
+ int ret = 0;
+
+ switch (action) {
+ case MEM_GOING_OFFLINE:
+ mutex_lock(&hotplug_mutex);
+ hotplug_occurred = 1;
+ ret = cmm_mem_going_offline(arg);
+ break;
+ case MEM_OFFLINE:
+ case MEM_CANCEL_OFFLINE:
+ mutex_unlock(&hotplug_mutex);
+ cmm_dbg("Memory offline operation complete.\n");
+ break;
+ case MEM_GOING_ONLINE:
+ case MEM_ONLINE:
+ case MEM_CANCEL_ONLINE:
+ break;
+ }
+
+ if (ret)
+ ret = notifier_from_errno(ret);
+ else
+ ret = NOTIFY_OK;
+
+ return ret;
+}
+
+static struct notifier_block cmm_mem_nb = {
+ .notifier_call = cmm_memory_cb,
+ .priority = CMM_MEM_HOTPLUG_PRI
+};
+
+/**
* cmm_init - Module initialization
*
* Return value:
@@ -426,18 +660,24 @@ static int cmm_init(void)
if ((rc = cmm_sysfs_register(&cmm_sysdev)))
goto out_reboot_notifier;
+ if (register_memory_notifier(&cmm_mem_nb) ||
+ register_memory_isolate_notifier(&cmm_mem_isolate_nb))
+ goto out_unregister_notifier;
+
if (cmm_disabled)
return rc;
cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread");
if (IS_ERR(cmm_thread_ptr)) {
rc = PTR_ERR(cmm_thread_ptr);
- goto out_unregister_sysfs;
+ goto out_unregister_notifier;
}
return rc;
-out_unregister_sysfs:
+out_unregister_notifier:
+ unregister_memory_notifier(&cmm_mem_nb);
+ unregister_memory_isolate_notifier(&cmm_mem_isolate_nb);
cmm_unregister_sysfs(&cmm_sysdev);
out_reboot_notifier:
unregister_reboot_notifier(&cmm_reboot_nb);
@@ -458,6 +698,8 @@ static void cmm_exit(void)
kthread_stop(cmm_thread_ptr);
unregister_oom_notifier(&cmm_oom_nb);
unregister_reboot_notifier(&cmm_reboot_nb);
+ unregister_memory_notifier(&cmm_mem_nb);
+ unregister_memory_isolate_notifier(&cmm_mem_isolate_nb);
cmm_free_pages(loaned_pages);
cmm_unregister_sysfs(&cmm_sysdev);
}
^ permalink raw reply
* Re: [patch 06/13] powerpc: Fixup last users of irq_chip->typename
From: Scott Wood @ 2009-11-18 17:55 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linuxppc-dev, Ingo Molnar, LKML
In-Reply-To: <20091117224916.566205413@linutronix.de>
On Tue, Nov 17, 2009 at 10:50:53PM +0000, Thomas Gleixner wrote:
> Index: linux-2.6/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> +++ linux-2.6/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
> @@ -69,7 +69,7 @@ static void pq2ads_pci_unmask_irq(unsign
> }
>
> static struct irq_chip pq2ads_pci_ic = {
> - .typename = "PQ2 ADS PCI",
> + .name = "PQ2 ADS PCI",
> .name = "PQ2 ADS PCI",
> .end = pq2ads_pci_unmask_irq,
> .mask = pq2ads_pci_mask_irq,
Duplicate ".name"...
-Scott
^ permalink raw reply
* Re: [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set
From: Mel Gorman @ 2009-11-18 17:05 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <1258524332.2140.663.camel@pasglop>
On Wed, Nov 18, 2009 at 05:05:32PM +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> > KConfig doesn't require CONFIG_XICS to be set with CONFIG_PSERIES but if
> > it's not set, there are numerous small build errors. This is a small series
> > of patches to allow CONFIG_XICS to be unset in the config.
> >
> > XICS appears to be some sort of interrupt controller but I'm not sure how
> > common it is on systems that require CONFIG_PSERIES. If CONFIG_PSERIES
> > universally requires CONFIG_XICS, the better path might be to force it to
> > be set.
> >
> > Testing was building with make oldconfig a configuration from 2.6.31 on
> > a PPC970.
>
> CONFIG_XICS should be made invisible and selected by PSERIES.
>
Like so?
==== CUT HERE ====
powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES
It's possible to set CONFIG_XICS without CONFIG_PCI_MSI. When that
happens, the kernel fails to build with
arch/powerpc/platforms/built-in.o: In function `.xics_startup':
xics.c:(.text+0x12f60): undefined reference to `.unmask_msi_irq'
make: *** [.tmp_vmlinux1] Error 1
Furthermore, as noted by Benjamin Herrenschmidt, "CONFIG_XICS should be
made invisible and selected by PSERIES."
This patch adds the dependency in KConfig for XICS on PCI_MSI. When
PSERIES support is being configured, both options are silently selected.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
arch/powerpc/platforms/Kconfig | 4 ++--
arch/powerpc/platforms/pseries/Kconfig | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 04a8061..a82c470 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -52,9 +52,9 @@ config PPC_UDBG_BEAT
default n
config XICS
- depends on PPC_PSERIES
+ depends on PCI_MSI
bool
- default y
+ default n
config IPIC
bool
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index f0e6f28..81c2289 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -5,6 +5,8 @@ config PPC_PSERIES
select PPC_I8259
select PPC_RTAS
select RTAS_ERROR_LOGGING
+ select PCI_MSI
+ select XICS
select PPC_UDBG_16550
select PPC_NATIVE
select PPC_PCI_CHOICE if EMBEDDED
^ permalink raw reply related
* Re: spi_mpc8xxx.c: chip select polarity problem
From: Torsten Fleischer @ 2009-11-18 16:20 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20091117232823.GA19058@oksana.dev.rtsoft.ru>
On Wen, Nov 18, 2009 00:28:23 Anton Vorontsov wrote:
[...]
> > > > > So it might be better to fix up initial value in the platform code?
> > > >
> > > > Oh, we actually cannot, because the driver calls
> > > > gpio_direction_output().
> > > >
> > > > And since we don't know the mode prior to SPI device's driver
> > > > probe() finished, we'll have to set up an initial state in the
> > > > first SPI transfer. I.e. something like this:
> > >
> > > In most cases the device drivers perform SPI transfers already in their
> > > probe() function. How can it be ensured that the CS of all other
> > > devices are inactive even if they are not initialized at that time?
> >
> > Good question. Oh, well... then we have to use spi-cs-high,
> > no matter that it is a duplication of the 'compatible' property.
> > SPI bus drivers don't know all the devices and their CS level,
> > and so spi-cs-high is the only way to tell that information. :-(
>
> Oh. On the other hand, we can postpone the gpio_direction_output()
> call, and still require that the platform code (or firmware)
> should be responsible for setting a sane default values on the
> chip selects.
>
How about that?
diff -u -r -N linux-2.6.31.6_orig//drivers/spi/spi_mpc8xxx.c linux-2.6.31.6/drivers/spi/spi_mpc8xxx.c
--- linux-2.6.31.6_orig//drivers/spi/spi_mpc8xxx.c 2009-11-10 01:32:31.000000000 +0100
+++ linux-2.6.31.6/drivers/spi/spi_mpc8xxx.c 2009-11-18 10:47:06.000000000 +0100
@@ -114,6 +114,7 @@
u32 rx_shift; /* RX data reg shift when in qe mode */
u32 tx_shift; /* TX data reg shift when in qe mode */
u32 hw_mode; /* Holds HW mode register settings */
+ int initialized;
};
static inline void mpc8xxx_spi_write_reg(__be32 __iomem *reg, u32 val)
@@ -437,6 +438,7 @@
cs = kzalloc(sizeof *cs, GFP_KERNEL);
if (!cs)
return -ENOMEM;
+ cs->initialized = 0;
spi->controller_state = cs;
}
mpc8xxx_spi = spi_master_get_devdata(spi->master);
@@ -503,15 +505,25 @@
return ret;
}
+
+static void mpc8xxx_spi_cs_init(struct spi_device *spi);
+
+
static int mpc8xxx_spi_transfer(struct spi_device *spi,
struct spi_message *m)
{
struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
+ struct spi_mpc8xxx_cs *cs = spi->controller_state;
unsigned long flags;
m->actual_length = 0;
m->status = -EINPROGRESS;
+ if (cs && !cs->initialized) {
+ mpc8xxx_spi_cs_init(spi);
+ cs->initialized = 1;
+ }
+
spin_lock_irqsave(&mpc8xxx_spi->lock, flags);
list_add_tail(&m->queue, &mpc8xxx_spi->queue);
queue_work(mpc8xxx_spi->workqueue, &mpc8xxx_spi->work);
@@ -671,6 +683,17 @@
gpio_set_value(gpio, on ^ alow);
}
+static void mpc8xxx_spi_cs_init(struct spi_device *spi)
+{
+ struct device *dev = spi->dev.parent;
+ struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data);
+ u16 cs = spi->chip_select;
+ int gpio = pinfo->gpios[cs];
+ bool on = (pinfo->alow_flags[cs] ^ !(spi->mode & SPI_CS_HIGH));
+
+ gpio_direction_output(gpio, on);
+}
+
static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
{
struct device_node *np = dev_archdata_get_node(&dev->archdata);
@@ -720,14 +743,6 @@
pinfo->gpios[i] = gpio;
pinfo->alow_flags[i] = flags & OF_GPIO_ACTIVE_LOW;
-
- ret = gpio_direction_output(pinfo->gpios[i],
- pinfo->alow_flags[i]);
- if (ret) {
- dev_err(dev, "can't set output direction for gpio "
- "#%d: %d\n", i, ret);
- goto err_loop;
- }
}
pdata->max_chipselect = ngpios;
^ permalink raw reply
* [PATCH 04/16] PPC: use ACCESS_ONCE for rlimits
From: Jiri Slaby @ 2009-11-18 14:51 UTC (permalink / raw)
To: jirislaby
Cc: sfr, Jiri Slaby, nhorman, Heiko Carstens, linux-kernel,
James Morris, linuxppc-dev, mingo, tglx, marcin.slusarz, hpa,
Paul Mackerras, akpm, torvalds, mingo
In-Reply-To: <4B040A03.2020508@gmail.com>
Make sure compiler won't do weird things with limits. E.g. fetching
them twice may return 2 different values after writable limits are
implemented.
Signed-off-by: Jiri Slaby <jslaby@novell.com>
Cc: James Morris <jmorris@namei.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
---
arch/powerpc/mm/mmap_64.c | 6 ++++--
arch/powerpc/platforms/cell/spufs/coredump.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/mmap_64.c b/arch/powerpc/mm/mmap_64.c
index 0d957a4..e96a5f6 100644
--- a/arch/powerpc/mm/mmap_64.c
+++ b/arch/powerpc/mm/mmap_64.c
@@ -47,7 +47,8 @@ static inline int mmap_is_legacy(void)
if (current->personality & ADDR_COMPAT_LAYOUT)
return 1;
- if (current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY)
+ if (ACCESS_ONCE(current->signal->rlim[RLIMIT_STACK].rlim_cur) ==
+ RLIM_INFINITY)
return 1;
return sysctl_legacy_va_layout;
@@ -77,7 +78,8 @@ static unsigned long mmap_rnd(void)
static inline unsigned long mmap_base(void)
{
- unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur;
+ unsigned long gap = ACCESS_ONCE(current->signal->
+ rlim[RLIMIT_STACK].rlim_cur);
if (gap < MIN_GAP)
gap = MIN_GAP;
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index c4d4a19..2abf290 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -54,7 +54,8 @@ static ssize_t do_coredump_read(int num, struct spu_context *ctx, void *buffer,
*/
static int spufs_dump_write(struct file *file, const void *addr, int nr, loff_t *foffset)
{
- unsigned long limit = current->signal->rlim[RLIMIT_CORE].rlim_cur;
+ unsigned long limit = ACCESS_ONCE(current->signal->
+ rlim[RLIMIT_CORE].rlim_cur);
ssize_t written;
if (*foffset + nr > limit)
--
1.6.4.2
^ permalink raw reply related
* Re: [PATCH] ibm_newemac: Fix EMACx_TRTR[TRT] bit shifts
From: David Miller @ 2009-11-18 13:11 UTC (permalink / raw)
To: sr; +Cc: netdev, linuxppc-dev, dmitchell, linuxppc-dev
In-Reply-To: <200911181107.51661.sr@denx.de>
From: Stefan Roese <sr@denx.de>
Date: Wed, 18 Nov 2009 11:07:51 +0100
> On Wednesday 18 November 2009 01:56:55 Dave Mitchell wrote:
>> The TRT bit shifts were reversed for EMAC4 and non-EMAC4 during the
>> port from ibm_emac to ibm_newemac. This patch corrects that error.
>>
>> Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com>
>> Acked-by: Feng Kan <fkan@appliedmicro.com>
>> Acked-by: Prodyut Hazarika <phazarika@appliedmicro.com>
>
> Acked-by: Stefan Roese <sr@denx.de>
>
> Would be great if this could go into 2.6.32. Thanks.
Applied to net-2.6, thanks.
^ permalink raw reply
* Re: [PATCH 0/4] Merge OF dynamic patches
From: Wolfram Sang @ 2009-11-18 10:41 UTC (permalink / raw)
To: Nathan Fontenot; +Cc: linuxppc-dev, devicetree-discuss, microblaze-uclinux
In-Reply-To: <4B030FC2.9070401@austin.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]
On Tue, Nov 17, 2009 at 03:04:02PM -0600, Nathan Fontenot wrote:
> This set of patches merges the common dynamic device tree
> updating routines of_attach_node() and of_detach_node() to
> drivers/of/of_dynamic.c.
>
> Built and tested on powerpc, I have no access to build/test
> this on microblaze.
They look good, but I can't test them as they don't apply to test-devicetree.
On which commit are they based?
It would be nice if you could also add a diffstat to every patch, this makes
reviewing 'move-around'-patches a bit easier.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH] ibm_newemac: Fix EMACx_TRTR[TRT] bit shifts
From: Stefan Roese @ 2009-11-18 10:07 UTC (permalink / raw)
To: linuxppc-dev; +Cc: netdev, Dave Mitchell, linuxppc-dev
In-Reply-To: <1258505815-31261-1-git-send-email-dmitchell@appliedmicro.com>
On Wednesday 18 November 2009 01:56:55 Dave Mitchell wrote:
> The TRT bit shifts were reversed for EMAC4 and non-EMAC4 during the
> port from ibm_emac to ibm_newemac. This patch corrects that error.
>
> Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com>
> Acked-by: Feng Kan <fkan@appliedmicro.com>
> Acked-by: Prodyut Hazarika <phazarika@appliedmicro.com>
Acked-by: Stefan Roese <sr@denx.de>
Would be great if this could go into 2.6.32. Thanks.
Cheers,
Stefan
^ permalink raw reply
* Re: [PATCH] spi/mpc52xx-spi: cleanups
From: Wolfram Sang @ 2009-11-18 9:58 UTC (permalink / raw)
To: Luotao Fu; +Cc: spi-devel-general, linuxppc-dev
In-Reply-To: <20091117144300.GB4850@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
> > - rc |= request_irq(ms->irq1, mpc52xx_spi_irq, IRQF_SAMPLE_RANDOM,
> > + rc |= request_irq(ms->irq1, mpc52xx_spi_irq, 0,
> > "mpc5200-spi-spiF", ms);
>
> The "spiF" here is probably also a typo.
Ack. Grant, if you think it is worth you may modify my patch to avoid a resend.
If it is easier for you, I will do the resend, of course.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ 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