2006-10-02 20:25:13

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 02 Oct 2006 17:21:09 +0100
David Howells <[email protected]> wrote:

> Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
> of passing regs around manually through all ~1800 interrupt handlers in the
> Linux kernel.
>
> ...
>
> 1086 files changed, 2634 insertions(+), 2968 deletions(-)
>

heh.

It's presumably too large a lump for vger to swallow so I put a copy at
http://userweb.kernel.org/~akpm/irq-maintain-regs-pointer-globally-rather-than-passing-to-irq-handlers.patch

I disagree with the implementation of get_irq_regs() and set_irq_regs():

+DECLARE_PER_CPU(struct pt_regs *, __irq_regs);
+
+static inline struct pt_regs *get_irq_regs(void)
+{
+ struct pt_regs *regs = get_cpu_var(__irq_regs);
+ put_cpu_var(__irq_regs);
+ return regs;
+}
+
+#define irq_regs (get_irq_regs())
+
+static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
+{
+ struct pt_regs *old_regs, **pp_regs = &get_cpu_var(__irq_regs);
+
+ old_regs = *pp_regs;
+ *pp_regs = new_regs;
+ put_cpu_var(__irq_regs);
+ return old_regs;
+}

These should just use __get_cpu_var(). If someone calls these from
preemptible code, they're already buggy, because they now have a pointer to
possibly-another-cpus registers. Using get_cpu_var() simply covers that
bug up.

And could we please remove the irq_regs macro? It's only used in three
places so simply open-coding that is simpler.


Patches #1 and #2 don't come vaguely close to applying on top of all the
IRQ changes we still have queued for 2.6.19 so that will need redoing
please. I'd expect to have that lot sent Linuswards around 48 hours from
now.

I think the change is good. But I don't want to maintain this whopper
out-of-tree for two months! If we want to do this, we should just smash it
in and grit our teeth. But I am a bit concerned about the non-x86
architectures. I assume they'll continue to compile-and-work?

What does Ingo think?

