mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Russell King <rmk@arm.linux.org.uk>,
	Andrew Morton <akpm@osdl.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: [patchset] Generic IRQ Subsystem: -V4
Date: Thu, 18 May 2006 00:15:36 +0200	[thread overview]
Message-ID: <20060517221536.GA13444@elte.hu> (raw)
In-Reply-To: <20060517001310.GA12877@elte.hu>

This is Version 4 of the genirq patch-queue, against 2.6.17-rc4. This 
patch-queue improves the generic IRQ layer to be truly generic, by 
adding various abstractions and features to it, without impacting 
existing functionality.

The number of patches has increased to 56 and the total patchsize has 
increased to 294K, so we wont be sending the patches to lkml. The full 
patch-queue can be downloaded from:

  http://redhat.com/~mingo/generic-irq-subsystem/

The split-out queue is at:

  http://redhat.com/~mingo/generic-irq-subsystem/patches/

In -V4 there are lots of changes all around the map. The most 
significant one is the conversion of the i386 and the x86_64 
architectures to a fully irq-chip based IRQ handling model.

This brought nice simplifications for these architectures:

$ diffstat patches/genirq-i386-irqchip.patch

  arch/i386/kernel/i8259.c   |   45 +++--------
  arch/i386/kernel/io_apic.c |  171 ++++++++++++++-------------------------------
  arch/i386/kernel/irq.c     |   19 ++---
  include/asm-i386/hw_irq.h  |    2
  4 files changed, 80 insertions(+), 157 deletions(-)

$ diffstat patches/genirq-x86_64-irqchip.patch

 arch/x86_64/kernel/i8259.c   |   50 +++----------
 arch/x86_64/kernel/io_apic.c |  165 ++++++++++---------------------------------
 arch/x86_64/kernel/irq.c     |    7 +
 include/asm-x86_64/hw_irq.h  |    2 
 4 files changed, 60 insertions(+), 164 deletions(-)

the IRQ handling hotpath for the most optimal flow got faster and 
leaner. The number of functions called in a typical IRQ decreased too. 
The irqchip implementations have become short and sweet:

 static struct irq_chip ioapic_chip __read_mostly = {
         .name           = "IO-APIC",
         .startup        = startup_ioapic_vector,
         .mask           = mask_ioapic_vector,
         .unmask         = unmask_ioapic_vector,
         .ack            = ack_apic,
 #ifdef CONFIG_SMP
         .set_affinity   = set_ioapic_affinity_vector,
 #endif
         .retrigger      = ioapic_retrigger_vector,
 };

 static struct irq_chip lapic_chip __read_mostly = {
         .name           = "local-APIC-edge",
         .mask           = mask_lapic_irq,
         .unmask         = unmask_lapic_irq,
         .ack            = ack_apic,
 };

 static struct irq_chip i8259A_chip = {
         .name           = "XT-PIC",
         .mask           = disable_8259A_irq,
         .unmask         = enable_8259A_irq,
         .mask_ack       = mask_and_ack_8259A,
 };

see the split-out patches at:

 http://redhat.com/~mingo/generic-irq-subsystem/patches/genirq-i386-irqchip.patch
 http://redhat.com/~mingo/generic-irq-subsystem/patches/genirq-x86_64-irqchip.patch

Another new feature is the handle_level_irq_fastack() highlevel irq-flow 
handler, which allows faster IRQ handling without masking/unmasking. 
This is current used by the new i386 and x86_64 IO-APIC code, but it 
could also be useful to most optimally support transparent ACK sequences 
in OpenPIC/MPIC controllers.

There were also extensive renames done to make the irq_chip and irq_desc 
fields clearer.

All changes since -V3:

- fixed set_wake prototype bug (reported by Daniel Walker)

- documentation fixes (Randy Dunlap)

- call desc->handle_irq() highlevel irq-flow handlers from __do_IRQ() 
  too, allowing gradual transition from a __do_IRQ() based model to an 
  irq-chips model. This was used for the i386 and x86_64 transition with 
  great success.

- ARM updates

- More size reduction:

      text    data     bss     dec     hex filename
   3430374  985464 1325080 5740918  579976 vmlinux-x64.orig
   3434234  982216 1321240 5737690  578cda vmlinux-x64.genirq

  while .text got larger, .data and .bss got smaller, so it's a net
  size reduction of ~4K.

- better debugging info from spurious interrupts.

- truly remove the irq_dir[] and smp_affinity_entry[] arrays. (this 
  change was announced in -V3 but went MIA)

- introduced the handle_level_irq_fastack() highlevel flow handler, for 
  fast IO-APIC interrupt handling. This should enable the most optimal 
  flow for transparent-ACK IRQ controllers too. (such as OpenPIC/MPIC)

- pushed desc->lock handling into the highlevel flow handlers. This 
  unified and simplified the arch-level call sites.

- sem2mutex: kernel/irq/autoprobe.c probe_sem => probe_lock mutex 
  conversion.

- changed the desc->handle_irq() handlers to be explicit fastcalls, to 
  keep the 4K_STACKS assembly code simpler.

- removed desc->affinity_entry - nothing uses it

- added chip->name as the primary field - chip->typename is still 
  kept for compatibility purposes.

- probe_irq() related fix in drivers/mfd/ucb1x00-core.c

- include flow information in /proc/interrupts for irq-chip based 
  architectures too.

- genirq-i386-irqchip.patch: change the i386 architecture to be irqchip 
  based.

- genirq-x86_64-irqchip.patch: change the x86_64 architecture to be 
  irqchip based.

- renamed 'desc->handler' to 'desc->chip' - the code got much cleaner 
  due to this.

- retrigger fix on i386 and x86_64, it is now MSI-vector aware.

- renamed 'desc->handle' to 'desc->handle_irq'

- moved the set_irq_handler() method of setting desc->handle_irq() from 
  ARM into the generic code.

-V4 has been build-tested with allyesconfig, and booted on x86, x86_64 
and various ARM platforms. Nevertheless the new i386 and x86_64 IRQ code 
is experimental and has been tested only on a limited number of systems.

	Ingo, Thomas

  parent reply	other threads:[~2006-05-17 22:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17  0:13 [patch 00/50] genirq: -V3 Ingo Molnar
2006-05-17  6:11 ` Benjamin Herrenschmidt
2006-05-17 22:27   ` Russell King
2006-05-18  0:32     ` Benjamin Herrenschmidt
2006-05-18  7:38       ` Russell King
2006-05-18  9:33         ` Benjamin Herrenschmidt
2006-05-17 22:15 ` Ingo Molnar [this message]
2006-05-18 22:24   ` [patchset] Generic IRQ Subsystem: -V4 Ingo Oeser
2006-05-19  9:31     ` Ingo Molnar
2006-05-19 17:00       ` Ingo Oeser
2006-05-19 14:52   ` [patchset] Generic IRQ Subsystem: -V5 Ingo Molnar
2006-06-07 16:54     ` Russell King
2006-06-07 17:20       ` Thomas Gleixner
2006-06-07 18:57         ` Thomas Gleixner
2006-06-08 11:35           ` Russell King
2006-06-08 12:04             ` [PATCH] genirq: Fix missing initializer for unmask in no_irq_chip Thomas Gleixner
2006-06-08 15:29               ` Russell King
2006-06-08 15:58                 ` Thomas Gleixner
2006-06-08 18:57                   ` Thomas Gleixner
2006-06-08 22:32                     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060517221536.GA13444@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome