linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/54] ARM irq_data conversion.
@ 2010-11-30 13:11 Lennert Buytenhek
  2010-11-30 13:37 ` Mark Brown
  2010-12-15  1:37 ` Lennert Buytenhek
  0 siblings, 2 replies; 7+ messages in thread
From: Lennert Buytenhek @ 2010-11-30 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

This patch set converts arch/arm/ irq_chips and flow handlers over
to the new struct irq_data based irq_chip functions.

struct irq_data is described here:

	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ff7dcd44dd446db2c3e13bdedf2d52b8e0127f16

The new irq_chip functions are described here:

	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8822657e799b02c55556c99a601261e207a299d

An example irq_data function conversion looks like this:

	-static void foobar_irq_mask(unsigned int irq)
	+static void foobar_irq_mask(struct irq_data *d)
	 {
	-	foobar_irq_mask &= ~(1 << irq);
	+	foobar_irq_mask &= ~(1 << d->irq);
		intctl_write(foobar_irq_mask);
	 }

	[...]
	 
	 struct irq_chip ext_chip = {
	-	.mask		= foobar_irq_mask,
	+	.irq_mask	= foobar_irq_mask,
	 };


These patches (along with a bunch of other irq_data conversions) are
also available at:

	http://git.kernel.org/?p=linux/kernel/git/buytenh/arm_irq_data.git;a=summary

There is a merge dependency on this patch:

	http://marc.info/?l=linux-kernel&m=129112019408380&w=2

Once the latter goes in, I'll split this queue into individual
per-subsystem queues for upstream merging purposes.


I have built this patch queue against all 153 (!) ARM defconfigs
currently in the tree, and these patches didn't introduce any build
errors that weren't already there.  Also, this queue seems to boot
and run fine on the ARM hardware I have access to.


There is a slight net LOC increase from this patch series due to cases
where the irq_chip functions alter their irq number argument, in which
cases we end up adding a local variable per such function.