> Some notes on the interrupt handling in the drivers:
>
> (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
> the input_dev struct.
>
> (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
> something different depending on whether it's been supplied with a regs
> pointer or not.
>
> (*) Various IRQ handler function pointers have been moved to type
> irq_handler_t.
>

Cc's added.


2006-10-02 20:26:19

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers


* Andrew Morton <[email protected]> wrote:

> I think the change is good. But I don't want to maintain this whopper
> out-of-tree for two months! If we want to do this, we should just
> smash it in and grit our teeth. But I am a bit concerned about the
> non-x86 architectures. I assume they'll continue to compile-and-work?
>
> What does Ingo think?

i agree that we should do this in one go and in Linus' tree. I suspect
David has a script for this, so we can do it anytime for any tree,
right?

the amount of code that truly relies on regs being present is very low.
Mostly only sysrq type of stuff and the timer interrupt is such. Any
arch should be able to adopt to that promptly, but i'd favor a
switchover that works on 99% of the arches, just to have this pain over
instantly (sans small bugs).

Ingo

2006-10-02 20:43:41

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On 10/2/06, Andrew Morton <[email protected]> wrote:
> On Mon, 02 Oct 2006 17:21:09 +0100
> David Howells <[email protected]> wrote:
>
> > Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
> > of passing regs around manually through all ~1800 interrupt handlers in the
> > Linux kernel.
> >

Nice! I was wanting to do that for a long time...

>
> I think the change is good. But I don't want to maintain this whopper
> out-of-tree for two months! If we want to do this, we should just smash it
> in and grit our teeth.

Yes, lets drop it in while we still not reached rc1.

>
> > Some notes on the interrupt handling in the drivers:
> >
> > (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
> > the input_dev struct.

Good riddance... Athough I would not remove input_regs() just yet but
just redefine it to an empty inline and mark it as depreciated so we
won't break all out-of-tree input drivers right away. Removal of
input_regs() from in-tree drivers could be done by separate patch as
well, once main changes are in.

--
Dmitry

2006-10-02 20:46:19

by David Brownell

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

The only downside I can think of for dropping pt_regs is that now it's harder
to just find the IRQ handler in a driver ... it's previously been all but
guaranteed that the _only_ use of that type is the IRQ logic. The upsides
surely outweigh that.

> > (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
> > something different depending on whether it's been supplied with a regs
> > pointer or not.

gaak! where did that come from? I'll be surprised if removing
that causes any problem at all.

- Dave

2006-10-02 20:55:13

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers



On Mon, 2 Oct 2006, Ingo Molnar wrote:
>
> i agree that we should do this in one go and in Linus' tree. I suspect
> David has a script for this, so we can do it anytime for any tree,
> right?
>
> the amount of code that truly relies on regs being present is very low.
> Mostly only sysrq type of stuff and the timer interrupt is such.

Yeah, well, it's been discussed before, and the real problem is not the
patch itself, it's the damn drivers maintained outside the tree, and
people who want to maintain the same driver for multiple different
versions of the kernel.

Things like the kernel graphics direct-rendering code, for example -
mostly maintained in X.org trees that then want to compile with other
kernels too.

I don't personally mind the patch, I just wanted to bring that issue up.

So far, when this has come up, the gains it gives have not been worth the
pain. I don't quite see why FRV is so broken that it would matter 20%
worth, and I suspect that number was somehow really not real, but more a
matter of "this small code snippet that is part of the irq delivery and
isn't really measurable improves by 20%", which is a different thing.

That said, it's almost certainly worth it, and I don't think anybody
really objects deep down.

So if the patch works against my current tree, and nobody objects, I can
certainly apply it.

So speak up, people...

Linus

2006-10-02 20:57:13

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 2 Oct 2006 16:43:38 -0400
"Dmitry Torokhov" <[email protected]> wrote:

> >
> > I think the change is good. But I don't want to maintain this whopper
> > out-of-tree for two months! If we want to do this, we should just smash it
> > in and grit our teeth.
>
> Yes, lets drop it in while we still not reached rc1.

Doing it after -rc1 would be saner, when the tree isn't changing at a
megabyte-per-minute. Give people at least a couple of days to review it,
test it, etc.

2006-10-02 20:59:17

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 2 Oct 2006 13:46:11 -0700
David Brownell <[email protected]> wrote:

> The only downside I can think of for dropping pt_regs is that now it's harder
> to just find the IRQ handler in a driver ... it's previously been all but
> guaranteed that the _only_ use of that type is the IRQ logic. The upsides
> surely outweigh that.

You can use irqreturn_t for that.

2006-10-02 21:01:47

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 2 Oct 2006 13:54:33 -0700 (PDT)
Linus Torvalds <[email protected]> wrote:

>
>
> On Mon, 2 Oct 2006, Ingo Molnar wrote:
> >
> > i agree that we should do this in one go and in Linus' tree. I suspect
> > David has a script for this, so we can do it anytime for any tree,
> > right?
> >
> > the amount of code that truly relies on regs being present is very low.
> > Mostly only sysrq type of stuff and the timer interrupt is such.
>
> Yeah, well, it's been discussed before, and the real problem is not the
> patch itself, it's the damn drivers maintained outside the tree, and
> people who want to maintain the same driver for multiple different
> versions of the kernel.
>
> Things like the kernel graphics direct-rendering code, for example -
> mostly maintained in X.org trees that then want to compile with other
> kernels too.
>
> I don't personally mind the patch, I just wanted to bring that issue up.

yup. Perhaps we could add

#define IRQ_HANDLERS_DONT_USE_PTREGS

so that out-of-tree drivers can reliably do their ifdefing.

> So far, when this has come up, the gains it gives have not been worth the
> pain. I don't quite see why FRV is so broken that it would matter 20%
> worth, and I suspect that number was somehow really not real, but more a
> matter of "this small code snippet that is part of the irq delivery and
> isn't really measurable improves by 20%", which is a different thing.
>
> That said, it's almost certainly worth it, and I don't think anybody
> really objects deep down.
>
> So if the patch works against my current tree, and nobody objects, I can
> certainly apply it.
>
> So speak up, people...
>

Whimper. Later in the week, please.

2006-10-02 21:11:56

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

From: Linus Torvalds <[email protected]>
Date: Mon, 2 Oct 2006 13:54:33 -0700 (PDT)

> So if the patch works against my current tree, and nobody objects, I can
> certainly apply it.
>
> So speak up, people...

Since it provides a suitable nestability of the regs setting, I have
no objections.

2006-10-02 21:13:25

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers



On Mon, 2 Oct 2006, Andrew Morton wrote:
>
> Whimper. Later in the week, please.

Sure. Somebody send me a (tested) version that works against pure -rc1,
and we're set to go.

Linus

2006-10-02 21:16:40

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 2006-10-02 at 14:12 -0700, David Miller wrote:
> From: Linus Torvalds <[email protected]>
> Date: Mon, 2 Oct 2006 13:54:33 -0700 (PDT)
>
> > So if the patch works against my current tree, and nobody objects, I can
> > certainly apply it.
> >
> > So speak up, people...
>
> Since it provides a suitable nestability of the regs setting, I have
> no objections.

ACK

tglx


2006-10-02 21:20:17

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Monday 02 October 2006 23:12, Linus Torvalds wrote:
>
> On Mon, 2 Oct 2006, Andrew Morton wrote:
> >
> > Whimper. Later in the week, please.
>
> Sure. Somebody send me a (tested) version that works against pure -rc1,
> and we're set to go.

How would you test something like this? It would touch all architectures
and nearly all drivers too.

-Andi

2006-10-02 21:34:43

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 2 Oct 2006, David Brownell wrote:

> > > (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
> > > something different depending on whether it's been supplied with a regs
> > > pointer or not.
>
> gaak! where did that come from? I'll be surprised if removing
> that causes any problem at all.

Here's the statement in question:

if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) {
...

Notice another questionable use of hcd->state. I don't know what the
correct change here is, but I suspect David H's isn't optimal.

Alan Stern

2006-10-02 21:46:52

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers



On Mon, 2 Oct 2006, Andi Kleen wrote:
>
> How would you test something like this? It would touch all architectures
> and nearly all drivers too.

"If it compiles, it works".

Pretty close.

Linus

2006-10-02 21:55:45

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers


* Linus Torvalds <[email protected]> wrote:

> On Mon, 2 Oct 2006, Andi Kleen wrote:
> >
> > How would you test something like this? It would touch all
> > architectures and nearly all drivers too.
>
> "If it compiles, it works".
>
> Pretty close.

Note that the IRQ threading code in the -rt tree already passes NULL as
the pt_regs argument to /all/ drivers [except the timer interrupt]. So
there's more than just the compilation evidence ;-)

Ingo

2006-10-02 21:59:12

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Monday 02 October 2006 23:46, Linus Torvalds wrote:
>
> On Mon, 2 Oct 2006, Andi Kleen wrote:
> >
> > How would you test something like this? It would touch all architectures
> > and nearly all drivers too.
>
> "If it compiles, it works".

I remember trying to compile a lot of architectures when I did 4level,
but I quickly gave up because of many of them just didn't without
me changing anything.

-Andi

2006-10-02 22:34:14

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers



On Mon, 2 Oct 2006, Andi Kleen wrote:
>
> I remember trying to compile a lot of architectures when I did 4level,
> but I quickly gave up because of many of them just didn't without
> me changing anything.

I think that if we cover x86-64 and plain old x86 with something like
"allmodconfig", and just doing a best effort on the other architectures,
we're already in pretty damn good shape. It's not like fixing any stupid
left-overs that got missed because some "grep" pattern didn't notice an
odd user is going to really cause problems.

I don't think the architecture maintainers will have any trouble
converting their own architecture. It's literally a question of getting
clear compiler warnings or errors, and just fixing them up. I'll do at
least the parts of ppc64 that I'd notice myself, unless somebody else just
gets to it first.

So I really wouldn't worry about any small short-term problems. The reason
I mentioned out-of-tree drivers is exactly the fact that they can't just
fix it up trivially for a single flag-day, so they have to have a longer-
term solution.

Linus

2006-10-02 22:58:17

by Karsten Wiese

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Am Montag, 2. Oktober 2006 22:54 schrieb Linus Torvalds:
>
> So speak up, people...
>
pro apply.

Karsten

2006-10-02 23:00:30

by David Brownell

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Monday 02 October 2006 2:34 pm, Alan Stern wrote:
> On Mon, 2 Oct 2006, David Brownell wrote:
>
> > > > (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
> > > > something different depending on whether it's been supplied with a regs
> > > > pointer or not.
> >
> > gaak! where did that come from? I'll be surprised if removing
> > that causes any problem at all.
>
> Here's the statement in question:
>
> if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) {

Where as I said, removing the "regs &&" should be just fine.
(Is the plan that David Howells re-issue that patch? If so, I'l
expect e will just fix it that way...)

> ...
>
> Notice another questionable use of hcd->state.

Questionable in what way? When that code is called to clean up
after driver death, that loop must be ignored ... every pending I/O
can safely be scrubbed. That's the main point of that particular
HC_IS_RUNNING() test. In other cases, it's essential not to touch
DMA queue entries that the host controller is still using.

- Dave

2006-10-02 23:53:09

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, Oct 02, 2006 at 04:43:38PM -0400, Dmitry Torokhov wrote:
> On 10/2/06, Andrew Morton <[email protected]> wrote:
> >On Mon, 02 Oct 2006 17:21:09 +0100
> >David Howells <[email protected]> wrote:
> >
> >> Maintain a per-CPU global "struct pt_regs *" variable which can be used
> >instead
> >> of passing regs around manually through all ~1800 interrupt handlers in
> >the
> >> Linux kernel.
> >>
>
> Nice! I was wanting to do that for a long time...

Yeah! Finally get rid of that from every single fricken USB urb
callback. I have been wanting that gone for a very long time.

> >I think the change is good. But I don't want to maintain this whopper
> >out-of-tree for two months! If we want to do this, we should just smash it
> >in and grit our teeth.
>
> Yes, lets drop it in while we still not reached rc1.

I don't care when it goes it, I have no objection to it at all.

David, thanks a lot for doing this.

greg k-h

2006-10-03 00:36:58

by Dave Airlie

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

>
> Things like the kernel graphics direct-rendering code, for example -
> mostly maintained in X.org trees that then want to compile with other
> kernels too.

Well in the DRM case we don't worry about that too much, the external
DRM git tree has all the compat code hidden away and I've got lots of
version check macros, so one more won't make a difference, the in-tree
version has none of the that stuff anyways....

Now it might break nvidia and ATI but that is all code that is in
their "public" source...

Dave.

2006-10-03 10:01:59

by David Howells

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Ingo Molnar <[email protected]> wrote:

> i agree that we should do this in one go and in Linus' tree. I suspect
> David has a script for this, so we can do it anytime for any tree,
> right?

I wish. No, it's not simple enough to script. All the usages of struct
pt_regs have to be eyeballed and have to be poked with the compiler. The
problem is when an interrupt handler passes regs down to someone else - that I
can't find.

However, I'm now in a position that I can just keep pulling Linus's GIT tree
with StGIT and fixing up the wibbly bits and grepping for new instances of
pt_regs and of course compile testing on a bunch of arches for which I have
compilers.

> the amount of code that truly relies on regs being present is very low.

The same goes for the IRQ number itself too. Very few things actually use
that, mostly they just use the arbitrary data argument. I'm not sure we want
to do the same to that, though, since it makes cascaded PIC processing more
interesting as the IRQ number changes.

David

2006-10-03 10:23:13

by David Howells

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Linus Torvalds <[email protected]> wrote:

> So far, when this has come up, the gains it gives have not been worth the
> pain. I don't quite see why FRV is so broken that it would matter 20%
> worth, and I suspect that number was somehow really not real, but more a
> matter of "this small code snippet that is part of the irq delivery and
> isn't really measurable improves by 20%", which is a different thing.

What appears to make up the difference is the loop in handle_IRQ_event().
That has to resurrect the arguments for the IRQ handler after calling the
previous IRQ handler.

FRV is just the easiest place for me to measure things like this. Trying to
do so on i386 would be tricky, and Xen wouldn't help as it could affect the
measurement of time - though it might permit me to count the intructions
instead. I might be able to do so on my power5 box, I suppose, but again,
like Xen, that's virtualised, and I'm not sure what affect that'd have.

So, I'm sure this will affect other archs, but it's much harder for me to
measure those.

But, you're also right: this is a statistic, and I'm sure you know the old
saying about those...

David

2006-10-03 10:32:05

by David Howells

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

David Howells <[email protected]> wrote:

> I wish. No, it's not simple enough to script. All the usages of struct
> pt_regs have to be eyeballed and have to be poked with the compiler. The
> problem is when an interrupt handler passes regs down to someone else - that I
> can't find.

Can't find with grep, I mean.

David

2006-10-03 10:51:41

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers


* Andrew Morton <[email protected]> wrote:

> > I don't personally mind the patch, I just wanted to bring that issue
> > up.
>
> yup. Perhaps we could add
>
> #define IRQ_HANDLERS_DONT_USE_PTREGS
>
> so that out-of-tree drivers can reliably do their ifdefing.

i'd suggest we do something like:

#define __PT_REGS

so that backportable drivers can do:

static irqreturn_t irq_handler(int irq, void *dev_id __PT_REGS)

instead of an #ifdef jungle. Older kernel bases can define __PT_REGS in
their interrupt.h (or in the backported driver's header, in one place)

#ifndef __PT_REGS
# define __PT_REGS , struct pt_regs *regs
#endif

this would minimize the direct impact in the source-code.

Ingo

2006-10-03 18:03:15

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

[Most people removed from CC: since they probably aren't too interested in
this.]

On Mon, 2 Oct 2006, David Brownell wrote:

> On Monday 02 October 2006 2:34 pm, Alan Stern wrote:
> > On Mon, 2 Oct 2006, David Brownell wrote:
> >
> > > > > (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
> > > > > something different depending on whether it's been supplied with a regs
> > > > > pointer or not.
> > >
> > > gaak! where did that come from? I'll be surprised if removing
> > > that causes any problem at all.
> >
> > Here's the statement in question:
> >
> > if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) {
>
> Where as I said, removing the "regs &&" should be just fine.
> (Is the plan that David Howells re-issue that patch? If so, I'l
> expect e will just fix it that way...)
>
> > ...
> >
> > Notice another questionable use of hcd->state.
>
> Questionable in what way? When that code is called to clean up
> after driver death, that loop must be ignored ... every pending I/O
> can safely be scrubbed. That's the main point of that particular
> HC_IS_RUNNING() test. In other cases, it's essential not to touch
> DMA queue entries that the host controller is still using.

Questionable because changes to hcd->state aren't synchronized with the
driver. In this case it probably doesn't end up making any difference.

Removing "regs &&" might change other aspects too. For instance, does
this routine ever get called from a timer routine, where regs would
normally be NULL? In such situations removing "regs &&" would reverse
the sense of the test.

Alan Stern

2006-10-05 08:02:14

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Mon, 2006-10-02 at 13:54 -0700, Linus Torvalds wrote:
> Yeah, well, it's been discussed before, and the real problem is not the
> patch itself, it's the damn drivers maintained outside the tree, and
> people who want to maintain the same driver for multiple different
> versions of the kernel.

Maintaining drivers out of tree is shameless autoflagellation at the
best of times. We really don't care -- if we didn't make life hard for
them in this way they'd only go and stick pins under their fingernails
to make up for the lack of pain. If you think about it like that, we're
probably doing them a favour -- at least this way they're _safe_.

> So if the patch works against my current tree, and nobody objects, I can
> certainly apply it.
>
> So speak up, people...

Go for it.

--
dwmw2

2006-10-05 14:38:05

by David Howells

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Andrew Morton <[email protected]> wrote:

> These should just use __get_cpu_var().

Done.

> And could we please remove the irq_regs macro?

Done.

> I think the change is good. But I don't want to maintain this whopper
> out-of-tree for two months! If we want to do this, we should just smash it
> in and grit our teeth. But I am a bit concerned about the non-x86
> architectures. I assume they'll continue to compile-and-work?

Well, it seems that IA64 and MIPS don't build as of 2.6.19-rc1 without my
having to do anything. i386, x86_64, powerpc and frv build for at least one
configuration each. The other archs I haven't touched, so will definitely
break.

Can those arch maintainers give me patches?


Anyway, I've made a GIT tree with just IRQ my patches in. It can be browsed
at:

http://git.infradead.org/?p=users/dhowells/irq-2.6.git;a=shortlog

Or pulled from:

git://git.infradead.org/~dhowells/irq-2.6.git

David

---
The following changes since commit d223a60106891bfe46febfacf46b20cd8509aaad:
Linus Torvalds:
Linux 2.6.19-rc1

are found in the git repository at:

git://git.infradead.org/~dhowells/irq-2.6.git

David Howells:
IRQ: Typedef the IRQ flow handler function type
IRQ: Typedef the IRQ handler function type
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

arch/frv/kernel/dma.c | 5 -
arch/frv/kernel/irq-mb93091.c | 4 -
arch/frv/kernel/irq-mb93093.c | 4 -
arch/frv/kernel/irq-mb93493.c | 4 -
arch/frv/kernel/irq.c | 2
arch/frv/kernel/time.c | 8 +
arch/i386/kernel/apic.c | 18 ++-
arch/i386/kernel/i8259.c | 4 -
arch/i386/kernel/irq.c | 12 +-
arch/i386/kernel/smp.c | 6 +
arch/i386/kernel/time.c | 6 -
arch/i386/kernel/time_hpet.c | 4 -
arch/i386/kernel/vm86.c | 2
arch/i386/mach-visws/visws_apic.c | 4 -
arch/i386/mach-voyager/voyager_basic.c | 2
arch/i386/mach-voyager/voyager_smp.c | 28 +++-
arch/ia64/kernel/irq_ia64.c | 4 -
arch/ia64/kernel/machvec.c | 2
arch/ia64/kernel/mca.c | 32 ++---
arch/ia64/kernel/time.c | 8 +
arch/ia64/sn/pci/tioca_provider.c | 3
arch/ia64/sn/pci/tioce_provider.c | 3
arch/mips/kernel/irq.c | 4 -
arch/mips/kernel/time.c | 24 ++--
arch/mips/sgi-ip22/ip22-reset.c | 2
arch/mips/sgi-ip22/ip22-time.c | 4 -
arch/powerpc/kernel/irq.c | 6 +
arch/powerpc/kernel/misc_64.S | 6 -
arch/powerpc/kernel/smp.c | 6 -
arch/powerpc/kernel/time.c | 6 +
arch/powerpc/platforms/cell/interrupt.c | 4 -
arch/powerpc/platforms/cell/spider-pic.c | 5 -
arch/powerpc/platforms/powermac/low_i2c.c | 2
arch/powerpc/platforms/powermac/pfunc_base.c | 2
arch/powerpc/platforms/powermac/pic.c | 7 -
arch/powerpc/platforms/pseries/ras.c | 14 +-
arch/powerpc/platforms/pseries/setup.c | 7 -
arch/powerpc/platforms/pseries/xics.c | 18 +--
arch/powerpc/platforms/pseries/xics.h | 3
arch/powerpc/sysdev/mpic.c | 4 -
arch/powerpc/xmon/xmon.c | 6 -
arch/x86_64/kernel/apic.c | 12 +-
arch/x86_64/kernel/irq.c | 7 +
arch/x86_64/kernel/time.c | 20 ++-
drivers/acorn/block/mfmhd.c | 2
drivers/acpi/osl.c | 2
drivers/ata/ahci.c | 4 -
drivers/ata/libata-core.c | 3
drivers/ata/pdc_adma.c | 5 -
drivers/ata/sata_mv.c | 6 -
drivers/ata/sata_nv.c | 18 +--
drivers/ata/sata_promise.c | 4 -
drivers/ata/sata_qstor.c | 4 -
drivers/ata/sata_sil.c | 6 -
drivers/ata/sata_sil24.c | 4 -
drivers/ata/sata_sx4.c | 4 -
drivers/ata/sata_vsc.c | 3
drivers/atm/ambassador.c | 4 -
drivers/atm/eni.c | 2
drivers/atm/firestream.c | 2
drivers/atm/fore200e.c | 2
drivers/atm/he.c | 4 -
drivers/atm/horizon.c | 4 -
drivers/atm/idt77252.c | 2
drivers/atm/iphase.c | 2
drivers/atm/lanai.c | 4 -
drivers/atm/nicstar.c | 4 -
drivers/atm/zatm.c | 2
drivers/block/DAC960.c | 24 +---
drivers/block/DAC960.h | 14 +-
drivers/block/acsi.c | 4 -
drivers/block/acsi_slm.c | 4 -
drivers/block/amiflop.c | 4 -
drivers/block/ataflop.c | 4 -
drivers/block/cciss.c | 6 -
drivers/block/cpqarray.c | 4 -
drivers/block/floppy.c | 4 -
drivers/block/ps2esdi.c | 6 -
drivers/block/swim3.c | 8 +
drivers/block/swim_iop.c | 4 -
drivers/block/sx8.c | 2
drivers/block/ub.c | 6 -
drivers/block/umem.c | 2
drivers/block/xd.c | 3
drivers/block/xd.h | 3
drivers/bluetooth/bcm203x.c | 2
drivers/bluetooth/bfusb.c | 8 +
drivers/bluetooth/bluecard_cs.c | 2
drivers/bluetooth/bpa10x.c | 2
drivers/bluetooth/bt3c_cs.c | 2
drivers/bluetooth/btuart_cs.c | 2
drivers/bluetooth/dtl1_cs.c | 2
drivers/bluetooth/hci_usb.c | 8 +
drivers/cdrom/cdu31a.c | 2
drivers/cdrom/cm206.c | 2
drivers/cdrom/mcdx.c | 2
drivers/cdrom/sonycd535.c | 2
drivers/char/amiserial.c | 6 -
drivers/char/applicom.c | 4 -
drivers/char/cyclades.c | 4 -
drivers/char/drm/drm_os_linux.h | 2
drivers/char/ec3104_keyb.c | 2
drivers/char/esp.c | 3
drivers/char/ftape/lowlevel/fdc-io.c | 2
drivers/char/hangcheck-timer.c | 2
drivers/char/hpet.c | 2
drivers/char/hvc_console.c | 4 -
drivers/char/hvcs.c | 6 -
drivers/char/hvsi.c | 6 -
drivers/char/ip2/ip2main.c | 9 +
drivers/char/ipmi/ipmi_si_intf.c | 6 -
drivers/char/ipmi/ipmi_watchdog.c | 2
drivers/char/isicom.c | 2
drivers/char/keyboard.c | 135 +++++++++++----------
drivers/char/mbcs.c | 3
drivers/char/mmtimer.c | 3
drivers/char/mwave/tp3780i.c | 4 -
drivers/char/mxser.c | 4 -
drivers/char/nwbutton.c | 2
drivers/char/nwbutton.h | 2
drivers/char/pcmcia/synclink_cs.c | 5 -
drivers/char/ppdev.c | 2
drivers/char/qtronix.c | 4 -
drivers/char/rio/rio_linux.c | 4 -
drivers/char/riscom8.c | 2
drivers/char/rtc.c | 8 +
drivers/char/ser_a2232.c | 4 -
drivers/char/serial167.c | 8 +
drivers/char/snsc.c | 2
drivers/char/snsc_event.c | 2
drivers/char/sonypi.c | 2
drivers/char/specialix.c | 4 -
drivers/char/stallion.c | 5 -
drivers/char/sx.c | 4 -
drivers/char/synclink.c | 3
drivers/char/synclink_gt.c | 5 -
drivers/char/synclinkmp.c | 3
drivers/char/sysrq.c | 62 ++++------
drivers/char/tlclk.c | 4 -
drivers/char/tpm/tpm_tis.c | 4 -
drivers/char/vme_scc.c | 18 +--
drivers/char/vr41xx_giu.c | 2
drivers/char/watchdog/eurotechwdt.c | 2
drivers/char/watchdog/mpcore_wdt.c | 2
drivers/char/watchdog/pcwd_usb.c | 2
drivers/char/watchdog/s3c2410_wdt.c | 3
drivers/char/watchdog/wdt.c | 3
drivers/char/watchdog/wdt285.c | 2
drivers/char/watchdog/wdt_pci.c | 3
drivers/dma/ioatdma.c | 2
drivers/fc4/soc.c | 2
drivers/fc4/socal.c | 2
drivers/i2c/busses/i2c-elektor.c | 2
drivers/i2c/busses/i2c-ibm_iic.c | 2
drivers/i2c/busses/i2c-iop3xx.c | 2
drivers/i2c/busses/i2c-ite.c | 3
drivers/i2c/busses/i2c-mpc.c | 2
drivers/i2c/busses/i2c-mv64xxx.c | 2
drivers/i2c/busses/i2c-ocores.c | 2
drivers/i2c/busses/i2c-omap.c | 4 -
drivers/i2c/busses/i2c-pca-isa.c | 2
drivers/i2c/busses/i2c-pxa.c | 2
drivers/i2c/busses/i2c-rpx.c | 4 -
drivers/i2c/busses/i2c-s3c2410.c | 3
drivers/i2c/chips/isp1301_omap.c | 4 -
drivers/i2c/chips/tps65010.c | 2
drivers/ide/ide-io.c | 2
drivers/ide/legacy/hd.c | 2
drivers/ide/legacy/macide.c | 2
drivers/ieee1394/ohci1394.c | 3
drivers/ieee1394/pcilynx.c | 3
drivers/infiniband/hw/amso1100/c2.c | 4 -
drivers/infiniband/hw/ehca/ehca_irq.c | 4 -
drivers/infiniband/hw/ehca/ehca_irq.h | 4 -
drivers/infiniband/hw/ipath/ipath_intr.c | 2
drivers/infiniband/hw/ipath/ipath_kernel.h | 2
drivers/infiniband/hw/mthca/mthca_eq.c | 10 +-
drivers/input/joystick/amijoy.c | 4 -
drivers/input/joystick/iforce/iforce-packets.c | 6 -
drivers/input/joystick/iforce/iforce-serio.c | 4 -
drivers/input/joystick/iforce/iforce-usb.c | 8 +
drivers/input/joystick/iforce/iforce.h | 2
drivers/input/joystick/magellan.c | 8 -
drivers/input/joystick/spaceball.c | 8 -
drivers/input/joystick/spaceorb.c | 8 -
drivers/input/joystick/stinger.c | 8 -
drivers/input/joystick/twidjoy.c | 8 -
drivers/input/joystick/warrior.c | 10 +-
drivers/input/keyboard/amikbd.c | 4 -
drivers/input/keyboard/atkbd.c | 4 -
drivers/input/keyboard/corgikbd.c | 9 -
drivers/input/keyboard/hil_kbd.c | 2
drivers/input/keyboard/hilkbd.c | 2
drivers/input/keyboard/lkkbd.c | 5 -
drivers/input/keyboard/locomokbd.c | 8 -
drivers/input/keyboard/newtonkbd.c | 3
drivers/input/keyboard/omap-keypad.c | 3
drivers/input/keyboard/spitzkbd.c | 10 +-
drivers/input/keyboard/stowaway.c | 3
drivers/input/keyboard/sunkbd.c | 3
drivers/input/keyboard/xtkbd.c | 3
drivers/input/misc/ixp4xx-beeper.c | 2
drivers/input/mouse/alps.c | 10 +-
drivers/input/mouse/amimouse.c | 4 -
drivers/input/mouse/hil_ptr.c | 2
drivers/input/mouse/inport.c | 4 -
drivers/input/mouse/lifebook.c | 4 -
drivers/input/mouse/logibm.c | 3
drivers/input/mouse/logips2pp.c | 4 -
drivers/input/mouse/pc110pad.c | 9 +
drivers/input/mouse/psmouse-base.c | 16 +-
drivers/input/mouse/psmouse.h | 2
drivers/input/mouse/rpcmouse.c | 4 -
drivers/input/mouse/sermouse.c | 14 +-
drivers/input/mouse/synaptics.c | 15 +-
drivers/input/mouse/vsxxxaa.c | 22 +--
drivers/input/serio/ambakmi.c | 4 -
drivers/input/serio/ct82c710.c | 4 -
drivers/input/serio/gscps2.c | 6 -
drivers/input/serio/hp_sdc.c | 4 -
drivers/input/serio/i8042.c | 12 +-
drivers/input/serio/maceps2.c | 5 -
drivers/input/serio/parkbd.c | 4 -
drivers/input/serio/pcips2.c | 4 -
drivers/input/serio/q40kbd.c | 4 -
drivers/input/serio/rpckbd.c | 6 -
drivers/input/serio/sa1111ps2.c | 6 -
drivers/input/serio/serio.c | 4 -
drivers/input/serio/serio_raw.c | 2
drivers/input/serio/serport.c | 5 -
drivers/input/touchscreen/ads7846.c | 2
drivers/input/touchscreen/corgi_ts.c | 13 +-
drivers/input/touchscreen/elo.c | 17 +--
drivers/input/touchscreen/gunze.c | 7 -
drivers/input/touchscreen/h3600_ts_input.c | 14 +-
drivers/input/touchscreen/hp680_ts_input.c | 2
drivers/input/touchscreen/mk712.c | 3
drivers/input/touchscreen/mtouch.c | 11 +-
drivers/input/touchscreen/penmount.c | 3
drivers/input/touchscreen/touchright.c | 3
drivers/input/touchscreen/touchwin.c | 3
drivers/isdn/act2000/act2000_isa.c | 2
drivers/isdn/gigaset/bas-gigaset.c | 12 +-
drivers/isdn/gigaset/usb-gigaset.c | 4 -
drivers/isdn/hardware/avm/avmcard.h | 4 -
drivers/isdn/hardware/avm/b1.c | 2
drivers/isdn/hardware/avm/b1dma.c | 2
drivers/isdn/hardware/avm/c4.c | 2
drivers/isdn/hardware/avm/t1isa.c | 2
drivers/isdn/hardware/eicon/diva.c | 4 -
drivers/isdn/hardware/eicon/divasmain.c | 3
drivers/isdn/hisax/amd7930_fn.c | 2
drivers/isdn/hisax/asuscom.c | 4 -
drivers/isdn/hisax/avm_a1.c | 2
drivers/isdn/hisax/avm_a1p.c | 2
drivers/isdn/hisax/avm_pci.c | 2
drivers/isdn/hisax/bkm_a4t.c | 2
drivers/isdn/hisax/bkm_a8.c | 2
drivers/isdn/hisax/diva.c | 8 +
drivers/isdn/hisax/elsa.c | 4 -
drivers/isdn/hisax/enternow_pci.c | 2
drivers/isdn/hisax/gazel.c | 4 -
drivers/isdn/hisax/hfc4s8s_l1.c | 2
drivers/isdn/hisax/hfc_pci.c | 2
drivers/isdn/hisax/hfc_sx.c | 2
drivers/isdn/hisax/hfc_usb.c | 8 +
drivers/isdn/hisax/hfcscard.c | 2
drivers/isdn/hisax/hisax.h | 2
drivers/isdn/hisax/hisax_fcpcipnp.c | 4 -
drivers/isdn/hisax/icc.c | 2
drivers/isdn/hisax/isac.c | 2
drivers/isdn/hisax/isurf.c | 2
drivers/isdn/hisax/ix1_micro.c | 2
drivers/isdn/hisax/mic.c | 2
drivers/isdn/hisax/netjet.h | 2
drivers/isdn/hisax/niccy.c | 3
drivers/isdn/hisax/nj_s.c | 2
drivers/isdn/hisax/nj_u.c | 2
drivers/isdn/hisax/s0box.c | 2
drivers/isdn/hisax/saphir.c | 2
drivers/isdn/hisax/sedlbauer.c | 6 -
drivers/isdn/hisax/sportster.c | 2
drivers/isdn/hisax/st5481_b.c | 2
drivers/isdn/hisax/st5481_d.c | 2
drivers/isdn/hisax/st5481_usb.c | 6 -
drivers/isdn/hisax/teleint.c | 2
drivers/isdn/hisax/teles0.c | 2
drivers/isdn/hisax/teles3.c | 2
drivers/isdn/hisax/telespci.c | 2
drivers/isdn/hisax/w6692.c | 4 -
drivers/isdn/hysdn/boardergo.c | 2
drivers/isdn/pcbit/layer2.c | 2
drivers/isdn/pcbit/layer2.h | 2
drivers/isdn/sc/init.c | 2
drivers/isdn/sc/interrupt.c | 2
drivers/macintosh/adb-iop.c | 8 +
drivers/macintosh/adb.c | 10 +-
drivers/macintosh/adbhid.c | 20 +--
drivers/macintosh/macio-adb.c | 7 -
drivers/macintosh/smu.c | 6 -
drivers/macintosh/via-cuda.c | 12 +-
drivers/macintosh/via-macii.c | 7 -
drivers/macintosh/via-maciisi.c | 12 +-
drivers/macintosh/via-pmu.c | 32 ++---
drivers/macintosh/via-pmu68k.c | 13 +-
drivers/media/common/saa7146_core.c | 2
drivers/media/dvb/b2c2/flexcop-pci.c | 2
drivers/media/dvb/b2c2/flexcop-usb.c | 2
drivers/media/dvb/bt8xx/bt878.c | 2
drivers/media/dvb/cinergyT2/cinergyT2.c | 4 -
drivers/media/dvb/dvb-usb/usb-urb.c | 2
drivers/media/dvb/pluto2/pluto2.c | 2
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 2
drivers/media/dvb/ttusb-dec/ttusb_dec.c | 4 -
drivers/media/video/arv.c | 2
drivers/media/video/bt8xx/bttv-driver.c | 2
drivers/media/video/cpia2/cpia2_usb.c | 4 -
drivers/media/video/cpia_usb.c | 2
drivers/media/video/cx88/cx88-alsa.c | 2
drivers/media/video/cx88/cx88-mpeg.c | 2
drivers/media/video/cx88/cx88-video.c | 2
drivers/media/video/dabusb.c | 2
drivers/media/video/em28xx/em28xx-core.c | 6 -
drivers/media/video/et61x251/et61x251_core.c | 2
drivers/media/video/meye.c | 2
drivers/media/video/ov511.c | 2
drivers/media/video/planb.c | 4 -
drivers/media/video/pvrusb2/pvrusb2-hdw.c | 4 -
drivers/media/video/pvrusb2/pvrusb2-io.c | 2
drivers/media/video/pwc/pwc-if.c | 2
drivers/media/video/saa7134/saa7134-alsa.c | 2
drivers/media/video/saa7134/saa7134-core.c | 2
drivers/media/video/saa7134/saa7134-oss.c | 2
drivers/media/video/se401.c | 4 -
drivers/media/video/sn9c102/sn9c102_core.c | 2
drivers/media/video/stradis.c | 2
drivers/media/video/stv680.c | 2
drivers/media/video/usbvideo/konicawc.c | 2
drivers/media/video/usbvideo/quickcam_messenger.c | 4 -
drivers/media/video/usbvideo/usbvideo.c | 2
drivers/media/video/vino.c | 2
drivers/media/video/w9968cf.c | 4 -
drivers/media/video/zc0301/zc0301_core.c | 2
drivers/media/video/zoran_device.c | 3
drivers/media/video/zoran_device.h | 4 -
drivers/media/video/zr36120.c | 4 -
drivers/message/fusion/mptbase.c | 5 -
drivers/message/i2o/pci.c | 3
drivers/mfd/ucb1x00-core.c | 2
drivers/misc/ibmasm/ibmasm.h | 4 -
drivers/misc/ibmasm/lowlevel.c | 4 -
drivers/misc/ibmasm/remote.c | 14 +-
drivers/misc/lkdtm.c | 5 -
drivers/misc/tifm_7xx1.c | 2
drivers/mmc/at91_mci.c | 4 -
drivers/mmc/au1xmmc.c | 2
drivers/mmc/imxmmc.c | 4 -
drivers/mmc/mmci.c | 4 -
drivers/mmc/omap.c | 4 -
drivers/mmc/pxamci.c | 6 -
drivers/mmc/sdhci.c | 2
drivers/mmc/wbsd.c | 2
drivers/net/3c501.c | 3
drivers/net/3c501.h | 2
drivers/net/3c505.c | 2
drivers/net/3c507.c | 4 -
drivers/net/3c509.c | 6 -
drivers/net/3c515.c | 6 -
drivers/net/3c523.c | 6 -
drivers/net/3c527.c | 4 -
drivers/net/3c59x.c | 14 +-
drivers/net/7990.c | 2
drivers/net/8139cp.c | 5 -
drivers/net/8139too.c | 8 -
drivers/net/82596.c | 8 +
drivers/net/8390.c | 5 -
drivers/net/8390.h | 2
drivers/net/a2065.c | 3
drivers/net/acenic.c | 2
drivers/net/acenic.h | 2
drivers/net/amd8111e.c | 4 -
drivers/net/apne.c | 6 -
drivers/net/appletalk/cops.c | 4 -
drivers/net/appletalk/ltpc.c | 2
drivers/net/arcnet/arcnet.c | 2
drivers/net/ariadne.c | 4 -
drivers/net/arm/am79c961a.c | 4 -
drivers/net/arm/at91_ether.c | 4 -
drivers/net/arm/ep93xx_eth.c | 2
drivers/net/arm/ether1.c | 4 -
drivers/net/arm/ether3.c | 4 -
drivers/net/at1700.c | 5 -
drivers/net/atari_bionet.c | 2
drivers/net/atari_pamsnet.c | 3
drivers/net/atarilance.c | 4 -
drivers/net/atp.c | 5 -
drivers/net/au1000_eth.c | 4 -
drivers/net/b44.c | 4 -
drivers/net/bmac.c | 14 +-
drivers/net/bnx2.c | 6 -
drivers/net/cassini.c | 8 +
drivers/net/chelsio/cxgb2.c | 2
drivers/net/chelsio/sge.c | 6 -
drivers/net/chelsio/sge.h | 9 -
drivers/net/cris/eth_v10.c | 8 +
drivers/net/cs89x0.c | 6 -
drivers/net/de600.c | 2
drivers/net/de600.h | 2
drivers/net/de620.c | 4 -
drivers/net/declance.c | 6 -
drivers/net/defxx.c | 6 -
drivers/net/depca.c | 4 -
drivers/net/dgrs.c | 2
drivers/net/dl2k.c | 4 -
drivers/net/dm9000.c | 4 -
drivers/net/e100.c | 4 -
drivers/net/e1000/e1000_ethtool.c | 3
drivers/net/e1000/e1000_main.c | 7 -
drivers/net/eepro.c | 4 -
drivers/net/eepro100.c | 6 -
drivers/net/eexpress.c | 4 -
drivers/net/ehea/ehea_main.c | 12 +-
drivers/net/epic100.c | 4 -
drivers/net/eth16i.c | 4 -
drivers/net/ewrk3.c | 4 -
drivers/net/fealnx.c | 4 -
drivers/net/fec.c | 10 +-
drivers/net/fec_8xx/fec_main.c | 4 -
drivers/net/forcedeth.c | 20 ++-
drivers/net/fs_enet/fs_enet-main.c | 4 -
drivers/net/gianfar.c | 22 ++-
drivers/net/gianfar.h | 2
drivers/net/hamachi.c | 4 -
drivers/net/hamradio/baycom_epp.c | 2
drivers/net/hamradio/baycom_par.c | 2
drivers/net/hamradio/baycom_ser_fdx.c | 2
drivers/net/hamradio/baycom_ser_hdx.c | 2
drivers/net/hamradio/dmascc.c | 4 -
drivers/net/hamradio/scc.c | 4 -
drivers/net/hamradio/yam.c | 2
drivers/net/hp100.c | 4 -
drivers/net/ibm_emac/ibm_emac_core.c | 4 -
drivers/net/ibm_emac/ibm_emac_debug.c | 3
drivers/net/ibm_emac/ibm_emac_mal.c | 10 +-
drivers/net/ibmlana.c | 2
drivers/net/ibmveth.c | 8 +
drivers/net/ioc3-eth.c | 2
drivers/net/irda/ali-ircc.c | 3
drivers/net/irda/au1k_ir.c | 4 -
drivers/net/irda/donauboe.c | 4 -
drivers/net/irda/irda-usb.c | 12 +-
drivers/net/irda/irport.c | 8 -
drivers/net/irda/irport.h | 2
drivers/net/irda/mcs7780.c | 4 -
drivers/net/irda/mcs7780.h | 4 -
drivers/net/irda/nsc-ircc.c | 3
drivers/net/irda/pxaficp_ir.c | 8 +
drivers/net/irda/sa1100_ir.c | 2
drivers/net/irda/smsc-ircc2.c | 6 -
drivers/net/irda/stir4200.c | 2
drivers/net/irda/via-ircc.c | 8 -
drivers/net/irda/vlsi_ir.c | 3
drivers/net/irda/w83977af_ir.c | 3
drivers/net/isa-skeleton.c | 4 -
drivers/net/iseries_veth.c | 2
drivers/net/ixgb/ixgb_main.c | 7 -
drivers/net/ixp2000/ixpdev.c | 2
drivers/net/lance.c | 5 -
drivers/net/lasi_82596.c | 6 -
drivers/net/lp486e.c | 4 -
drivers/net/mac89x0.c | 4 -
drivers/net/mace.c | 12 +-
drivers/net/macmace.c | 8 +
drivers/net/meth.c | 4 -
drivers/net/mipsnet.c | 3
drivers/net/mv643xx_eth.c | 3
drivers/net/myri10ge/myri10ge.c | 2
drivers/net/myri_sbus.c | 2
drivers/net/natsemi.c | 6 -
drivers/net/netx-eth.c | 2
drivers/net/ni5010.c | 4 -
drivers/net/ni52.c | 4 -
drivers/net/ni65.c | 4 -
drivers/net/ns83820.c | 2
drivers/net/pci-skeleton.c | 6 -
drivers/net/pcmcia/3c574_cs.c | 6 -
drivers/net/pcmcia/3c589_cs.c | 6 -
drivers/net/pcmcia/axnet_cs.c | 12 +-
drivers/net/pcmcia/fmvj18x_cs.c | 4 -
drivers/net/pcmcia/nmclan_cs.c | 4 -
drivers/net/pcmcia/pcnet_cs.c | 8 +
drivers/net/pcmcia/smc91c92_cs.c | 6 -
drivers/net/pcmcia/xirc2ps_cs.c | 4 -
drivers/net/pcnet32.c | 6 -
drivers/net/phy/phy.c | 2
drivers/net/plip.c | 6 -
drivers/net/qla3xxx.c | 2
drivers/net/r8169.c | 7 -
drivers/net/rrunner.c | 2
drivers/net/rrunner.h | 2
drivers/net/s2io.c | 12 +-
drivers/net/s2io.h | 8 +
drivers/net/saa9730.c | 3
drivers/net/sb1000.c | 4 -
drivers/net/sb1250-mac.c | 4 -
drivers/net/seeq8005.c | 4 -
drivers/net/sgiseeq.c | 2
drivers/net/sis190.c | 4 -
drivers/net/sis900.c | 6 -
drivers/net/sk98lin/skge.c | 10 +-
drivers/net/sk_mca.c | 2
drivers/net/skfp/skfddi.c | 5 -
drivers/net/skge.c | 4 -
drivers/net/sky2.c | 5 -
drivers/net/smc-ultra.c | 2
drivers/net/smc911x.c | 6 -
drivers/net/smc9194.c | 4 -
drivers/net/smc91x.c | 2
drivers/net/smc91x.h | 2
drivers/net/sonic.c | 2
drivers/net/sonic.h | 2
drivers/net/spider_net.c | 4 -
drivers/net/starfire.c | 4 -
drivers/net/sun3_82586.c | 4 -
drivers/net/sun3lance.c | 4 -
drivers/net/sunbmac.c | 2
drivers/net/sundance.c | 4 -
drivers/net/sungem.c | 4 -
drivers/net/sunhme.c | 4 -
drivers/net/sunlance.c | 2
drivers/net/sunqe.c | 2
drivers/net/tc35815.c | 4 -
drivers/net/tg3.c | 15 +-
drivers/net/tlan.c | 7 -
drivers/net/tokenring/3c359.c | 4 -
drivers/net/tokenring/ibmtr.c | 6 -
drivers/net/tokenring/lanstreamer.c | 5 -
drivers/net/tokenring/madgemc.c | 6 -
drivers/net/tokenring/olympic.c | 4 -
drivers/net/tokenring/smctr.c | 4 -
drivers/net/tokenring/tms380tr.c | 2
drivers/net/tokenring/tms380tr.h | 2
drivers/net/tulip/de2104x.c | 2
drivers/net/tulip/de4x5.c | 4 -
drivers/net/tulip/dmfe.c | 6 -
drivers/net/tulip/interrupt.c | 2
drivers/net/tulip/tulip.h | 2
drivers/net/tulip/tulip_core.c | 2
drivers/net/tulip/uli526x.c | 4 -
drivers/net/tulip/winbond-840.c | 4 -
drivers/net/tulip/xircom_cb.c | 6 -
drivers/net/tulip/xircom_tulip_cb.c | 4 -
drivers/net/typhoon.c | 2
drivers/net/ucc_geth.c | 5 -
drivers/net/via-rhine.c | 6 -
drivers/net/via-velocity.c | 5 -
drivers/net/wan/cosa.c | 4 -
drivers/net/wan/cycx_main.c | 4 -
drivers/net/wan/dscc4.c | 4 -
drivers/net/wan/farsync.c | 2
drivers/net/wan/hd6457x.c | 2
drivers/net/wan/lmc/lmc_main.c | 4 -
drivers/net/wan/pc300_drv.c | 4 -
drivers/net/wan/sbni.c | 4 -
drivers/net/wan/sdla.c | 2
drivers/net/wan/wanxl.c | 2
drivers/net/wan/z85230.c | 2
drivers/net/wan/z85230.h | 2
drivers/net/wireless/airo.c | 5 -
drivers/net/wireless/arlan-main.c | 4 -
drivers/net/wireless/atmel.c | 2
drivers/net/wireless/bcm43xx/bcm43xx_main.c | 4 -
drivers/net/wireless/hostap/hostap_hw.c | 2
drivers/net/wireless/ipw2100.c | 2
drivers/net/wireless/ipw2200.c | 2
drivers/net/wireless/netwave_cs.c | 6 -
drivers/net/wireless/orinoco.c | 2
drivers/net/wireless/orinoco.h | 2
drivers/net/wireless/prism54/islpci_dev.c | 2
drivers/net/wireless/prism54/islpci_dev.h | 2
drivers/net/wireless/ray_cs.c | 4 -
drivers/net/wireless/wavelan.c | 2
drivers/net/wireless/wavelan.p.h | 3
drivers/net/wireless/wavelan_cs.c | 3
drivers/net/wireless/wavelan_cs.p.h | 3
drivers/net/wireless/wl3501_cs.c | 3
drivers/net/wireless/zd1201.c | 6 -
drivers/net/wireless/zd1211rw/zd_usb.c | 6 -
drivers/net/yellowfin.c | 4 -
drivers/net/znet.c | 4 -
drivers/parisc/dino.c | 3
drivers/parisc/eisa.c | 4 -
drivers/parisc/gsc.c | 4 -
drivers/parisc/gsc.h | 2
drivers/parisc/power.c | 2
drivers/parisc/superio.c | 4 -
drivers/parport/daisy.c | 2
drivers/parport/ieee1284.c | 2
drivers/parport/parport_amiga.c | 4 -
drivers/parport/parport_atari.c | 4 -
drivers/parport/parport_ax88796.c | 4 -
drivers/parport/parport_gsc.c | 4 -
drivers/parport/parport_ip32.c | 11 --
drivers/parport/parport_mfc3.c | 2
drivers/parport/parport_pc.c | 4 -
drivers/parport/parport_sunbpp.c | 2
drivers/parport/share.c | 2
drivers/pci/hotplug/cpci_hotplug_core.c | 2
drivers/pci/hotplug/cpqphp.h | 2
drivers/pci/hotplug/cpqphp_ctrl.c | 2
drivers/pci/hotplug/pciehp_hpc.c | 6 -
drivers/pci/hotplug/shpchp_hpc.c | 6 -
drivers/pci/pcie/aer/aerdrv.c | 3
drivers/pcmcia/at91_cf.c | 2
drivers/pcmcia/hd64465_ss.c | 2
drivers/pcmcia/i82092.c | 2
drivers/pcmcia/i82092aa.h | 2
drivers/pcmcia/i82365.c | 9 +
drivers/pcmcia/m32r_cfc.c | 7 -
drivers/pcmcia/m32r_pcc.c | 4 -
drivers/pcmcia/m8xx_pcmcia.c | 4 -
drivers/pcmcia/omap_cf.c | 2
drivers/pcmcia/pcmcia_resource.c | 2
drivers/pcmcia/pd6729.c | 6 -
drivers/pcmcia/soc_common.c | 2
drivers/pcmcia/tcic.c | 10 +-
drivers/pcmcia/vrc4171_card.c | 2
drivers/pcmcia/vrc4173_cardu.c | 2
drivers/pcmcia/yenta_socket.c | 6 -
drivers/pnp/resource.c | 2
drivers/rtc/rtc-at91.c | 3
drivers/rtc/rtc-ds1553.c | 3
drivers/rtc/rtc-pl031.c | 2
drivers/rtc/rtc-s3c.c | 4 -
drivers/rtc/rtc-sa1100.c | 6 -
drivers/rtc/rtc-sh.c | 4 -
drivers/rtc/rtc-vr41xx.c | 4 -
drivers/sbus/char/aurora.c | 4 -
drivers/sbus/char/bbc_i2c.c | 2
drivers/sbus/char/cpwatchdog.c | 4 -
drivers/sbus/char/uctrl.c | 2
drivers/scsi/3w-9xxx.c | 2
drivers/scsi/3w-xxxx.c | 3
drivers/scsi/53c700.c | 2
drivers/scsi/53c700.h | 2
drivers/scsi/53c7xx.c | 6 -
drivers/scsi/BusLogic.c | 2
drivers/scsi/BusLogic.h | 2
drivers/scsi/NCR5380.c | 6 -
drivers/scsi/NCR5380.h | 2
drivers/scsi/NCR53C9x.c | 6 -
drivers/scsi/NCR53C9x.h | 2
drivers/scsi/NCR53c406a.c | 11 +-
drivers/scsi/NCR_D700.c | 4 -
drivers/scsi/NCR_Q720.c | 4 -
drivers/scsi/a100u2w.c | 2
drivers/scsi/a2091.c | 2
drivers/scsi/a3000.c | 2
drivers/scsi/aacraid/rx.c | 4 -
drivers/scsi/aacraid/sa.c | 2
drivers/scsi/advansys.c | 4 -
drivers/scsi/aha152x.c | 6 -
drivers/scsi/aha1542.c | 12 +-
drivers/scsi/aha1740.c | 3
drivers/scsi/aic7xxx/aic79xx_osm.c | 2
drivers/scsi/aic7xxx/aic79xx_osm.h | 2
drivers/scsi/aic7xxx/aic7xxx_osm.c | 2
drivers/scsi/aic7xxx/aic7xxx_osm.h | 2
drivers/scsi/aic7xxx_old.c | 12 +-
drivers/scsi/aic94xx/aic94xx_hwi.c | 3
drivers/scsi/aic94xx/aic94xx_hwi.h | 2
drivers/scsi/amiga7xx.h | 2
drivers/scsi/arcmsr/arcmsr_hba.c | 3
drivers/scsi/arm/acornscsi.c | 5 -
drivers/scsi/arm/cumana_2.c | 3
drivers/scsi/arm/eesox.c | 3
drivers/scsi/arm/powertec.c | 4 -
drivers/scsi/atari_NCR5380.c | 2
drivers/scsi/atari_dma_emul.c | 4 -
drivers/scsi/atari_scsi.c | 10 +-
drivers/scsi/atp870u.c | 2
drivers/scsi/bvme6000.h | 2
drivers/scsi/dc395x.c | 3
drivers/scsi/dec_esp.c | 12 +-
drivers/scsi/dpt_i2o.c | 2
drivers/scsi/dpti.h | 2
drivers/scsi/eata.c | 5 -
drivers/scsi/eata_pio.c | 7 -
drivers/scsi/esp.c | 4 -
drivers/scsi/fd_mcs.c | 4 -
drivers/scsi/fdomain.c | 6 -
drivers/scsi/gdth.c | 6 -
drivers/scsi/gvp11.c | 2
drivers/scsi/hptiop.c | 2
drivers/scsi/ibmmca.c | 3
drivers/scsi/ibmvscsi/rpa_vscsi.c | 5 -
drivers/scsi/in2000.c | 2
drivers/scsi/initio.c | 2
drivers/scsi/ipr.c | 3
drivers/scsi/ips.c | 4 -
drivers/scsi/lpfc/lpfc_crtn.h | 2
drivers/scsi/lpfc/lpfc_sli.c | 2
drivers/scsi/mac53c94.c | 10 +-
drivers/scsi/mac_esp.c | 14 +-
drivers/scsi/megaraid.c | 6 -
drivers/scsi/megaraid.h | 4 -
drivers/scsi/megaraid/megaraid_mbox.c | 4 -
drivers/scsi/megaraid/megaraid_sas.c | 2
drivers/scsi/mesh.c | 8 +
drivers/scsi/mvme147.c | 2
drivers/scsi/mvme16x.h | 2
drivers/scsi/ncr53c8xx.c | 2
drivers/scsi/ncr53c8xx.h | 2
drivers/scsi/nsp32.c | 4 -
drivers/scsi/pcmcia/nsp_cs.c | 2
drivers/scsi/pcmcia/nsp_cs.h | 2
drivers/scsi/pcmcia/sym53c500_cs.c | 2
drivers/scsi/psi240i.c | 7 -
drivers/scsi/qla1280.c | 2
drivers/scsi/qla2xxx/qla_def.h | 2
drivers/scsi/qla2xxx/qla_gbl.h | 6 -
drivers/scsi/qla2xxx/qla_inline.h | 2
drivers/scsi/qla2xxx/qla_isr.c | 9 -
drivers/scsi/qla4xxx/ql4_glbl.h | 2
drivers/scsi/qla4xxx/ql4_isr.c | 3
drivers/scsi/qlogicfas408.c | 6 -
drivers/scsi/qlogicfas408.h | 2
drivers/scsi/qlogicpti.c | 4 -
drivers/scsi/seagate.c | 11 +-
drivers/scsi/sgiwd93.c | 2
drivers/scsi/stex.c | 2
drivers/scsi/sun3_NCR5380.c | 2
drivers/scsi/sun3_scsi.c | 6 -
drivers/scsi/sun3_scsi_vme.c | 6 -
drivers/scsi/sym53c416.c | 3
drivers/scsi/sym53c8xx_2/sym_glue.c | 2
drivers/scsi/tmscsim.c | 6 -
drivers/scsi/u14-34f.c | 5 -
drivers/scsi/ultrastor.c | 13 +-
drivers/scsi/wd7000.c | 2
drivers/serial/21285.c | 4 -
drivers/serial/68328serial.c | 9 +
drivers/serial/68360serial.c | 2
drivers/serial/8250.c | 14 +-
drivers/serial/amba-pl010.c | 15 --
drivers/serial/amba-pl011.c | 15 --
drivers/serial/atmel_serial.c | 8 +
drivers/serial/clps711x.c | 6 -
drivers/serial/cpm_uart/cpm_uart_core.c | 16 +-
drivers/serial/crisv10.c | 6 -
drivers/serial/dz.c | 2
drivers/serial/icom.c | 3
drivers/serial/imx.c | 8 +
drivers/serial/ioc3_serial.c | 10 +-
drivers/serial/ioc4_serial.c | 3
drivers/serial/ip22zilog.c | 18 +--
drivers/serial/jsm/jsm.h | 2
drivers/serial/jsm/jsm_neo.c | 2
drivers/serial/m32r_sio.c | 14 +-
drivers/serial/mcfserial.c | 2
drivers/serial/mpc52xx_uart.c | 10 +-
drivers/serial/mpsc.c | 8 +
drivers/serial/netx-serial.c | 8 +
drivers/serial/pmac_zilog.c | 17 +--
drivers/serial/pxa.c | 10 +-
drivers/serial/s3c2410.c | 6 -
drivers/serial/sa1100.c | 8 +
drivers/serial/serial_lh7a40x.c | 16 --
drivers/serial/serial_txx9.c | 8 +
drivers/serial/sh-sci.c | 33 ++---
drivers/serial/sn_console.c | 11 +-
drivers/serial/sunhv.c | 10 +-
drivers/serial/sunsab.c | 13 +-
drivers/serial/sunsu.c | 19 +--
drivers/serial/sunzilog.c | 31 ++---
drivers/serial/v850e_uart.c | 4 -
drivers/serial/vr41xx_siu.c | 9 +
drivers/sn/ioc3.c | 12 +-
drivers/spi/pxa2xx_spi.c | 4 -
drivers/spi/spi_mpc83xx.c | 3
drivers/spi/spi_s3c24xx.c | 2
drivers/tc/zs.c | 6 -
drivers/usb/atm/cxacru.c | 2
drivers/usb/atm/speedtch.c | 2
drivers/usb/atm/ueagle-atm.c | 2
drivers/usb/atm/usbatm.c | 2
drivers/usb/class/cdc-acm.c | 6 -
drivers/usb/class/usblp.c | 4 -
drivers/usb/core/devio.c | 2
drivers/usb/core/hcd.c | 15 +-
drivers/usb/core/hcd.h | 9 -
drivers/usb/core/hub.c | 2
drivers/usb/core/message.c | 4 -
drivers/usb/gadget/at91_udc.c | 4 -
drivers/usb/gadget/goku_udc.c | 2
drivers/usb/gadget/lh7a40x_udc.c | 2
drivers/usb/gadget/net2280.c | 2
drivers/usb/gadget/omap_udc.c | 9 -
drivers/usb/gadget/pxa2xx_udc.c | 11 +-
drivers/usb/host/ehci-hcd.c | 26 ++--
drivers/usb/host/ehci-hub.c | 4 -
drivers/usb/host/ehci-pci.c | 4 -
drivers/usb/host/ehci-q.c | 21 ++-
drivers/usb/host/ehci-sched.c | 21 +--
drivers/usb/host/hc_crisv10.c | 12 +-
drivers/usb/host/isp116x-hcd.c | 16 +-
drivers/usb/host/ohci-hcd.c | 14 +-
drivers/usb/host/ohci-hub.c | 8 +
drivers/usb/host/ohci-q.c | 16 +-
drivers/usb/host/sl811-hcd.c | 21 ++-
drivers/usb/host/u132-hcd.c | 8 +
drivers/usb/host/uhci-hcd.c | 8 +
drivers/usb/host/uhci-hub.c | 2
drivers/usb/host/uhci-q.c | 15 +-
drivers/usb/image/mdc800.c | 6 -
drivers/usb/image/microtek.c | 10 +-
drivers/usb/input/acecad.c | 2
drivers/usb/input/aiptek.c | 13 --
drivers/usb/input/appletouch.c | 2
drivers/usb/input/ati_remote.c | 17 +--
drivers/usb/input/ati_remote2.c | 14 +-
drivers/usb/input/hid-core.c | 28 ++--
drivers/usb/input/hid-input.c | 4 -
drivers/usb/input/hid.h | 4 -
drivers/usb/input/hiddev.c | 2
drivers/usb/input/itmtouch.c | 4 -
drivers/usb/input/kbtab.c | 2
drivers/usb/input/keyspan_remote.c | 7 -
drivers/usb/input/mtouchusb.c | 3
drivers/usb/input/powermate.c | 7 -
drivers/usb/input/touchkitusb.c | 15 +-
drivers/usb/input/usbkbd.c | 6 -
drivers/usb/input/usbmouse.c | 4 -
drivers/usb/input/usbtouchscreen.c | 15 +-
drivers/usb/input/wacom.h | 4 -
drivers/usb/input/wacom_sys.c | 9 -
drivers/usb/input/wacom_wac.c | 9 -
drivers/usb/input/xpad.c | 8 -
drivers/usb/input/yealink.c | 9 +
drivers/usb/misc/adutux.c | 4 -
drivers/usb/misc/appledisplay.c | 2
drivers/usb/misc/auerswald.c | 30 ++---
drivers/usb/misc/ftdi-elan.c | 2
drivers/usb/misc/ldusb.c | 4 -
drivers/usb/misc/legousbtower.c | 8 +
drivers/usb/misc/phidgetkit.c | 2
drivers/usb/misc/phidgetmotorcontrol.c | 2
drivers/usb/misc/sisusbvga/sisusb.c | 4 -
drivers/usb/misc/usblcd.c | 2
drivers/usb/misc/usbtest.c | 8 +
drivers/usb/misc/uss720.c | 4 -
drivers/usb/net/asix.c | 2
drivers/usb/net/catc.c | 8 +
drivers/usb/net/gl620a.c | 2
drivers/usb/net/kaweth.c | 10 +-
drivers/usb/net/net1080.c | 2
drivers/usb/net/pegasus.c | 14 +-
drivers/usb/net/rtl8150.c | 12 +-
drivers/usb/net/usbnet.c | 10 +-
drivers/usb/serial/aircable.c | 4 -
drivers/usb/serial/airprime.c | 4 -
drivers/usb/serial/belkin_sa.c | 4 -
drivers/usb/serial/cyberjack.c | 12 +-
drivers/usb/serial/cypress_m8.c | 8 +
drivers/usb/serial/digi_acceleport.c | 8 +
drivers/usb/serial/empeg.c | 8 +
drivers/usb/serial/ftdi_sio.c | 8 +
drivers/usb/serial/garmin_gps.c | 6 -
drivers/usb/serial/generic.c | 4 -
drivers/usb/serial/io_edgeport.c | 16 +-
drivers/usb/serial/io_ti.c | 6 -
drivers/usb/serial/ipaq.c | 8 +
drivers/usb/serial/ipw.c | 4 -
drivers/usb/serial/ir-usb.c | 8 +
drivers/usb/serial/keyspan.c | 52 ++++----
drivers/usb/serial/keyspan_pda.c | 4 -
drivers/usb/serial/kl5kusb105.c | 8 +
drivers/usb/serial/kobil_sct.c | 8 +
drivers/usb/serial/mct_u232.c | 4 -
drivers/usb/serial/mos7840.c | 9 +
drivers/usb/serial/navman.c | 2
drivers/usb/serial/omninet.c | 8 +
drivers/usb/serial/option.c | 10 +-
drivers/usb/serial/pl2303.c | 6 -
drivers/usb/serial/safe_serial.c | 2
drivers/usb/serial/ti_usb_3410_5052.c | 12 +-
drivers/usb/serial/visor.c | 12 +-
drivers/usb/serial/whiteheat.c | 16 +-
drivers/usb/storage/onetouch.c | 3
drivers/usb/storage/transport.c | 2
drivers/usb/usb-skeleton.c | 2
drivers/video/amifb.c | 4 -
drivers/video/arcfb.c | 3
drivers/video/atafb.c | 2
drivers/video/aty/atyfb_base.c | 2
drivers/video/au1200fb.c | 2
drivers/video/console/fbcon.c | 4 -
drivers/video/intelfb/intelfbhw.c | 2
drivers/video/matrox/matroxfb_base.c | 2
drivers/video/pvr2fb.c | 4 -
drivers/video/pxafb.c | 2
drivers/video/s3c2410fb.c | 2
drivers/video/sa1100fb.c | 2
fs/proc/proc_misc.c | 2
include/asm-frv/dma.h | 5 -
include/asm-frv/irq_regs.h | 27 ++++
include/asm-frv/ptrace.h | 1
include/asm-generic/irq_regs.h | 37 ++++++
include/asm-i386/apic.h | 4 -
include/asm-i386/arch_hooks.h | 2
include/asm-i386/floppy.h | 6 -
include/asm-i386/hpet.h | 2
include/asm-i386/hw_irq.h | 2
include/asm-i386/irq_regs.h | 1
include/asm-i386/mach-default/do_timer.h | 8 +
include/asm-i386/mach-visws/do_timer.h | 8 +
include/asm-i386/mach-voyager/do_timer.h | 6 -
include/asm-i386/voyager.h | 4 -
include/asm-ia64/irq_regs.h | 1
include/asm-ia64/machvec.h | 4 -
include/asm-mips/irq_regs.h | 1
include/asm-mips/time.h | 4 -
include/asm-powerpc/irq.h | 2
include/asm-powerpc/irq_regs.h | 2
include/asm-powerpc/smp.h | 3
include/asm-x86_64/apic.h | 2
include/asm-x86_64/floppy.h | 6 -
include/asm-x86_64/irq_regs.h | 1
include/asm-x86_64/proto.h | 4 -
include/linux/adb.h | 4 -
include/linux/arcdevice.h | 2
include/linux/hiddev.h | 4 -
include/linux/ide.h | 2
include/linux/input.h | 7 -
include/linux/interrupt.h | 9 +
include/linux/ioc3.h | 2
include/linux/irq.h | 66 ++++------
include/linux/libata.h | 4 -
include/linux/parport.h | 16 +-
include/linux/profile.h | 2
include/linux/rtc.h | 2
include/linux/serial_core.h | 7 -
include/linux/serio.h | 5 -
include/linux/sysrq.h | 6 -
include/linux/usb.h | 3
include/linux/usb/serial.h | 12 +-
include/sound/cs4231.h | 2
include/sound/emu10k1.h | 2
include/sound/gus.h | 2
include/sound/initval.h | 2
include/sound/mpu401.h | 6 -
include/sound/sb.h | 6 -
include/sound/vx_core.h | 2
kernel/irq/chip.c | 48 +++----
kernel/irq/handle.c | 19 +--
kernel/irq/manage.c | 4 -
kernel/irq/spurious.c | 10 +-
kernel/power/poweroff.c | 3
kernel/profile.c | 5 +
lib/Makefile | 2
lib/irq_regs.c | 15 ++
sound/aoa/core/snd-aoa-gpio-feature.c | 4 -
sound/aoa/soundbus/i2sbus/i2sbus-core.c | 5 -
sound/aoa/soundbus/i2sbus/i2sbus-pcm.c | 4 -
sound/aoa/soundbus/i2sbus/i2sbus.h | 4 -
sound/arm/aaci.c | 2
sound/arm/pxa2xx-ac97.c | 2
sound/arm/pxa2xx-pcm.c | 2
sound/drivers/mpu401/mpu401_uart.c | 8 -
sound/drivers/mtpav.c | 2
sound/drivers/mts64.c | 2
sound/drivers/serial-u16550.c | 2
sound/drivers/vx/vx_core.c | 2
sound/isa/ad1816a/ad1816a_lib.c | 2
sound/isa/ad1848/ad1848_lib.c | 2
sound/isa/cs423x/cs4231_lib.c | 2
sound/isa/es1688/es1688_lib.c | 2
sound/isa/es18xx.c | 4 -
sound/isa/gus/gus_irq.c | 2
sound/isa/gus/gusmax.c | 6 -
sound/isa/gus/interwave.c | 6 -
sound/isa/opl3sa2.c | 6 -
sound/isa/opti9xx/opti92x-ad1848.c | 2
sound/isa/sb/es968.c | 3
sound/isa/sb/sb16_main.c | 4 -
sound/isa/sb/sb8.c | 2
sound/isa/sb/sb_common.c | 2
sound/isa/sgalaxy.c | 2
sound/isa/wavefront/wavefront.c | 4 -
sound/mips/au1x00.c | 2
sound/oss/ad1816.c | 2
sound/oss/ad1848.c | 4 -
sound/oss/ad1889.c | 2
sound/oss/btaudio.c | 2
sound/oss/cs46xx.c | 2
sound/oss/dmasound/dmasound_atari.c | 4 -
sound/oss/dmasound/dmasound_awacs.c | 14 +-
sound/oss/dmasound/dmasound_paula.c | 4 -
sound/oss/dmasound/dmasound_q40.c | 8 +
sound/oss/emu10k1/irqmgr.c | 2
sound/oss/emu10k1/main.c | 2
sound/oss/es1371.c | 2
sound/oss/hal2.c | 2
sound/oss/i810_audio.c | 2
sound/oss/mpu401.c | 2
sound/oss/mpu401.h | 3
sound/oss/msnd_pinnacle.c | 2
sound/oss/nec_vrc5477.c | 2
sound/oss/nm256.h | 2
sound/oss/nm256_audio.c | 8 +
sound/oss/pas2_card.c | 2
sound/oss/sb_common.c | 4 -
sound/oss/sh_dac_audio.c | 2
sound/oss/swarm_cs4297a.c | 2
sound/oss/trident.c | 2
sound/oss/uart401.c | 2
sound/oss/uart6850.c | 2
sound/oss/via82cxxx_audio.c | 6 -
sound/oss/vidc.h | 2
sound/oss/vwsnd.c | 4 -
sound/oss/waveartist.c | 2
sound/parisc/harmony.c | 2
sound/pci/ad1889.c | 4 -
sound/pci/ali5451/ali5451.c | 4 -
sound/pci/als300.c | 6 -
sound/pci/als4000.c | 4 -
sound/pci/atiixp.c | 2
sound/pci/atiixp_modem.c | 2
sound/pci/au88x0/au88x0.h | 3
sound/pci/au88x0/au88x0_core.c | 4 -
sound/pci/azt3328.c | 4 -
sound/pci/bt87x.c | 2
sound/pci/ca0106/ca0106_main.c | 3
sound/pci/cmipci.c | 4 -
sound/pci/cs4281.c | 4 -
sound/pci/cs46xx/cs46xx_lib.c | 2
sound/pci/cs5535audio/cs5535audio.c | 3
sound/pci/echoaudio/echoaudio.c | 3
sound/pci/emu10k1/emu10k1x.c | 3
sound/pci/emu10k1/irq.c | 2
sound/pci/ens1370.c | 4 -
sound/pci/es1938.c | 6 -
sound/pci/es1968.c | 6 -
sound/pci/fm801.c | 4 -
sound/pci/hda/hda_intel.c | 2
sound/pci/ice1712/ice1712.c | 6 -
sound/pci/ice1712/ice1724.c | 4 -
sound/pci/intel8x0.c | 2
sound/pci/intel8x0m.c | 2
sound/pci/korg1212/korg1212.c | 2
sound/pci/maestro3.c | 3
sound/pci/mixart/mixart_core.c | 2
sound/pci/mixart/mixart_core.h | 2
sound/pci/nm256/nm256.c | 6 -
sound/pci/pcxhr/pcxhr_core.c | 2
sound/pci/pcxhr/pcxhr_core.h | 2
sound/pci/riptide/riptide.c | 5 -
sound/pci/rme32.c | 3
sound/pci/rme96.c | 3
sound/pci/rme9652/hdsp.c | 2
sound/pci/rme9652/hdspm.c | 3
sound/pci/rme9652/rme9652.c | 2
sound/pci/sonicvibes.c | 4 -
sound/pci/trident/trident_main.c | 7 -
sound/pci/via82xx.c | 6 -
sound/pci/via82xx_modem.c | 2
sound/pci/ymfpci/ymfpci_main.c | 4 -
sound/pcmcia/pdaudiocf/pdaudiocf.h | 2
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c | 4 -
sound/ppc/pmac.c | 6 -
sound/ppc/tumbler.c | 2
sound/sparc/amd7930.c | 2
sound/sparc/cs4231.c | 2
sound/sparc/dbri.c | 3
sound/usb/usbaudio.c | 4 -
sound/usb/usbmidi.c | 4 -
sound/usb/usbmixer.c | 5 -
sound/usb/usx2y/usbusx2y.c | 4 -
sound/usb/usx2y/usbusx2yaudio.c | 10 +-
sound/usb/usx2y/usx2yhwdeppcm.c | 6 -
1080 files changed, 2638 insertions(+), 3006 deletions(-)
create mode 100644 include/asm-frv/irq_regs.h
create mode 100644 include/asm-generic/irq_regs.h
create mode 100644 include/asm-i386/irq_regs.h
create mode 100644 include/asm-ia64/irq_regs.h
create mode 100644 include/asm-mips/irq_regs.h
create mode 100644 include/asm-powerpc/irq_regs.h
create mode 100644 include/asm-x86_64/irq_regs.h
create mode 100644 lib/irq_regs.c

2006-10-05 19:47:00

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Thu, 05 Oct 2006 15:22:07 +0100
David Howells <[email protected]> wrote:

> Andrew Morton <[email protected]> wrote:
>
> > These should just use __get_cpu_var().
>
> Done.
>
> > And could we please remove the irq_regs macro?
>
> Done.
>
> > I think the change is good. But I don't want to maintain this whopper
> > out-of-tree for two months! If we want to do this, we should just smash it
> > in and grit our teeth. But I am a bit concerned about the non-x86
> > architectures. I assume they'll continue to compile-and-work?
>
> Well, it seems that IA64 and MIPS don't build as of 2.6.19-rc1 without my
> having to do anything. i386, x86_64, powerpc and frv build for at least one
> configuration each. The other archs I haven't touched, so will definitely
> break.
>
> Can those arch maintainers give me patches?
>
>
> Anyway, I've made a GIT tree with just IRQ my patches in. It can be browsed
> at:
>
> http://git.infradead.org/?p=users/dhowells/irq-2.6.git;a=shortlog
>
> Or pulled from:
>
> git://git.infradead.org/~dhowells/irq-2.6.git
>
> David
>
> ---
> The following changes since commit d223a60106891bfe46febfacf46b20cd8509aaad:
> Linus Torvalds:
> Linux 2.6.19-rc1
>
> are found in the git repository at:
>
> git://git.infradead.org/~dhowells/irq-2.6.git
>

A quick survey of the wreckage:

- Dmitry's input git tree breaks a bit

- five of Greg's USB patches need fixing

- a few random -mm patches need touchups

- The hrtimer+dynticks i386 patch takes rather a hit and will need redoing.

So, not too bad at all. It's a bit rough on the poor old arch maintainers,
but it's pretty simple stuff.

I'd say let's do it...

2006-10-05 20:14:16

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Thu, 2006-10-05 at 12:46 -0700, Andrew Morton wrote:
> A quick survey of the wreckage:
>
> - Dmitry's input git tree breaks a bit
>
> - five of Greg's USB patches need fixing
>
> - a few random -mm patches need touchups
>
> - The hrtimer+dynticks i386 patch takes rather a hit and will need redoing.

Nothing to worry about. In fact it makes life easier. I have to store
the regs now in hrtimer_cpu_base to make them available to the
sched_tick hrtimer callback.

Push it in.

tglx


2006-10-05 20:20:58

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On 10/5/06, Andrew Morton <[email protected]> wrote:
>
> A quick survey of the wreckage:
>
> - Dmitry's input git tree breaks a bit

Ignore my tree for now, it needs redoing... I will reset it to kill
the 3 problematic patches if I have time tonight, otherwise it matches
with what Linus has in his tree.

--
Dmitry

2006-10-05 20:41:21

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Thu, Oct 05, 2006 at 12:46:01PM -0700, Andrew Morton wrote:
> A quick survey of the wreckage:
>
> - five of Greg's USB patches need fixing

I'll fix my stuff up, no objection from me at all, push it in :)

thanks,

greg k-h

2006-10-05 23:35:37

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers



On Thu, 5 Oct 2006, David Howells wrote:
>
> Anyway, I've made a GIT tree with just IRQ my patches in. It can be browsed
> at:
>
> http://git.infradead.org/?p=users/dhowells/irq-2.6.git;a=shortlog
>
> Or pulled from:
>
> git://git.infradead.org/~dhowells/irq-2.6.git

Gaah. It has those ugly "cherry-picked from" messages (please use "-r"
when cherry-picking, or "-e" and edit them out), but it looks fine
otherwise, and I think I heard a _very_ convincing "please do it" from
everybody involved when this was discussed, so I've pulled.

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

Linus

2006-10-06 00:52:55

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

The overwhelming majority of irq handlers don't use the 'irq' argument
either... the driver-supplied pointer is what drivers use, exclusively,
to differentiate between different instances.

If we are going to break all the irq handlers, I'd suggest going ahead
and removing that one too.

Jeff


2006-10-06 01:32:01

by Olof Johansson

[permalink] [raw]
Subject: [PATCH] powerpc: irq change build breaks


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


Signed-off-by: Olof Johansson <[email protected]>

---

On Thu, 5 Oct 2006 16:35:02 -0700 (PDT) Linus Torvalds <[email protected]> wrote:


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

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



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



Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -72,7 +72,7 @@ static void cpm2_cascade(unsigned int ir
int cascade_irq;

while ((cascade_irq = cpm2_get_irq(regs)) >= 0) {
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);
}
desc->chip->eoi(irq);
}
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -138,7 +138,7 @@ static void mpc85xx_8259_cascade(unsigne
unsigned int cascade_irq = i8259_irq(regs);

if (cascade_irq != NO_IRQ)
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);

desc->chip->eoi(irq);
}
Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -58,7 +58,7 @@ static void mpc86xx_8259_cascade(unsigne
{
unsigned int cascade_irq = i8259_irq(regs);
if (cascade_irq != NO_IRQ)
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
}
#endif /* CONFIG_PCI */
Index: linux-2.6/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/interrupt.c
+++ linux-2.6/arch/powerpc/platforms/cell/interrupt.c
@@ -121,7 +121,7 @@ static void iic_ioexc_cascade(unsigned i
irq_linear_revmap(iic_host,
base | cascade);
if (cirq != NO_IRQ)
- generic_handle_irq(cirq, regs);
+ generic_handle_irq(cirq);
}
/* post-ack level interrupts */
ack = bits & ~IIC_ISR_EDGE_MASK;
Index: linux-2.6/arch/powerpc/platforms/chrp/setup.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/chrp/setup.c
+++ linux-2.6/arch/powerpc/platforms/chrp/setup.c
@@ -340,7 +340,7 @@ static void chrp_8259_cascade(unsigned i
{
unsigned int cascade_irq = i8259_irq(regs);
if (cascade_irq != NO_IRQ)
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
}

Index: linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -343,7 +343,7 @@ void fastcall qe_ic_cascade_low(unsigned

chip->mask_ack(irq);
if (cascade_irq != NO_IRQ)
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);
chip->unmask(irq);
}

@@ -359,7 +359,7 @@ void fastcall qe_ic_cascade_high(unsigne

chip->mask_ack(irq);
if (cascade_irq != NO_IRQ)
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);
chip->unmask(irq);
}

Index: linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/tsi108_pci.c
+++ linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
@@ -410,6 +410,6 @@ void tsi108_irq_cascade(unsigned int irq
{
unsigned int cascade_irq = get_pci_source();
if (cascade_irq != NO_IRQ)
- generic_handle_irq(cascade_irq, regs);
+ generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
}
Index: linux-2.6/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/pic.c
+++ linux-2.6/arch/powerpc/platforms/powermac/pic.c
@@ -227,7 +227,7 @@ static irqreturn_t gatwick_action(int cp
continue;
irq += __ilog2(bits);
spin_unlock_irqrestore(&pmac_pic_lock, flags);
- __do_IRQ(irq, regs);
+ __do_IRQ(irq);
spin_lock_irqsave(&pmac_pic_lock, flags);
rc = IRQ_HANDLED;
}
Index: linux-2.6/drivers/macintosh/via-cuda.c
===================================================================
--- linux-2.6.orig/drivers/macintosh/via-cuda.c
+++ linux-2.6/drivers/macintosh/via-cuda.c
@@ -437,7 +437,7 @@ cuda_poll(void)
* disable_irq(), would that work on m68k ? --BenH
*/
local_irq_save(flags);
- cuda_interrupt(0, NULL, NULL);
+ cuda_interrupt(0, NULL);
local_irq_restore(flags);
}

Index: linux-2.6/sound/oss/dmasound/dmasound_awacs.c
===================================================================
--- linux-2.6.orig/sound/oss/dmasound/dmasound_awacs.c
+++ linux-2.6/sound/oss/dmasound/dmasound_awacs.c
@@ -465,7 +465,7 @@ tas_dmasound_init(void)
val = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio_headphone_detect, 0);
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio_headphone_detect, val | 0x80);
/* Trigger it */
- headphone_intr(0,NULL,NULL);
+ headphone_intr(0, NULL);
}
}
if (!gpio_headphone_irq) {
@@ -1499,7 +1499,7 @@ static int awacs_sleep_notify(struct pmu
write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol);
msleep(150);
tas_leave_sleep(); /* Stub for now */
- headphone_intr(0,NULL,NULL);
+ headphone_intr(0, NULL);
break;
case AWACS_DACA:
msleep(10); /* Check this !!! */

2006-10-06 03:45:46

by David Brownell

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Tuesday 03 October 2006 11:03 am, Alan Stern wrote:

> > > Notice another questionable use of hcd->state.
> >
> > Questionable in what way? When that code is called to clean up
> > after driver death, that loop must be ignored ... every pending I/O
> > can safely be scrubbed. That's the main point of that particular
> > HC_IS_RUNNING() test. In other cases, it's essential not to touch
> > DMA queue entries that the host controller is still using.
>
> Questionable because changes to hcd->state aren't synchronized with the
> driver. In this case it probably doesn't end up making any difference.

The driver changes hcd->state with its spinlock held ... or it did,
last time I audited that code.


> Removing "regs &&" might change other aspects too. For instance, does
> this routine ever get called from a timer routine, where regs would
> normally be NULL? In such situations removing "regs &&" would reverse
> the sense of the test.

As I said in my previous comments: should not be an issue. OHCI doesn't
have timers. That routine is normally called in_irq(), with the other
two call sites being cases where the controller is stopped.

- Dave

2006-10-06 04:23:34

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: [PATCH] powerpc: irq change build breaks

On Thu, 2006-10-05 at 20:31 -0500, Olof Johansson wrote:
> Fix up some of the buildbreaks from the irq handler changes.
>
>
> Signed-off-by: Olof Johansson <[email protected]>

Acked-by: Benjamin Herrenschmidt <[email protected]>

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

2006-10-06 08:03:49

by Gregor Jasny

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Hi,

I need the following patch to compile the latest git snapshot from Linus.

Gregor


Attachments:
(No filename) (87.00 B)
apic-irq.diff (435.00 B)
Download all attachments

2006-10-06 11:02:58

by Alan

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Ar Iau, 2006-10-05 am 20:52 -0400, ysgrifennodd Jeff Garzik:
> The overwhelming majority of irq handlers don't use the 'irq' argument
> either... the driver-supplied pointer is what drivers use, exclusively,
> to differentiate between different instances.
>
> If we are going to break all the irq handlers, I'd suggest going ahead
> and removing that one too.

NAK to that, it will mess up a lot of older drivers which still use the
irq field and also those who want it to print

2006-10-06 11:15:26

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Alan Cox wrote:
> Ar Iau, 2006-10-05 am 20:52 -0400, ysgrifennodd Jeff Garzik:
>> The overwhelming majority of irq handlers don't use the 'irq' argument
>> either... the driver-supplied pointer is what drivers use, exclusively,
>> to differentiate between different instances.
>>
>> If we are going to break all the irq handlers, I'd suggest going ahead
>> and removing that one too.
>
> NAK to that, it will mess up a lot of older drivers which still use the
> irq field and also those who want it to print

Look at the pt_regs change -- the irq change is similar:

The information does not go away, it is merely available via another avenue.

Jeff



2006-10-06 11:20:12

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers


* Jeff Garzik <[email protected]> wrote:

> >NAK to that, it will mess up a lot of older drivers which still use
> >the irq field and also those who want it to print
>
> Look at the pt_regs change -- the irq change is similar:
>
> The information does not go away, it is merely available via another
> avenue.

but pt_regs is alot less frequently used than irq - and where it's used
they arent "drivers" but mostly arch level code like hw-timer handlers.

Ingo

2006-10-06 11:27:32

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Ingo Molnar wrote:
> * Jeff Garzik <[email protected]> wrote:
>
>>> NAK to that, it will mess up a lot of older drivers which still use
>>> the irq field and also those who want it to print
>> Look at the pt_regs change -- the irq change is similar:
>>
>> The information does not go away, it is merely available via another
>> avenue.
>
> but pt_regs is alot less frequently used than irq - and where it's used
> they arent "drivers" but mostly arch level code like hw-timer handlers.

Nonetheless the -vast majority- of drivers don't use the argument at
all, and the minority that do use it are not modern drivers.

Jeff



2006-10-06 11:34:27

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers


* Jeff Garzik <[email protected]> wrote:

> >but pt_regs is alot less frequently used than irq - and where it's
> >used they arent "drivers" but mostly arch level code like hw-timer
> >handlers.
>
> Nonetheless the -vast majority- of drivers don't use the argument at
> all, and the minority that do use it are not modern drivers.

i'm all for changing that too :)

Ingo

2006-10-06 14:07:42

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On 10/6/06, Ingo Molnar <[email protected]> wrote:
>
> * Jeff Garzik <[email protected]> wrote:
>
> > >but pt_regs is alot less frequently used than irq - and where it's
> > >used they arent "drivers" but mostly arch level code like hw-timer
> > >handlers.
> >
> > Nonetheless the -vast majority- of drivers don't use the argument at
> > all, and the minority that do use it are not modern drivers.
>
> i'm all for changing that too :)
>

What drivers use irq argument? I know i8042 does but only to detect
whether interrupt routine was called because irq was raised or it was
called manually and I can use dev_id for that...

--
Dmitry

2006-10-06 14:16:26

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Dmitry Torokhov wrote:
> On 10/6/06, Ingo Molnar <[email protected]> wrote:
>>
>> * Jeff Garzik <[email protected]> wrote:
>>
>> > >but pt_regs is alot less frequently used than irq - and where it's
>> > >used they arent "drivers" but mostly arch level code like hw-timer
>> > >handlers.
>> >
>> > Nonetheless the -vast majority- of drivers don't use the argument at
>> > all, and the minority that do use it are not modern drivers.
>>
>> i'm all for changing that too :)
>>
>
> What drivers use irq argument? I know i8042 does but only to detect
> whether interrupt routine was called because irq was raised or it was
> called manually and I can use dev_id for that...

Ancient ISA legacys, a few powermac drivers, and a lot of printk's.
Your gut instinct is correct -- outside of printk, it is largely used to
differentiate callers.

Jeff



2006-10-06 15:18:10

by Jeff Garzik

[permalink] [raw]
Subject: [PATCH, RAW] IRQ: Maintain irq number globally rather than passing to IRQ handlers

Here is the raw, un-split-up first pass of the irq argument removal
patch (500K): http://gtf.org/garzik/misc/patch.irq-remove

Notes:

* raw first pass, DO NOT APPLY.

* this was useful work: it turned up several minor bugs

* Do we mark irq handlers FASTCALL? If not, we probably can now.

* I also turned up a few obvious places that dhowells missed in his
pt_regs patch, inevitably in non-x86 arches that probably were not built.

* I need to fix up ~10 or so drivers that called their interrupt
handlers directly, then used a 'irq == 0' test to determine whether the
interrupt handler was called internally, or by the system.

* not sure yet if I want to mark the parport "irq handler" functions as
truly irqreturn_t

* Hopefully I will have this polished by the end of the day.


2006-10-06 15:20:37

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH, RAW] IRQ: Maintain irq number globally rather than passing to IRQ handlers

Jeff Garzik wrote:
> Here is the raw, un-split-up first pass of the irq argument removal
> patch (500K): http://gtf.org/garzik/misc/patch.irq-remove

A couple more notes:

* Builds on x86 and x86-64, including !CONFIG_SMP (which turns on
several drivers most never see)

* Is missing the EXPORT_SYMBOL(), just like dhowell's pt_regs stuff is now

2006-10-06 15:48:48

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH, RAW] IRQ: Maintain irq number globally rather than passing to IRQ handlers



On Fri, 6 Oct 2006, Jeff Garzik wrote:
>
> Here is the raw, un-split-up first pass of the irq argument removal patch
> (500K): http://gtf.org/garzik/misc/patch.irq-remove

So I'm not at all as sure about this as about the "regs" stuff.

The "regs" value has always been controversial. It's pretty much always
existed (due to the keyboard hander and the magic debugging keysequences),
and anybody who looks at 0.01 will quickly realize that the keyboard
driver was one of the very first drivers (I think it's even written in
assembly at that point: originally _all_ of what was to become Linux was
pure asm, the whole "oh, cool, I could write this part in C" came later).
But it's been pretty much a special case since day #1, purely for that
"press a key to see where the h*ck we hung" case.

In contrast, the irq argument itself is really no different from the
cookie we pass in on registration - it's just passing it back to the
driver that requested the thing. So unlike "regs", there's not really
anything strange about it, and there's nothing really "wrong" with having
it there.

So I'm not at all as convinced about this one.

2006-10-06 16:21:35

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH, RAW] IRQ: Maintain irq number globally rather than passing to IRQ handlers

