kernel-fxtec-pro1x/drivers/macintosh
Benjamin Herrenschmidt 6e99e45828 [PATCH] powerpc: fix trigger handling in the new irq code
This patch slightly reworks the new irq code to fix a small design error.  I
removed the passing of the trigger to the map() calls entirely, it was not a
good idea to have one call do two different things.  It also fixes a couple of
corner cases.

Mapping a linux virtual irq to a physical irq now does only that.  Setting the
trigger is a different action which has a different call.

The main changes are:

- I no longer call host->ops->map() for an already mapped irq, I just return
  the virtual number that was already mapped.  It was called before to give an
  opportunity to change the trigger, but that was causing issues as that could
  happen while the interrupt was in use by a device, and because of the
  trigger change, map would potentially muck around with things in a racy way.
   That was causing much burden on a given's controller implementation of
  map() to get it right.  This is much simpler now.  map() is only called on
  the initial mapping of an irq, meaning that you know that this irq is _not_
  being used.  You can initialize the hardware if you want (though you don't
  have to).

- Controllers that can handle different type of triggers (level/edge/etc...)
  now implement the standard irq_chip->set_type() call as defined by the
  generic code.  That means that you can use the standard set_irq_type() to
  configure an irq line manually if you wish or (though I don't like that
  interface), pass explicit trigger flags to request_irq() as defined by the
  generic kernel interfaces.  Also, using those interfaces guarantees that
  your controller set_type callback is called with the descriptor lock held,
  thus providing locking against activity on the same interrupt (including
  mask/unmask/etc...) automatically.  A result is that, for example, MPIC's
  own map() implementation calls irq_set_type(NONE) to configure the hardware
  to the default triggers.

- To allow the above, the irq_map array entry for the new mapped interrupt
  is now set before map() callback is called for the controller.

- The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
  for mapping interrupts from the device-tree now also call the separate
  set_irq_type(), and only does so if there is a change in the trigger type.

- While I was at it, I changed pci_read_irq_line() (which is the helper I
  would expect most archs to use in their pcibios_fixup() to get the PCI
  interrupt routing from the device tree) to also handle a fallback when the
  DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
  the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
  interrupt number from the device.  That number is then mapped using the
  default controller, and the trigger is set to level low.  That default
  behaviour works for several platforms that don't have a proper interrupt
  tree like Pegasos.  If it doesn't work for your platform, then either
  provide a proper interrupt tree from the firmware so that fallback isn't
  needed, or don't call pci_read_irq_line()

- Add back a bit that got dropped by my main rework patch for properly
  clearing pending IPIs on pSeries when using a kexec

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 13:24:20 -07:00
..
adb-iop.c [PATCH] m68k: NULL noise removal 2006-01-12 09:09:04 -08:00
adb.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
adbhid.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ans-lcd.c
apm_emu.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Kconfig [POWERPC] Make sure we select CONFIG_NEW_LEDS if ADB_PMU_LED is set 2006-06-28 15:19:04 +10:00
mac_hid.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
macio-adb.c [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
macio_asic.c [PATCH] powerpc: fix trigger handling in the new irq code 2006-07-10 13:24:20 -07:00
macio_sysfs.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Makefile [POWERPC] Convert powermac ide blink to new led infrastructure 2006-06-28 11:51:12 +10:00
mediabay.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
nvram.c
smu.c [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
therm_adt746x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
therm_pm72.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
therm_pm72.h typo fixes: mecanism -> mechanism 2006-06-30 18:20:44 +02:00
therm_windtunnel.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
via-cuda.c [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
via-macii.c [PATCH] m68k: NULL noise removal 2006-01-12 09:09:04 -08:00
via-maciisi.c [PATCH] m68k: NULL noise removal 2006-01-12 09:09:04 -08:00
via-pmu-backlight.c [PATCH] Rewritten backlight infrastructure for portable Apple computers 2006-06-25 10:00:59 -07:00
via-pmu-event.c Input: via-pmu - add input device support 2006-06-26 01:49:55 -04:00
via-pmu-event.h Input: via-pmu - add input device support 2006-06-26 01:49:55 -04:00
via-pmu-led.c [POWERPC] Convert powermac ide blink to new led infrastructure 2006-06-28 11:51:12 +10:00
via-pmu.c [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
via-pmu68k.c [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
windfarm.h [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_core.c [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
windfarm_cpufreq_clamp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
windfarm_lm75_sensor.c [PATCH] macintosh: cleanup the use of i2c headers 2006-03-23 14:40:24 +11:00
windfarm_max6690_sensor.c [PATCH] macintosh: cleanup the use of i2c headers 2006-03-23 14:40:24 +11:00
windfarm_pid.c [PATCH] windfarm license fix 2006-03-06 18:40:45 -08:00
windfarm_pid.h [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_pm81.c [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_pm91.c [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_pm112.c [PATCH] powerpc: Fix windfarm_pm112 not starting all control loops 2006-03-03 21:44:06 +11:00
windfarm_smu_controls.c [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_smu_sat.c [PATCH] macintosh: cleanup the use of i2c headers 2006-03-23 14:40:24 +11:00
windfarm_smu_sensors.c [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00