Comments and testing appreciated!


 arch/arm/common/gic.c                    |   62 ++++++------
 arch/arm/common/it8152.c                 |   14 ++-
 arch/arm/common/locomo.c                 |   24 ++--
 arch/arm/common/sa1111.c                 |   94 ++++++++--------
 arch/arm/common/vic.c                    |   32 +++---
 arch/arm/kernel/ecard.c                  |   28 +++---
 arch/arm/kernel/irq.c                    |   17 ++--
 arch/arm/kernel/smp_twd.c                |    2 +-
 arch/arm/mach-aaec2000/core.c            |   18 ++--
 arch/arm/mach-at91/gpio.c                |   34 +++---
 arch/arm/mach-at91/irq.c                 |   36 +++---
 arch/arm/mach-bcmring/irq.c              |   42 ++++----
 arch/arm/mach-clps711x/irq.c             |   40 ++++----
 arch/arm/mach-davinci/cp_intc.c          |   30 +++---
 arch/arm/mach-davinci/gpio.c             |   46 ++++----
 arch/arm/mach-davinci/irq.c              |   26 +++---
 arch/arm/mach-dove/irq.c                 |   18 ++--
 arch/arm/mach-ebsa110/core.c             |   14 ++--
 arch/arm/mach-ep93xx/gpio.c              |   36 +++---
 arch/arm/mach-footbridge/common.c        |   14 ++--
 arch/arm/mach-footbridge/isa-irq.c       |   36 +++---
 arch/arm/mach-gemini/gpio.c              |   26 +++---
 arch/arm/mach-gemini/irq.c               |   20 ++--
 arch/arm/mach-h720x/common.c             |   38 ++++----
 arch/arm/mach-h720x/cpu-h7202.c          |   14 ++--
 arch/arm/mach-integrator/integrator_ap.c |   16 ++--
 arch/arm/mach-integrator/integrator_cp.c |   48 ++++----
 arch/arm/mach-iop13xx/irq.c              |   64 ++++++------
 arch/arm/mach-iop13xx/msi.c              |    4 +-
 arch/arm/mach-iop32x/irq.c               |   16 ++--
 arch/arm/mach-iop33x/irq.c               |   32 +++---
 arch/arm/mach-ixp2000/core.c             |   70 +++++++------
 arch/arm/mach-ixp2000/ixdp2x00.c         |   18 ++--
 arch/arm/mach-ixp2000/ixdp2x01.c         |   18 ++--
 arch/arm/mach-ixp23xx/core.c             |   55 ++++++----
 arch/arm/mach-ixp23xx/ixdp2351.c         |   36 +++---
 arch/arm/mach-ixp4xx/common.c            |   42 ++++----
 arch/arm/mach-ks8695/irq.c               |   43 ++++----
 arch/arm/mach-lh7a40x/arch-kev7a400.c    |   20 ++--
 arch/arm/mach-lh7a40x/arch-lpd7a40x.c    |   25 +++--
 arch/arm/mach-lh7a40x/irq-lh7a400.c      |   30 +++---
 arch/arm/mach-lh7a40x/irq-lh7a404.c      |   60 +++++-----
 arch/arm/mach-lh7a40x/irq-lpd7a40x.c     |   22 ++--
 arch/arm/mach-lpc32xx/irq.c              |   56 +++++-----
 arch/arm/mach-mmp/irq-mmp2.c             |   46 ++++----
 arch/arm/mach-mmp/irq-pxa168.c           |   18 ++--
 arch/arm/mach-msm/board-trout-gpio.c     |   42 ++++----
 arch/arm/mach-msm/gpio.c                 |   48 ++++----
 arch/arm/mach-msm/irq-vic.c              |   65 ++++++------
 arch/arm/mach-msm/irq.c                  |   45 ++++----
 arch/arm/mach-msm/sirc.c                 |   39 ++++----
 arch/arm/mach-mx3/mach-mx31ads.c         |   18 ++--
 arch/arm/mach-netx/generic.c             |   30 +++---
 arch/arm/mach-ns9xxx/board-a9m9750dev.c  |   28 +++---
 arch/arm/mach-ns9xxx/irq.c               |   28 +++---
 arch/arm/mach-nuc93x/irq.c               |   16 ++--
 arch/arm/mach-omap1/ams-delta-fiq.c      |    8 +-
 arch/arm/mach-omap1/fpga.c               |   28 +++---
 arch/arm/mach-omap1/irq.c                |   44 ++++----
 arch/arm/mach-omap2/irq.c                |   22 ++--
 arch/arm/mach-pnx4008/irq.c              |   62 ++++++-----
 arch/arm/mach-pxa/balloon3.c             |   23 +++--
 arch/arm/mach-pxa/cm-x2xx-pci.c          |    2 +-
 arch/arm/mach-pxa/generic.h              |    4 +-
 arch/arm/mach-pxa/irq.c                  |   42 ++++----
 arch/arm/mach-pxa/lpd270.c               |   17 ++--
 arch/arm/mach-pxa/lubbock.c              |   17 ++--
 arch/arm/mach-pxa/mainstone.c            |   17 ++--
 arch/arm/mach-pxa/pcm990-baseboard.c     |   15 ++--
 arch/arm/mach-pxa/pxa25x.c               |    7 +-
 arch/arm/mach-pxa/pxa27x.c               |    9 +-
 arch/arm/mach-pxa/pxa3xx.c               |   36 +++---
 arch/arm/mach-pxa/viper.c                |   22 ++--
 arch/arm/mach-pxa/zeus.c                 |   22 ++--
 arch/arm/mach-rpc/irq.c                  |   60 +++++-----
 arch/arm/mach-s3c2410/bast-irq.c         |   22 ++--
 arch/arm/mach-s3c2412/irq.c              |   50 +++++-----
 arch/arm/mach-s3c2416/irq.c              |   72 +++++++-------
 arch/arm/mach-s3c2440/irq.c              |   18 ++--
 arch/arm/mach-s3c2440/s3c244x-irq.c      |   18 ++--
 arch/arm/mach-s3c2443/irq.c              |   90 ++++++++--------
 arch/arm/mach-s3c64xx/irq-eint.c         |   34 +++---
 arch/arm/mach-s5pv310/irq-combiner.c     |   26 +++--
 arch/arm/mach-s5pv310/irq-eint.c         |   55 +++++-----
 arch/arm/mach-sa1100/irq.c               |   84 ++++++++--------
 arch/arm/mach-sa1100/neponset.c          |    8 +-
 arch/arm/mach-shark/irq.c                |   26 +++---
 arch/arm/mach-stmp378x/stmp378x.c        |   16 ++--
 arch/arm/mach-stmp37xx/stmp37xx.c        |   24 ++--
 arch/arm/mach-tcc8k/irq.c                |   56 +++++-----
 arch/arm/mach-tegra/gpio.c               |   38 ++++----
 arch/arm/mach-tegra/irq.c                |   36 +++---
 arch/arm/mach-versatile/core.c           |   16 ++--
 arch/arm/mach-w90x900/irq.c              |   20 ++--
 arch/arm/plat-mxc/3ds_debugboard.c       |   28 +++---
 arch/arm/plat-mxc/gpio.c                 |   30 +++---
 arch/arm/plat-mxc/irq.c                  |   14 ++--
 arch/arm/plat-mxc/tzic.c                 |   38 ++++----
 arch/arm/plat-nomadik/gpio.c             |   56 +++++-----
 arch/arm/plat-omap/gpio.c                |   93 ++++++++--------
 arch/arm/plat-orion/gpio.c               |   37 +++----
 arch/arm/plat-orion/irq.c                |   18 ++--
 arch/arm/plat-pxa/gpio.c                 |   28 +++---
 arch/arm/plat-pxa/include/plat/gpio.h    |    4 +-
 arch/arm/plat-s3c24xx/include/plat/irq.h |    4 +-
 arch/arm/plat-s3c24xx/irq-pm.c           |    9 +-
 arch/arm/plat-s3c24xx/irq.c              |  170 +++++++++++++++---------------
 arch/arm/plat-s5p/irq-eint.c             |   84 ++++++++--------
 arch/arm/plat-s5p/irq-gpioint.c          |   50 +++++-----
 arch/arm/plat-s5p/irq-pm.c               |    6 +-
 arch/arm/plat-samsung/include/plat/pm.h  |    4 +-
 arch/arm/plat-samsung/irq-uart.c         |   44 ++++----
 arch/arm/plat-samsung/irq-vic-timer.c    |   22 ++--
 arch/arm/plat-samsung/pm.c               |    7 +-
 arch/arm/plat-spear/shirq.c              |   22 ++--
 arch/arm/plat-stmp3xxx/irq.c             |    2 +-
 arch/arm/plat-stmp3xxx/pinmux.c          |   32 +++---
 117 files changed, 1938 insertions(+), 1889 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 00/54] ARM irq_data conversion.
  2010-11-30 13:11 [PATCH 00/54] ARM irq_data conversion Lennert Buytenhek