On 10/6/06, Linus Torvalds <[email protected]> wrote:

> In contrast, the irq argument itself is really no different from the
> cookie we pass in on registration - it's just passing it back to the
> driver that requested the thing. So unlike "regs", there's not really
> anything strange about it, and there's nothing really "wrong" with having
> it there.
>
> So I'm not at all as convinced about this one.

But drivers rarely care about exact IRQ that caused their interrupt
routines to be called. I looked at some of them and they normally use
it just to print warnings which is not critical (and data can still be
retrieved form elsewhere). And without it the only argument can very
nicely be passed via a register (if regparm is allowed).

Drivers that truly need to know IRQ can have it added to dev_id cookie
and use separate dev_ids.

--
Dmitry

2006-10-06 16:39:13

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH, RAW] IRQ: Maintain irq number globally rather than passing to IRQ handlers

Linus Torvalds wrote:
>
> On Fri, 6 Oct 2006, Jeff Garzik wrote:
>> Here is the raw, un-split-up first pass of the irq argument removal patch
>> (500K): http://gtf.org/garzik/misc/patch.irq-remove
>
> So I'm not at all as sure about this as about the "regs" stuff.
>
> The "regs" value has always been controversial. It's pretty much always
> existed (due to the keyboard hander and the magic debugging keysequences),
> and anybody who looks at 0.01 will quickly realize that the keyboard
> driver was one of the very first drivers (I think it's even written in
> assembly at that point: originally _all_ of what was to become Linux was
> pure asm, the whole "oh, cool, I could write this part in C" came later).
> But it's been pretty much a special case since day #1, purely for that
> "press a key to see where the h*ck we hung" case.

