android_kernel_motorola_sm6225/drivers/char
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
..
agp [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
drm [PATCH] irq-flags: drivers/drm: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
ftape [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
hw_random [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ip2 [PATCH] Add Computone IntelliPort Plus serial hotplug support 2006-07-10 13:24:13 -07:00
ipmi [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
mwave [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
pcmcia [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
rio [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
tpm [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
watchdog [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
.gitignore gitignore: misc files 2006-01-01 22:21:50 +01:00
amiserial.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
applicom.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
applicom.h
cd1865.h
ChangeLog
consolemap.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cp437.uni
cs5535_gpio.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
cyclades.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
decserial.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
defkeymap.c_shipped
defkeymap.map
digi.h
digi1.h [PATCH] Clean up the old digi support and rescue it 2005-09-07 16:57:20 -07:00
digiFep1.h [PATCH] Clean up the old digi support and rescue it 2005-09-07 16:57:20 -07:00
digiPCI.h
ds1286.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ds1302.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ds1620.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
dsp56k.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
dtlk.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ec3104_keyb.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
efirtc.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
epca.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
epca.h [PATCH] epca iomem annotations + several missing readw() 2005-09-16 10:38:10 -07:00
epcaconfig.h
esp.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
generic_nvram.c [PATCH] powerpc: Kill _machine and hard-coded platform numbers 2006-03-28 23:15:54 +11:00
generic_serial.c [PATCH] sem2mutex: serial ->port_write_mutex 2006-03-23 07:38:14 -08:00
genrtc.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
hangcheck-timer.c [PATCH] hangcheck: remove monotomic_clock on x86 2006-06-26 09:58:20 -07:00
hpet.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
hvc_console.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
hvc_console.h [PATCH] powerpc: hvc_console updates 2006-03-28 16:45:26 +11:00
hvc_rtas.c [PATCH] powerpc: Cleanup hvc_rtas.c a little 2006-06-09 21:24:20 +10:00
hvc_vio.c [PATCH] powerpc: hvc_console updates 2006-03-28 16:45:26 +11:00
hvcs.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
hvsi.c [PATCH] powerpc: fix trigger handling in the new irq code 2006-07-10 13:24:20 -07:00
i8k.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ip27-rtc.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
isicom.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
istallion.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ite_gpio.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
Kconfig [PATCH] GPIO for SCx200 & PC-8736x: x86-only 2006-06-29 10:26:21 -07:00
keyboard.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
lcd.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
lcd.h Resurrect Cobalt support for 2.6. 2005-10-29 19:30:42 +01:00
lp.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
Makefile [PATCH] chardev: GPIO for SCx200 & PC-8736x: add proper Kconfig, Makefile entries 2006-06-27 17:32:43 -07:00
mbcs.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
mbcs.h
mem.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
misc.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
mmtimer.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
moxa.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mxser.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
mxser.h [PATCH] Typo fixes 2006-03-28 09:16:08 -08:00
n_hdlc.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
n_r3964.c [PATCH] R3964: fix GFP_KERNEL allocations in timer function 2006-06-25 10:01:17 -07:00
n_tty.c [PATCH] remove TTY_DONT_FLIP 2006-06-28 14:59:05 -07:00
nsc_gpio.c [PATCH] chardev: GPIO for SCx200 & PC-8736x: display pin values in/out in gpio_dump 2006-06-27 17:32:43 -07:00
nvram.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
nwbutton.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
nwbutton.h
nwflash.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
pc8736x_gpio.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
ppdev.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
pty.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
qtronix.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
qtronixmap.c_shipped
qtronixmap.map
random.c [PATCH] lockdep: locking init debugging improvement 2006-07-03 15:27:02 -07:00
raw.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
riscom8.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
riscom8.h
riscom8_reg.h
rocket.c [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV 2006-06-26 12:25:09 -07:00
rocket.h
rocket_int.h
rtc.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
s3c2410-rtc.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
scan_keyb.c
scan_keyb.h
scc.h [PATCH] m68k: static vs. extern in scc.h 2006-01-12 09:09:00 -08:00
scx200_gpio.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
selection.c [PATCH] TTY layer buffering revamp 2006-01-10 08:01:59 -08:00
ser_a2232.c [PATCH] sem2mutex: serial ->port_write_mutex 2006-03-23 07:38:14 -08:00
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
snsc.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
snsc.h [IA64-SGI] Handle SC env. powerdown events 2006-01-26 13:32:26 -08:00
snsc_event.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
sonypi.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
specialix.c [PATCH] Add Specialix IO8+ card support hotplug support 2006-07-10 13:24:13 -07:00
specialix_io8.h
stallion.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
sx.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
sx.h
sxboards.h
sxwindow.h
synclink.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
synclink_gt.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
synclinkmp.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
sysrq.c [PATCH] lockdep: print all lock classes on SysRQ-D 2006-07-03 15:27:04 -07:00
tb0219.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
tipar.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
tlclk.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
toshiba.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
tty_io.c [PATCH] sched: cleanup, remove task_t, convert to struct task_struct 2006-07-03 15:27:11 -07:00
tty_ioctl.c [PATCH] coverity: tty_ldisc_ref return null check 2005-06-28 21:20:34 -07:00
vc_screen.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
viocons.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
viotape.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
vme_scc.c [PATCH] irq-flags: drivers/char: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
vr41xx_giu.c [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
vt.c [PATCH] vt: Decrement ref count of the VT backend on deallocation 2006-07-03 15:26:59 -07:00
vt_ioctl.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00