@ 2010-11-30 13:37 ` Mark Brown
  2010-12-01  7:29   ` Kukjin Kim
  2010-12-15  1:37 ` Lennert Buytenhek
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2010-11-30 13:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 30, 2010 at 02:11:05PM +0100, Lennert Buytenhek wrote:

>  arch/arm/mach-s3c64xx/irq-eint.c         |   34 +++---
>  arch/arm/plat-samsung/include/plat/pm.h  |    4 +-
>  arch/arm/plat-samsung/irq-uart.c         |   44 ++++----
>  arch/arm/plat-samsung/irq-vic-timer.c    |   22 ++--
>  arch/arm/plat-samsung/pm.c               |    7 +-

I've already sent changes which cover some of these (everything that
appears on s3c64xx anyway) and use the opportunity of doing the
conversion to introduce some trivial optimisations.  Hopefully Kukjin
and/or Ben will get a chance to look at them soon.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 00/54] ARM irq_data conversion.
  2010-11-30 13:37 ` Mark Brown
@ 2010-12-01  7:29   ` Kukjin Kim
  2010-12-01 10:19     ` 'Lennert Buytenhek'
  0 siblings, 1 reply; 7+ messages in thread
From: Kukjin Kim @ 2010-12-01  7:29 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown wrote:
> 
> On Tue, Nov 30, 2010 at 02:11:05PM +0100, Lennert Buytenhek wrote:
> 
> >  arch/arm/mach-s3c64xx/irq-eint.c         |   34 +++---
> >  arch/arm/plat-samsung/include/plat/pm.h  |    4 +-
> >  arch/arm/plat-samsung/irq-uart.c         |   44 ++++----
> >  arch/arm/plat-samsung/irq-vic-timer.c    |   22 ++--
> >  arch/arm/plat-samsung/pm.c               |    7 +-
> 
> I've already sent changes which cover some of these (everything that
> appears on s3c64xx anyway) and use the opportunity of doing the
> conversion to introduce some trivial optimisations.  Hopefully Kukjin
> and/or Ben will get a chance to look at them soon.