Chuckle :)

> In contrast, the irq argument itself is really no different from the
> cookie we pass in on registration - it's just passing it back to the
> driver that requested the thing. So unlike "regs", there's not really
> anything strange about it, and there's nothing really "wrong" with having
> it there.

It doesn't have the colorful history of pt_regs, but the 'irq' argument
is dead weight. I'd say the wrongness stems from its utter uselessness.

Out of ~1100 irq handlers, the irq parameter is used in ~50. The vast
majority of those 50 uses are debug printks, or abused as a "did I call
myself?" internal driver flag. The number of "real" uses is under 15,
and those are all ancient ISA or platform drivers that pre-date my ~10
year history with Linux.

So, I don't see any convincing argument to keep it. And if we are going
to kill it, given the pt_regs churn, this is probably the best
opportunity we'll have in years.

Another weak-but-still-present argument in favor of killing it is that
this change would IMO future-proof irq handlers, against more exotic irq
handling methods that may come down the pipe.

Jeff


2006-10-06 16:42:38

by Russell King

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Thu, Oct 05, 2006 at 04:35:02PM -0700, Linus Torvalds wrote:
> On Thu, 5 Oct 2006, David Howells wrote:
> > Anyway, I've made a GIT tree with just IRQ my patches in. It can be browsed
> > at:
> >
> > http://git.infradead.org/?p=users/dhowells/irq-2.6.git;a=shortlog
> >
> > Or pulled from:
> >
> > git://git.infradead.org/~dhowells/irq-2.6.git
>
> Gaah. It has those ugly "cherry-picked from" messages (please use "-r"
> when cherry-picking, or "-e" and edit them out), but it looks fine
> otherwise, and I think I heard a _very_ convincing "please do it" from
> everybody involved when this was discussed, so I've pulled.
>
> Any fall-out from this should be both obvious and pretty trivial to fix
> up.

