* Re: [PATCH] powerpc: Cell timebase bug workaround
From: Stephen Rothwell @ 2006-10-09 6:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <1160370623.14601.42.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]
On Mon, 09 Oct 2006 15:10:22 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> Index: linux-work/arch/powerpc/kernel/vdso64/gettimeofday.S
> ===================================================================
> --- linux-work.orig/arch/powerpc/kernel/vdso64/gettimeofday.S 2006-10-06 13:47:54.000000000 +1000
> +++ linux-work/arch/powerpc/kernel/vdso64/gettimeofday.S 2006-10-09 13:28:54.000000000 +1000
> @@ -11,6 +11,8 @@
> * as published by the Free Software Foundation; either version
> * 2 of the License, or (at your option) any later version.
> */
> +
> +#include <linux/config.h>
You don't need that (in fact someone just remoed them all).
> #ifdef __ASSEMBLY__
>
> -#define BEGIN_FTR_SECTION 98:
> +#define BEGIN_FTR_SECTION_NESTED(label) label:
> +#define BEGIN_FTR_SECTION BEGIN_FTR_SECTION_NESTED(98)
>
> #ifndef __powerpc64__
> -#define END_FTR_SECTION(msk, val) \
> +#define END_FTR_SECTION_NESTED(msk, val, label) \
> 99: \
> .section __ftr_fixup,"a"; \
> .align 2; \
> .long msk; \
> .long val; \
> - .long 98b; \
> + .long label##b; \
> .long 99b; \
> .previous
> #else /* __powerpc64__ */
> -#define END_FTR_SECTION(msk, val) \
> +#define END_FTR_SECTION_NESTED(msk, val, label) \
> 99: \
> .section __ftr_fixup,"a"; \
> .align 3; \
> .llong msk; \
> .llong val; \
> - .llong 98b; \
> + .llong label##b; \
> .llong 99b; \
> .previous
> #endif /* __powerpc64__ */
>
> +#define END_FTR_SECTION(msk, val) \
> + END_FTR_SECTION_NESTED(msk, val, 98)
> +
The above should be in a separate patch.
> +#ifdef CONFIG_PPC_CELL
> +#define MFTB(dest) \
> + mftb dest; \
> +BEGIN_FTR_SECTION; \
> + cmpwi dest,0; \
> + bne+ 97f; \
> + mftb dest; \
> +97: \
> +END_FTR_SECTION_IFSET(CPU_FTR_CELL_TB_BUG)
Why not branch back to the mftb if the lower word is zero (this would
also take care of the very unlikely "hitting the bug more than once" case
and the "normal" case would then not have to branch at all. (And it uses
one less instruction.)
> +#ifdef CONFIG_PPC_CELL
> +#define mftb() ({unsigned long rval; \
> + asm volatile( \
> + " mftb %0;\n" \
> + "98: cmpwi %0,0;\n" \
> + " bne+ 99f;\n" \
> + " mftb %0;\n" \
> + "99:\n" \
Ditto.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] powerpc: Cell timebase bug workaround
From: Benjamin Herrenschmidt @ 2006-10-09 7:05 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20061009165629.4fa5813a.sfr@canb.auug.org.au>
On Mon, 2006-10-09 at 16:56 +1000, Stephen Rothwell wrote:
> On Mon, 09 Oct 2006 15:10:22 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > Index: linux-work/arch/powerpc/kernel/vdso64/gettimeofday.S
> > ===================================================================
> > --- linux-work.orig/arch/powerpc/kernel/vdso64/gettimeofday.S 2006-10-06 13:47:54.000000000 +1000
> > +++ linux-work/arch/powerpc/kernel/vdso64/gettimeofday.S 2006-10-09 13:28:54.000000000 +1000
> > @@ -11,6 +11,8 @@
> > * as published by the Free Software Foundation; either version
> > * 2 of the License, or (at your option) any later version.
> > */
> > +
> > +#include <linux/config.h>
>
> You don't need that (in fact someone just remoed them all).
Oops, leftover of a previous patch. I'll remove it.
> > #ifdef __ASSEMBLY__
> >
> > -#define BEGIN_FTR_SECTION 98:
> > +#define BEGIN_FTR_SECTION_NESTED(label) label:
> > +#define BEGIN_FTR_SECTION BEGIN_FTR_SECTION_NESTED(98)
> >
> > #ifndef __powerpc64__
> > -#define END_FTR_SECTION(msk, val) \
> > +#define END_FTR_SECTION_NESTED(msk, val, label) \
> > 99: \
> > .section __ftr_fixup,"a"; \
> > .align 2; \
> > .long msk; \
> > .long val; \
> > - .long 98b; \
> > + .long label##b; \
> > .long 99b; \
> > .previous
> > #else /* __powerpc64__ */
> > -#define END_FTR_SECTION(msk, val) \
> > +#define END_FTR_SECTION_NESTED(msk, val, label) \
> > 99: \
> > .section __ftr_fixup,"a"; \
> > .align 3; \
> > .llong msk; \
> > .llong val; \
> > - .llong 98b; \
> > + .llong label##b; \
> > .llong 99b; \
> > .previous
> > #endif /* __powerpc64__ */
> >
> > +#define END_FTR_SECTION(msk, val) \
> > + END_FTR_SECTION_NESTED(msk, val, 98)
> > +
>
> The above should be in a separate patch.
Hrm... makes my life more complicated but I suppose I can split it.
> > +#ifdef CONFIG_PPC_CELL
> > +#define MFTB(dest) \
> > + mftb dest; \
> > +BEGIN_FTR_SECTION; \
> > + cmpwi dest,0; \
> > + bne+ 97f; \
> > + mftb dest; \
> > +97: \
> > +END_FTR_SECTION_IFSET(CPU_FTR_CELL_TB_BUG)
>
> Why not branch back to the mftb if the lower word is zero (this would
> also take care of the very unlikely "hitting the bug more than once" case
> and the "normal" case would then not have to branch at all. (And it uses
> one less instruction.)
Because that would cause us to spinloop for the whole duration of a tb
tick in that case, which is pretty bad when the timebase is slow (the
slower I've seen so far is 14Mhz).
Ben.
^ permalink raw reply
* Re: [PATCH] powerpc: Cell timebase bug workaround
From: Stephen Rothwell @ 2006-10-09 8:36 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <1160377517.14601.48.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
On Mon, 09 Oct 2006 17:05:17 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > Why not branch back to the mftb if the lower word is zero (this would
> > also take care of the very unlikely "hitting the bug more than once" case
> > and the "normal" case would then not have to branch at all. (And it uses
> > one less instruction.)
>
> Because that would cause us to spinloop for the whole duration of a tb
> tick in that case, which is pretty bad when the timebase is slow (the
> slower I've seen so far is 14Mhz).
Right! /me hits himself in the forehead :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] powerpc: Cell timebase bug workaround
From: Benjamin Herrenschmidt @ 2006-10-09 8:57 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev list, Paul Mackerras
In-Reply-To: <20061009183652.3d4897bc.sfr@canb.auug.org.au>
On Mon, 2006-10-09 at 18:36 +1000, Stephen Rothwell wrote:
> On Mon, 09 Oct 2006 17:05:17 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > > Why not branch back to the mftb if the lower word is zero (this would
> > > also take care of the very unlikely "hitting the bug more than once" case
> > > and the "normal" case would then not have to branch at all. (And it uses
> > > one less instruction.)
> >
> > Because that would cause us to spinloop for the whole duration of a tb
> > tick in that case, which is pretty bad when the timebase is slow (the
> > slower I've seen so far is 14Mhz).
>
> Right! /me hits himself in the forehead :-)
Well, it's not -that- stupid .... I did consider it. The chances of
hitting the problem at all are so small that taking a 100ns hit or so
when it happen isn't -that- bad and it does make the normal case nicer
avoiding a branch....
In fact, I'll ask Mike what he thinks of doing it that way instead, it
might be a better option in the long run.
Ben.
^ permalink raw reply
* [PATCH] ARCH=ppc pt_regs fixes
From: Al Viro @ 2006-10-09 11:48 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/ppc/4xx_io/serial_sicc.c | 10 +++++-----
arch/ppc/8260_io/enet.c | 4 ++--
arch/ppc/8260_io/fcc_enet.c | 6 +++---
arch/ppc/8xx_io/commproc.c | 19 +++++++++----------
arch/ppc/8xx_io/cs4218_tdm.c | 4 ++--
arch/ppc/8xx_io/enet.c | 4 ++--
arch/ppc/8xx_io/fec.c | 7 +++----
arch/ppc/kernel/smp.c | 4 ++--
arch/ppc/platforms/apus_setup.c | 2 +-
arch/ppc/platforms/hdpu.c | 22 ++++++++++------------
arch/ppc/platforms/radstone_ppc7d.c | 10 +++++-----
arch/ppc/platforms/sbc82xx.c | 4 ++--
arch/ppc/syslib/cpc700.h | 2 +-
arch/ppc/syslib/cpc700_pic.c | 2 +-
arch/ppc/syslib/cpm2_pic.c | 2 +-
arch/ppc/syslib/cpm2_pic.h | 2 +-
arch/ppc/syslib/gt64260_pic.c | 9 +++------
arch/ppc/syslib/ibm440gx_common.c | 2 +-
arch/ppc/syslib/ipic.c | 2 +-
arch/ppc/syslib/m82xx_pci.c | 4 ++--
arch/ppc/syslib/m8xx_setup.c | 2 +-
arch/ppc/syslib/m8xx_wdt.c | 4 ++--
arch/ppc/syslib/mpc52xx_pic.c | 2 +-
arch/ppc/syslib/mv64360_pic.c | 18 +++++++-----------
arch/ppc/syslib/open_pic2.c | 2 +-
arch/ppc/syslib/ppc403_pic.c | 2 +-
arch/ppc/syslib/ppc4xx_pic.c | 8 ++++----
arch/ppc/syslib/ppc85xx_rio.c | 9 +++------
arch/ppc/syslib/ppc8xx_pic.c | 4 ++--
arch/ppc/syslib/xilinx_pic.c | 2 +-
include/asm-ppc/commproc.h | 3 +--
include/asm-ppc/gt64260.h | 2 +-
include/asm-ppc/mpc52xx.h | 2 +-
include/asm-ppc/mv64x60.h | 4 ++--
34 files changed, 85 insertions(+), 100 deletions(-)
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c
index 87fe9a8..e354839 100644
--- a/arch/ppc/4xx_io/serial_sicc.c
+++ b/arch/ppc/4xx_io/serial_sicc.c
@@ -414,7 +414,7 @@ static void siccuart_event(struct SICC_i
}
static void
-siccuart_rx_chars(struct SICC_info *info, struct pt_regs *regs)
+siccuart_rx_chars(struct SICC_info *info)
{
struct tty_struct *tty = info->tty;
unsigned int status, ch, rsr, flg, ignored = 0;
@@ -441,7 +441,7 @@ siccuart_rx_chars(struct SICC_info *info
#ifdef SUPPORT_SYSRQ
if (info->sysrq) {
if (ch && time_before(jiffies, info->sysrq)) {
- handle_sysrq(ch, regs, NULL);
+ handle_sysrq(ch, NULL);
info->sysrq = 0;
goto ignore_char;
}
@@ -553,15 +553,15 @@ static void siccuart_tx_chars(struct SIC
}
-static irqreturn_t siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t siccuart_int_rx(int irq, void *dev_id)
{
struct SICC_info *info = dev_id;
- siccuart_rx_chars(info, regs);
+ siccuart_rx_chars(info)
return IRQ_HANDLED;
}
-static irqreturn_t siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t siccuart_int_tx(int irq, void *dev_id)
{
struct SICC_info *info = dev_id;
siccuart_tx_chars(info);
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index ac6d55f..a6056c2 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -122,7 +122,7 @@ struct scc_enet_private {
static int scc_enet_open(struct net_device *dev);
static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int scc_enet_rx(struct net_device *dev);
-static irqreturn_t scc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
+static irqreturn_t scc_enet_interrupt(int irq, void *dev_id);
static int scc_enet_close(struct net_device *dev);
static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
@@ -273,7 +273,7 @@ #endif
* This is called from the CPM handler, not the MPC core interrupt.
*/
static irqreturn_t
-scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+scc_enet_interrupt(int irq, void * dev_id)
{
struct net_device *dev = dev_id;
volatile struct scc_enet_private *cep;
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index e347fe8..2e1943e 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -140,7 +140,7 @@ #define PKT_MAXBLR_SIZE 1536
static int fcc_enet_open(struct net_device *dev);
static int fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int fcc_enet_rx(struct net_device *dev);
-static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
+static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id);
static int fcc_enet_close(struct net_device *dev);
static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev);
/* static void set_multicast_list(struct net_device *dev); */
@@ -524,7 +524,7 @@ #endif
/* The interrupt handler. */
static irqreturn_t
-fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+fcc_enet_interrupt(int irq, void * dev_id)
{
struct net_device *dev = dev_id;
volatile struct fcc_enet_private *cep;
@@ -1563,7 +1563,7 @@ #endif /* CONFIG_USE_MDIO */
#ifdef PHY_INTERRUPT
/* This interrupt occurs when the PHY detects a link change. */
static irqreturn_t
-mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+mii_link_interrupt(int irq, void * dev_id)
{
struct net_device *dev = dev_id;
struct fcc_enet_private *fep = dev->priv;
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 9b3ace2..3b23bcb 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -47,12 +47,12 @@ cpm8xx_t *cpmp; /* Pointer to comm proc
/* CPM interrupt vector functions.
*/
struct cpm_action {
- void (*handler)(void *, struct pt_regs * regs);
+ void (*handler)(void *);
void *dev_id;
};
static struct cpm_action cpm_vecs[CPMVEC_NR];
-static irqreturn_t cpm_interrupt(int irq, void * dev, struct pt_regs * regs);
-static irqreturn_t cpm_error_interrupt(int irq, void *dev, struct pt_regs * regs);
+static irqreturn_t cpm_interrupt(int irq, void * dev);
+static irqreturn_t cpm_error_interrupt(int irq, void *dev);
static void alloc_host_memory(void);
/* Define a table of names to identify CPM interrupt handlers in
* /proc/interrupts.
@@ -205,7 +205,7 @@ cpm_interrupt_init(void)
* Get the CPM interrupt vector.
*/
int
-cpm_get_irq(struct pt_regs *regs)
+cpm_get_irq(void)
{
int cpm_vec;
@@ -222,7 +222,7 @@ cpm_get_irq(struct pt_regs *regs)
/* CPM interrupt controller cascade interrupt.
*/
static irqreturn_t
-cpm_interrupt(int irq, void * dev, struct pt_regs * regs)
+cpm_interrupt(int irq, void * dev)
{
/* This interrupt handler never actually gets called. It is
* installed only to unmask the CPM cascade interrupt in the SIU
@@ -237,7 +237,7 @@ cpm_interrupt(int irq, void * dev, struc
* tests in the interrupt handler.
*/
static irqreturn_t
-cpm_error_interrupt(int irq, void *dev, struct pt_regs *regs)
+cpm_error_interrupt(int irq, void *dev)
{
return IRQ_HANDLED;
}
@@ -246,11 +246,11 @@ cpm_error_interrupt(int irq, void *dev,
* request_irq() to the handler prototype required by cpm_install_handler().
*/
static irqreturn_t
-cpm_handler_helper(int irq, void *dev_id, struct pt_regs *regs)
+cpm_handler_helper(int irq, void *dev_id)
{
int cpm_vec = irq - CPM_IRQ_OFFSET;
- (*cpm_vecs[cpm_vec].handler)(dev_id, regs);
+ (*cpm_vecs[cpm_vec].handler)(dev_id);
return IRQ_HANDLED;
}
@@ -267,8 +267,7 @@ cpm_handler_helper(int irq, void *dev_id
* request_irq() or cpm_install_handler().
*/
void
-cpm_install_handler(int cpm_vec, void (*handler)(void *, struct pt_regs *regs),
- void *dev_id)
+cpm_install_handler(int cpm_vec, void (*handler)(void *), void *dev_id)
{
int err;
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c
index f5f300f..959d31c 100644
--- a/arch/ppc/8xx_io/cs4218_tdm.c
+++ b/arch/ppc/8xx_io/cs4218_tdm.c
@@ -331,7 +331,7 @@ static int CS_SetFormat(int format);
static int CS_SetVolume(int volume);
static void cs4218_tdm_tx_intr(void *devid);
static void cs4218_tdm_rx_intr(void *devid);
-static void cs4218_intr(void *devid, struct pt_regs *regs);
+static void cs4218_intr(void *devid);
static int cs_get_volume(uint reg);
static int cs_volume_setter(int volume, int mute);
static int cs_get_gain(uint reg);
@@ -2646,7 +2646,7 @@ #endif
* full duplex operation.
*/
static void
-cs4218_intr(void *dev_id, struct pt_regs *regs)
+cs4218_intr(void *dev_id)
{
volatile smc_t *sp;
volatile cpm8xx_t *cp;
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index a695375..b23c45b 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -149,7 +149,7 @@ struct scc_enet_private {
static int scc_enet_open(struct net_device *dev);
static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int scc_enet_rx(struct net_device *dev);
-static void scc_enet_interrupt(void *dev_id, struct pt_regs *regs);
+static void scc_enet_interrupt(void *dev_id);
static int scc_enet_close(struct net_device *dev);
static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
@@ -305,7 +305,7 @@ #endif
* This is called from the CPM handler, not the MPC core interrupt.
*/
static void
-scc_enet_interrupt(void *dev_id, struct pt_regs *regs)
+scc_enet_interrupt(void *dev_id)
{
struct net_device *dev = dev_id;
volatile struct scc_enet_private *cep;
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 8b6295b..2f9fa9e 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -198,8 +198,7 @@ static int fec_enet_start_xmit(struct sk
#ifdef CONFIG_USE_MDIO
static void fec_enet_mii(struct net_device *dev);
#endif /* CONFIG_USE_MDIO */
-static irqreturn_t fec_enet_interrupt(int irq, void * dev_id,
- struct pt_regs * regs);
+static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
#ifdef CONFIG_FEC_PACKETHOOK
static void fec_enet_tx(struct net_device *dev, __u32 regval);
static void fec_enet_rx(struct net_device *dev, __u32 regval);
@@ -472,7 +471,7 @@ #endif
* This is called from the MPC core interrupt.
*/
static irqreturn_t
-fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+fec_enet_interrupt(int irq, void * dev_id)
{
struct net_device *dev = dev_id;
volatile fec_t *fecp;
@@ -1408,7 +1407,7 @@ static
#ifdef CONFIG_RPXCLASSIC
void mii_link_interrupt(void *dev_id)
#else
-irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+irqreturn_t mii_link_interrupt(int irq, void * dev_id)
#endif
{
#ifdef CONFIG_USE_MDIO
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c
index ca57e89..96a5597 100644
--- a/arch/ppc/kernel/smp.c
+++ b/arch/ppc/kernel/smp.c
@@ -84,7 +84,7 @@ smp_message_pass(int target, int msg)
/*
* Common functions
*/
-void smp_message_recv(int msg, struct pt_regs *regs)
+void smp_message_recv(int msg)
{
atomic_inc(&ipi_recv);
@@ -100,7 +100,7 @@ void smp_message_recv(int msg, struct pt
break;
#ifdef CONFIG_XMON
case PPC_MSG_XMON_BREAK:
- xmon(regs);
+ xmon(get_irq_regs());
break;
#endif /* CONFIG_XMON */
default:
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c
index 1d034ea..063274d 100644
--- a/arch/ppc/platforms/apus_setup.c
+++ b/arch/ppc/platforms/apus_setup.c
@@ -492,7 +492,7 @@ apus_halt(void)
static unsigned char last_ipl[8];
-int apus_get_irq(struct pt_regs* regs)
+int apus_get_irq(void)
{
unsigned char ipl_emu, mask;
unsigned int level;
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c
index e0f112a..d809e17 100644
--- a/arch/ppc/platforms/hdpu.c
+++ b/arch/ppc/platforms/hdpu.c
@@ -659,8 +659,7 @@ #ifdef CONFIG_SMP
char hdpu_smp0[] = "SMP Cpu #0";
char hdpu_smp1[] = "SMP Cpu #1";
-static irqreturn_t hdpu_smp_cpu0_int_handler(int irq, void *dev_id,
- struct pt_regs *regs)
+static irqreturn_t hdpu_smp_cpu0_int_handler(int irq, void *dev_id)
{
volatile unsigned int doorbell;
@@ -670,22 +669,21 @@ static irqreturn_t hdpu_smp_cpu0_int_han
mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, doorbell);
if (doorbell & 1) {
- smp_message_recv(0, regs);
+ smp_message_recv(0);
}
if (doorbell & 2) {
- smp_message_recv(1, regs);
+ smp_message_recv(1);
}
if (doorbell & 4) {
- smp_message_recv(2, regs);
+ smp_message_recv(2);
}
if (doorbell & 8) {
- smp_message_recv(3, regs);
+ smp_message_recv(3);
}
return IRQ_HANDLED;
}
-static irqreturn_t hdpu_smp_cpu1_int_handler(int irq, void *dev_id,
- struct pt_regs *regs)
+static irqreturn_t hdpu_smp_cpu1_int_handler(int irq, void *dev_id)
{
volatile unsigned int doorbell;
@@ -695,16 +693,16 @@ static irqreturn_t hdpu_smp_cpu1_int_han
mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, doorbell);
if (doorbell & 1) {
- smp_message_recv(0, regs);
+ smp_message_recv(0);
}
if (doorbell & 2) {
- smp_message_recv(1, regs);
+ smp_message_recv(1);
}
if (doorbell & 4) {
- smp_message_recv(2, regs);
+ smp_message_recv(2);
}
if (doorbell & 8) {
- smp_message_recv(3, regs);
+ smp_message_recv(3);
}
return IRQ_HANDLED;
}
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index 3bb530a..13d70ab 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -451,11 +451,11 @@ static void __init ppc7d_calibrate_decr(
* Interrupt stuff
*****************************************************************************/
-static irqreturn_t ppc7d_i8259_intr(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t ppc7d_i8259_intr(int irq, void *dev_id)
{
u32 temp = mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE);
if (temp & (1 << 28)) {
- i8259_irq(regs);
+ i8259_irq();
mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, temp & (~(1 << 28)));
return IRQ_HANDLED;
}
@@ -536,13 +536,13 @@ static u32 ppc7d_irq_canonicalize(u32 ir
return irq;
}
-static int ppc7d_get_irq(struct pt_regs *regs)
+static int ppc7d_get_irq(void)
{
int irq;
- irq = mv64360_get_irq(regs);
+ irq = mv64360_get_irq();
if (irq == (mv64360_irq_base + MV64x60_IRQ_GPP28))
- irq = i8259_irq(regs);
+ irq = i8259_irq();
return irq;
}
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
index 60b769c..cc0935c 100644
--- a/arch/ppc/platforms/sbc82xx.c
+++ b/arch/ppc/platforms/sbc82xx.c
@@ -121,7 +121,7 @@ struct hw_interrupt_type sbc82xx_i8259_i
.end = sbc82xx_i8259_end_irq,
};
-static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id)
{
spin_lock(&sbc82xx_i8259_lock);
@@ -139,7 +139,7 @@ static irqreturn_t sbc82xx_i8259_demux(i
return IRQ_HANDLED;
}
}
- __do_IRQ(NR_SIU_INTS + irq, regs);
+ __do_IRQ(NR_SIU_INTS + irq);
return IRQ_HANDLED;
}
diff --git a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h
index 0a8a5d8..987e9aa 100644
--- a/arch/ppc/syslib/cpc700.h
+++ b/arch/ppc/syslib/cpc700.h
@@ -91,6 +91,6 @@ extern struct hw_interrupt_type cpc700_p
extern unsigned int cpc700_irq_assigns[32][2];
extern void __init cpc700_init_IRQ(void);
-extern int cpc700_get_irq(struct pt_regs *);
+extern int cpc700_get_irq(void);
#endif /* __PPC_SYSLIB_CPC700_H__ */
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c
index 172aa21..d48e8f4 100644
--- a/arch/ppc/syslib/cpc700_pic.c
+++ b/arch/ppc/syslib/cpc700_pic.c
@@ -158,7 +158,7 @@ cpc700_init_IRQ(void)
* Find the highest IRQ that generating an interrupt, if any.
*/
int
-cpc700_get_irq(struct pt_regs *regs)
+cpc700_get_irq(void)
{
int irq = 0;
u_int irq_status, irq_test = 1;
diff --git a/arch/ppc/syslib/cpm2_pic.c b/arch/ppc/syslib/cpm2_pic.c
index c0fee0b..fb2d584 100644
--- a/arch/ppc/syslib/cpm2_pic.c
+++ b/arch/ppc/syslib/cpm2_pic.c
@@ -123,7 +123,7 @@ static struct hw_interrupt_type cpm2_pic
.end = cpm2_end_irq,
};
-int cpm2_get_irq(struct pt_regs *regs)
+int cpm2_get_irq(void)
{
int irq;
unsigned long bits;
diff --git a/arch/ppc/syslib/cpm2_pic.h b/arch/ppc/syslib/cpm2_pic.h
index 97cab8f..4673393 100644
--- a/arch/ppc/syslib/cpm2_pic.h
+++ b/arch/ppc/syslib/cpm2_pic.h
@@ -1,7 +1,7 @@
#ifndef _PPC_KERNEL_CPM2_H
#define _PPC_KERNEL_CPM2_H
-extern int cpm2_get_irq(struct pt_regs *regs);
+extern int cpm2_get_irq(void);
extern void cpm2_init_IRQ(void);
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c
index 7fd550a..e84d432 100644
--- a/arch/ppc/syslib/gt64260_pic.c
+++ b/arch/ppc/syslib/gt64260_pic.c
@@ -110,9 +110,6 @@ gt64260_init_irq(void)
* This function returns the lowest interrupt number of all interrupts that
* are currently asserted.
*
- * Input Variable(s):
- * struct pt_regs* not used
- *
* Output Variable(s):
* None.
*
@@ -120,7 +117,7 @@ gt64260_init_irq(void)
* int <interrupt number> or -2 (bogus interrupt)
*/
int
-gt64260_get_irq(struct pt_regs *regs)
+gt64260_get_irq(void)
{
int irq;
int irq_gpp;
@@ -229,7 +226,7 @@ gt64260_mask_irq(unsigned int irq)
}
static irqreturn_t
-gt64260_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+gt64260_cpu_error_int_handler(int irq, void *dev_id)
{
printk(KERN_ERR "gt64260_cpu_error_int_handler: %s 0x%08x\n",
"Error on CPU interface - Cause regiser",
@@ -250,7 +247,7 @@ gt64260_cpu_error_int_handler(int irq, v
}
static irqreturn_t
-gt64260_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+gt64260_pci_error_int_handler(int irq, void *dev_id)
{
u32 val;
unsigned int pci_bus = (unsigned int)dev_id;
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c
index 4b77e6c..6ad52f4 100644
--- a/arch/ppc/syslib/ibm440gx_common.c
+++ b/arch/ppc/syslib/ibm440gx_common.c
@@ -119,7 +119,7 @@ static inline u32 l2c_diag(u32 addr)
return mfdcr(DCRN_L2C0_DATA);
}
-static irqreturn_t l2c_error_handler(int irq, void* dev, struct pt_regs* regs)
+static irqreturn_t l2c_error_handler(int irq, void* dev)
{
u32 sr = mfdcr(DCRN_L2C0_SR);
if (sr & L2C_SR_CPE){
diff --git a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c
index 46801f5..10659c2 100644
--- a/arch/ppc/syslib/ipic.c
+++ b/arch/ppc/syslib/ipic.c
@@ -601,7 +601,7 @@ void ipic_clear_mcp_status(u32 mask)
}
/* Return an interrupt vector or -1 if no interrupt is pending. */
-int ipic_get_irq(struct pt_regs *regs)
+int ipic_get_irq(void)
{
int irq;
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c
index d3fa264..e3b586b 100644
--- a/arch/ppc/syslib/m82xx_pci.c
+++ b/arch/ppc/syslib/m82xx_pci.c
@@ -117,7 +117,7 @@ struct hw_interrupt_type pq2pci_ic = {
};
static irqreturn_t
-pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs)
+pq2pci_irq_demux(int irq, void *dev_id)
{
unsigned long stat, mask, pend;
int bit;
@@ -130,7 +130,7 @@ pq2pci_irq_demux(int irq, void *dev_id,
break;
for (bit = 0; pend != 0; ++bit, pend <<= 1) {
if (pend & 0x80000000)
- __do_IRQ(NR_CPM_INTS + bit, regs);
+ __do_IRQ(NR_CPM_INTS + bit);
}
}
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 54303a7..d8d299b 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -169,7 +169,7 @@ #endif
}
/* A place holder for time base interrupts, if they are ever enabled. */
-irqreturn_t timebase_interrupt(int irq, void * dev, struct pt_regs * regs)
+irqreturn_t timebase_interrupt(int irq, void * dev)
{
printk ("timebase_interrupt()\n");
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c
index ac11d7b..fffac8c 100644
--- a/arch/ppc/syslib/m8xx_wdt.c
+++ b/arch/ppc/syslib/m8xx_wdt.c
@@ -21,7 +21,7 @@ #include <syslib/m8xx_wdt.h>
static int wdt_timeout;
int m8xx_has_internal_rtc = 0;
-static irqreturn_t m8xx_wdt_interrupt(int, void *, struct pt_regs *);
+static irqreturn_t m8xx_wdt_interrupt(int, void *);
static struct irqaction m8xx_wdt_irqaction = {
.handler = m8xx_wdt_interrupt,
.name = "watchdog",
@@ -35,7 +35,7 @@ void m8xx_wdt_reset(void)
out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
}
-static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs)
+static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev)
{
volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR;
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c
index 6425b5c..af35a31 100644
--- a/arch/ppc/syslib/mpc52xx_pic.c
+++ b/arch/ppc/syslib/mpc52xx_pic.c
@@ -220,7 +220,7 @@ mpc52xx_init_irq(void)
}
int
-mpc52xx_get_irq(struct pt_regs *regs)
+mpc52xx_get_irq(void)
{
u32 status;
int irq = -1;
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c
index 3f6d162..b57589e 100644
--- a/arch/ppc/syslib/mv64360_pic.c
+++ b/arch/ppc/syslib/mv64360_pic.c
@@ -55,10 +55,9 @@ #endif
static void mv64360_unmask_irq(unsigned int);
static void mv64360_mask_irq(unsigned int);
-static irqreturn_t mv64360_cpu_error_int_handler(int, void *, struct pt_regs *);
-static irqreturn_t mv64360_sram_error_int_handler(int, void *,
- struct pt_regs *);
-static irqreturn_t mv64360_pci_error_int_handler(int, void *, struct pt_regs *);
+static irqreturn_t mv64360_cpu_error_int_handler(int, void *);
+static irqreturn_t mv64360_sram_error_int_handler(int, void *);
+static irqreturn_t mv64360_pci_error_int_handler(int, void *);
/* ========================== local declarations =========================== */
@@ -131,9 +130,6 @@ mv64360_init_irq(void)
* This function returns the lowest interrupt number of all interrupts that
* are currently asserted.
*
- * Input Variable(s):
- * struct pt_regs* not used
- *
* Output Variable(s):
* None.
*
@@ -142,7 +138,7 @@ mv64360_init_irq(void)
*
*/
int
-mv64360_get_irq(struct pt_regs *regs)
+mv64360_get_irq(void)
{
int irq;
int irq_gpp;
@@ -283,7 +279,7 @@ #endif
}
static irqreturn_t
-mv64360_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+mv64360_cpu_error_int_handler(int irq, void *dev_id)
{
printk(KERN_ERR "mv64360_cpu_error_int_handler: %s 0x%08x\n",
"Error on CPU interface - Cause regiser",
@@ -304,7 +300,7 @@ mv64360_cpu_error_int_handler(int irq, v
}
static irqreturn_t
-mv64360_sram_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+mv64360_sram_error_int_handler(int irq, void *dev_id)
{
printk(KERN_ERR "mv64360_sram_error_int_handler: %s 0x%08x\n",
"Error in internal SRAM - Cause register",
@@ -325,7 +321,7 @@ mv64360_sram_error_int_handler(int irq,
}
static irqreturn_t
-mv64360_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+mv64360_pci_error_int_handler(int irq, void *dev_id)
{
u32 val;
unsigned int pci_bus = (unsigned int)dev_id;
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c
index e1ff971..d585207 100644
--- a/arch/ppc/syslib/open_pic2.c
+++ b/arch/ppc/syslib/open_pic2.c
@@ -529,7 +529,7 @@ static void openpic2_end_irq(unsigned in
}
int
-openpic2_get_irq(struct pt_regs *regs)
+openpic2_get_irq(void)
{
int irq = openpic2_irq();
diff --git a/arch/ppc/syslib/ppc403_pic.c b/arch/ppc/syslib/ppc403_pic.c
index 1584c8b..607ebd1 100644
--- a/arch/ppc/syslib/ppc403_pic.c
+++ b/arch/ppc/syslib/ppc403_pic.c
@@ -42,7 +42,7 @@ static struct hw_interrupt_type ppc403_a
};
int
-ppc403_pic_get_irq(struct pt_regs *regs)
+ppc403_pic_get_irq(void)
{
int irq;
unsigned long bits;
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c
index 745685d..ee0da4b 100644
--- a/arch/ppc/syslib/ppc4xx_pic.c
+++ b/arch/ppc/syslib/ppc4xx_pic.c
@@ -96,7 +96,7 @@ UIC_HANDLERS(1);
UIC_HANDLERS(2);
UIC_HANDLERS(3);
-static int ppc4xx_pic_get_irq(struct pt_regs *regs)
+static int ppc4xx_pic_get_irq(void)
{
u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
if (uic0 & UIC0_UIC1NC)
@@ -125,7 +125,7 @@ UIC_HANDLERS(0);
UIC_HANDLERS(1);
UIC_HANDLERS(2);
-static int ppc4xx_pic_get_irq(struct pt_regs *regs)
+static int ppc4xx_pic_get_irq(void)
{
u32 uicb = mfdcr(DCRN_UIC_MSR(UICB));
if (uicb & UICB_UIC0NC)
@@ -158,7 +158,7 @@ #define ACK_UIC1_PARENT mtdcr(DCRN_UIC_S
UIC_HANDLERS(0);
UIC_HANDLERS(1);
-static int ppc4xx_pic_get_irq(struct pt_regs *regs)
+static int ppc4xx_pic_get_irq(void)
{
u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
if (uic0 & UIC0_UIC1NC)
@@ -179,7 +179,7 @@ #elif NR_UICS == 1
#define ACK_UIC0_PARENT
UIC_HANDLERS(0);
-static int ppc4xx_pic_get_irq(struct pt_regs *regs)
+static int ppc4xx_pic_get_irq(void)
{
u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
return uic0 ? 32 - ffs(uic0) : -1;
diff --git a/arch/ppc/syslib/ppc85xx_rio.c b/arch/ppc/syslib/ppc85xx_rio.c
index d9b471b..05b0e94 100644
--- a/arch/ppc/syslib/ppc85xx_rio.c
+++ b/arch/ppc/syslib/ppc85xx_rio.c
@@ -349,13 +349,12 @@ EXPORT_SYMBOL_GPL(rio_hw_add_outb_messag
* mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
* @irq: Linux interrupt number
* @dev_instance: Pointer to interrupt-specific data
- * @regs: Register context
*
* Handles outbound message interrupts. Executes a register outbound
* mailbox event handler and acks the interrupt occurence.
*/
static irqreturn_t
-mpc85xx_rio_tx_handler(int irq, void *dev_instance, struct pt_regs *regs)
+mpc85xx_rio_tx_handler(int irq, void *dev_instance)
{
int osr;
struct rio_mport *port = (struct rio_mport *)dev_instance;
@@ -517,13 +516,12 @@ void rio_close_outb_mbox(struct rio_mpor
* mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
* @irq: Linux interrupt number
* @dev_instance: Pointer to interrupt-specific data
- * @regs: Register context
*
* Handles inbound message interrupts. Executes a registered inbound
* mailbox event handler and acks the interrupt occurence.
*/
static irqreturn_t
-mpc85xx_rio_rx_handler(int irq, void *dev_instance, struct pt_regs *regs)
+mpc85xx_rio_rx_handler(int irq, void *dev_instance)
{
int isr;
struct rio_mport *port = (struct rio_mport *)dev_instance;
@@ -736,13 +734,12 @@ EXPORT_SYMBOL_GPL(rio_hw_get_inb_message
* mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
* @irq: Linux interrupt number
* @dev_instance: Pointer to interrupt-specific data
- * @regs: Register context
*
* Handles doorbell interrupts. Parses a list of registered
* doorbell event handlers and executes a matching event handler.
*/
static irqreturn_t
-mpc85xx_rio_dbell_handler(int irq, void *dev_instance, struct pt_regs *regs)
+mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
{
int dsr;
struct rio_mport *port = (struct rio_mport *)dev_instance;
diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c
index d6c25fe..e8619c7 100644
--- a/arch/ppc/syslib/ppc8xx_pic.c
+++ b/arch/ppc/syslib/ppc8xx_pic.c
@@ -10,7 +10,7 @@ #include <asm/8xx_immap.h>
#include <asm/mpc8xx.h>
#include "ppc8xx_pic.h"
-extern int cpm_get_irq(struct pt_regs *regs);
+extern int cpm_get_irq(void);
/* The 8xx internal interrupt controller. It is usually
* the only interrupt controller. Some boards, like the MBX and
@@ -96,7 +96,7 @@ m8xx_get_irq(struct pt_regs *regs)
* get back SIU_LEVEL7. In this case, return -1
*/
if (irq == CPM_INTERRUPT)
- irq = CPM_IRQ_OFFSET + cpm_get_irq(regs);
+ irq = CPM_IRQ_OFFSET + cpm_get_irq();
#if defined(CONFIG_PCI)
else if (irq == ISA_BRIDGE_INT) {
int isa_irq;
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c
index 39a93dc..6fd4cdb 100644
--- a/arch/ppc/syslib/xilinx_pic.c
+++ b/arch/ppc/syslib/xilinx_pic.c
@@ -86,7 +86,7 @@ static struct hw_interrupt_type xilinx_i
};
int
-xilinx_pic_get_irq(struct pt_regs *regs)
+xilinx_pic_get_irq(void)
{
int irq;
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h
index 3247bea..7b06b4e 100644
--- a/include/asm-ppc/commproc.h
+++ b/include/asm-ppc/commproc.h
@@ -690,8 +690,7 @@ #define CICR_HP_MASK ((uint)0x00001f00)
#define CICR_IEN ((uint)0x00000080) /* Int. enable */
#define CICR_SPS ((uint)0x00000001) /* SCC Spread */
-extern void cpm_install_handler(int vec,
- void (*handler)(void *, struct pt_regs *regs), void *dev_id);
+extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
extern void cpm_free_handler(int vec);
#endif /* __CPM_8XX__ */
diff --git a/include/asm-ppc/gt64260.h b/include/asm-ppc/gt64260.h
index cd0ef64..9e63b3c 100644
--- a/include/asm-ppc/gt64260.h
+++ b/include/asm-ppc/gt64260.h
@@ -315,7 +315,7 @@ int gt64260_get_base(u32 *base);
int gt64260_pci_exclude_device(u8 bus, u8 devfn);
void gt64260_init_irq(void);
-int gt64260_get_irq(struct pt_regs *regs);
+int gt64260_get_irq(void);
void gt64260_mpsc_progress(char *s, unsigned short hex);
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
index 7e98428..64c8874 100644
--- a/include/asm-ppc/mpc52xx.h
+++ b/include/asm-ppc/mpc52xx.h
@@ -415,7 +415,7 @@ #endif /* __ASSEMBLY__ */
#ifndef __ASSEMBLY__
extern void mpc52xx_init_irq(void);
-extern int mpc52xx_get_irq(struct pt_regs *regs);
+extern int mpc52xx_get_irq(void);
extern unsigned long mpc52xx_find_end_of_memory(void);
extern void mpc52xx_set_bat(void);
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h
index 663edbe..db3776f 100644
--- a/include/asm-ppc/mv64x60.h
+++ b/include/asm-ppc/mv64x60.h
@@ -336,9 +336,9 @@ int mv64x60_pci_exclude_device(u8 bus, u
void gt64260_init_irq(void);
-int gt64260_get_irq(struct pt_regs *regs);
+int gt64260_get_irq(void);
void mv64360_init_irq(void);
-int mv64360_get_irq(struct pt_regs *regs);
+int mv64360_get_irq(void);
u32 mv64x60_mask(u32 val, u32 num_bits);
u32 mv64x60_shift_left(u32 val, u32 num_bits);
--
1.4.2.GIT
^ permalink raw reply related
* Re: [PATCH] ARCH=ppc pt_regs fixes
From: Josh Boyer @ 2006-10-09 12:49 UTC (permalink / raw)
To: Al Viro; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <20061009114842.GO29920@ftp.linux.org.uk>
On Mon, 2006-10-09 at 12:48 +0100, Al Viro wrote:
> arch/ppc/syslib/ppc4xx_pic.c | 8 ++++----
I already sent a patch for this file and I was working on some of the
other 4xx stuff. But overall yours is much more comprehensive.
Ack-by: Josh Boyer <jdub@us.ibm.com>
josh
^ permalink raw reply
* Problem with OPB access on 440GX and Linux 2.6.15
From: powerpc440 @ 2006-10-09 13:46 UTC (permalink / raw)
To: linuxppc-embedded
Hi everybody,
I'm having a PPC440GX based board, based on Ocotea.
On the board is a Xilinx CPLD chip, connected with OPB (On-Chip
Peripheral Bus).
Under U-Boot I can communicate – reading and writing, without any
problems, but when the Linux kernel ones is loaded, then I'm getting
error message: “Bus error”. This error message appears on reading or
writing.
How I can access the units, which are connected with OPB?
There are the source code from the driver, that I use :
static void io_addr = ioremap(0x48300000, 0x100000); /* allocate 1MB
adress space */
long value = readl(io_addr + 0x7000);
and the error message:
VA: 0xe2180000
Machine check in kernel mode.
Data Read PLB Error
PLB0: BEAR=0x0000000048307000 ACR= 0x9b000000 BESR= 0x0c000000
POB0: BEAR=0x00000000040c0020 BESR0=0x00000000 BESR1=0x00000000
OPB0: BEAR=0x0000000000000000 BSTAT=0x00000000
Oops: machine check, sig: 7 [#4]
NIP: E107D078 LR: E107D068 CTR: 00000000
REGS: c0335f50 TRAP: 0202 Not tainted (2.6.16.27-himadef-0)
MSR: 00029000 <EE,ME> CR: 22004024 XER: 20000000
TASK = dfa1cc10[412] 'cat' THREAD: dcc54000
GPR00: E107D068 DCC55E80 DFA1CC10 00000010 00000010 E107D7AB D490F704
00000010
GPR08: 00000000 E2180000 00000000 FFFFFFFF 22004048 1001C334 00000000
00000400
GPR16: 00000001 100B0000 10014344 00000000 00000002 00000000 00000000
DDAC8600
GPR24: 00000000 DCC55EB8 DD3E5000 00000C00 E1080000 00000010 10014204
00001000
NIP [E107D078] sensor_proc_read+0x58/0x94 [himaio]
LR [E107D068] sensor_proc_read+0x48/0x94 [himaio]
Call Trace:
[DCC55E80] [E107D068] sensor_proc_read+0x48/0x94 [himaio] (unreliable)
[DCC55EB0] [C008C6EC] proc_file_read+0x2a4/0x354
[DCC55EF0] [C00564F0] vfs_read+0xcc/0x1a0
[DCC55F10] [C0057228] sys_read+0x4c/0x90
[DCC55F40] [C00019C4] ret_from_syscall+0x0/0x3c
Instruction dump:
7cf93b78 4800048d 80dce160 3ca0e108 38a5d7a0 7f43d378 7f64db78 48000485
813ce160 7c7d1b78 38c97000 7cc0342c <0c060000> 4c00012c 3ca0e108 7c7a1a14
Thanks in advance!
^ permalink raw reply
* Re: powerpc: Fix make rules for dtc
From: Segher Boessenkool @ 2006-10-09 14:21 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20061009002945.GA2259@localhost.localdomain>
>>> clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
>>> - $(obj)/empty.c
>>> + $(obj)/empty.c *.dtb
>>
>> If this wildcard works at all, it will still do the wrong thing:
>> deleting all .dtb files (even the ones that the Makefile cannot
>> create again, e.g., the user put them in the tree manually) is
>> at best not very polite.
>
> It certainly works at all
My problem with it is the := which might be expanded at the wrong
time. Or maybe that won't glob the *.dtb yet, who knows. It's
not obviously "working" either way.
> (the preceding $(obj)/empty.c, however, is
> wrong, I've sent a separate patch for that). One could say the same
> thing for *.o in clean targets,
Yes, and that's a very well-known problem.
> though I guess adding .dtb files is
> rather more likely. However, I can't seen an obvious way of
> generating a list of the re-creatable dtbs, without an explicit
> listing of every file in arch/powerpc/boot/dts which sounds like a bit
> of a pain. Suggestions?
You shouldn't clean _all_ dtb's that you could build, only the dtb's
that you _did_ build. You already have a rule for what dtb's to
build I assume; just copy the logic from there.
Segher
^ permalink raw reply
* Re: Problem with OPB access on 440GX and Linux 2.6.15
From: Gerhard Jaeger @ 2006-10-09 14:49 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <452A52B4.1010303@googlemail.com>
On Monday 09 October 2006 15:46, powerpc440 wrote:
> Hi everybody,
>=20
> I'm having a PPC440GX based board, based on Ocotea.
> On the board is a Xilinx CPLD chip, connected with OPB (On-Chip
> Peripheral Bus).
> Under U-Boot I can communicate =96 reading and writing, without any
> problems, but when the Linux kernel ones is loaded, then I'm getting
> error message: =93Bus error=94. This error message appears on reading or
> writing.
> How I can access the units, which are connected with OPB?
>=20
> There are the source code from the driver, that I use :
>=20
> static void io_addr =3D ioremap(0x48300000, 0x100000); /* allocate 1MB
> adress space */
> long value =3D readl(io_addr + 0x7000);
>=20
[SNIPSNAP]
Hi,
are you sure the address is correct?
This looks to me like the Ocotea FPGA address minus 0x100000000...
In that case use ioremap64().
HTH
Gerhard
=2D-=20
Gerhard Jaeger <gjaeger@sysgo.com> =20
SYSGO AG Embedded and Real-Time Software
www.sysgo.com | www.elinos.com | www.pikeos.com | www.osek.de=20
^ permalink raw reply
* [PATCH] extern doesn't make sense on a definition of function...
From: Al Viro @ 2006-10-09 15:22 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/powerpc/kernel/irq.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 829ac18..5e37bf1 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -572,8 +572,8 @@ unsigned int irq_create_mapping(struct i
}
EXPORT_SYMBOL_GPL(irq_create_mapping);
-extern unsigned int irq_create_of_mapping(struct device_node *controller,
- u32 *intspec, unsigned int intsize)
+unsigned int irq_create_of_mapping(struct device_node *controller,
+ u32 *intspec, unsigned int intsize)
{
struct irq_host *host;
irq_hw_number_t hwirq;
--
1.4.2.GIT
^ permalink raw reply related
* [PATCH] trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c)
From: Al Viro @ 2006-10-09 15:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index 4679c52..39020c1 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -35,17 +35,17 @@ #define PA_PXP_CFA(bus, devfn, off) (((b
#define CONFIG_OFFSET_VALID(off) ((off) < 4096)
-static unsigned long pa_pxp_cfg_addr(struct pci_controller *hose,
+static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose,
u8 bus, u8 devfn, int offset)
{
- return ((unsigned long)hose->cfg_data) + PA_PXP_CFA(bus, devfn, offset);
+ return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset);
}
static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
int offset, int len, u32 *val)
{
struct pci_controller *hose;
- unsigned long addr;
+ void volatile __iomem *addr;
hose = pci_bus_to_host(bus);
if (!hose)
@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci
*/
switch (len) {
case 1:
- *val = in_8((u8 *)addr);
+ *val = in_8(addr);
break;
case 2:
- *val = in_le16((u16 *)addr);
+ *val = in_le16(addr);
break;
default:
- *val = in_le32((u32 *)addr);
+ *val = in_le32(addr);
break;
}
@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pc
int offset, int len, u32 val)
{
struct pci_controller *hose;
- unsigned long addr;
+ void volatile __iomem *addr;
hose = pci_bus_to_host(bus);
if (!hose)
@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pc
*/
switch (len) {
case 1:
- out_8((u8 *)addr, val);
- (void) in_8((u8 *)addr);
+ out_8(addr, val);
+ (void) in_8(addr);
break;
case 2:
- out_le16((u16 *)addr, val);
- (void) in_le16((u16 *)addr);
+ out_le16(addr, val);
+ (void) in_le16(addr);
break;
default:
- out_le32((u32 *)addr, val);
- (void) in_le32((u32 *)addr);
+ out_le32(addr, val);
+ (void) in_le32(addr);
break;
}
return PCIBIOS_SUCCESSFUL;
--
1.4.2.GIT
^ permalink raw reply related
* [PATCH] mv64630_pic NULL noise removal
From: Al Viro @ 2006-10-09 15:26 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/ppc/syslib/mv64360_pic.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c
index 3f6d162..5104386 100644
--- a/arch/ppc/syslib/mv64360_pic.c
+++ b/arch/ppc/syslib/mv64360_pic.c
@@ -380,7 +380,7 @@ mv64360_register_hdlrs(void)
/* Clear old errors and register CPU interface error intr handler */
mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base,
- mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0)))
+ mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, NULL)))
printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
@@ -389,7 +389,7 @@ mv64360_register_hdlrs(void)
/* Clear old errors and register internal SRAM error intr handler */
mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base,
- mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0)))
+ mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, NULL)))
printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
/* Clear old errors and register PCI 0 error intr handler */
--
1.4.2.GIT
^ permalink raw reply related
* Re: [PATCH] trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c)
From: Olof Johansson @ 2006-10-09 15:40 UTC (permalink / raw)
To: Al Viro; +Cc: linuxppc-dev, Linus Torvalds, linux-kernel
In-Reply-To: <20061009152309.GQ29920@ftp.linux.org.uk>
On Mon, 9 Oct 2006 16:23:09 +0100 Al Viro <viro@ftp.linux.org.uk> wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Olof Johansson <olof@lixom.net>
> ---
> arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++-------------
> 1 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
> index 4679c52..39020c1 100644
> --- a/arch/powerpc/platforms/pasemi/pci.c
> +++ b/arch/powerpc/platforms/pasemi/pci.c
> @@ -35,17 +35,17 @@ #define PA_PXP_CFA(bus, devfn, off) (((b
>
> #define CONFIG_OFFSET_VALID(off) ((off) < 4096)
>
> -static unsigned long pa_pxp_cfg_addr(struct pci_controller *hose,
> +static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose,
> u8 bus, u8 devfn, int offset)
> {
> - return ((unsigned long)hose->cfg_data) + PA_PXP_CFA(bus, devfn, offset);
> + return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset);
> }
>
> static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
> int offset, int len, u32 *val)
> {
> struct pci_controller *hose;
> - unsigned long addr;
> + void volatile __iomem *addr;
>
> hose = pci_bus_to_host(bus);
> if (!hose)
> @@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci
> */
> switch (len) {
> case 1:
> - *val = in_8((u8 *)addr);
> + *val = in_8(addr);
> break;
> case 2:
> - *val = in_le16((u16 *)addr);
> + *val = in_le16(addr);
> break;
> default:
> - *val = in_le32((u32 *)addr);
> + *val = in_le32(addr);
> break;
> }
>
> @@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pc
> int offset, int len, u32 val)
> {
> struct pci_controller *hose;
> - unsigned long addr;
> + void volatile __iomem *addr;
>
> hose = pci_bus_to_host(bus);
> if (!hose)
> @@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pc
> */
> switch (len) {
> case 1:
> - out_8((u8 *)addr, val);
> - (void) in_8((u8 *)addr);
> + out_8(addr, val);
> + (void) in_8(addr);
> break;
> case 2:
> - out_le16((u16 *)addr, val);
> - (void) in_le16((u16 *)addr);
> + out_le16(addr, val);
> + (void) in_le16(addr);
> break;
> default:
> - out_le32((u32 *)addr, val);
> - (void) in_le32((u32 *)addr);
> + out_le32(addr, val);
> + (void) in_le32(addr);
> break;
> }
> return PCIBIOS_SUCCESSFUL;
^ permalink raw reply
* Re: Problem with OPB access on 440GX and Linux 2.6.15
From: Jeff Mock @ 2006-10-09 15:21 UTC (permalink / raw)
To: powerpc440; +Cc: linuxppc-embedded
In-Reply-To: <452A52B4.1010303@googlemail.com>
Hey,
You're using the EBC, which is hooked up to the OPB (if I've got my IBM
letter soup correct).
The 440GX has 36-bit physical address. The EBC is mapped at address
0x100000000ULL-0x13fffffffULL. The phys_addr_t type in the PPC kernel
(first parameter to ioremap) is an 8-byte thing to hold the 36-bit
address. So, to map the physical address of the I/O device, your call
should look something like:
p = ioremap(0x100000000ULL, 1<<20);
The actual address is set by the way you program the EBC registers for
the chip select on your device. It's a good idea to look at all 8 pairs
of registers for configuring chip selects, if they overlap or if one
pair is strangely configured weird things can happen.
EBC0_BxCR
EBC0_BxCP
It sounds like your EBC registers are getting setup in u-boot and not in
the kernel since you can access the device in u-boot. I think this is a
good way to do things. You probably just have the wrong physical
address in your driver.
jeff
powerpc440 wrote:
> Hi everybody,
>
> I'm having a PPC440GX based board, based on Ocotea.
> On the board is a Xilinx CPLD chip, connected with OPB (On-Chip
> Peripheral Bus).
> Under U-Boot I can communicate – reading and writing, without any
> problems, but when the Linux kernel ones is loaded, then I'm getting
> error message: “Bus error”. This error message appears on reading or
> writing.
> How I can access the units, which are connected with OPB?
>
> There are the source code from the driver, that I use :
>
> static void io_addr = ioremap(0x48300000, 0x100000); /* allocate 1MB
> adress space */
> long value = readl(io_addr + 0x7000);
>
> and the error message:
>
> VA: 0xe2180000
> Machine check in kernel mode.
> Data Read PLB Error
> PLB0: BEAR=0x0000000048307000 ACR= 0x9b000000 BESR= 0x0c000000
> POB0: BEAR=0x00000000040c0020 BESR0=0x00000000 BESR1=0x00000000
> OPB0: BEAR=0x0000000000000000 BSTAT=0x00000000
> Oops: machine check, sig: 7 [#4]
> NIP: E107D078 LR: E107D068 CTR: 00000000
> REGS: c0335f50 TRAP: 0202 Not tainted (2.6.16.27-himadef-0)
> MSR: 00029000 <EE,ME> CR: 22004024 XER: 20000000
> TASK = dfa1cc10[412] 'cat' THREAD: dcc54000
> GPR00: E107D068 DCC55E80 DFA1CC10 00000010 00000010 E107D7AB D490F704
> 00000010
> GPR08: 00000000 E2180000 00000000 FFFFFFFF 22004048 1001C334 00000000
> 00000400
> GPR16: 00000001 100B0000 10014344 00000000 00000002 00000000 00000000
> DDAC8600
> GPR24: 00000000 DCC55EB8 DD3E5000 00000C00 E1080000 00000010 10014204
> 00001000
> NIP [E107D078] sensor_proc_read+0x58/0x94 [himaio]
> LR [E107D068] sensor_proc_read+0x48/0x94 [himaio]
> Call Trace:
> [DCC55E80] [E107D068] sensor_proc_read+0x48/0x94 [himaio] (unreliable)
> [DCC55EB0] [C008C6EC] proc_file_read+0x2a4/0x354
> [DCC55EF0] [C00564F0] vfs_read+0xcc/0x1a0
> [DCC55F10] [C0057228] sys_read+0x4c/0x90
> [DCC55F40] [C00019C4] ret_from_syscall+0x0/0x3c
> Instruction dump:
> 7cf93b78 4800048d 80dce160 3ca0e108 38a5d7a0 7f43d378 7f64db78 48000485
> 813ce160 7c7d1b78 38c97000 7cc0342c <0c060000> 4c00012c 3ca0e108 7c7a1a14
>
> Thanks in advance!
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply
* build 016 starting no CVS checkins please
From: Neil Wilson @ 2006-10-09 16:20 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
Neil
--
Neil Wilson
Principal Engineer, Embedded Software
Airspan Communications Ltd.
Cambridge House
Oxford Road
Uxbridge
UB8 1UN
UK
+44(0)1895-467265
nwilson@airspan.com
[-- Attachment #2: Type: text/html, Size: 818 bytes --]
^ permalink raw reply
* Re: powerpc: Fix make rules for dtc
From: David Gibson @ 2006-10-10 0:23 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <811124BA-A99B-46B9-9A16-4111D937468E@kernel.crashing.org>
On Mon, Oct 09, 2006 at 04:21:31PM +0200, Segher Boessenkool wrote:
> >>> clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
> >>> - $(obj)/empty.c
> >>> + $(obj)/empty.c *.dtb
> >>
> >> If this wildcard works at all, it will still do the wrong thing:
> >> deleting all .dtb files (even the ones that the Makefile cannot
> >> create again, e.g., the user put them in the tree manually) is
> >> at best not very polite.
> >
> > It certainly works at all
>
> My problem with it is the := which might be expanded at the wrong
> time. Or maybe that won't glob the *.dtb yet, who knows.
*I* know, because I checked the Kbuild rules first, and verified that
globs are legal in the clean-files variable.
> It's
> not obviously "working" either way.
> > (the preceding $(obj)/empty.c, however, is
> > wrong, I've sent a separate patch for that). One could say the same
> > thing for *.o in clean targets,
>
> Yes, and that's a very well-known problem.
>
> > though I guess adding .dtb files is
> > rather more likely. However, I can't seen an obvious way of
> > generating a list of the re-creatable dtbs, without an explicit
> > listing of every file in arch/powerpc/boot/dts which sounds like a bit
> > of a pain. Suggestions?
>
> You shouldn't clean _all_ dtb's that you could build, only the dtb's
> that you _did_ build. You already have a rule for what dtb's to
> build I assume; just copy the logic from there.
No. clean rules never work this way, because if you change the config
between building and cleaning, things won't get cleaned (which is why
clean rules are just about the only place one uses globs in makefiles,
rather than expanding variables appropriately).
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH] powerpc: Fix i2c-powermac platform device usage
From: Benjamin Herrenschmidt @ 2006-10-10 1:45 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
i2c-powermac was written & merged right after Russell King's changes
adding platform_driver... which I missed. Thus it still used struct
device, causing crashes when hitting sleep/wakeup callbacks (it happened
to work by luck so far, until early/late callbacks got added). This
causes crashes on sleep/wakeup on PowerBooks with 2.6.19. The patch
fixes it by using a proper platform_driver.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/i2c/busses/i2c-powermac.c
===================================================================
--- linux-work.orig/drivers/i2c/busses/i2c-powermac.c 2006-10-06 13:48:03.000000000 +1000
+++ linux-work/drivers/i2c/busses/i2c-powermac.c 2006-10-10 11:35:46.000000000 +1000
@@ -182,9 +182,9 @@ static const struct i2c_algorithm i2c_po
};
-static int i2c_powermac_remove(struct device *dev)
+static int i2c_powermac_remove(struct platform_device *dev)
{
- struct i2c_adapter *adapter = dev_get_drvdata(dev);
+ struct i2c_adapter *adapter = platform_get_drvdata(dev);
struct pmac_i2c_bus *bus = i2c_get_adapdata(adapter);
int rc;
@@ -195,16 +195,16 @@ static int i2c_powermac_remove(struct de
if (rc)
printk("i2c-powermac.c: Failed to remove bus %s !\n",
adapter->name);
- dev_set_drvdata(dev, NULL);
+ platform_set_drvdata(dev, NULL);
kfree(adapter);
return 0;
}
-static int i2c_powermac_probe(struct device *dev)
+static int __devexit i2c_powermac_probe(struct platform_device *dev)
{
- struct pmac_i2c_bus *bus = dev->platform_data;
+ struct pmac_i2c_bus *bus = dev->dev.platform_data;
struct device_node *parent = NULL;
struct i2c_adapter *adapter;
char name[32];
@@ -246,11 +246,11 @@ static int i2c_powermac_probe(struct dev
printk(KERN_ERR "i2c-powermac: can't allocate inteface !\n");
return -ENOMEM;
}
- dev_set_drvdata(dev, adapter);
+ platform_set_drvdata(dev, adapter);
strcpy(adapter->name, name);
adapter->algo = &i2c_powermac_algorithm;
i2c_set_adapdata(adapter, bus);
- adapter->dev.parent = dev;
+ adapter->dev.parent = &dev->dev;
pmac_i2c_attach_adapter(bus, adapter);
rc = i2c_add_adapter(adapter);
if (rc) {
@@ -265,23 +265,25 @@ static int i2c_powermac_probe(struct dev
}
-static struct device_driver i2c_powermac_driver = {
- .name = "i2c-powermac",
- .bus = &platform_bus_type,
+static struct platform_driver i2c_powermac_driver = {
.probe = i2c_powermac_probe,
- .remove = i2c_powermac_remove,
+ .remove = __devexit_p(i2c_powermac_remove),
+ .driver = {
+ .name = "i2c-powermac",
+ .bus = &platform_bus_type,
+ },
};
static int __init i2c_powermac_init(void)
{
- driver_register(&i2c_powermac_driver);
+ platform_driver_register(&i2c_powermac_driver);
return 0;
}
static void __exit i2c_powermac_cleanup(void)
{
- driver_unregister(&i2c_powermac_driver);
+ platform_driver_unregister(&i2c_powermac_driver);
}
module_init(i2c_powermac_init);
^ permalink raw reply
* [PATCH] powerpc: Fix windfarm platform device usage
From: Benjamin Herrenschmidt @ 2006-10-10 1:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
The windfarm code uses a struct device_driver instead of
platform_driver, which can cause crashes if any of the callbacks are
called (like on module removal). This fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/macintosh/windfarm_pm112.c
===================================================================
--- linux-work.orig/drivers/macintosh/windfarm_pm112.c 2006-03-10 15:58:18.000000000 +1100
+++ linux-work/drivers/macintosh/windfarm_pm112.c 2006-10-10 11:40:20.000000000 +1000
@@ -650,24 +650,26 @@ static struct notifier_block pm112_event
.notifier_call = pm112_wf_notify,
};
-static int wf_pm112_probe(struct device *dev)
+static int wf_pm112_probe(struct platform_device *dev)
{
wf_register_client(&pm112_events);
return 0;
}
-static int wf_pm112_remove(struct device *dev)
+static int __devexit wf_pm112_remove(struct platform_device *dev)
{
wf_unregister_client(&pm112_events);
/* should release all sensors and controls */
return 0;
}
-static struct device_driver wf_pm112_driver = {
- .name = "windfarm",
- .bus = &platform_bus_type,
+static struct platform_driver wf_pm112_driver = {
.probe = wf_pm112_probe,
- .remove = wf_pm112_remove,
+ .remove = __devexit_p(wf_pm112_remove),
+ .driver = {
+ .name = "windfarm",
+ .bus = &platform_bus_type,
+ },
};
static int __init wf_pm112_init(void)
@@ -683,13 +685,13 @@ static int __init wf_pm112_init(void)
++nr_cores;
printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n");
- driver_register(&wf_pm112_driver);
+ platform_driver_register(&wf_pm112_driver);
return 0;
}
static void __exit wf_pm112_exit(void)
{
- driver_unregister(&wf_pm112_driver);
+ platform_driver_unregister(&wf_pm112_driver);
}
module_init(wf_pm112_init);
Index: linux-work/drivers/macintosh/windfarm_pm81.c
===================================================================
--- linux-work.orig/drivers/macintosh/windfarm_pm81.c 2006-10-06 13:48:04.000000000 +1000
+++ linux-work/drivers/macintosh/windfarm_pm81.c 2006-10-10 11:42:02.000000000 +1000
@@ -131,8 +131,6 @@
static int wf_smu_mach_model; /* machine model id */
-static struct device *wf_smu_dev;
-
/* Controls & sensors */
static struct wf_sensor *sensor_cpu_power;
static struct wf_sensor *sensor_cpu_temp;
@@ -717,16 +715,14 @@ static int wf_init_pm(void)
return 0;
}
-static int wf_smu_probe(struct device *ddev)
+static int wf_smu_probe(struct platform_device *ddev)
{
- wf_smu_dev = ddev;
-
wf_register_client(&wf_smu_events);
return 0;
}
-static int wf_smu_remove(struct device *ddev)
+static int __devexit wf_smu_remove(struct platform_device *ddev)
{
wf_unregister_client(&wf_smu_events);
@@ -766,16 +762,16 @@ static int wf_smu_remove(struct device *
if (wf_smu_cpu_fans)
kfree(wf_smu_cpu_fans);
- wf_smu_dev = NULL;
-
return 0;
}
-static struct device_driver wf_smu_driver = {
- .name = "windfarm",
- .bus = &platform_bus_type,
+static struct platform_driver wf_smu_driver = {
.probe = wf_smu_probe,
- .remove = wf_smu_remove,
+ .remove = __devexit_p(wf_smu_remove),
+ .driver = {
+ .name = "windfarm",
+ .bus = &platform_bus_type,
+ },
};
@@ -794,7 +790,7 @@ static int __init wf_smu_init(void)
request_module("windfarm_lm75_sensor");
#endif /* MODULE */
- driver_register(&wf_smu_driver);
+ platform_driver_register(&wf_smu_driver);
}
return rc;
@@ -803,7 +799,7 @@ static int __init wf_smu_init(void)
static void __exit wf_smu_exit(void)
{
- driver_unregister(&wf_smu_driver);
+ platform_driver_unregister(&wf_smu_driver);
}
Index: linux-work/drivers/macintosh/windfarm_pm91.c
===================================================================
--- linux-work.orig/drivers/macintosh/windfarm_pm91.c 2006-10-06 13:48:04.000000000 +1000
+++ linux-work/drivers/macintosh/windfarm_pm91.c 2006-10-10 11:41:52.000000000 +1000
@@ -63,8 +63,6 @@
*/
#undef HACKED_OVERTEMP
-static struct device *wf_smu_dev;
-
/* Controls & sensors */
static struct wf_sensor *sensor_cpu_power;
static struct wf_sensor *sensor_cpu_temp;
@@ -641,16 +639,14 @@ static int wf_init_pm(void)
return 0;
}
-static int wf_smu_probe(struct device *ddev)
+static int wf_smu_probe(struct platform_device *ddev)
{
- wf_smu_dev = ddev;
-
wf_register_client(&wf_smu_events);
return 0;
}
-static int wf_smu_remove(struct device *ddev)
+static int __devexit wf_smu_remove(struct platform_device *ddev)
{
wf_unregister_client(&wf_smu_events);
@@ -698,16 +694,16 @@ static int wf_smu_remove(struct device *
if (wf_smu_cpu_fans)
kfree(wf_smu_cpu_fans);
- wf_smu_dev = NULL;
-
return 0;
}
-static struct device_driver wf_smu_driver = {
- .name = "windfarm",
- .bus = &platform_bus_type,
+static struct platform_driver wf_smu_driver = {
.probe = wf_smu_probe,
- .remove = wf_smu_remove,
+ .remove = __devexit_p(wf_smu_remove),
+ .driver = {
+ .name = "windfarm",
+ .bus = &platform_bus_type,
+ },
};
@@ -725,7 +721,7 @@ static int __init wf_smu_init(void)
request_module("windfarm_lm75_sensor");
#endif /* MODULE */
- driver_register(&wf_smu_driver);
+ platform_driver_register(&wf_smu_driver);
}
return rc;
@@ -734,7 +730,7 @@ static int __init wf_smu_init(void)
static void __exit wf_smu_exit(void)
{
- driver_unregister(&wf_smu_driver);
+ platform_driver_unregister(&wf_smu_driver);
}
^ permalink raw reply
* Re: [PATCH] Add Kconfig dependency !VT for VIOCONS
From: Adrian Bunk @ 2006-10-10 4:55 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20061006143437.f7338860.rdunlap@xenotime.net>
On Fri, Oct 06, 2006 at 02:34:37PM -0700, Randy Dunlap wrote:
> On Fri, 6 Oct 2006 13:00:07 -0700 Judith Lebzelter wrote:
>
> > Actually, this gets rid of the CONFIG_VIOCONS from my .config, but
> > then I get another warning when I build:
> >
> > Warning! Found recursive dependency: VT VIOCONS VT
> >
> > Can anyone suggest something?
>
> I think that your patch is mostly good/correct, but one more line
> is needed on the VT side: a deletion.
>
> This works for me:
>
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Make allmodconfig .config build successfully by making VIOCONS
> available only if VT=n. VT need not check VIOCONS.
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> arch/powerpc/platforms/iseries/Kconfig | 2 +-
> drivers/char/Kconfig | 1 -
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> --- linux-2619-rc1g2.orig/arch/powerpc/platforms/iseries/Kconfig
> +++ linux-2619-rc1g2/arch/powerpc/platforms/iseries/Kconfig
> @@ -3,7 +3,7 @@ menu "iSeries device drivers"
> depends on PPC_ISERIES
>
> config VIOCONS
> - tristate "iSeries Virtual Console Support (Obsolete)"
> + tristate "iSeries Virtual Console Support (Obsolete)" if !VT
> help
>...
> config VT
> bool "Virtual terminal" if EMBEDDED
With this dependency on EMBEDDED, you could as well simply remove
VIOCONS...
> select INPUT
> - default y if !VIOCONS
Removing the "default y" is wrong.
> ---help---
> If you say Y here, you will get support for terminal devices with
> display and keyboard devices. These are called "virtual" because you
>...
> ~Randy
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* 2.6.19-rc1: known regressions (v3)
From: Adrian Bunk @ 2006-10-10 5:10 UTC (permalink / raw)
To: Linus Torvalds
Cc: alsa-devel, Thierry Vignaud, Torsten Kaiser, ak, linuxppc-dev,
pavel, Vivek Goyal, Andrew de Quincey, Jens Axboe,
linux-usb-devel, Steve Fox, lm-sensors, art, Mel Gorman,
Michael Krufky, Sylvain BERTRAND, jgarzik, Prakash Punnoor,
fastboot, Olaf Hering, linux-pm, Trond Myklebust, Alex Romosan,
Dave Kleikamp, Antonino Daplas, v4l-dvb-maintainer, perex,
discuss, linux-fbdev-devel, linux-ide, netdev, Greg Kroah-Hartman,
Linux Kernel Mailing List, Sukadev Bhattiprolu, ebiederm,
Matthieu Castet, Jean Delvare, Johannes Berg, Ernst Herzberg,
David Hubbard
In-Reply-To: <Pine.LNX.4.64.0610042017340.3952@g5.osdl.org>
This email lists some known regressions in 2.6.19-rc1 compared to 2.6.18
that are not yet fixed Linus' tree.
If you find your name in the Cc header, you are either submitter of one
of the bugs, maintainer of an affectected subsystem or driver, a patch
of you caused a breakage or I'm considering you in any other way possibly
involved with one or more of these issues.
Due to the huge amount of recipients, please trim the Cc when answering.
Subject : sata-via doesn't detect anymore disks attached to VIA vt6421
References : http://bugzilla.kernel.org/show_bug.cgi?id=7255
Submitter : Thierry Vignaud <tvignaud@mandriva.com>
Status : unknown
Subject : monitor not active after boot
References : http://lkml.org/lkml/2006/10/5/338
Submitter : Olaf Hering <olaf@aepfle.de>
Caused-By : Antonino Daplas <adaplas@pol.net>
commit 346bc21026e7a92e1d7a4a1b3792c5e8b686133d
Status : unknown
Subject : SMP x86_64 boot problem
References : http://lkml.org/lkml/2006/9/28/330
http://lkml.org/lkml/2006/10/5/289
Submitter : art@usfltd.com
Status : submitter was asked to git bisect
result of bisecting seems to be wrong
Subject : sleep/wakeup on powerbooks apparently busted
References : http://lkml.org/lkml/2006/10/5/13
Submitter : Benjamin Herrenschmidt <benh@kernel.crashing.org>
Handled-By : Benjamin Herrenschmidt <benh@kernel.crashing.org>
Status : Benjamin will investigate
Subject : w83781d modprobing failure
References : http://bugzilla.kernel.org/show_bug.cgi?id=7293
Submitter : Sylvain BERTRAND <sylvain.bertrand@gmail.com>
Caused-By : David Hubbard <david.c.hubbard@gmail.com> (?)
commit 8202632647278eba7223727dc442f49227c040d0 (?)
Handled-By : Jean Delvare <khali@linux-fr.org>
Status : Jean is investigating
Subject : CD/DVD drives lost capabilities
References : http://lkml.org/lkml/2006/10/1/45
http://bugzilla.kernel.org/show_bug.cgi?id=7284
Submitter : Olaf Hering <olaf@aepfle.de>
Johannes Berg <johannes@sipsolutions.net>
Caused-By : Jens Axboe <jens.axboe@oracle.com>
commit 4aff5e2333c9a1609662f2091f55c3f6fffdad36
Handled-By : Jens Axboe <jens.axboe@oracle.com>
Status : Jens is working on a fix
Subject : snd-hda-intel <-> forcedeth MSI problem
References : http://lkml.org/lkml/2006/10/5/40
http://lkml.org/lkml/2006/10/7/164
Submitter : Prakash Punnoor <prakash@punnoor.de>
Status : suggested workaround for 2.6.19:
deactivate MSI in snd-intel-hda by default
Subject : DVB frontend selection causes compile errors
References : http://lkml.org/lkml/2006/10/8/244
Submitter : Adrian Bunk <bunk@stusta.de>
Caused-By : "Andrew de Quincey" <adq_dvb@lidskialf.net>
commit 176ac9da4f09820a43fd48f0e74b1486fc3603ba
Handled-By : Michael Krufky <mkrufky@linuxtv.org>
"Andrew de Quincey" <adq_dvb@lidskialf.net>
Status : possible workaround: don't allow CONFIG_DVB_FE_CUSTOMISE=y
Subject : ueagle-atm Oops
References : http://lkml.org/lkml/2006/10/6/390
Submitter : Ernst Herzberg <list-lkml@net4u.de>
Caused-By : Greg Kroah-Hartman <gregkh@suse.de>
commit e7ccdfec087f02930c5cdc81143d4a045ae8d361
Handled-By : Matthieu Castet <castet.matthieu@free.fr>
Laurent Riffard
Patch : https://mail.gna.org/public/ueagleatm-dev/2006-10/msg00022.html
Status : "patch available, but some cleaning is needed"
Subject : oops in xfrm_register_mode
References : http://lkml.org/lkml/2006/10/4/170
Submitter : Steve Fox <drfickle@us.ibm.com>
Handled-By : Vivek Goyal <vgoyal@in.ibm.com>
Status : patch available
Subject : doesn't boot on iBook G4
References : http://lkml.org/lkml/2006/10/5/305
Submitter : Andreas Schwab <schwab@suse.de>
Handled-By : Mel Gorman <mel@skynet.ie>
Patch : http://lkml.org/lkml/2006/10/6/80
Status : patch available
Subject : airo suspend fails
References : http://lkml.org/lkml/2006/10/6/3
Submitter : Alex Romosan <romosan@sycorax.lbl.gov>
Caused-By : Sukadev Bhattiprolu <sukadev@us.ibm.com> (?)
commit 3b4c7d640376dbccfe80fc4f7b8772ecc7de28c5 (?)
Handled-By : Dave Kleikamp <shaggy@austin.ibm.com>
Patch : http://lkml.org/lkml/2006/10/7/139
Status : patch available
Subject : kexec broken on x86_64
References : http://lkml.org/lkml/2006/10/5/86
Submitter : Magnus Damm <magnus.damm@gmail.com>
Handled-By : Vivek Goyal <vgoyal@in.ibm.com>
Patch : http://lkml.org/lkml/2006/10/5/199
Status : patch available
Subject : NFSv4 fails to mount (timeout)
References : http://bugzilla.kernel.org/show_bug.cgi?id=7274
Submitter : Torsten Kaiser <kernel@bardioc.dyndns.org>
Caused-By : Trond Myklebust <Trond.Myklebust@netapp.com>
commit 51b6ded4d9a94a61035deba1d8f51a54e3a3dd86
Handled-By : Trond Myklebust <Trond.Myklebust@netapp.com>
Patch : http://bugzilla.kernel.org/show_bug.cgi?id=7274
Status : patch available
^ permalink raw reply
* [PATCH] powerpc: Don't crash on cell with 2 BEs when !CONFIG_NUMA
From: Benjamin Herrenschmidt @ 2006-10-10 5:14 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev list, Paul Mackerras
The SPU code will crash if CONFIG_NUMA is not set and SPUs are found on
a non-0 node. This workaround will ignore those SPEs and just print an
message in the kernel log.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-cell/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linux-cell.orig/arch/powerpc/platforms/cell/spu_base.c 2006-10-10 13:50:25.000000000 +1000
+++ linux-cell/arch/powerpc/platforms/cell/spu_base.c 2006-10-10 15:11:39.000000000 +1000
@@ -847,6 +847,17 @@ static int __init create_spu(struct devi
if (!spu)
goto out;
+ spu->node = find_spu_node_id(spe);
+ if (spu->node >= MAX_NUMNODES) {
+ printk(KERN_WARNING "SPE %s on node %d ignored,"
+ " node number too big\n", spe->full_name, spu->node);
+ printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
+ return -ENODEV;
+ }
+ spu->nid = of_node_to_nid(spe);
+ if (spu->nid == -1)
+ spu->nid = 0;
+
ret = spu_map_device(spu, spe);
/* try old method */
if (ret)
@@ -854,10 +865,6 @@ static int __init create_spu(struct devi
if (ret)
goto out_free;
- spu->node = find_spu_node_id(spe);
- spu->nid = of_node_to_nid(spe);
- if (spu->nid == -1)
- spu->nid = 0;
ret = spu_map_interrupts(spu, spe);
if (ret)
ret = spu_map_interrupts_old(spu, spe);
^ permalink raw reply
* Please pull powerpc.git 'merge' branch
From: Paul Mackerras @ 2006-10-10 5:31 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
Linus,
Please do:
git pull \
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge
to get some PowerPC bugfixes, including a pile of pt_regs fixes for
ARCH=ppc from Al Viro, and a fix for a crash on resume on powerbooks
from Ben.
Thanks,
Paul.
arch/powerpc/boot/Makefile | 16 +--
arch/powerpc/configs/maple_defconfig | 56 ++++++++--
arch/powerpc/platforms/maple/pci.c | 187 ++++++++++++++++++++++++++++++++-
arch/powerpc/platforms/powermac/smp.c | 7 +
arch/powerpc/xmon/xmon.c | 6 +
arch/ppc/4xx_io/serial_sicc.c | 8 +
arch/ppc/8260_io/enet.c | 4 -
arch/ppc/8260_io/fcc_enet.c | 6 +
arch/ppc/8xx_io/commproc.c | 19 ++-
arch/ppc/8xx_io/cs4218_tdm.c | 4 -
arch/ppc/8xx_io/enet.c | 4 -
arch/ppc/8xx_io/fec.c | 7 +
arch/ppc/kernel/smp.c | 4 -
arch/ppc/platforms/apus_setup.c | 2
arch/ppc/platforms/hdpu.c | 22 ++--
arch/ppc/platforms/radstone_ppc7d.c | 10 +-
arch/ppc/platforms/sbc82xx.c | 4 -
arch/ppc/syslib/cpc700.h | 2
arch/ppc/syslib/cpc700_pic.c | 2
arch/ppc/syslib/cpm2_pic.c | 2
arch/ppc/syslib/cpm2_pic.h | 2
arch/ppc/syslib/gt64260_pic.c | 9 +-
arch/ppc/syslib/ibm440gx_common.c | 2
arch/ppc/syslib/ipic.c | 2
arch/ppc/syslib/m82xx_pci.c | 4 -
arch/ppc/syslib/m8xx_setup.c | 2
arch/ppc/syslib/m8xx_wdt.c | 4 -
arch/ppc/syslib/mpc52xx_pic.c | 2
arch/ppc/syslib/mv64360_pic.c | 18 +--
arch/ppc/syslib/open_pic2.c | 2
arch/ppc/syslib/ppc403_pic.c | 2
arch/ppc/syslib/ppc4xx_pic.c | 8 +
arch/ppc/syslib/ppc85xx_rio.c | 9 +-
arch/ppc/syslib/ppc8xx_pic.c | 4 -
arch/ppc/syslib/xilinx_pic.c | 2
drivers/i2c/busses/i2c-powermac.c | 28 +++--
drivers/macintosh/windfarm_pm112.c | 18 ++-
drivers/macintosh/windfarm_pm81.c | 24 ++--
drivers/macintosh/windfarm_pm91.c | 24 ++--
include/asm-ppc/commproc.h | 3 -
include/asm-ppc/gt64260.h | 2
include/asm-ppc/mpc52xx.h | 2
include/asm-ppc/mv64x60.h | 4 -
43 files changed, 370 insertions(+), 179 deletions(-)
Al Viro:
[POWERPC] ARCH=ppc pt_regs fixes
Benjamin Herrenschmidt:
[POWERPC] Make U4 PCIe work on maple
[POWERPC] Fix Maple secondary IDE interrupt
[POWERPC] Update maple defconfig
[POWERPC] Fix i2c-powermac platform device usage
[POWERPC] Fix windfarm platform device usage
Geoff Levand:
[POWERPC] cell: fix default zImage build target
Michael Ellerman:
[POWERPC] Fix boot wrapper invocation if CROSS_COMPILE contains spaces
Paul Mackerras:
[POWERPC] Fix xmon IRQ handler for pt_regs removal
[POWERPC] Fix secondary CPU startup on old "powersurge" SMP powermacs
^ permalink raw reply
* RE: [Cbe-oss-dev] [PATCH 09/14] spufs: add support for read/write oncntl
From: Noguchi, Masato @ 2006-10-10 6:00 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linuxppc-dev, Paul Mackerras, Arnd Bergmann, linux-kernel,
cbe-oss-dev
After applying these patches, it seems the kernel leaks memory.
No doubt you forget to call simple_attr_close on "[PATCH 09/14]
spufs: add support for read/write oncntl".
Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
---
Index:
linux-2.6.18-arnd-20061004/arch/powerpc/platforms/cell/spufs/file.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
---
linux-2.6.18-arnd-20061004.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linux-2.6.18-arnd-20061004/arch/powerpc/platforms/cell/spufs/file.c
@@ -246,6 +246,7 @@ static int spufs_cntl_open(struct inode=20
=20
static struct file_operations spufs_cntl_fops =3D {
.open =3D spufs_cntl_open,
+ .close =3D simple_attr_close,
.read =3D simple_attr_read,
.write =3D simple_attr_write,
.mmap =3D spufs_cntl_mmap,
^ permalink raw reply
* [PATCH 0/4] powerpc: Next round of bootwrapper flat dt patches
From: Mark A. Greer @ 2006-10-10 6:09 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Hi,
This patch series is a respin of--and complete replacement for--the
bootwrapper reorg patches that I sent out a while back. I also included
the flatdevtree.c file which is the latest version that Paul sent plus
changes that I've made.
The patches apply to powerpc.git commit id:
ba00003aa83a61b615542dd66f5af8fb4a7cee1d
Paul, it would really help the rest of us if you would apply these patches
quickly. There are several people waiting for this work but there are so
many versions of so many patches that no one knows what to use. Plus, it
would get more people testing/debugging the flatdevtree code.
Summary of changes:
===================
more reorg patch
----------------
- This patch includes Paul's changes to zImage.lds.S which define
_dtb_start & _dtb_end and a related patch for the wrapper script.
- I changed main.c:start() a little so that the call to ft_init() is
done in platform_init(). I did this because of an interface change
to ft_init which now require some platform knowledge.
- I added a realloc() call to dt_ops so it can be passed to ft_open.
flatdevtree patch
-----------------
- I did not debug all of the flatdevtree.c code. I only debugged
ft_find_device, ft_get_prop, ft_set_prop and their supporting routines.
- I added a phandle table (insided the cxt) to track phandles returned by
ft_find_device(). Now the value returned by ft_find_device() is a phandle
which is nothing more than an index into the phandle table. The phandle
table contains the address of the corresponding node. When the flat dt
is edited/moved, the node pointers in the phandle table are updated
accordingly so no phandles kept by the caller become stale.
- I tested shrinking, and expanding an existing property but did not test
adding a new property.
- I'm not sure of the usefulness of the genealogy stuff but I left it there
in case Paul has plans for it. I did not test ft_get_parent (the only user
of genealogy).
simple_realloc patch
--------------------
- The flatdevtree code needs a realloc now so that is implemented in here.
- As the name implies, it is a simple allocator which uses a table to track
what's been allocated. simple_alloc_init() let's the caller set where
the heap is, its size, the granularity of its allocations, and how many
entries the table has.
- Once a slot in the table is used, its base & size are set. This allows
the code to be much simpler.
non-OF serial console patch
---------------------------
- I decided not to look for a /cpus/<some cpu>/64-bit property and instead
get either 1 or 2 "32-bit things" from the uart's 'virtual-reg' property.
If there is 1, its 32-bits; if its 2, its 64-bits.
Mark
^ permalink raw reply
* [PATCH 1/4] powerpc: More bootwrapper reorg
From: Mark A. Greer @ 2006-10-10 6:11 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
More reorganization of the bootwrapper:
- Add dtb section to zImage
- ft_init now called by platform_init
- Pack a flat dt before calling kernel
- Remove size parameter from free
- printf only calls console_ops.write it its not NULL
- Some cleanup
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
main.c | 27 ++++++---------------------
of.c | 8 +-------
ops.h | 25 ++++++++++++++-----------
stdio.c | 3 ++-
wrapper | 4 ++--
zImage.lds.S | 5 +++++
6 files changed, 30 insertions(+), 42 deletions(-)
---
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index d719bb9..4184974 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -27,6 +27,8 @@ extern char _vmlinux_start[];
extern char _vmlinux_end[];
extern char _initrd_start[];
extern char _initrd_end[];
+extern char _dtb_start[];
+extern char _dtb_end[];
struct addr_range {
unsigned long addr;
@@ -250,10 +252,6 @@ #endif
flush_cache((void *)vmlinux.addr, vmlinux.size);
}
-void __attribute__ ((weak)) ft_init(void *dt_blob)
-{
-}
-
/* A buffer that may be edited by tools operating on a zImage binary so as to
* edit the command line passed to vmlinux (by setting /chosen/bootargs).
* The buffer is put in it's own section so that tools may locate it easier.
@@ -285,19 +283,12 @@ static void set_cmdline(char *buf)
setprop(devp, "bootargs", buf, strlen(buf) + 1);
}
-/* Section where ft can be tacked on after zImage is built */
-union blobspace {
- struct boot_param_header hdr;
- char space[8*1024];
-} dt_blob __attribute__((__section__("__builtin_ft")));
-
struct platform_ops platform_ops;
struct dt_ops dt_ops;
struct console_ops console_ops;
void start(unsigned long a1, unsigned long a2, void *promptr, void *sp)
{
- int have_dt = 0;
kernel_entry_t kentry;
char cmdline[COMMAND_LINE_SIZE];
@@ -306,15 +297,7 @@ void start(unsigned long a1, unsigned lo
memset(&dt_ops, 0, sizeof(dt_ops));
memset(&console_ops, 0, sizeof(console_ops));
- /* Override the dt_ops and device tree if there was an flat dev
- * tree attached to the zImage.
- */
- if (dt_blob.hdr.magic == OF_DT_HEADER) {
- have_dt = 1;
- ft_init(&dt_blob);
- }
-
- if (platform_init(promptr))
+ if (platform_init(promptr, _dtb_start, _dtb_end))
exit();
if (console_ops.open && (console_ops.open() < 0))
exit();
@@ -342,8 +325,10 @@ void start(unsigned long a1, unsigned lo
console_ops.close();
kentry = (kernel_entry_t) vmlinux.addr;
- if (have_dt)
+ if (_dtb_end > _dtb_start) {
+ dt_ops.ft_pack();
kentry(dt_ops.ft_addr(), 0, NULL);
+ }
else
/* XXX initrd addr/size should be passed in properties */
kentry(a1, a2, promptr);
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c
index 3a71845..0182f38 100644
--- a/arch/powerpc/boot/of.c
+++ b/arch/powerpc/boot/of.c
@@ -256,24 +256,18 @@ static void of_console_write(char *buf,
call_prom("write", 3, 1, of_stdout_handle, buf, len);
}
-int platform_init(void *promptr)
+int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end)
{
- platform_ops.fixups = NULL;
platform_ops.image_hdr = of_image_hdr;
platform_ops.malloc = of_try_claim;
- platform_ops.free = NULL;
platform_ops.exit = of_exit;
dt_ops.finddevice = of_finddevice;
dt_ops.getprop = of_getprop;
dt_ops.setprop = of_setprop;
- dt_ops.translate_addr = NULL;
console_ops.open = of_console_open;
console_ops.write = of_console_write;
- console_ops.edit_cmdline = NULL;
- console_ops.close = NULL;
- console_ops.data = NULL;
prom = (int (*)(void *))promptr;
return 0;
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 135eb4b..59832fb 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -22,7 +22,8 @@ struct platform_ops {
void (*fixups)(void);
void (*image_hdr)(const void *);
void * (*malloc)(u32 size);
- void (*free)(void *ptr, u32 size);
+ void (*free)(void *ptr);
+ void * (*realloc)(void *ptr, unsigned long size);
void (*exit)(void);
};
extern struct platform_ops platform_ops;
@@ -30,12 +31,11 @@ extern struct platform_ops platform_ops;
/* Device Tree operations */
struct dt_ops {
void * (*finddevice)(const char *name);
- int (*getprop)(const void *node, const char *name, void *buf,
+ int (*getprop)(const void *phandle, const char *name, void *buf,
const int buflen);
- int (*setprop)(const void *node, const char *name,
+ int (*setprop)(const void *phandle, const char *name,
const void *buf, const int buflen);
- u64 (*translate_addr)(const char *path, const u32 *in_addr,
- const u32 addr_len);
+ void (*ft_pack)(void);
unsigned long (*ft_addr)(void);
};
extern struct dt_ops dt_ops;
@@ -59,10 +59,13 @@ struct serial_console_data {
void (*close)(void);
};
-extern int platform_init(void *promptr);
-extern void simple_alloc_init(void);
-extern void ft_init(void *dt_blob);
-extern int serial_console_init(void);
+int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end);
+int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device);
+int serial_console_init(void);
+int ns16550_console_init(void *devp, struct serial_console_data *scdp);
+void *simple_alloc_init(char *base, u32 heap_size, u32 granularity,
+ u32 max_allocs);
+
static inline void *finddevice(const char *name)
{
@@ -84,10 +87,10 @@ static inline void *malloc(u32 size)
return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL;
}
-static inline void free(void *ptr, u32 size)
+static inline void free(void *ptr)
{
if (platform_ops.free)
- platform_ops.free(ptr, size);
+ platform_ops.free(ptr);
}
static inline void exit(void)
diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c
index 6d5f638..0a9feeb 100644
--- a/arch/powerpc/boot/stdio.c
+++ b/arch/powerpc/boot/stdio.c
@@ -320,6 +320,7 @@ printf(const char *fmt, ...)
va_start(args, fmt);
n = vsprintf(sprint_buf, fmt, args);
va_end(args);
- console_ops.write(sprint_buf, n);
+ if (console_ops.write)
+ console_ops.write(sprint_buf, n);
return n;
}
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index eab7318..b5fb1fe 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -179,11 +179,11 @@ if [ -z "$cacheit" ]; then
fi
if [ -n "$initrd" ]; then
- addsec $tmp "$initrd" initrd
+ addsec $tmp "$initrd" $isection
fi
if [ -n "$dtb" ]; then
- addsec $tmp "$dtb" dtb
+ addsec $tmp "$dtb" .kernel:dtb
fi
if [ "$platform" != "miboot" ]; then
diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S
index 4b6bb3f..4be3c64 100644
--- a/arch/powerpc/boot/zImage.lds.S
+++ b/arch/powerpc/boot/zImage.lds.S
@@ -21,6 +21,11 @@ SECTIONS
__got2_end = .;
}
+ . = ALIGN(8);
+ _dtb_start = .;
+ .kernel:dtb : { *(.kernel:dtb) }
+ _dtb_end = .;
+
. = ALIGN(4096);
_vmlinux_start = .;
.kernel:vmlinux.strip : { *(.kernel:vmlinux.strip) }
^ permalink raw reply related
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