Hi Mark,

Oh, sorry for late.
Will check soon :-)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 00/54] ARM irq_data conversion.
  2010-12-01  7:29   ` Kukjin Kim
@ 2010-12-01 10:19     ` 'Lennert Buytenhek'
  2010-12-01 11:04       ` Mark Brown
  2010-12-01 11:50       ` Kukjin Kim
  0 siblings, 2 replies; 7+ messages in thread
From: 'Lennert Buytenhek' @ 2010-12-01 10:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 01, 2010 at 04:29:39PM +0900, Kukjin Kim wrote:

> > >  arch/arm/mach-s3c64xx/irq-eint.c         |   34 +++---
> > >  arch/arm/plat-samsung/include/plat/pm.h  |    4 +-
> > >  arch/arm/plat-samsung/irq-uart.c         |   44 ++++----
> > >  arch/arm/plat-samsung/irq-vic-timer.c    |   22 ++--
> > >  arch/arm/plat-samsung/pm.c               |    7 +-
> > 
> > I've already sent changes which cover some of these (everything that
> > appears on s3c64xx anyway) and use the opportunity of doing the
> > conversion to introduce some trivial optimisations.  Hopefully Kukjin
> > and/or Ben will get a chance to look at them soon.
> 
> Hi Mark,
> 
> Oh, sorry for late.
> Will check soon :-)

So do you want me to drop my patch for now?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 00/54] ARM irq_data conversion.
  2010-12-01 10:19     ` 'Lennert Buytenhek'
@ 2010-12-01 11:04       ` Mark Brown
  2010-12-01 11:50       ` Kukjin Kim
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2010-12-01 11:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 01, 2010 at 11:19:26AM +0100, 'Lennert Buytenhek' wrote:
> On Wed, Dec 01, 2010 at 04:29:39PM +0900, Kukjin Kim wrote:

> > Oh, sorry for late.
> > Will check soon :-)

> So do you want me to drop my patch for now?

I've only done the S3C64xx stuff so most of it doesn't overlap.  I'll
repost my stuff with you in the CC so you can see where the overlap is.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 00/54] ARM irq_data conversion.
  2010-12-01 10:19     ` 'Lennert Buytenhek'
  2010-12-01 11:04       ` Mark Brown
@ 2010-12-01 11:50       ` Kukjin Kim
  1 sibling, 0 replies; 7+ messages in thread
From: Kukjin Kim @ 2010-12-01 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