Someone needs to fix ARM - I'm told it's utterly broken at the moment.
Since I'm on holiday (and the machine with the git trees on is powered
off and there's no way I can power it on) it's someone elses job. 8)
I'm not likely to be in a position to fix this before next Wednesday in
any case.

If it's obvious and trivial, it should be easy for anyone to fix, even
the person who broke it. Especially as there are build logs automatically
generated for every -git tree at http://armlinux.simtec.co.uk/kautobuild/

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2006-10-06 16:43:45

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH, RAW] IRQ: Maintain irq number globally rather than passing to IRQ handlers



On Fri, 6 Oct 2006, Dmitry Torokhov wrote:
>
> But drivers rarely care about exact IRQ that caused their interrupt
> routines to be called.

Sure. But it's not a _cleanup_ as far as I can tell.

> Drivers that truly need to know IRQ can have it added to dev_id cookie
> and use separate dev_ids.

I'm not saying that what you describe is impossible. I'm just saying that
it's pointless.

What's wrong with passing in "irq"? It makes sense from a logical angle,
and it's something you kind of expect if you think of irq's as "signals
for the kernel" (which they almost literally used to be, why do you think
it was called "SA_SHIRQ" etc?).

So there is absolutely nothing wrong with passing in irq from a conceptual
or a practical angle, and some routines _do_ use it.

