All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/75] genirq: Overhaul for 2.6.39
@ 2011-02-10 23:35 Thomas Gleixner
  2011-02-10 23:35 ` [patch 01/75] genirq: Namespace cleanup Thomas Gleixner
                   ` (76 more replies)
  0 siblings, 77 replies; 100+ messages in thread
From: Thomas Gleixner @ 2011-02-10 23:35 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Peter Zijlstra, linux-arch, Linus Torvals,
	Greg Kroah-Hartman

This is a major overhaul of the generic interrupt layer.

     - Namespace cleanup

     - Further encapsulation of the core state

     - Spurious/Poll handling fixes

     - Stop setaffinity blindly manipulating affinity mask

     - Cleanups and enhancements all over the place

1) Namespace cleanup

   I reworked the slightly confusing (sorry, my bad) namespace of the
   various accessor functions. They follow a simple scheme now:

   irq_set/get_xxx(unsigned int irq, ...)
   irq_data_set/get_xxx(struct irq_data *d, ...)

   That's the first patch in the series and I'm going to apply it to
   a separate rc-4 based branch which everybody can pull in to
   do the changes now in his tree.

2) Encapsulation

   After __do_IRQ() was finally gone (Thanks to all involved!) I
   wanted to restructure the core status handling and cleanup the
   IRQ_* flag space.

   A quick grep over the tree made me really shudder, so I converted
   13 archs which are known to follow core changes slow to the new
   irq_chip callback functions and cleaned up the irq_desc accessors
   while at it. That way I learned also a lot about arch requirements.

   Then I looked at the remaining places which deal with
   irq_desc->status directly.

   1) Special EOI handling in sparc64/mips/sh. Easy to replace.

   2) Random abusers of chained_interrupt_handler. The worst offender
      is arch/powerpc/sysdev/fsl_msi.c, which implements a combo
      eoi/level flow handler instead of using the existing ones.

   3) Random places which quirk around their chip oddities instead of
      looking for solutions which can be made generic. One of them is
      the requirement to mask irq chips before setting the trigger
      type. Why is nobody talking to me ?

   4) Random leftovers from the __do_IRQ() semantics which are easy to
      cleanup.

   5) Initializations with IRQ_DISABLED and random IRQ_ flags.
      IRQ_DISABLED is core internal state and already set by default.
      The settable flags have to use the provided modifier functions.

   6) Weird flow handlers in m68knommu/arm/powerpc. All of them can
      be either replaced by existing handlers or can use an existing
      handler with minimal modifications. Patches are already out.

   7) Totally broken debug code in gpiolib and a copy of the same in
      some arm Soc code. Patch is in this series to kill it. Also
      remove unused code in arm/mach-tegra which seems to be some
      relict from the android mess.

   So there is no real requirement to expose the guts of the generic
   irq code to the world.

   Even if all is cleaned up, I'm tired of:

   	- Having to chase the creative abusage all the time

	- People not talking to me about their special requirements
	
	- Spending another day to find out that someone had typoed
	  desc->status |= IRQ_LEVEL; into desc->status = IRQ_LEVEL;
	  in some weird arch code and then complaining about the
	  core code playing silly buggers.

   So I decided to encapsulate the state into the core and make it
   hard to access and offenders easy to find. For now I keep the
   existing and used IRQ_* status bits up to date, unless
   GENERIC_HARDIRQS_NO_COMPAT=y which can be selected by the
   architecture. Be aware that not setting that config adds extra
   overhead to the core code.

   For all real requirements which I found, I provided solutions
   either in the core itself or information accessible via a state
   field in irq_data, which is handed to the irq_chip functions. So
   setting GENERIC_HARDIRQS_NO_COMPAT=y should be not a big deal on
   most architectures. There are some gpio and mfd drivers which need
   to be converted to threaded interrupts instead of having the old
   style racy and ugly disable_irq_nosync/schedule_work()
   implementation.

   There are a few places which need some thought like the powerpc
   kexec shutdown, but even that stuff should be generic as it makes
   sense to cleanup irqs before booting into a new kernel. Nothing
   which can't be solved though.

   Note that most accessors to irq_desc are going away sooner than
   later and long term I want to remove irq_desc from the public space
   completely.

   One step to this is a generic show_interrupts() function, which
   replaces the 23 copies with random modifications and different bugs
   inside. Unless you switch over you will be reminded by a nice
   deprecated warning.