Lennert Byutenhek wrote:
> 
> On Wed, Dec 01, 2010 at 04:29:39PM +0900, Kukjin Kim wrote:
> 
> > > >  arch/arm/mach-s3c64xx/irq-eint.c         |   34 +++---
> > > >  arch/arm/plat-samsung/include/plat/pm.h  |    4 +-
> > > >  arch/arm/plat-samsung/irq-uart.c         |   44 ++++----
> > > >  arch/arm/plat-samsung/irq-vic-timer.c    |   22 ++--
> > > >  arch/arm/plat-samsung/pm.c               |    7 +-
> > >
> > > I've already sent changes which cover some of these (everything that
> > > appears on s3c64xx anyway) and use the opportunity of doing the
> > > conversion to introduce some trivial optimisations.  Hopefully Kukjin
> > > and/or Ben will get a chance to look at them soon.
> >
> > Hi Mark,
> >
> > Oh, sorry for late.
> > Will check soon :-)
> 
> So do you want me to drop my patch for now?

Hmm...if possible, I'd like to use your patch also.
But actually, seems need to sort out for avoiding overlaps.

Will check your patch after reviewing Mark's new irq stuff.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 00/54] ARM irq_data conversion.
  2010-11-30 13:11 [PATCH 00/54] ARM irq_data conversion Lennert Buytenhek
  2010-11-30 13:37 ` Mark Brown
@ 2010-12-15  1:37 ` Lennert Buytenhek
  1 sibling, 0 replies; 7+ messages in thread
From: Lennert Buytenhek @ 2010-12-15  1:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 30, 2010 at 02:11:05PM +0100, Lennert Buytenhek wrote:

> This patch set converts arch/arm/ irq_chips and flow handlers over
> to the new struct irq_data based irq_chip functions.

I have collected the various ACKs provided in this thread, dropped the
Samsung SoC patches from the queue (hopefully in favor of the patches I
sent on top of the current samsung -next branch today), and put the
result here:

	http://git.kernel.org/?p=linux/kernel/git/buytenh/arm_irq_data.git;a=summary
	git://git.kernel.org/pub/scm/linux/kernel/git/buytenh/arm_irq_data.git master

The most significant change is probably that I tacked the patch
attached below onto the end of the queue.

There exists a merge dependency between the irq_chip users/providers in
arch/arm/ and the irq_chip users/providers in drivers/, in that the
compatibility code in kernel/irq/ only provides compatibility between
old-style irq_chip providers and new-style irq_chip callers, and not
the other way around.

Patches to convert all drivers/gpio/ and drivers/mfd/ irq_chip
implementations to the new-style API have been submitted by me and Mark
Brown, and this queue of ARM irq_data patches semi-depends on those
patches to be merged to avoid the situation where old-style (drivers/)
irq_chip users call into new-style (arch/arm/) irq_chip providers.

A patch to provide API compat in the reverse direction was rejected,
which means that if e.g. the ARM queue gets merged before the drivers/
patches do, we can end up in situations where drivers/ users call into
NULL irq_chip members.

To avoid this, the last patch in this queue selects
GENERIC_HARDIRQS_NO_DEPRECATED, at the suggestion of Yong Zhang on
lkml, so as to catch this type of breakage at compile time rather
than at run time.

This queue is against current -linus -- I'd be happy to rebase it onto
any other branch (arm tree devel?).  If there are no objections, please
pull.

Comments appreciated!


thanks,
Lennert


commit f4195ca70c8881f6fe8d654acd0babb1b2cda5d8
Author: Lennert Buytenhek <buytenh@wantstofly.org>
Date:   Mon Nov 29 11:53:39 2010 +0100

    ARM: disable deprecated genirq support.
    
    Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0281d7b..71904d6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -24,6 +24,7 @@ config ARM
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
 	select HAVE_GENERIC_HARDIRQS
+	select GENERIC_HARDIRQS_NO_DEPRECATED
 	select HAVE_SPARSE_IRQ
 	help
 	  The ARM series is a line of low-power-consumption RISC chip designs

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-15  1:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 13:11 [PATCH 00/54] ARM irq_data conversion Lennert Buytenhek
2010-11-30 13:37 ` Mark Brown
2010-12-01  7:29   ` Kukjin Kim
2010-12-01 10:19     ` 'Lennert Buytenhek'
2010-12-01 11:04       ` Mark Brown
2010-12-01 11:50       ` Kukjin Kim
2010-12-15  1:37 ` Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).