Linus

2006-10-06 17:42:14

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Thu, 5 Oct 2006, David Brownell wrote:

> On Tuesday 03 October 2006 11:03 am, Alan Stern wrote:
>
> > > > Notice another questionable use of hcd->state.
> > >
> > > Questionable in what way? When that code is called to clean up
> > > after driver death, that loop must be ignored ... every pending I/O
> > > can safely be scrubbed. That's the main point of that particular
> > > HC_IS_RUNNING() test. In other cases, it's essential not to touch
> > > DMA queue entries that the host controller is still using.
> >
> > Questionable because changes to hcd->state aren't synchronized with the
> > driver. In this case it probably doesn't end up making any difference.
>
> The driver changes hcd->state with its spinlock held ... or it did,
> last time I audited that code.

Yeah, but usbcore changes hcd->state without holding the spinlock.

> > Removing "regs &&" might change other aspects too. For instance, does
> > this routine ever get called from a timer routine, where regs would
> > normally be NULL? In such situations removing "regs &&" would reverse
> > the sense of the test.
>
> As I said in my previous comments: should not be an issue. OHCI doesn't
> have timers. That routine is normally called in_irq(), with the other
> two call sites being cases where the controller is stopped.

(Or suspended?)

Well, I'm not familiar with the code so I accept your statement.

However, consider that even though ohci-hcd may not have timers, usbcore
does have the root-hub status timer, and it calls into ohci-hcd whenever
that timer expires. Even though root-hub interrupts are now used, there
still are occasions when the driver asks for polling. More than there
used to be, thanks to my auto-stop changes.

Alan Stern

2006-10-06 18:02:24

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers



On Fri, 6 Oct 2006, Russell King wrote:
>
> If it's obvious and trivial, it should be easy for anyone to fix, even
> the person who broke it. Especially as there are build logs automatically
> generated for every -git tree at http://armlinux.simtec.co.uk/kautobuild/

Ok, I just committed a rough first cut at fixing up arm/.

I don't have a cross-build environment, and am too lazy to set one up, but
that should likely fix 99% of the issues, and any missing things should be
fairly obvious from the compiler warnings and errors that are bound to
remain.

Somebody with an arm environment, please test and send in any remaining
missing parts, and we'll get it all sorted out long before rmk comes back
from holidays ;)

Linus

2006-10-06 19:00:12

by Olaf Hering

[permalink] [raw]
Subject: [PATCH] fix mesh compile errors after irq changes


drivers/scsi/mesh.c:469: error: too many arguments to function 'mesh_interrupt'
drivers/scsi/mesh.c:507: error: too many arguments to function 'mesh_interrupt'

Signed-off-by: Olaf Hering <[email protected]>