3) Spurious/Poll 

   This is a long neglected piece of code and got an overhaul so it's
   simpler and less broken than it used to be.

4) irq_setaffinity()

   Does not longer blindly update the affinity mask before calling
   into the arch code. Also the chip functions can now return a 
   return code, which tells the core that it modified the mask
   itself. That's useful when arch code restricts the mask further
   than the core code can do.

5) Cleanups and enhancements

   Main cleanup happened in poll and the consolidation of the flow
   handlers which moved their duplicated code into handle_irq_event
   
   irq_set_type() now checks chip.flags for a chip flag, which indicates
   that the chip needs to be masked before setting the trigger type.
   That avoids duplicated code and fiddling with internal core state.

If no major outcry comes I'm going to push this into tip/irq/core and
next.

A preview is available at:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq.git irq/core

Thanks,

	tglx


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

end of thread, other threads:[~2011-02-14 19:02 UTC | newest]

Thread overview: 100+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 23:35 [patch 00/75] genirq: Overhaul for 2.6.39 Thomas Gleixner
2011-02-10 23:35 ` [patch 01/75] genirq: Namespace cleanup Thomas Gleixner
2011-02-10 23:35 ` [patch 02/75] genirq: Simplify affinity related code Thomas Gleixner
2011-02-10 23:35 ` [patch 03/75] genirq: Rremove redundant check Thomas Gleixner
2011-02-10 23:35 ` [patch 04/75] genirq: Always apply cpu online mask Thomas Gleixner
2011-02-10 23:36 ` [patch 05/75] genirq: Do not copy affinity before set Thomas Gleixner
2011-02-10 23:36 ` [patch 06/75] genirq: Plug race in report_bad_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 07/75] genirq: Warn when handler enables interrupts Thomas Gleixner
2011-02-10 23:36 ` [patch 08/75] genirq: Fixup poll handling Thomas Gleixner
2011-02-10 23:36 ` [patch 09/75] genirq: Do not poll disabled, percpu and timer interrupts Thomas Gleixner
2011-02-10 23:36 ` [patch 10/75] genirq: spurious: Run only one poller at a time Thomas Gleixner
2011-02-10 23:36 ` [patch 11/75] genirq: Mark polled irqs and defer the real handler Thomas Gleixner
2011-02-10 23:36 ` [patch 12/75] genirq: Move irq thread flags to core Thomas Gleixner
2011-02-10 23:36 ` [patch 13/75] genirq: Remove bogus conditional Thomas Gleixner
2011-02-10 23:36 ` [patch 14/75] genirq: Consolidate startup/shutdown of interrupts Thomas Gleixner
2011-02-10 23:36 ` [patch 15/75] genirq: Consolidate disable/enable Thomas Gleixner
2011-02-10 23:36 ` [patch 16/75] genirq: Remove default magic Thomas Gleixner
2011-02-10 23:36 ` [patch 17/75] genirq: Consolidate IRQ_DISABLED Thomas Gleixner
2011-02-11  7:57   ` Lars-Peter Clausen
2011-02-11 11:39     ` Thomas Gleixner
2011-02-10 23:36 ` [patch 18/75] genirq: Do not fiddle with IRQ_MASKED in handle_edge_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 19/75] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
2011-02-10 23:36 ` [patch 20/75] arm: Ns9xxx: Remove " Thomas Gleixner
2011-02-10 23:36   ` Thomas Gleixner
2011-02-10 23:36 ` [patch 21/75] genirq: Mark handle_IRQ_event deprecated Thomas Gleixner
2011-02-10 23:36 ` [patch 22/75] genirq: Implement handle_irq_event() Thomas Gleixner
2011-02-10 23:36 ` [patch 23/75] genirq: Use handle_irq_event() in handle_simple_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 24/75] genirq: Use handle_irq_event() in handle_level_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 25/75] genirq: Use handle_irq_event() in handle_fasteoi_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 26/75] genirq: Use handle_irq_event() in handle_edge_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 27/75] genirq: Use handle_perpcu_event() in handle_percpu_irq() Thomas Gleixner
2011-02-10 23:36 ` [patch 28/75] genirq: Use handle_irq_event() in the spurious poll code Thomas Gleixner
2011-02-10 23:36 ` [patch 29/75] genirq: Simplify handle_irq_event() Thomas Gleixner
2011-02-10 23:36 ` [patch 30/75] genirq: Implement generic irq_show_interrupts() Thomas Gleixner
2011-02-10 23:37 ` [patch 31/75] genirq: Fixup core code namespace fallout Thomas Gleixner
2011-02-10 23:37 ` [patch 32/75] genirq: Add internal state field to irq_desc Thomas Gleixner
2011-02-10 23:37 ` [patch 33/75] gpio: Remove broken irq_desc hackery Thomas Gleixner
2011-02-11 12:57   ` Wolfram Sang
2011-02-10 23:37 ` [patch 34/75] arm: ep93xx: Kill another instance of broken irq_desc fiddling Thomas Gleixner
2011-02-11  0:07   ` H Hartley Sweeten
2011-02-11  0:22   ` Ryan Mallon
2011-02-11 11:42     ` Thomas Gleixner
2011-02-11 20:16       ` Ryan Mallon
2011-02-10 23:37 ` [patch 35/75] genirq: Protect tglx from tripping over his own feet Thomas Gleixner
2011-02-10 23:37 ` [patch 36/75] genirq: Move IRQ_AUTODETECT to internal state Thomas Gleixner
2011-02-10 23:37 ` [patch 37/75] genirq: Move IRQ_SPURIOUS_DISABLED to core state Thomas Gleixner
2011-02-10 23:37 ` [patch 38/75] genirq: Move IRQ_NESTED_THREAD " Thomas Gleixner
2011-02-10 23:37 ` [patch 39/75] genirq: Move IRQ_POLL_INPROGRESS to core Thomas Gleixner
2011-02-10 23:37 ` [patch 40/75] genirq: Add IRQ_INPROGRESS " Thomas Gleixner
2011-02-10 23:37 ` [patch 41/75] genirq: Move IRQ_ONESHOT " Thomas Gleixner
2011-02-10 23:37 ` [patch 42/75] genirq: Move IRQ_REPLAY and IRQ_WAITING " Thomas Gleixner
2011-02-10 23:37 ` [patch 43/75] genirq: Move IRQ_DISABLED " Thomas Gleixner
2011-02-10 23:37 ` [patch 44/75] genirq: Move IRQ_PENDING flag " Thomas Gleixner
2011-02-10 23:37 ` [patch 45/75] genirq: Move IRQ_MASKED " Thomas Gleixner
2011-02-10 23:37 ` [patch 46/75] genirq: Move IRQ_SUSPENDED " Thomas Gleixner
2011-02-10 23:37 ` [patch 47/75] arm: tegra: Remove unused function which fiddles with irq_desc Thomas Gleixner
2011-02-10 23:37   ` Thomas Gleixner
2011-02-10 23:37   ` Thomas Gleixner
2011-02-10 23:48   ` Colin Cross
2011-02-10 23:48     ` Colin Cross
2011-02-10 23:37 ` [patch 48/75] genirq: Move IRQ_WAKEUP to core Thomas Gleixner
2011-02-10 23:37 ` [patch 49/75] genirq: Add state field to irq_data Thomas Gleixner
2011-02-10 23:37 ` [patch 50/75] genirq: Add IRQ_MOVE_PENDING to irq_data.state Thomas Gleixner
2011-02-10 23:37 ` [patch 51/75] genirq: Remove CONFIG_IRQ_PER_CPU Thomas Gleixner
2011-02-10 23:37 ` [patch 52/75] genirq: Make CHECK_IRQ_PER_CPU an inline and deprecate it Thomas Gleixner
2011-02-10 23:37 ` [patch 53/75] genirq: Remove CHECK_IRQ_PER_CPU from core code Thomas Gleixner
2011-02-10 23:37 ` [patch 54/75] genirq: Move debug code to separate header Thomas Gleixner
2011-02-10 23:37 ` [patch 55/75] genirq: Mirror IRQ_PER_CPU and IRQ_NO_BALANCING in irq_data.state Thomas Gleixner
2011-02-10 23:38 ` [patch 56/75] genirq: Reuse existing can set affinty check Thomas Gleixner
2011-02-10 23:38 ` [patch 57/75] genirq: Move IRQ_AFFINITY_SET to core Thomas Gleixner
2011-02-10 23:38 ` [patch 58/75] genirq: Mirror irq trigger type bits in irq_data.state Thomas Gleixner
2011-02-10 23:38 ` [patch 59/75] genirq: Wrap the remaning IRQ_* flags Thomas Gleixner
2011-02-10 23:38 ` [patch 60/75] genirq: Force wrapped access to desc->status in core code Thomas Gleixner
2011-02-10 23:38 ` [patch 61/75] genirq: Cleanup irq.h Thomas Gleixner
2011-02-10 23:38 ` [patch 62/75] genirq: Add flags to irq_chip Thomas Gleixner
2011-02-10 23:38 ` [patch 63/75] genirq: Add IRQCHIP_SET_TYPE_MASKED flag and IRQD_WAKE_SET Thomas Gleixner
2011-02-14 17:07   ` Rabin Vincent
2011-02-14 18:43     ` Thomas Gleixner
2011-02-10 23:38 ` [patch 64/75] genirq: Move wakeup state to irq_data Thomas Gleixner
2011-02-10 23:38 ` [patch 65/75] genirq: Reflect IRQ_INPROGRESS/DISABLED in irq_data.state Thomas Gleixner
2011-02-10 23:38 ` [patch 66/75] genirq: Reflect IRQ_MOVE_PCNTXT in irq_data state Thomas Gleixner
2011-02-10 23:38 ` [patch 67/75] genirq: Remove desc->status when GENERIC_HARDIRQS_NO_COMPAT=y Thomas Gleixner
2011-02-10 23:38 ` [patch 68/75] genirq: Add preflow handler support Thomas Gleixner
2011-02-10 23:38 ` [patch 69/75] genirq: Implement irq_data based move_*_irq() versions Thomas Gleixner
2011-02-10 23:38 ` [patch 70/75] x86: Fixup deprecation warnings Thomas Gleixner
2011-02-10 23:38 ` [patch 71/75] x86: ioapic: Use irq_data->state Thomas Gleixner
2011-02-10 23:38 ` [patch 72/75] x86: Use the proper accessors in fixup_irqs() Thomas Gleixner
2011-02-10 23:38 ` [patch 73/75] x86: ioapic: Use new move_irq functions Thomas Gleixner
2011-02-10 23:38 ` [patch 74/75] x86: Use generic show_interrupts Thomas Gleixner
2011-02-10 23:38 ` [patch 75/75] x86: Disable deprecated GENIRQ features Thomas Gleixner
2011-02-10 23:53 ` [patch 00/75] genirq: Overhaul for 2.6.39 Linus Torvalds
2011-02-11  0:00   ` Thomas Gleixner
2011-02-11  0:28     ` Linus Torvalds
2011-02-11  0:49       ` Thomas Gleixner
2011-02-11 13:05         ` Thomas Gleixner
2011-02-11 13:59           ` Ingo Molnar
2011-02-11 14:26             ` Thomas Gleixner
2011-02-13 12:50               ` Sam Ravnborg
2011-02-14 19:01                 ` Thomas Gleixner
2011-02-11  4:03 ` Frank Rowand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.