---
drivers/scsi/mesh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/scsi/mesh.c
===================================================================
--- linux-2.6.orig/drivers/scsi/mesh.c
+++ linux-2.6/drivers/scsi/mesh.c
@@ -466,7 +466,7 @@ static void mesh_start_cmd(struct mesh_s
dlog(ms, "intr b4 arb, intr/exc/err/fc=%.8x",
MKWORD(mr->interrupt, mr->exception,
mr->error, mr->fifo_count));
- mesh_interrupt(0, (void *)ms, NULL);
+ mesh_interrupt(0, (void *)ms);
if (ms->phase != arbitrating)
return;
}
@@ -504,7 +504,7 @@ static void mesh_start_cmd(struct mesh_s
dlog(ms, "intr after disresel, intr/exc/err/fc=%.8x",
MKWORD(mr->interrupt, mr->exception,
mr->error, mr->fifo_count));
- mesh_interrupt(0, (void *)ms, NULL);
+ mesh_interrupt(0, (void *)ms);
if (ms->phase != arbitrating)
return;
dlog(ms, "after intr after disresel, intr/exc/err/fc=%.8x",

2006-10-06 19:10:31

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] fix mesh compile errors after irq changes

On Fri, 6 Oct 2006, Olaf Hering wrote:
> drivers/scsi/mesh.c:469: error: too many arguments to function 'mesh_interrupt'
> drivers/scsi/mesh.c:507: error: too many arguments to function 'mesh_interrupt'
>
> Signed-off-by: Olaf Hering <[email protected]>
>
> ---
> drivers/scsi/mesh.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/drivers/scsi/mesh.c
> ===================================================================
> --- linux-2.6.orig/drivers/scsi/mesh.c
> +++ linux-2.6/drivers/scsi/mesh.c
> @@ -466,7 +466,7 @@ static void mesh_start_cmd(struct mesh_s
> dlog(ms, "intr b4 arb, intr/exc/err/fc=%.8x",
> MKWORD(mr->interrupt, mr->exception,
> mr->error, mr->fifo_count));
> - mesh_interrupt(0, (void *)ms, NULL);
> + mesh_interrupt(0, (void *)ms);
^^^^^^^^
> if (ms->phase != arbitrating)
> return;
> }
> @@ -504,7 +504,7 @@ static void mesh_start_cmd(struct mesh_s
> dlog(ms, "intr after disresel, intr/exc/err/fc=%.8x",
> MKWORD(mr->interrupt, mr->exception,
> mr->error, mr->fifo_count));
> - mesh_interrupt(0, (void *)ms, NULL);
> + mesh_interrupt(0, (void *)ms);
^^^^^^^^
These casts are superfluous, right?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2006-10-06 20:41:41

by Olaf Hering

[permalink] [raw]
Subject: [PATCH] powerpc: fixup after irq changes


remove struct pt_regs * from all handlers.
compile tested with arch/powerpc/config/* and
arch/ppc/configs/prep_defconfig

Signed-off-by: Olaf Hering <[email protected]>

---

xmon needs some attention



arch/powerpc/kernel/ibmebus.c | 2 +-
arch/powerpc/kernel/irq.c | 2 +-
arch/powerpc/kernel/time.c | 2 +-
arch/powerpc/platforms/82xx/mpc82xx_ads.c | 5 ++---
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 5 ++---
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 7 ++++---
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 5 ++---
arch/powerpc/platforms/cell/interrupt.c | 5 ++---
arch/powerpc/platforms/chrp/setup.c | 7 +++----
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 5 ++---
arch/powerpc/platforms/iseries/irq.c | 14 +++++++-------
arch/powerpc/platforms/iseries/irq.h | 2 +-
arch/powerpc/platforms/iseries/lpevents.c | 4 ++--
arch/powerpc/platforms/iseries/mf.c | 4 ++--
arch/powerpc/platforms/iseries/smp.c | 4 ++--
arch/powerpc/platforms/iseries/viopath.c | 2 +-
arch/powerpc/platforms/powermac/pic.c | 12 ++++++------
arch/powerpc/platforms/powermac/pic.h | 4 ++--
arch/powerpc/platforms/powermac/smp.c | 8 ++++----
arch/powerpc/platforms/pseries/setup.c | 2 +-
arch/powerpc/platforms/pseries/xics.c | 4 ++--
arch/powerpc/sysdev/cpm2_pic.c | 2 +-
arch/powerpc/sysdev/cpm2_pic.h | 2 +-
arch/powerpc/sysdev/i8259.c | 2 +-
arch/powerpc/sysdev/ipic.c | 2 +-
arch/powerpc/sysdev/mpic.c | 6 +++---
arch/powerpc/sysdev/qe_lib/qe_ic.c | 14 ++++++--------
arch/powerpc/sysdev/tsi108_pci.c | 3 +--
arch/ppc/kernel/time.c | 2 +-
arch/ppc/platforms/85xx/mpc8560_ads.c | 6 +++---
arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 6 +++---
arch/ppc/platforms/85xx/stx_gp3.c | 6 +++---
arch/ppc/platforms/85xx/tqm85xx.c | 6 +++---
arch/ppc/syslib/i8259.c | 2 +-
drivers/char/viocons.c | 2 +-
include/asm-powerpc/i8259.h | 4 ++--
include/asm-powerpc/ibmebus.h | 2 +-
include/asm-powerpc/ipic.h | 4 ++--
include/asm-powerpc/iseries/hv_lp_event.h | 2 +-
include/asm-powerpc/iseries/it_lp_queue.h | 2 +-
include/asm-powerpc/machdep.h | 2 +-
include/asm-powerpc/mpic.h | 4 ++--
include/asm-ppc/floppy.h | 6 +++---
include/asm-ppc/machdep.h | 2 +-
44 files changed, 93 insertions(+), 101 deletions(-)

Index: linux-2.6/arch/powerpc/platforms/iseries/irq.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/irq.c
+++ linux-2.6/arch/powerpc/platforms/iseries/irq.c
@@ -45,7 +45,7 @@
#include "call_pci.h"

#if defined(CONFIG_SMP)
-extern void iSeries_smp_message_recv(struct pt_regs *);
+extern void iSeries_smp_message_recv(void);
#endif

#ifdef CONFIG_PCI
@@ -88,7 +88,7 @@ static DEFINE_SPINLOCK(pending_irqs_lock
static int num_pending_irqs;
static int pending_irqs[NR_IRQS];

-static void int_received(struct pci_event *event, struct pt_regs *regs)
+static void int_received(struct pci_event *event)
{
int irq;

@@ -146,11 +146,11 @@ static void int_received(struct pci_even
}
}

-static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs)
+static void pci_event_handler(struct HvLpEvent *event)
{
if (event && (event->xType == HvLpEvent_Type_PciIo)) {
if (hvlpevent_is_int(event))
- int_received((struct pci_event *)event, regs);
+ int_received((struct pci_event *)event);
else
printk(KERN_ERR
"pci_event_handler: unexpected ack received\n");
@@ -308,18 +308,18 @@ int __init iSeries_allocate_IRQ(HvBusNum
/*
* Get the next pending IRQ.
*/
-unsigned int iSeries_get_irq(struct pt_regs *regs)
+unsigned int iSeries_get_irq(void)
{
int irq = NO_IRQ_IGNORE;

#ifdef CONFIG_SMP
if (get_lppaca()->int_dword.fields.ipi_cnt) {
get_lppaca()->int_dword.fields.ipi_cnt = 0;
- iSeries_smp_message_recv(regs);
+ iSeries_smp_message_recv();
}
#endif /* CONFIG_SMP */
if (hvlpevent_is_pending())
- process_hvlpevents(regs);
+ process_hvlpevents();

#ifdef CONFIG_PCI
if (num_pending_irqs) {
Index: linux-2.6/arch/powerpc/platforms/iseries/irq.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/irq.h
+++ linux-2.6/arch/powerpc/platforms/iseries/irq.h
@@ -4,6 +4,6 @@
extern void iSeries_init_IRQ(void);
extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32);
extern void iSeries_activate_IRQs(void);
-extern unsigned int iSeries_get_irq(struct pt_regs *);
+extern unsigned int iSeries_get_irq(void);

#endif /* _ISERIES_IRQ_H */
Index: linux-2.6/arch/powerpc/platforms/iseries/lpevents.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/lpevents.c
+++ linux-2.6/arch/powerpc/platforms/iseries/lpevents.c
@@ -116,7 +116,7 @@ static void hvlpevent_clear_valid(struct
hvlpevent_invalidate(event);
}

-void process_hvlpevents(struct pt_regs *regs)
+void process_hvlpevents(void)
{
struct HvLpEvent * event;

@@ -144,7 +144,7 @@ void process_hvlpevents(struct pt_regs *
__get_cpu_var(hvlpevent_counts)[event->xType]++;
if (event->xType < HvLpEvent_Type_NumTypes &&
lpEventHandler[event->xType])
- lpEventHandler[event->xType](event, regs);
+ lpEventHandler[event->xType](event);
else
printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType );

Index: linux-2.6/arch/powerpc/platforms/iseries/mf.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/mf.c
+++ linux-2.6/arch/powerpc/platforms/iseries/mf.c
@@ -513,7 +513,7 @@ static void handle_ack(struct io_mf_lp_e
* parse it enough to know if it is an interrupt or an
* acknowledge.
*/
-static void hv_handler(struct HvLpEvent *event, struct pt_regs *regs)
+static void hv_handler(struct HvLpEvent *event)
{
if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) {
if (hvlpevent_is_ack(event))
@@ -847,7 +847,7 @@ static int mf_get_boot_rtc(struct rtc_ti
/* We need to poll here as we are not yet taking interrupts */
while (rtc_data.busy) {
if (hvlpevent_is_pending())
- process_hvlpevents(NULL);
+ process_hvlpevents();
}
return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
}
Index: linux-2.6/arch/powerpc/platforms/iseries/smp.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/smp.c
+++ linux-2.6/arch/powerpc/platforms/iseries/smp.c
@@ -45,7 +45,7 @@

static unsigned long iSeries_smp_message[NR_CPUS];

-void iSeries_smp_message_recv(struct pt_regs *regs)
+void iSeries_smp_message_recv(void)
{
int cpu = smp_processor_id();
int msg;
@@ -55,7 +55,7 @@ void iSeries_smp_message_recv(struct pt_

for (msg = 0; msg < 4; msg++)
if (test_and_clear_bit(msg, &iSeries_smp_message[cpu]))
- smp_message_recv(msg, regs);
+ smp_message_recv(msg);
}

static inline void smp_iSeries_do_message(int cpu, int msg)
Index: linux-2.6/arch/powerpc/platforms/iseries/viopath.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/viopath.c
+++ linux-2.6/arch/powerpc/platforms/iseries/viopath.c
@@ -378,7 +378,7 @@ void vio_set_hostlp(void)
}
EXPORT_SYMBOL(vio_set_hostlp);

-static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs)
+static void vio_handleEvent(struct HvLpEvent *event)
{
HvLpIndex remoteLp;
int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK)
Index: linux-2.6/arch/powerpc/kernel/ibmebus.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/ibmebus.c
+++ linux-2.6/arch/powerpc/kernel/ibmebus.c
@@ -319,7 +319,7 @@ EXPORT_SYMBOL(ibmebus_unregister_driver)

int ibmebus_request_irq(struct ibmebus_dev *dev,
u32 ist,
- irqreturn_t (*handler)(int, void*, struct pt_regs *),
+ irqreturn_t (*handler)(int, void*),
unsigned long irq_flags, const char * devname,
void *dev_id)
{
Index: linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -384,8 +384,7 @@ struct hw_interrupt_type m82xx_pci_ic =
};

static void
-m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc)
{
unsigned long stat, mask, pend;
int bit;
@@ -398,7 +397,7 @@ m82xx_pci_irq_demux(unsigned int irq, st
break;
for (bit = 0; pend != 0; ++bit, pend <<= 1) {
if (pend & 0x80000000)
- __do_IRQ(pci_int_base + bit, regs);
+ __do_IRQ(pci_int_base + bit);
}
}
}
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -66,12 +66,11 @@ mpc85xx_pcibios_fixup(void)

#ifdef CONFIG_CPM2

-static void cpm2_cascade(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
{
int cascade_irq;

- while ((cascade_irq = cpm2_get_irq(regs)) >= 0) {
+ while ((cascade_irq = cpm2_get_irq()) >= 0) {
generic_handle_irq(cascade_irq);
}
desc->chip->eoi(irq);
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -132,10 +132,9 @@ mpc85xx_cds_pcibios_fixup(void)

#ifdef CONFIG_PPC_I8259
#warning The i8259 PIC support is currently broken
-static void mpc85xx_8259_cascade(unsigned int irq, struct
- irq_desc *desc, struct pt_regs *regs)
+static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
{
- unsigned int cascade_irq = i8259_irq(regs);
+ unsigned int cascade_irq = i8259_irq();

if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
@@ -150,8 +149,10 @@ void __init mpc85xx_cds_pic_init(void)
struct mpic *mpic;
struct resource r;
struct device_node *np = NULL;
+#ifdef CONFIG_PPC_I8259
struct device_node *cascade_node = NULL;
int cascade_irq;
+#endif

np = of_find_node_by_type(np, "open-pic");

Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -53,10 +53,9 @@ unsigned long pci_dram_offset = 0;


#ifdef CONFIG_PCI
-static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
{
- unsigned int cascade_irq = i8259_irq(regs);
+ unsigned int cascade_irq = i8259_irq();
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
Index: linux-2.6/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/interrupt.c
+++ linux-2.6/arch/powerpc/platforms/cell/interrupt.c
@@ -98,8 +98,7 @@ static void iic_ioexc_eoi(unsigned int i
{
}

-static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc)
{
struct cbe_iic_regs __iomem *node_iic = (void __iomem *)desc->handler_data;
unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC;
@@ -140,7 +139,7 @@ static struct irq_chip iic_ioexc_chip =
};

/* Get an IRQ number from the pending state register of the IIC */
-static unsigned int iic_get_irq(struct pt_regs *regs)
+static unsigned int iic_get_irq(void)
{
struct cbe_iic_pending_bits pending;
struct iic *iic;
Index: linux-2.6/arch/powerpc/platforms/chrp/setup.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/chrp/setup.c
+++ linux-2.6/arch/powerpc/platforms/chrp/setup.c
@@ -70,7 +70,7 @@ unsigned long event_scan_interval;
* has to include <linux/interrupt.h> (to get irqreturn_t), which
* causes all sorts of problems. -- paulus
*/
-extern irqreturn_t xmon_irq(int, void *, struct pt_regs *);
+extern irqreturn_t xmon_irq(int, void *);

extern unsigned long loops_per_jiffy;

@@ -335,10 +335,9 @@ chrp_event_scan(unsigned long unused)
jiffies + event_scan_interval);
}

-static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc)
{
- unsigned int cascade_irq = i8259_irq(regs);
+ unsigned int cascade_irq = i8259_irq();
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -61,8 +61,7 @@ pci_dram_offset = MPC7448_HPC2_PCI_MEM_O
extern int tsi108_setup_pci(struct device_node *dev);
extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
extern void tsi108_pci_int_init(void);
-extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs);
+extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);

int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn)
{
@@ -200,7 +199,7 @@ static void __init mpc7448_hpc2_init_IRQ
tsi_pic = of_find_node_by_type(NULL, "open-pic");
if (tsi_pic) {
unsigned int size;
- void *prop = get_property(tsi_pic, "reg", &size);
+ const void *prop = get_property(tsi_pic, "reg", &size);
mpic_paddr = of_translate_address(tsi_pic, prop);
}

Index: linux-2.6/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/pic.c
+++ linux-2.6/arch/powerpc/platforms/powermac/pic.c
@@ -42,7 +42,7 @@
* has to include <linux/interrupt.h> (to get irqreturn_t), which
* causes all sorts of problems. -- paulus
*/
-extern irqreturn_t xmon_irq(int, void *, struct pt_regs *);
+extern irqreturn_t xmon_irq(int, void *);

#ifdef CONFIG_PPC32
struct pmac_irq_hw {
@@ -210,7 +210,7 @@ static struct irq_chip pmac_pic = {
.retrigger = pmac_retrigger,
};

-static irqreturn_t gatwick_action(int cpl, void *dev_id, struct pt_regs *regs)
+static irqreturn_t gatwick_action(int cpl, void *dev_id)
{
unsigned long flags;
int irq, bits;
@@ -235,18 +235,18 @@ static irqreturn_t gatwick_action(int cp
return rc;
}

-static unsigned int pmac_pic_get_irq(struct pt_regs *regs)
+static unsigned int pmac_pic_get_irq(void)
{
int irq;
unsigned long bits = 0;
unsigned long flags;

#ifdef CONFIG_SMP
- void psurge_smp_message_recv(struct pt_regs *);
+ void psurge_smp_message_recv(void);

/* IPI's are a hack on the powersurge -- Cort */
if ( smp_processor_id() != 0 ) {
- psurge_smp_message_recv(regs);
+ psurge_smp_message_recv();
return NO_IRQ_IGNORE; /* ignore, already handled */
}
#endif /* CONFIG_SMP */
@@ -444,7 +444,7 @@ static void pmac_u3_cascade(unsigned int
{
struct mpic *mpic = desc->handler_data;

- unsigned int cascade_irq = mpic_get_one_irq(mpic, get_irq_regs());
+ unsigned int cascade_irq = mpic_get_one_irq(mpic);
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
Index: linux-2.6/arch/powerpc/platforms/powermac/pic.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/pic.h
+++ linux-2.6/arch/powerpc/platforms/powermac/pic.h
@@ -5,7 +5,7 @@

extern struct hw_interrupt_type pmac_pic;

-void pmac_pic_init(void);
-int pmac_get_irq(struct pt_regs *regs);
+extern void pmac_pic_init(void);
+extern int pmac_get_irq(void);

#endif /* __PPC_PLATFORMS_PMAC_PIC_H */
Index: linux-2.6/arch/powerpc/platforms/powermac/smp.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/smp.c
+++ linux-2.6/arch/powerpc/platforms/powermac/smp.c
@@ -160,7 +160,7 @@ static inline void psurge_clr_ipi(int cp
*/
static unsigned long psurge_smp_message[NR_CPUS];

-void psurge_smp_message_recv(struct pt_regs *regs)
+void psurge_smp_message_recv(void)
{
int cpu = smp_processor_id();
int msg;
@@ -174,12 +174,12 @@ void psurge_smp_message_recv(struct pt_r
/* make sure there is a message there */
for (msg = 0; msg < 4; msg++)
if (test_and_clear_bit(msg, &psurge_smp_message[cpu]))
- smp_message_recv(msg, regs);
+ smp_message_recv(msg);
}

-irqreturn_t psurge_primary_intr(int irq, void *d, struct pt_regs *regs)
+irqreturn_t psurge_primary_intr(int irq, void *d)
{
- psurge_smp_message_recv(regs);
+ psurge_smp_message_recv();
return IRQ_HANDLED;
}

Index: linux-2.6/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/xics.c
+++ linux-2.6/arch/powerpc/platforms/pseries/xics.c
@@ -308,14 +308,14 @@ static inline unsigned int xics_remap_ir
return NO_IRQ;
}

-static unsigned int xics_get_irq_direct(struct pt_regs *regs)
+static unsigned int xics_get_irq_direct(void)
{
unsigned int cpu = smp_processor_id();

return xics_remap_irq(direct_xirr_info_get(cpu));
}

-static unsigned int xics_get_irq_lpar(struct pt_regs *regs)
+static unsigned int xics_get_irq_lpar(void)
{
unsigned int cpu = smp_processor_id();

Index: linux-2.6/arch/powerpc/sysdev/cpm2_pic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/cpm2_pic.c
+++ linux-2.6/arch/powerpc/sysdev/cpm2_pic.c
@@ -147,7 +147,7 @@ static struct irq_chip cpm2_pic = {
.end = cpm2_end_irq,
};

-unsigned int cpm2_get_irq(struct pt_regs *regs)
+unsigned int cpm2_get_irq(void)
{
int irq;
unsigned long bits;
Index: linux-2.6/arch/powerpc/sysdev/cpm2_pic.h
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/cpm2_pic.h
+++ linux-2.6/arch/powerpc/sysdev/cpm2_pic.h
@@ -3,7 +3,7 @@

extern intctl_cpm2_t *cpm2_intctl;

-extern unsigned int cpm2_get_irq(struct pt_regs *regs);
+extern unsigned int cpm2_get_irq(void);

extern void cpm2_pic_init(struct device_node*);

Index: linux-2.6/arch/powerpc/sysdev/i8259.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/i8259.c
+++ linux-2.6/arch/powerpc/sysdev/i8259.c
@@ -34,7 +34,7 @@ static struct irq_host *i8259_host;
* which is called. It should be noted that polling is broken on some
* IBM and Motorola PReP boxes so we must use the int-ack feature on them.
*/
-unsigned int i8259_irq(struct pt_regs *regs)
+unsigned int i8259_irq(void)
{
int irq;
int lock = 0;
Index: linux-2.6/arch/powerpc/sysdev/ipic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/ipic.c
+++ linux-2.6/arch/powerpc/sysdev/ipic.c
@@ -709,7 +709,7 @@ void ipic_clear_mcp_status(u32 mask)
}

/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
-unsigned int ipic_get_irq(struct pt_regs *regs)
+unsigned int ipic_get_irq(void)
{
int irq;

Index: linux-2.6/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mpic.c
+++ linux-2.6/arch/powerpc/sysdev/mpic.c
@@ -1217,7 +1217,7 @@ void mpic_send_ipi(unsigned int ipi_no,
mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
}

-unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs)
+unsigned int mpic_get_one_irq(struct mpic *mpic)
{
u32 src;

@@ -1230,13 +1230,13 @@ unsigned int mpic_get_one_irq(struct mpi
return irq_linear_revmap(mpic->irqhost, src);
}

-unsigned int mpic_get_irq(struct pt_regs *regs)
+unsigned int mpic_get_irq(void)
{
struct mpic *mpic = mpic_primary;

BUG_ON(mpic == NULL);

- return mpic_get_one_irq(mpic, regs);
+ return mpic_get_one_irq(mpic);
}


Index: linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ linux-2.6/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -300,7 +300,7 @@ static struct irq_host_ops qe_ic_host_op
};

/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
-unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic, struct pt_regs *regs)
+unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic)
{
int irq;

@@ -316,7 +316,7 @@ unsigned int qe_ic_get_low_irq(struct qe
}

/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
-unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic, struct pt_regs *regs)
+unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic)
{
int irq;

@@ -333,13 +333,12 @@ unsigned int qe_ic_get_high_irq(struct q

/* FIXME: We mask all the QE Low interrupts while handling. We should
* let other interrupt come in, but BAD interrupts are generated */
-void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc)
{
struct qe_ic *qe_ic = desc->handler_data;
struct irq_chip *chip = irq_desc[irq].chip;

- unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic, regs);
+ unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);

chip->mask_ack(irq);
if (cascade_irq != NO_IRQ)
@@ -349,13 +348,12 @@ void fastcall qe_ic_cascade_low(unsigned

/* FIXME: We mask all the QE High interrupts while handling. We should
* let other interrupt come in, but BAD interrupts are generated */
-void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc)
{
struct qe_ic *qe_ic = desc->handler_data;
struct irq_chip *chip = irq_desc[irq].chip;

- unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic, regs);
+ unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);

chip->mask_ack(irq);
if (cascade_irq != NO_IRQ)
Index: linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/tsi108_pci.c
+++ linux-2.6/arch/powerpc/sysdev/tsi108_pci.c
@@ -405,8 +405,7 @@ void __init tsi108_pci_int_init(void)
init_pci_source();
}

-void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs)
+void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc)
{
unsigned int cascade_irq = get_pci_source();
if (cascade_irq != NO_IRQ)
Index: linux-2.6/arch/ppc/platforms/85xx/mpc8560_ads.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ linux-2.6/arch/ppc/platforms/85xx/mpc8560_ads.c
@@ -211,10 +211,10 @@ mpc8560ads_setup_arch(void)
#endif
}

-static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t cpm2_cascade(int irq, void *dev_id)
{
- while ((irq = cpm2_get_irq(regs)) >= 0)
- __do_IRQ(irq, regs);
+ while ((irq = cpm2_get_irq()) >= 0)
+ __do_IRQ(irq);
return IRQ_HANDLED;
}

Index: linux-2.6/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ linux-2.6/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -127,10 +127,10 @@ mpc85xx_cds_show_cpuinfo(struct seq_file
}

#ifdef CONFIG_CPM2
-static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t cpm2_cascade(int irq, void *dev_id)
{
- while((irq = cpm2_get_irq(regs)) >= 0)
- __do_IRQ(irq, regs);
+ while((irq = cpm2_get_irq()) >= 0)
+ __do_IRQ(irq);
return IRQ_HANDLED;
}

Index: linux-2.6/arch/ppc/platforms/85xx/stx_gp3.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/stx_gp3.c
+++ linux-2.6/arch/ppc/platforms/85xx/stx_gp3.c
@@ -156,10 +156,10 @@ gp3_setup_arch(void)
printk ("bi_immr_base = %8.8lx\n", binfo->bi_immr_base);
}

-static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t cpm2_cascade(int irq, void *dev_id)
{
- while ((irq = cpm2_get_irq(regs)) >= 0)
- __do_IRQ(irq, regs);
+ while ((irq = cpm2_get_irq()) >= 0)
+ __do_IRQ(irq);

return IRQ_HANDLED;
}
Index: linux-2.6/arch/ppc/platforms/85xx/tqm85xx.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/85xx/tqm85xx.c
+++ linux-2.6/arch/ppc/platforms/85xx/tqm85xx.c
@@ -181,10 +181,10 @@ tqm85xx_setup_arch(void)
}

#ifdef CONFIG_MPC8560
-static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t cpm2_cascade(int irq, void *dev_id)
{
- while ((irq = cpm2_get_irq(regs)) >= 0)
- __do_IRQ(irq, regs);
+ while ((irq = cpm2_get_irq()) >= 0)
+ __do_IRQ(irq);
return IRQ_HANDLED;
}

Index: linux-2.6/include/asm-powerpc/ibmebus.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/ibmebus.h
+++ linux-2.6/include/asm-powerpc/ibmebus.h
@@ -65,7 +65,7 @@ void ibmebus_unregister_driver(struct ib

int ibmebus_request_irq(struct ibmebus_dev *dev,
u32 ist,
- irqreturn_t (*handler)(int, void*, struct pt_regs *),
+ irqreturn_t (*handler)(int, void*),
unsigned long irq_flags, const char * devname,
void *dev_id);
void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id);
Index: linux-2.6/include/asm-powerpc/machdep.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/machdep.h
+++ linux-2.6/include/asm-powerpc/machdep.h
@@ -97,7 +97,7 @@ struct machdep_calls {
void (*show_percpuinfo)(struct seq_file *m, int i);

void (*init_IRQ)(void);
- unsigned int (*get_irq)(struct pt_regs *);
+ unsigned int (*get_irq)(void);
#ifdef CONFIG_KEXEC
void (*kexec_cpu_down)(int crash_shutdown, int secondary);
#endif
Index: linux-2.6/include/asm-powerpc/i8259.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/i8259.h
+++ linux-2.6/include/asm-powerpc/i8259.h
@@ -6,10 +6,10 @@

#ifdef CONFIG_PPC_MERGE
extern void i8259_init(struct device_node *node, unsigned long intack_addr);
-extern unsigned int i8259_irq(struct pt_regs *regs);
+extern unsigned int i8259_irq(void);
#else
extern void i8259_init(unsigned long intack_addr, int offset);
-extern int i8259_irq(struct pt_regs *regs);
+extern int i8259_irq(void);
#endif

#endif /* __KERNEL__ */
Index: linux-2.6/arch/powerpc/kernel/irq.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6/arch/powerpc/kernel/irq.c
@@ -217,7 +217,7 @@ void do_IRQ(struct pt_regs *regs)
* The value -2 is for buggy hardware and means that this IRQ
* has already been handled. -- Tom
*/
- irq = ppc_md.get_irq(regs);
+ irq = ppc_md.get_irq();

if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
#ifdef CONFIG_IRQSTACKS
Index: linux-2.6/include/asm-powerpc/mpic.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/mpic.h
+++ linux-2.6/include/asm-powerpc/mpic.h
@@ -409,9 +409,9 @@ extern void mpic_send_ipi(unsigned int i
void smp_mpic_message_pass(int target, int msg);

/* Fetch interrupt from a given mpic */
-extern unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs);
+extern unsigned int mpic_get_one_irq(struct mpic *mpic);
/* This one gets to the primary mpic */
-extern unsigned int mpic_get_irq(struct pt_regs *regs);
+extern unsigned int mpic_get_irq(void);

/* Set the EPIC clock ratio */
void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
Index: linux-2.6/include/asm-powerpc/iseries/it_lp_queue.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/iseries/it_lp_queue.h
+++ linux-2.6/include/asm-powerpc/iseries/it_lp_queue.h
@@ -72,7 +72,7 @@ struct hvlpevent_queue {
extern struct hvlpevent_queue hvlpevent_queue;

extern int hvlpevent_is_pending(void);
-extern void process_hvlpevents(struct pt_regs *);
+extern void process_hvlpevents(void);
extern void setup_hvlpevent_queue(void);

#endif /* _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H */
Index: linux-2.6/include/asm-powerpc/iseries/hv_lp_event.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/iseries/hv_lp_event.h
+++ linux-2.6/include/asm-powerpc/iseries/hv_lp_event.h
@@ -50,7 +50,7 @@ struct HvLpEvent {
u64 xCorrelationToken; /* Unique value for source/type x10-x17 */
};

-typedef void (*LpEventHandler)(struct HvLpEvent *, struct pt_regs *);
+typedef void (*LpEventHandler)(struct HvLpEvent *);

/* Register a handler for an event type - returns 0 on success */
extern int HvLpEvent_registerHandler(HvLpEvent_Type eventType,
Index: linux-2.6/arch/powerpc/kernel/time.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/time.c
+++ linux-2.6/arch/powerpc/kernel/time.c
@@ -706,7 +706,7 @@ void timer_interrupt(struct pt_regs * re

#ifdef CONFIG_PPC_ISERIES
if (hvlpevent_is_pending())
- process_hvlpevents(regs);
+ process_hvlpevents();
#endif

#ifdef CONFIG_PPC64
Index: linux-2.6/drivers/char/viocons.c
===================================================================
--- linux-2.6.orig/drivers/char/viocons.c
+++ linux-2.6/drivers/char/viocons.c
@@ -947,7 +947,7 @@ static void vioHandleData(struct HvLpEve
*/
continue;
} else if (vio_sysrq_pressed) {
- handle_sysrq(cevent->data[index], NULL, tty);
+ handle_sysrq(cevent->data[index], tty);
vio_sysrq_pressed = 0;
/*
* continue because we don't want to add
Index: linux-2.6/arch/ppc/kernel/time.c
===================================================================
--- linux-2.6.orig/arch/ppc/kernel/time.c
+++ linux-2.6/arch/ppc/kernel/time.c
@@ -142,7 +142,7 @@ void timer_interrupt(struct pt_regs * re
while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
jiffy_stamp += tb_ticks_per_jiffy;

- profile_tick(CPU_PROFILING, regs);
+ profile_tick(CPU_PROFILING);
update_process_times(user_mode(regs));

if (smp_processor_id())
Index: linux-2.6/include/asm-ppc/floppy.h
===================================================================
--- linux-2.6.orig/include/asm-ppc/floppy.h
+++ linux-2.6/include/asm-ppc/floppy.h
@@ -38,14 +38,14 @@ static int virtual_dma_mode;
static int doing_vdma;
static struct fd_dma_ops *fd_ops;

-static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
+static irqreturn_t floppy_hardint(int irq, void *dev_id)
{
unsigned char st;
int lcount;
char *lptr;

if (!doing_vdma)
- return floppy_interrupt(irq, dev_id, regs);
+ return floppy_interrupt(irq, dev_id);


st = 1;
@@ -69,7 +69,7 @@ static irqreturn_t floppy_hardint(int ir
virtual_dma_residue += virtual_dma_count;
virtual_dma_count=0;
doing_vdma = 0;
- floppy_interrupt(irq, dev_id, regs);
+ floppy_interrupt(irq, dev_id);
return IRQ_HANDLED;
}
return IRQ_HANDLED;
Index: linux-2.6/include/asm-ppc/machdep.h
===================================================================
--- linux-2.6.orig/include/asm-ppc/machdep.h
+++ linux-2.6/include/asm-ppc/machdep.h
@@ -43,7 +43,7 @@ struct machdep_calls {
/* Optional, may be NULL. */
unsigned int (*irq_canonicalize)(unsigned int irq);
void (*init_IRQ)(void);
- int (*get_irq)(struct pt_regs *);
+ int (*get_irq)(void);

/* A general init function, called by ppc_init in init/main.c.
May be NULL. DEPRECATED ! */
Index: linux-2.6/arch/ppc/syslib/i8259.c
===================================================================
--- linux-2.6.orig/arch/ppc/syslib/i8259.c
+++ linux-2.6/arch/ppc/syslib/i8259.c
@@ -28,7 +28,7 @@ static int i8259_pic_irq_offset;
* which is called. It should be noted that polling is broken on some
* IBM and Motorola PReP boxes so we must use the int-ack feature on them.
*/
-int i8259_irq(struct pt_regs *regs)
+int i8259_irq(void)
{
int irq;

Index: linux-2.6/include/asm-powerpc/ipic.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/ipic.h
+++ linux-2.6/include/asm-powerpc/ipic.h
@@ -79,12 +79,12 @@ extern void ipic_clear_mcp_status(u32 ma

#ifdef CONFIG_PPC_MERGE
extern void ipic_init(struct device_node *node, unsigned int flags);
-extern unsigned int ipic_get_irq(struct pt_regs *regs);
+extern unsigned int ipic_get_irq(void);
#else
extern void ipic_init(phys_addr_t phys_addr, unsigned int flags,
unsigned int irq_offset,
unsigned char *senses, unsigned int senses_count);
-extern int ipic_get_irq(struct pt_regs *regs);
+extern int ipic_get_irq(void);
#endif

#endif /* __ASM_IPIC_H__ */
Index: linux-2.6/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/setup.c
+++ linux-2.6/arch/powerpc/platforms/pseries/setup.c
@@ -123,7 +123,7 @@ static void __init fwnmi_init(void)

void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
{
- unsigned int cascade_irq = i8259_irq(get_irq_regs());
+ unsigned int cascade_irq = i8259_irq();
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);

2006-10-06 20:59:15

by Olaf Hering

[permalink] [raw]
Subject: [PATCH] powerpc: spu fixup after irq changes


remove struct pt_regs * from remaining spu irq functions.

Signed-off-by: Olaf Hering <[email protected]>

---
on top of previous irq fixup


arch/powerpc/platforms/cell/spu_base.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spu_base.c
+++ linux-2.6/arch/powerpc/platforms/cell/spu_base.c
@@ -147,7 +147,7 @@ static int __spu_trap_data_map(struct sp
}

static irqreturn_t
-spu_irq_class_0(int irq, void *data, struct pt_regs *regs)
+spu_irq_class_0(int irq, void *data)
{
struct spu *spu;

@@ -186,7 +186,7 @@ spu_irq_class_0_bottom(struct spu *spu)
EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom);

static irqreturn_t
-spu_irq_class_1(int irq, void *data, struct pt_regs *regs)
+spu_irq_class_1(int irq, void *data)
{
struct spu *spu;
unsigned long stat, mask, dar, dsisr;
@@ -224,7 +224,7 @@ spu_irq_class_1(int irq, void *data, str
EXPORT_SYMBOL_GPL(spu_irq_class_1_bottom);

static irqreturn_t
-spu_irq_class_2(int irq, void *data, struct pt_regs *regs)
+spu_irq_class_2(int irq, void *data)
{
struct spu *spu;
unsigned long stat;

2006-10-06 21:16:14

by Olaf Hering

[permalink] [raw]
Subject: [PATCH] ppc: PReP fixup after irq changes

compile fixes for PReP

Signed-off-by: Olaf Hering <[email protected]>

---

xmon still needs some attention

arch/ppc/syslib/open_pic.c | 14 +++++++-------
include/asm-ppc/open_pic.h | 6 +++---
include/asm-ppc/smp.h | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)

Index: linux-2.6/include/asm-ppc/open_pic.h
===================================================================
--- linux-2.6.orig/include/asm-ppc/open_pic.h
+++ linux-2.6/include/asm-ppc/open_pic.h
@@ -48,12 +48,12 @@ extern void openpic_init(int linux_irq_o
extern void openpic_init_nmi_irq(u_int irq);
extern void openpic_set_irq_priority(u_int irq, u_int pri);
extern void openpic_hookup_cascade(u_int irq, char *name,
- int (*cascade_fn)(struct pt_regs *));
+ int (*cascade_fn)(void));
extern u_int openpic_irq(void);
extern void openpic_eoi(void);
extern void openpic_request_IPIs(void);
extern void do_openpic_setup_cpu(void);
-extern int openpic_get_irq(struct pt_regs *regs);
+extern int openpic_get_irq(void);
extern void openpic_reset_processor_phys(u_int cpumask);
extern void openpic_setup_ISU(int isu_num, unsigned long addr);
extern void openpic_cause_IPI(u_int ipi, cpumask_t cpumask);
@@ -93,6 +93,6 @@ extern void openpic2_init(int linux_irq_
extern void openpic2_init_nmi_irq(u_int irq);
extern u_int openpic2_irq(void);
extern void openpic2_eoi(void);
-extern int openpic2_get_irq(struct pt_regs *regs);
+extern int openpic2_get_irq(void);
extern void openpic2_setup_ISU(int isu_num, unsigned long addr);
#endif /* _PPC_KERNEL_OPEN_PIC_H */
Index: linux-2.6/arch/ppc/syslib/open_pic.c
===================================================================
--- linux-2.6.orig/arch/ppc/syslib/open_pic.c
+++ linux-2.6/arch/ppc/syslib/open_pic.c
@@ -45,7 +45,7 @@ static u_int NumSources;
static int open_pic_irq_offset;
static volatile OpenPIC_Source __iomem *ISR[NR_IRQS];
static int openpic_cascade_irq = -1;
-static int (*openpic_cascade_fn)(struct pt_regs *);
+static int (*openpic_cascade_fn)(void);

/* Global Operations */
static void openpic_disable_8259_pass_through(void);
@@ -54,7 +54,7 @@ static void openpic_set_spurious(u_int v
#ifdef CONFIG_SMP
/* Interprocessor Interrupts */
static void openpic_initipi(u_int ipi, u_int pri, u_int vector);
-static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *);
+static irqreturn_t openpic_ipi_action(int cpl, void *dev_id);
#endif

/* Timer Interrupts */
@@ -700,7 +700,7 @@ static struct irqaction openpic_cascade_

void __init
openpic_hookup_cascade(u_int irq, char *name,
- int (*cascade_fn)(struct pt_regs *))
+ int (*cascade_fn)(void))
{
openpic_cascade_irq = irq;
openpic_cascade_fn = cascade_fn;
@@ -857,16 +857,16 @@ static void openpic_end_ipi(unsigned int
{
}

-static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
+static irqreturn_t openpic_ipi_action(int cpl, void *dev_id)
{
- smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset, regs);
+ smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset);
return IRQ_HANDLED;
}

#endif /* CONFIG_SMP */

int
-openpic_get_irq(struct pt_regs *regs)
+openpic_get_irq(void)
{
int irq = openpic_irq();

@@ -876,7 +876,7 @@ openpic_get_irq(struct pt_regs *regs)
* This should move to irq.c eventually. -- paulus
*/
if (irq == openpic_cascade_irq && openpic_cascade_fn != NULL) {
- int cirq = openpic_cascade_fn(regs);
+ int cirq = openpic_cascade_fn();

/* Allow for the cascade being shared with other devices */
if (cirq != -1) {
Index: linux-2.6/include/asm-ppc/smp.h
===================================================================
--- linux-2.6.orig/include/asm-ppc/smp.h
+++ linux-2.6/include/asm-ppc/smp.h
@@ -39,7 +39,7 @@ extern struct smp_ops_t *smp_ops;
extern void smp_send_tlb_invalidate(int);
extern void smp_send_xmon_break(int cpu);
struct pt_regs;
-extern void smp_message_recv(int, struct pt_regs *);
+extern void smp_message_recv(int);

extern int __cpu_disable(void);
extern void __cpu_die(unsigned int cpu);

2006-10-07 00:19:14

by Paul Mackerras

[permalink] [raw]
Subject: Re: [PATCH] powerpc: fixup after irq changes

Olaf Hering writes:

> remove struct pt_regs * from all handlers.
> compile tested with arch/powerpc/config/* and
> arch/ppc/configs/prep_defconfig

You also removed the regs argument from the get_irq functions. That
is a separate unrelated change, which I would want to think about for
a bit, because at least at one stage I had a use for that parameter.

So the patch is NAK'd as to that part. I have some patches queued up
already which do some of the other fixes too. Thanks for your efforts
on this though.

Regards,
Paul.

2006-10-07 02:54:47

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Fri, Oct 06, 2006 at 11:01:24AM -0700, Linus Torvalds wrote:
> On Fri, 6 Oct 2006, Russell King wrote:
> >
> > If it's obvious and trivial, it should be easy for anyone to fix, even
> > the person who broke it. Especially as there are build logs automatically
> > generated for every -git tree at http://armlinux.simtec.co.uk/kautobuild/
>
> Ok, I just committed a rough first cut at fixing up arm/.

Could you do:

git-pull git://git.parisc-linux.org/git/linux-2.6.git irq-fixes

Or apply the patch below, if that's easier

diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 9bdd019..2ece7c7 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -35,8 +35,8 @@ #include <asm/smp.h>

#undef PARISC_IRQ_CR16_COUNTS

-extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
-extern irqreturn_t ipi_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t timer_interrupt(int, void *);
+extern irqreturn_t ipi_interrupt(int, void *);

#define EIEM_MASK(irq) (1UL<<(CPU_IRQ_MAX - irq))

@@ -375,7 +375,7 @@ #ifdef CONFIG_SMP
goto set_out;
}
#endif
- __do_IRQ(irq, regs);
+ __do_IRQ(irq);

out:
irq_exit();
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 1d58ce0..b448392 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -66,7 +66,7 @@ irqreturn_t timer_interrupt(int irq, voi
/* gcc can optimize for "read-only" case with a local clocktick */
unsigned long cpt = clocktick;

- profile_tick(CPU_PROFILING, regs);
+ profile_tick(CPU_PROFILING);

/* Initialize next_tick to the expected tick time. */
next_tick = cpu_data[cpu].it_value;
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index c9b0b89..e774dd3 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -328,7 +328,7 @@ static int hil_kbd_connect(struct serio
kbd->dev->id.vendor = PCI_VENDOR_ID_HP;
kbd->dev->id.product = 0x0001; /* TODO: get from kbd->rsc */
kbd->dev->id.version = 0x0100; /* TODO: get from kbd->rsc */
- kbd->dev->dev = &serio->dev;
+ kbd->dev->cdev.dev = &serio->dev;

for (i = 0; i < 128; i++) {
set_bit(hil_kbd_set1[i], kbd->dev->keybit);
diff --git a/drivers/input/mouse/hil_ptr.c b/drivers/input/mouse/hil_ptr.c
index 402b057..4f2b503 100644
--- a/drivers/input/mouse/hil_ptr.c
+++ b/drivers/input/mouse/hil_ptr.c
@@ -375,7 +375,7 @@ #endif
ptr->dev->id.vendor = PCI_VENDOR_ID_HP;
ptr->dev->id.product = 0x0001; /* TODO: get from ptr->rsc */
ptr->dev->id.version = 0x0100; /* TODO: get from ptr->rsc */
- ptr->dev->dev = &serio->dev;
+ ptr->dev->cdev.dev = &serio->dev;

input_register_device(ptr->dev);
printk(KERN_INFO "input: %s (%s), ID: %d\n",
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index 081fdc3..74f14e0 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -166,7 +166,7 @@ static inline int gscps2_writeb_output(s

/* make sure any received data is returned as fast as possible */
/* this is important e.g. when we set the LEDs on the keyboard */
- gscps2_interrupt(0, NULL, NULL);
+ gscps2_interrupt(0, NULL);

return 1;
}
@@ -306,7 +306,7 @@ static int gscps2_open(struct serio *por
/* enable it */
gscps2_enable(ps2port, ENABLE);

- gscps2_interrupt(0, NULL, NULL);
+ gscps2_interrupt(0, NULL);

return 0;
}
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index bbbe15e..bdfde04 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -162,10 +162,10 @@ static void hil_mlc_send_polls(hil_mlc *
if (did != (p & HIL_PKT_ADDR_MASK) >> 8) {
if (drv == NULL || drv->interrupt == NULL) goto skip;

- drv->interrupt(serio, 0, 0, NULL);
- drv->interrupt(serio, HIL_ERR_INT >> 16, 0, NULL);
- drv->interrupt(serio, HIL_PKT_CMD >> 8, 0, NULL);
- drv->interrupt(serio, HIL_CMD_POL + cnt, 0, NULL);
+ drv->interrupt(serio, 0, 0);
+ drv->interrupt(serio, HIL_ERR_INT >> 16, 0);
+ drv->interrupt(serio, HIL_PKT_CMD >> 8, 0);
+ drv->interrupt(serio, HIL_CMD_POL + cnt, 0);
skip:
did = (p & HIL_PKT_ADDR_MASK) >> 8;
serio = did ? mlc->serio[mlc->di_map[did-1]] : NULL;
@@ -174,10 +174,10 @@ static void hil_mlc_send_polls(hil_mlc *
}
cnt++; i++;
if (drv == NULL || drv->interrupt == NULL) continue;
- drv->interrupt(serio, (p >> 24), 0, NULL);
- drv->interrupt(serio, (p >> 16) & 0xff, 0, NULL);
- drv->interrupt(serio, (p >> 8) & ~HIL_PKT_ADDR_MASK, 0, NULL);
- drv->interrupt(serio, p & 0xff, 0, NULL);
+ drv->interrupt(serio, (p >> 24), 0);
+ drv->interrupt(serio, (p >> 16) & 0xff, 0);
+ drv->interrupt(serio, (p >> 8) & ~HIL_PKT_ADDR_MASK, 0);
+ drv->interrupt(serio, p & 0xff, 0);
}
}

@@ -780,16 +780,16 @@ static int hil_mlc_serio_write(struct se
while ((last != idx) && (*last == 0)) last--;

while (idx != last) {
- drv->interrupt(serio, 0, 0, NULL);
- drv->interrupt(serio, HIL_ERR_INT >> 16, 0, NULL);
- drv->interrupt(serio, 0, 0, NULL);
- drv->interrupt(serio, *idx, 0, NULL);
+ drv->interrupt(serio, 0, 0);
+ drv->interrupt(serio, HIL_ERR_INT >> 16, 0);
+ drv->interrupt(serio, 0, 0);
+ drv->interrupt(serio, *idx, 0);
idx++;
}
- drv->interrupt(serio, 0, 0, NULL);
- drv->interrupt(serio, HIL_ERR_INT >> 16, 0, NULL);
- drv->interrupt(serio, HIL_PKT_CMD >> 8, 0, NULL);
- drv->interrupt(serio, *idx, 0, NULL);
+ drv->interrupt(serio, 0, 0);
+ drv->interrupt(serio, HIL_ERR_INT >> 16, 0);
+ drv->interrupt(serio, HIL_PKT_CMD >> 8, 0);
+ drv->interrupt(serio, *idx, 0);

mlc->serio_oidx[map->didx] = 0;
mlc->serio_opacket[map->didx] = 0;
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
index 8cbd940..f4d815b 100644
--- a/drivers/net/lasi_82596.c
+++ b/drivers/net/lasi_82596.c
@@ -1252,7 +1252,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER
static void i596_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
- i596_interrupt(dev->irq, dev, NULL);
+ i596_interrupt(dev->irq, dev);
enable_irq(dev->irq);
}
#endif
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index a0a8fd8..03c763c 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -389,7 +389,7 @@ ilr_again:
int irq = dino_dev->global_irq[local_irq];
DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
__FUNCTION__, irq, intr_dev, mask);
- __do_IRQ(irq, regs);
+ __do_IRQ(irq);
mask &= ~(1 << local_irq);
} while (mask);

diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 094562e..e97cecb 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -234,7 +234,7 @@ static irqreturn_t eisa_irq(int wax_irq,
}
spin_unlock_irqrestore(&eisa_irq_lock, flags);

- __do_IRQ(irq, regs);
+ __do_IRQ(irq);

spin_lock_irqsave(&eisa_irq_lock, flags);
/* unmask */
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index aa819d3..8ad1b8c 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -230,7 +230,7 @@ static void mux_read(struct uart_port *p
continue;
}

- if (uart_handle_sysrq_char(port, data & 0xffu, NULL))
+ if (uart_handle_sysrq_char(port, data & 0xffu))
continue;

tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
diff --git a/include/asm-parisc/irq_regs.h b/include/asm-parisc/irq_regs.h
new file mode 100644
index 0000000..3dd9c0b
--- /dev/null
+++ b/include/asm-parisc/irq_regs.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_regs.h>

2006-10-07 12:33:33

by Paul Mackerras

[permalink] [raw]
Subject: Re: [PATCH] powerpc: fixup after irq changes

I wrote:

> You also removed the regs argument from the get_irq functions. That
> is a separate unrelated change, which I would want to think about for
> a bit, because at least at one stage I had a use for that parameter.

I remembered the use I had for it - for interrupt controllers that
want to save away an old cpu priority value or similar. The ones that
need to do that (xics and cell) either don't do it (xics :) or use a
per-cpu array (cell). Also, we call get_irq from an interrupt handler
for cascaded interrupts in some cases. So I have applied your patch
and fixed the rejects.

Thanks,
Paul.

2006-10-07 14:44:55

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

On Fri, Oct 06, 2006 at 08:54:44PM -0600, Matthew Wilcox wrote:
> git-pull git://git.parisc-linux.org/git/linux-2.6.git irq-fixes
>
> Or apply the patch below, if that's easier

And the next series of patches actually make it boot.

git-pull git://git.parisc-linux.org/git/linux-2.6.git irq-fixes

Kyle McMartin:
[PARISC] Make firmware calls irqsafe-ish...

Matthew Wilcox:
[PARISC] Use set_irq_regs
[PA-RISC] Fix boot breakage
[PARISC] pdc_init no longer exists
[PARISC] More pt_regs removal

arch/parisc/kernel/drivers.c | 6 -
arch/parisc/kernel/firmware.c | 250 +++++++++++++++++++++++++-----------------
arch/parisc/kernel/irq.c | 3
arch/parisc/kernel/smp.c | 15 --
arch/parisc/kernel/time.c | 32 ++---
include/asm-parisc/pdc.h | 2
6 files changed, 177 insertions(+), 131 deletions(-)