linux-2.6
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Thu, 5 Oct 2006 01:57:35 +0000 (18:57 -0700)] 
Merge /pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (54 commits)
  [SCSI] Initial Commit of qla4xxx
  [SCSI] raid class: handle component-add errors
  [SCSI] SCSI megaraid_sas: handle thrown errors
  [SCSI] SCSI aic94xx: handle sysfs errors
  [SCSI] SCSI st: fix error handling in module init, sysfs
  [SCSI] SCSI sd: fix module init/exit error handling
  [SCSI] SCSI osst: add error handling to module init, sysfs
  [SCSI] scsi: remove hosts.h
  [SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c
  [SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog
  [SCSI] megaraid_sas: adds tasklet for cmd completion
  [SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error
  [SCSI] megaraid_sas: function pointer for disable interrupt
  [SCSI] megaraid_sas: frame count optimization
  [SCSI] megaraid_sas: FW transition and q size changes
  [SCSI] qla2xxx: Update version number to 8.01.07-k2.
  [SCSI] qla2xxx: Stall mid-layer error handlers while rport is blocked.
  [SCSI] qla2xxx: Add MODULE_FIRMWARE tags.
  [SCSI] qla2xxx: Add support for host port state FC transport attribute.
  [SCSI] qla2xxx: Add support for fabric name FC transport attribute.
  ...

17 years ago[SCSI] Initial Commit of qla4xxx
David Somayajulu [Tue, 19 Sep 2006 17:28:00 +0000 (10:28 -0700)] 
[SCSI] Initial Commit of qla4xxx

open-iSCSI driver for Qlogic Corporation's iSCSI HBAs

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Doug Maxey <dwm@bubba.enoyolf.org>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] raid class: handle component-add errors
Jeff Garzik [Wed, 4 Oct 2006 11:05:11 +0000 (07:05 -0400)] 
[SCSI] raid class: handle component-add errors

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] SCSI megaraid_sas: handle thrown errors
Jeff Garzik [Wed, 4 Oct 2006 10:34:03 +0000 (06:34 -0400)] 
[SCSI] SCSI megaraid_sas: handle thrown errors

- handle clear_user() error

- handle and properly unwind from sysfs errors thrown during mod init

- adjust order of calls in megasas_exit() to precisely match
  registration order in megasas_init()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Updated for extra attribute and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] SCSI aic94xx: handle sysfs errors
Jeff Garzik [Wed, 4 Oct 2006 10:19:18 +0000 (06:19 -0400)] 
[SCSI] SCSI aic94xx: handle sysfs errors

Handle and unwind from errors returned by driver model functions.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] SCSI st: fix error handling in module init, sysfs
Jeff Garzik [Wed, 4 Oct 2006 10:00:38 +0000 (06:00 -0400)] 
[SCSI] SCSI st: fix error handling in module init, sysfs

- Notice and handle sysfs errors in module init, tape init

- Properly unwind errors in module init

- Remove bogus st_sysfs_class==NULL test, it is guaranteed !NULL at that point

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] SCSI sd: fix module init/exit error handling
Jeff Garzik [Wed, 4 Oct 2006 09:32:54 +0000 (05:32 -0400)] 
[SCSI] SCSI sd: fix module init/exit error handling

- Properly handle and unwind errors in init_sd().  Fixes leaks on error,
  if class_register() or scsi_register_driver() failed.

- Ensure that exit_sd() execution order is the perfect inverse of
  initialization order.

FIXME:  If some-but-not-all register_blkdev() calls fail, we wind up
calling unregister_blkdev() for block devices we did not register.
This was a pre-existing bug.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] SCSI osst: add error handling to module init, sysfs
Jeff Garzik [Wed, 4 Oct 2006 09:23:04 +0000 (05:23 -0400)] 
[SCSI] SCSI osst: add error handling to module init, sysfs

- check all sysfs-related return codes, and propagate them back to callers

- properly unwind errors in osst_probe(), init_osst().  This fixes a
  leak that occured if scsi driver registration failed, and fixes an
  oops if sysfs creation returned an error.

(unrelated)
- kzalloc() cleanup in new_tape_buf()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi: remove hosts.h
Henne [Wed, 4 Oct 2006 08:22:09 +0000 (10:22 +0200)] 
[SCSI] scsi: remove hosts.h

Remove the obsolete hosts.h file under drivers/scsi.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c
Henne [Wed, 4 Oct 2006 07:33:47 +0000 (09:33 +0200)] 
[SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c

Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in aic7xxx_old.c.
Also replacing lots of whitespaces with tabs in structures and functions
which have been changed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[S390] cio: improve unit check handling for internal operations
Peter Oberparleiter [Wed, 4 Oct 2006 18:02:30 +0000 (20:02 +0200)] 
[S390] cio: improve unit check handling for internal operations

Retry internal operation after unit check instead of aborting them.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: add timeout handler for internal operations.
Peter Oberparleiter [Wed, 4 Oct 2006 18:02:26 +0000 (20:02 +0200)] 
[S390] cio: add timeout handler for internal operations.

Add timeout handler for common-I/O-layer-internal I/O operations.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Remove open-coded mem_map usage.
Heiko Carstens [Wed, 4 Oct 2006 18:02:23 +0000 (20:02 +0200)] 
[S390] Remove open-coded mem_map usage.

Use page_to_phys and pfn_to_page to avoid open-coded mem_map usage.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Have s390 use add_active_range() and free_area_init_nodes.
Heiko Carstens [Wed, 4 Oct 2006 18:02:19 +0000 (20:02 +0200)] 
[S390] Have s390 use add_active_range() and free_area_init_nodes.

Size zones and holes in an architecture independent manner for s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] Remove crept in whitespace from head*.S again.
Heiko Carstens [Wed, 4 Oct 2006 18:02:15 +0000 (20:02 +0200)] 
[S390] Remove crept in whitespace from head*.S again.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] incorrect placement of include.
Martin Schwidefsky [Wed, 4 Oct 2006 18:02:12 +0000 (20:02 +0200)] 
[S390] incorrect placement of include.

The include of linux/smp.h needs to be done before the #if that
checks for the compiler version. Seems like fallout from the
inline assembly cleanup patch vs. the directed yield patch.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Wire up sys_getcpu system call.
Heiko Carstens [Wed, 4 Oct 2006 18:02:09 +0000 (20:02 +0200)] 
[S390] Wire up sys_getcpu system call.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] zcrypt device registration/unregistration race.
Ralph Wuerthner [Wed, 4 Oct 2006 18:02:05 +0000 (20:02 +0200)] 
[S390] zcrypt device registration/unregistration race.

Fix a race condition during AP device registration and unregistration.

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Add timeouts during sense PGID, path verification and disband PGID.
Cornelia Huck [Wed, 4 Oct 2006 18:02:02 +0000 (20:02 +0200)] 
[S390] Add timeouts during sense PGID, path verification and disband PGID.

While the machine owns us an interrupt in these cases (and we should get
one), reality isn't always like that...

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] user-copy optimization fallout.
Martin Schwidefsky [Wed, 4 Oct 2006 18:01:58 +0000 (20:01 +0200)] 
[S390] user-copy optimization fallout.

Fix new restore_sigregs function. It copies the user space copy of the
old psw without correcting the psw.mask and the psw.addr high order bit.
While we are at it, simplify save_sigregs a bit.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] update default configuration
Martin Schwidefsky [Wed, 4 Oct 2006 18:01:52 +0000 (20:01 +0200)] 
[S390] update default configuration

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog
Sumant Patro [Tue, 3 Oct 2006 20:19:21 +0000 (13:19 -0700)] 
[SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog

This patch sets timeout of max 180 seconds for ioctl completion.
It also updates the Changelog and hikes the version to 3.05.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] megaraid_sas: adds tasklet for cmd completion
Sumant Patro [Tue, 3 Oct 2006 20:13:18 +0000 (13:13 -0700)] 
[SCSI] megaraid_sas: adds tasklet for cmd completion

This patch adds a tasklet for command completion.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error
Sumant Patro [Tue, 3 Oct 2006 20:09:14 +0000 (13:09 -0700)] 
[SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error

This patch adds function to print the pending frame details before returning
failure from the reset routine. It also exposes a new variable megasas_dbg_lvl
that allows the user to set the debug level for logging.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] megaraid_sas: function pointer for disable interrupt
Sumant Patro [Tue, 3 Oct 2006 19:52:12 +0000 (12:52 -0700)] 
[SCSI] megaraid_sas: function pointer for disable interrupt

This patch adds function pointer to invoke disable interrupt for
xscale and ppc IOP based controllers. Removes old implementation that checks
for controller type in megasas_disable_intr.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] megaraid_sas: frame count optimization
Sumant Patro [Tue, 3 Oct 2006 19:40:47 +0000 (12:40 -0700)] 
[SCSI] megaraid_sas: frame count optimization

This patch removes duplicated code in frame calculation &  adds
megasas_get_frame_count() that also takes into account the number of frames
that can be contained in the Main frame.
FW uses the frame count to pull sufficient number of frames from host memory.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] megaraid_sas: FW transition and q size changes
Sumant Patro [Tue, 3 Oct 2006 19:28:49 +0000 (12:28 -0700)] 
[SCSI] megaraid_sas: FW transition and q size changes

This patch has the following enhancements :
        a. handles new transition states of FW to support controller hotplug.
        b. It reduces by 1 the maximum cmds that the driver may send to FW.
        c. Sends "Stop Processing" cmd to FW before returning failure from reset routine
        d. Adds print in megasas_transition routine
        e. Sends "RESET" flag to FW to do a soft reset of controller
to move from Operational to Ready state.
f. Sending correct pointer (cmd->sense) to pci_pool_free

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years agoMerge branch 'for-2.6.19' of git://brick.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Wed, 4 Oct 2006 17:44:01 +0000 (10:44 -0700)] 
Merge branch 'for-2.6.19' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'for-2.6.19' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] Document bi_sector and sector_t
  [PATCH] helper function for retrieving scsi_cmd given host based block layer tag

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 4 Oct 2006 17:43:31 +0000 (10:43 -0700)] 
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Remove remaining reference to ite_gpio.h from Kbuild
  [MIPS] PNX8550 fixups

17 years ago[PATCH] Document bi_sector and sector_t
Roger Gammans [Wed, 4 Oct 2006 11:37:45 +0000 (13:37 +0200)] 
[PATCH] Document bi_sector and sector_t

Signed-Off-By: Roger Gammans <rgammans@computer-surgery.co.uk>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] helper function for retrieving scsi_cmd given host based block layer tag
David C Somayajulu [Wed, 4 Oct 2006 06:27:25 +0000 (08:27 +0200)] 
[PATCH] helper function for retrieving scsi_cmd given host based block layer tag

This was necessitated by the need for a function to get back
to a scsi_cmnd, when an hba the posts its (corresponding) completion
interrupt with a block layer tag as its reference.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Wed, 4 Oct 2006 17:30:07 +0000 (10:30 -0700)] 
Merge /pub/scm/linux/kernel/git/mchehab/v4l-dvb

* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (4712): Fix warning when compiling on x86_i64
  V4L/DVB (4711): Radio: No need to return void
  V4L/DVB (4708): Add tveeprom support for Philips FM1236/FM1216ME MK5
  V4L/DVB (4707): 4linux: complete conversion to hotplug safe PCI API
  V4L/DVB (4706): Do not enable VIDEO_V4L2 unconditionally
  V4L/DVB (4704): SAA713x: fixed compile warning in SECAM fixup
  V4L/DVB (4703): Add support for the ASUS EUROPA2 OEM board
  V4L/DVB (4702): Fix: set antenna input for DVB-T for Asus P7131 Dual hybrid
  V4L/DVB (4701): Saa713x audio fixes
  V4L/DVB (4676a): Remove Kconfig item for DiB7000M support

17 years ago[PATCH] atmel_serial: Fix roundoff error in atmel_console_get_options
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:11 +0000 (16:02 +0200)] 
[PATCH] atmel_serial: Fix roundoff error in atmel_console_get_options

The atmel_console_get_options() function initializes the baud,
parity and bits settings from the actual hardware setup, in
case it has been initialized by a e.g. boot loader.

The baud rate, however, is not necessarily exactly equal to one of
the standard baud rates (115200, etc.) This means that the baud rate
calculated by this function may be slightly higher or slightly lower
than one of the standard baud rates.

If the baud rate is slightly lower than the target, this causes
problems when uart_set_option() tries to match the detected baud rate
against the standard baud rate, as it will always select a baud rate
that is lower or equal to the target rate. For example if the
detected baud rate is slightly lower than 115200, usart_set_options()
will select 57600.

This patch fixes the problem by subtracting 1 from the value in BRGR
when calculating the baud rate. The detected baud rate will thus
always be higher than the nearest standard baud rate, and
uart_set_options() will end up doing the right thing.

Tested on ATSTK1000 and AT91RM9200-EK boards. Both are broken without
this patch.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] AVR32: Allow renumbering of serial devices
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:10 +0000 (16:02 +0200)] 
[PATCH] AVR32: Allow renumbering of serial devices

Allow the board to remap actual USART peripheral devices to serial
devices by calling at32_map_usart(hw_id, serial_line). This ensures
that even though ATSTK1002 uses USART1 as the first serial port, it
will still have a ttyS0 device.

This also adds a board-specific early setup hook and moves the
at32_setup_serial_console() call there from the platform code.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] atmel_serial: Support AVR32
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:09 +0000 (16:02 +0200)] 
[PATCH] atmel_serial: Support AVR32

Make CONFIG_SERIAL_ATMEL selectable on AVR32 and #ifdef out some ARM-
specific code in the driver.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] atmel_serial: Pass fixed register mappings through platform_data
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:08 +0000 (16:02 +0200)] 
[PATCH] atmel_serial: Pass fixed register mappings through platform_data

In order to initialize the serial console early, the atmel_serial
driver had to do a hack where it compared the physical address of the
port with an address known to be permanently mapped, and used it as a
virtual address. This got around the limitation that ioremap() isn't
always available when the console is being initalized.

This patch removes that hack and replaces it with a new "regs" field
in struct atmel_uart_data that the board-specific code can initialize
to a fixed virtual mapping for platform devices where this is possible.
It also initializes the DBGU's regs field with the address the driver
used to check against.

On AVR32, the "regs" field is initialized from the physical base
address when this it can be accessed through a permanently 1:1 mapped
segment, i.e. the P4 segment.

If regs is NULL, the console initialization is delayed until the "real"
driver is up and running and ioremap() can be used.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] atmel_serial: Rename at91_register_uart_fns
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:07 +0000 (16:02 +0200)] 
[PATCH] atmel_serial: Rename at91_register_uart_fns

Rename at91_register_uart_fns and associated structs and variables
to make it consistent with the atmel_ prefix used by the rest of
the driver.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] serial: Rename PORT_AT91 -> PORT_ATMEL
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:06 +0000 (16:02 +0200)] 
[PATCH] serial: Rename PORT_AT91 -> PORT_ATMEL

The at91_serial driver can be used with both AT32 and AT91 devices
from Atmel and has therefore been renamed atmel_serial. The only
thing left is to rename PORT_AT91 PORT_ATMEL.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] at91_serial -> atmel_serial: Internal names
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:05 +0000 (16:02 +0200)] 
[PATCH] at91_serial -> atmel_serial: Internal names

Prefix all internal functions and variables with atmel_ instead of
at91_.

The at91_register_uart_fns() stuff is left as is since I can't find
any actual users of it.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] at91_serial -> atmel_serial: Public definitions
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:04 +0000 (16:02 +0200)] 
[PATCH] at91_serial -> atmel_serial: Public definitions

Rename the following public definitions:
  * AT91_NR_UART -> ATMEL_MAX_UART
  * struct at91_uart_data -> struct atmel_uart_data
  * at91_default_console_device -> atmel_default_console_device

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] at91_serial -> atmel_serial: Platform device name
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:03 +0000 (16:02 +0200)] 
[PATCH] at91_serial -> atmel_serial: Platform device name

Rename the "at91_usart" platform driver "atmel_usart" and update
platform devices accordingly.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] at91_serial -> atmel_serial: Kconfig symbols
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:02 +0000 (16:02 +0200)] 
[PATCH] at91_serial -> atmel_serial: Kconfig symbols

Rename the following Kconfig symbols:
  * CONFIG_SERIAL_AT91 -> CONFIG_SERIAL_ATMEL
  * CONFIG_SERIAL_AT91_CONSOLE -> CONFIG_SERIAL_ATMEL_CONSOLE
  * CONFIG_SERIAL_AT91_TTYAT -> CONFIG_SERIAL_ATMEL_TTYAT

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] at91_serial -> atmel_serial: at91_serial.c
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:01 +0000 (16:02 +0200)] 
[PATCH] at91_serial -> atmel_serial: at91_serial.c

Rename at91_serial.c atmel_serial.c

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] at91_serial -> atmel_serial: at91rm9200_usart.h
Haavard Skinnemoen [Wed, 4 Oct 2006 14:02:00 +0000 (16:02 +0200)] 
[PATCH] at91_serial -> atmel_serial: at91rm9200_usart.h

Move include/asm/arch/at91rm9200_usart.h into drivers/serial and rename
it atmel_usart.h. Also delete AVR32's version of this file.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[MIPS] Remove remaining reference to ite_gpio.h from Kbuild
David Woodhouse [Wed, 4 Oct 2006 16:32:21 +0000 (17:32 +0100)] 
[MIPS] Remove remaining reference to ite_gpio.h from Kbuild

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] PNX8550 fixups
Vitaly Wool [Wed, 4 Oct 2006 15:19:58 +0000 (19:19 +0400)] 
[MIPS] PNX8550 fixups

This patch fixes the compilation errors on PNX8550 and hard-to-track
bug in interrupt handling.
It also corresponds to the latest changes in PNX8550 serial driver.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davej/configh
Linus Torvalds [Wed, 4 Oct 2006 16:59:57 +0000 (09:59 -0700)] 
Merge /pub/scm/linux/kernel/git/davej/configh

* master.kernel.org:/pub/scm/linux/kernel/git/davej/configh:
  Remove all inclusions of <linux/config.h>

Manually resolved trivial path conflicts due to removed files in
the sound/oss/ subdirectory.

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6
Linus Torvalds [Wed, 4 Oct 2006 16:06:16 +0000 (09:06 -0700)] 
Merge git://git./linux/kernel/git/steve/gfs2-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6: (292 commits)
  [GFS2] Fix endian bug for de_type
  [GFS2] Initialize SELinux extended attributes at inode creation time.
  [GFS2] Move logging code into log.c (mostly)
  [GFS2] Mark nlink cleared so VFS sees it happen
  [GFS2] Two redundant casts removed
  [GFS2] Remove uneeded endian conversion
  [GFS2] Remove duplicate sb reading code
  [GFS2] Mark metadata reads for blktrace
  [GFS2] Remove iflags.h, use FS_
  [GFS2] Fix code style/indent in ops_file.c
  [GFS2] streamline-generic_file_-interfaces-and-filemap gfs fix
  [GFS2] Remove readv/writev methods and use aio_read/aio_write instead (gfs bits)
  [GFS2] inode-diet: Eliminate i_blksize from the inode structure
  [GFS2] inode_diet: Replace inode.u.generic_ip with inode.i_private (gfs)
  [GFS2] Fix typo in last patch
  [GFS2] Fix direct i/o logic in filemap.c
  [GFS2] Fix bug in Makefiles for lock modules
  [GFS2] Remove (extra) fs_subsys declaration
  [GFS2/DLM] Fix trailing whitespace
  [GFS2] Tidy up meta_io code
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 4 Oct 2006 15:26:19 +0000 (08:26 -0700)] 
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [XFRM]: BEET mode
  [TCP]: Kill warning in tcp_clean_rtx_queue().
  [NET_SCHED]: Remove old estimator implementation
  [ATM]: [zatm] always *pcr in alloc_shaper()
  [ATM]: [ambassador] Change the return type to reflect reality
  [ATM]: kmalloc to kzalloc patches for drivers/atm
  [TIPC]: fix printk warning
  [XFRM]: Clearing xfrm_policy_count[] to zero during flush is incorrect.
  [XFRM] STATE: Use destination address for src hash.
  [NEIGH]: always use hash_mask under tbl lock
  [UDP]: Fix MSG_PROBE crash
  [UDP6]: Fix flowi clobbering
  [NET_SCHED]: Revert "HTB: fix incorrect use of RB_EMPTY_NODE"
  [NETFILTER]: ebt_mark: add or/and/xor action support to mark target
  [NETFILTER]: ipt_REJECT: remove largely duplicate route_reverse function
  [NETFILTER]: Honour source routing for LVS-NAT
  [NETFILTER]: add type parameter to ip_route_me_harder
  [NETFILTER]: Kconfig: fix xt_physdev dependencies

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6
Linus Torvalds [Wed, 4 Oct 2006 15:18:34 +0000 (08:18 -0700)] 
Merge /pub/scm/linux/kernel/git/willy/parisc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6: (41 commits)
  [PARISC] Kill wall_jiffies use
  [PARISC] Honour "panic_on_oops" sysctl
  [PARISC] Fix fs/binfmt_som.c
  [PARISC] Export clear_user_page to modules
  [PARISC] Make DMA routines more stubby
  [PARISC] Define pci_get_legacy_ide_irq
  [PARISC] Fix CONFIG_DEBUG_SPINLOCK
  [PARISC] Fix HPUX compat compile with current GCC
  [PARISC] Fix iounmap compile warning
  [PARISC] Add support for Quicksilver AGPGART
  [PARISC] Move LBA and SBA register defines to the common ropes.h
  [PARISC] Create shared <asm/ropes.h> header
  [PARISC] Stash the lba_device in its struct device drvdata
  [PARISC] Generalize IS_ASTRO et al to take a parisc_device like
  [PARISC] Pretty print the name of the lba type on kernel boot
  [PARISC] Remove some obsolete comments and I checked that Reo is similar to Ike
  [PARISC] Add hardware found in the rp8400
  [PARISC] Allow nested interrupts
  [PARISC] Further updates to timer_interrupt()
  [PARISC] remove halftick and copy clocktick to local var (gcc can optimize usage)
  ...

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Wed, 4 Oct 2006 15:16:37 +0000 (08:16 -0700)] 
Merge git://git./linux/kernel/git/paulus/powerpc

* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (25 commits)
  [POWERPC] Add support for the mpc832x mds board
  [POWERPC] Add initial support for the e300c2 core
  [POWERPC] Add MPC8360EMDS default dts file
  [POWERPC] Add MPC8360EMDS board support
  [POWERPC] Add QUICC Engine (QE) infrastructure
  [POWERPC] Add QE device tree node definition
  [POWERPC] Don't try to just continue if xmon has no input device
  [POWERPC] Fix a printk in pseries_mpic_init_IRQ
  [POWERPC] Get default baud rate in udbg_scc
  [POWERPC] Fix zImage.coff on oldworld PowerMac
  [POWERPC] Fix xmon=off and cleanup xmon initialisation
  [POWERPC] Cleanup include/asm-powerpc/xmon.h
  [POWERPC] Update swim3 printk after blkdev.h change
  [POWERPC] Cell interrupt rework
  POWERPC: mpc82xx merge: board-specific/platform stuff(resend)
  POWERPC: 8272ads merge to powerpc: common stuff
  POWERPC: Added devicetree for mpc8272ads board
  [POWERPC] iSeries has no legacy I/O
  [POWERPC] implement BEGIN/END_FW_FTR_SECTION
  [POWERPC] iSeries does not need pcibios_fixup_resources
  ...

17 years agoMerge branch 'audit.b32' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Wed, 4 Oct 2006 15:15:55 +0000 (08:15 -0700)] 
Merge branch 'audit.b32' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b32' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] message types updated
  [PATCH] name_count array overrun
  [PATCH] PPID filtering fix
  [PATCH] arch filter lists with < or > should not be accepted

17 years ago[PATCH] pata: teach ali about rev C8, keep pcmcia driver in sync
Alan Cox [Wed, 4 Oct 2006 11:47:14 +0000 (12:47 +0100)] 
[PATCH] pata: teach ali about rev C8, keep pcmcia driver in sync

This fixes support for rev c8 of the ALi/ULi PATA, and keeps pcmcia in
sync so ide_cs and pata_pcmcia are interchangable, both are only changes
to constants.

Right now rev 0xC8 and higher don't work with libata but 0xc8 is in the
field now.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] RTC: build fixes
Jeff Garzik [Wed, 4 Oct 2006 08:41:53 +0000 (04:41 -0400)] 
[PATCH] RTC: build fixes

Fix obvious build breakage revealed by 'make allyesconfig'
in current -git.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 4 Oct 2006 15:06:16 +0000 (08:06 -0700)] 
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] pata_artop: kill gcc warning
  [PATCH] libata: turn off NCQ if queue depth is adjusted to 1
  [PATCH] libata: cosmetic changes to constants
  [libata] DocBook minor updates, fixes
  [libata] PCI ID table cleanup in various drivers
  [libata] Print out Status register, if a BSY-sleep takes too long
  [libata] init probe_ent->private_data in a common location
  [libata] minor PCI IDE probe fixes and cleanups
  [libata] Use new PCI_VDEVICE() macro to dramatically shorten ID lists
  [PATCH] Fix reference of uninitialised memory in ata_device_add()

17 years ago[PATCH] git-powerpc: wrapper: don't require execute permissions
Andrew Morton [Wed, 4 Oct 2006 09:17:32 +0000 (02:17 -0700)] 
[PATCH] git-powerpc: wrapper: don't require execute permissions

If you lose the x bit (eg: by using patch(1)), powerpc won't build.  Be
defensive about it...

Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] kill sound/oss/*_syms.c
Adrian Bunk [Wed, 4 Oct 2006 09:17:31 +0000 (02:17 -0700)] 
[PATCH] kill sound/oss/*_syms.c

Move all EXPORT_SYMBOL's from sound/oss/*_syms.c to the files with the
actual functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] The scheduled removal of some OSS drivers
Adrian Bunk [Wed, 4 Oct 2006 09:17:22 +0000 (02:17 -0700)] 
[PATCH] The scheduled removal of some OSS drivers

This patch contains the scheduled removal of OSS drivers that:
- have ALSA drivers for the same hardware without known regressions and
- whose Kconfig options have been removed in 2.6.17.

[michal.k.k.piotrowski@gmail.com: build fix]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] RCU: CREDITS and MAINTAINERS
Josh Triplett [Wed, 4 Oct 2006 09:17:21 +0000 (02:17 -0700)] 
[PATCH] RCU: CREDITS and MAINTAINERS

Add MAINTAINERS entry for Read-Copy Update (RCU), listing Dipankar Sarma as
maintainer, and giving the URL for Paul McKenney's RCU site.  Add
MAINTAINERS entry for rcutorture, listing myself as maintainer.  Add
CREDITS entries for developers of RCU, RCU variants, and rcutorture.  Use
Paul McKenney's preferred email address in include/linux/rcupdate.h .

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Cc: Paul McKenney <paulmck@us.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: simplify/improve batch tuning
Oleg Nesterov [Wed, 4 Oct 2006 09:17:17 +0000 (02:17 -0700)] 
[PATCH] rcu: simplify/improve batch tuning

Kill a hard-to-calculate 'rsinterval' boot parameter and per-cpu
rcu_data.last_rs_qlen.  Instead, it adds adds a flag rcu_ctrlblk.signaled,
which records the fact that one of CPUs has sent a resched IPI since the
last rcu_start_batch().

Roughly speaking, we need two rcu_start_batch()s in order to move callbacks
from ->nxtlist to ->donelist.  This means that when ->qlen exceeds qhimark
and continues to grow, we should send a resched IPI, and then do it again
after we gone through a quiescent state.

On the other hand, if it was already sent, we don't need to do it again
when another CPU detects overflow of the queue.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: add sched torture type to rcutorture
Josh Triplett [Wed, 4 Oct 2006 09:17:16 +0000 (02:17 -0700)] 
[PATCH] rcu: add sched torture type to rcutorture

Implement torture testing for the "sched" variant of RCU, which uses
preempt_disable, preempt_enable, and synchronize_sched.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: add rcu_bh_sync torture type to rcutorture
Josh Triplett [Wed, 4 Oct 2006 09:17:16 +0000 (02:17 -0700)] 
[PATCH] rcu: add rcu_bh_sync torture type to rcutorture

Use the newly-generic synchronous deferred free function to implement torture
testing for rcu_bh using synchronize_rcu_bh rather than the asynchronous
call_rcu_bh.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: add rcu_sync torture type to rcutorture
Josh Triplett [Wed, 4 Oct 2006 09:17:15 +0000 (02:17 -0700)] 
[PATCH] rcu: add rcu_sync torture type to rcutorture

Use the newly-generic synchronous deferred free function to implement torture
testing for RCU using synchronize_rcu rather than the asynchronous call_rcu.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: refactor srcu_torture_deferred_free to work for any implementation
Josh Triplett [Wed, 4 Oct 2006 09:17:14 +0000 (02:17 -0700)] 
[PATCH] rcu: refactor srcu_torture_deferred_free to work for any implementation

Make srcu_torture_deferred_free use cur_ops->sync() so it will work for any
implementation.  Move and rename it in preparation for use in the ops of other
implementations.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] RCU: add fake writers to rcutorture
Josh Triplett [Wed, 4 Oct 2006 09:17:13 +0000 (02:17 -0700)] 
[PATCH] RCU: add fake writers to rcutorture

rcutorture currently has one writer and an arbitrary number of readers.  To
better exercise some of the code paths in RCU implementations, add fake
writer threads which call the synchronize function for the RCU variant in a
loop, with a delay between calls to arrange for different numbers of
writers running in parallel.

[bunk@stusta.de: cleanup]
Acked-by: Paul McKenney <paulmck@us.ibm.com>
Cc: Dipkanar Sarma <dipankar@in.ibm.com>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: Fix sign bug making rcu_random always return the same sequence
Josh Triplett [Wed, 4 Oct 2006 09:17:12 +0000 (02:17 -0700)] 
[PATCH] rcu: Fix sign bug making rcu_random always return the same sequence

rcu_random uses a counter rrs_count to occasionally mix data from
get_random_bytes into the state of its pseudorandom generator.  However,
the rrs_counter gets declared as an unsigned long, and rcu_random checks
for --rrs_count < 0, so this code will never mix any real random data into
the state, and will thus always return the same sequence of random numbers.

Also, change the return value of rcu_random from long to unsigned long, to
avoid potential issues caused by the use of the % operator, which can
return negative values for negative left operands.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: Avoid kthread_stop on invalid pointer if rcutorture reader startup fails
Josh Triplett [Wed, 4 Oct 2006 09:17:11 +0000 (02:17 -0700)] 
[PATCH] rcu: Avoid kthread_stop on invalid pointer if rcutorture reader startup fails

rcu_torture_init kmallocs the array of reader threads, then creates each
one with kthread_run, cleaning up with rcu_torture_cleanup if this fails.
rcu_torture_cleanup calls kthread_stop on any non-NULL pointer in the
array; however, any readers after the one that failed to start up will have
invalid pointers, not null pointers.  Avoid this by using kzalloc instead.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: Mention rcu_bh in description of rcutorture's torture_type parameter
Josh Triplett [Wed, 4 Oct 2006 09:17:10 +0000 (02:17 -0700)] 
[PATCH] rcu: Mention rcu_bh in description of rcutorture's torture_type parameter

The comment for rcutorture's torture_type parameter only lists the RCU
variants rcu and srcu, but not rcu_bh; add rcu_bh to the list.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rcu: Add MODULE_AUTHOR to rcutorture module
Josh Triplett [Wed, 4 Oct 2006 09:17:09 +0000 (02:17 -0700)] 
[PATCH] rcu: Add MODULE_AUTHOR to rcutorture module

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] cpufreq: make the transition_notifier chain use SRCU
Alan Stern [Wed, 4 Oct 2006 09:17:06 +0000 (02:17 -0700)] 
[PATCH] cpufreq: make the transition_notifier chain use SRCU

This patch (as762) changes the cpufreq_transition_notifier_list from a
blocking_notifier_head to an srcu_notifier_head.  This will prevent errors
caused attempting to call down_read() to access the notifier chain at a
time when interrupts must remain disabled, during system suspend.

It's not clear to me whether this is really necessary; perhaps the chain
could be made into an atomic_notifier.  However a couple of the callout
routines do use blocking operations, so this approach seems safer.

The head of the notifier chain needs to be initialized before use; this is
done by an __init routine at core_initcall time.  If this turns out not to
be a good choice, it can easily be changed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Jesse Brandeburg <jesse.brandeburg@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] SRCU: report out-of-memory errors
Alan Stern [Wed, 4 Oct 2006 09:17:05 +0000 (02:17 -0700)] 
[PATCH] SRCU: report out-of-memory errors

Currently the init_srcu_struct() routine has no way to report out-of-memory
errors.  This patch (as761) makes it return -ENOMEM when the per-cpu data
allocation fails.

The patch also makes srcu_init_notifier_head() report a BUG if a notifier
head can't be initialized.  Perhaps it should return -ENOMEM instead, but
in the most likely cases where this might occur I don't think any recovery
is possible.  Notifier chains generally are not created dynamically.

[akpm@osdl.org: avoid statement-with-side-effect in macro]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add SRCU-based notifier chains
Alan Stern [Wed, 4 Oct 2006 09:17:04 +0000 (02:17 -0700)] 
[PATCH] Add SRCU-based notifier chains

This patch (as751) adds a new type of notifier chain, based on the SRCU
(Sleepable Read-Copy Update) primitives recently added to the kernel.  An
SRCU notifier chain is much like a blocking notifier chain, in that it must
be called in process context and its callout routines are allowed to sleep.
 The difference is that the chain's links are protected by the SRCU
mechanism rather than by an rw-semaphore, so calling the chain has
extremely low overhead: no memory barriers and no cache-line bouncing.  On
the other hand, unregistering from the chain is expensive and the chain
head requires special runtime initialization (plus cleanup if it is to be
deallocated).

SRCU notifiers are appropriate for notifiers that will be called very
frequently and for which unregistration occurs very seldom.  The proposed
"task notifier" scheme qualifies, as may some of the network notifiers.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] srcu-3: add SRCU operations to rcutorture
Paul E. McKenney [Wed, 4 Oct 2006 09:17:03 +0000 (02:17 -0700)] 
[PATCH] srcu-3: add SRCU operations to rcutorture

Adds SRCU operations to rcutorture and updates rcutorture documentation.
Also increases the stress imposed by the rcutorture test.

[bunk@stusta.de: make needlessly global code static]
Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com>
Cc: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] srcu-3: RCU variant permitting read-side blocking
Paul E. McKenney [Wed, 4 Oct 2006 09:17:02 +0000 (02:17 -0700)] 
[PATCH] srcu-3: RCU variant permitting read-side blocking

Updated patch adding a variant of RCU that permits sleeping in read-side
critical sections.  SRCU is as follows:

o Each use of SRCU creates its own srcu_struct, and each
srcu_struct has its own set of grace periods.  This is
critical, as it prevents one subsystem with a blocking
reader from holding up SRCU grace periods for other
subsystems.

o The SRCU primitives (srcu_read_lock(), srcu_read_unlock(),
and synchronize_srcu()) all take a pointer to a srcu_struct.

o The SRCU primitives must be called from process context.

o srcu_read_lock() returns an int that must be passed to
the matching srcu_read_unlock().  Realtime RCU avoids the
need for this by storing the state in the task struct,
but SRCU needs to allow a given code path to pass through
multiple SRCU domains -- storing state in the task struct
would therefore require either arbitrary space in the
task struct or arbitrary limits on SRCU nesting.  So I
kicked the state-storage problem up to the caller.

Of course, it is not permitted to call synchronize_srcu()
while in an SRCU read-side critical section.

o There is no call_srcu().  It would not be hard to implement
one, but it seems like too easy a way to OOM the system.
(Hey, we have enough trouble with call_rcu(), which does
-not- permit readers to sleep!!!)  So, if you want it,
please tell me why...

[josht@us.ibm.com: sparse notation]
Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] htirq: tidy up the htirq code
Eric W. Biederman [Wed, 4 Oct 2006 09:17:01 +0000 (02:17 -0700)] 
[PATCH] htirq: tidy up the htirq code

This moves the declarations for the architecture helpers into
include/linux/htirq.h from the generic include/linux/pci.h.  Hopefully this
will make this distinction clearer.

htirq.h is included where it is needed.

The dependency on the msi code is fixed and removed.

The Makefile is tidied up.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg KH <greg@kroah.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] msi: move the ia64 code into arch/ia64
Eric W. Biederman [Wed, 4 Oct 2006 09:17:00 +0000 (02:17 -0700)] 
[PATCH] msi: move the ia64 code into arch/ia64

This is just a few makefile tweaks and some file renames.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg KH <greg@kroah.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] msi: refactor and move the msi irq_chip into the arch code
Eric W. Biederman [Wed, 4 Oct 2006 09:16:59 +0000 (02:16 -0700)] 
[PATCH] msi: refactor and move the msi irq_chip into the arch code

It turns out msi_ops was simply not enough to abstract the architecture
specific details of msi.  So I have moved the resposibility of constructing
the struct irq_chip to the architectures, and have two architecture specific
functions arch_setup_msi_irq, and arch_teardown_msi_irq.

For simple architectures those functions can do all of the work.  For
architectures with platform dependencies they can call into the appropriate
platform code.

With this msi.c is finally free of assuming you have an apic, and this
actually takes less code.

The helpers for the architecture specific code are declared in the linux/msi.h
to keep them separate from the msi functions used by drivers in linux/pci.h

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg KH <greg@kroah.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] msi: only use a single irq_chip for msi interrupts
Eric W. Biederman [Wed, 4 Oct 2006 09:16:57 +0000 (02:16 -0700)] 
[PATCH] msi: only use a single irq_chip for msi interrupts

The logic works like this.

Since we no longer track the state logic by hand in msi.c startup and shutdown
are no longer needed.

By updating msi_set_mask_bit to work on msi devices that do not implement a
mask bit we can always call the mask/unmask functions.

What we really have are mask and unmask so we use them to implement the .mask
and .unmask functions instead of .enable and .disable.

By switching to the handle_edge_irq handler we only need an ack function that
moves the irq if necessary.  Which removes the old end and ack functions and
their peculiar logic of sometimes disabling an irq.

This removes the reliance on pre genirq irq handling methods.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg KH <greg@kroah.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] msi: simplify msi sanity checks by adding with generic irq code
Eric W. Biederman [Wed, 4 Oct 2006 09:16:56 +0000 (02:16 -0700)] 
[PATCH] msi: simplify msi sanity checks by adding with generic irq code

Currently msi.c is doing sanity checks that make certain before an irq is
destroyed it has no more users.

By adding irq_has_action I can perform the test is a generic way, instead of
relying on a msi specific data structure.

By performing the core check in dynamic_irq_cleanup I ensure every user of
dynamic irqs has a test present and we don't free resources that are in use.

In msi.c this allows me to kill the attrib.state member of msi_desc and all of
the assciated code to maintain it.

To keep from freeing data structures when irq cleanup code is called to soon
changing dyanamic_irq_cleanup is insufficient because there are msi specific
data structures that are also not safe to free.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg KH <greg@kroah.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Initial generic hypertransport interrupt support
Eric W. Biederman [Wed, 4 Oct 2006 09:16:55 +0000 (02:16 -0700)] 
[PATCH] Initial generic hypertransport interrupt support

This patch implements two functions ht_create_irq and ht_destroy_irq for
use by drivers.  Several other functions are implemented as helpers for
arch specific irq_chip handlers.

The driver for the card I tested this on isn't yet ready to be merged.
However this code is and hypertransport irqs are in use in a few other
places in the kernel.  Not that any of this will get merged before 2.6.19

Because the ipath-ht400 is slightly out of spec this code will need to be
generalized to work there.

I think all of the powerpc uses are for a plain interrupt controller in a
chipset so support for native hypertransport devices is a little less
interesting.

However I think this is a half way decent model on how to separate arch
specific and generic helper code, and I think this is a functional model of
how to get the architecture dependencies out of the msi code.

[akpm@osdl.org: Kconfig fix]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg KH <greg@kroah.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Add Hypertransport capability defines
Eric W. Biederman [Wed, 4 Oct 2006 09:16:54 +0000 (02:16 -0700)] 
[PATCH] Add Hypertransport capability defines

This adds defines for the hypertransport capability subtypes and starts
using them a little.

[akpm@osdl.org: fix typo]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: Kill irq compression
Eric W. Biederman [Wed, 4 Oct 2006 09:16:53 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: Kill irq compression

With more irqs in the system we don't need this.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: Kill gsi_irq_sharing
Eric W. Biederman [Wed, 4 Oct 2006 09:16:52 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: Kill gsi_irq_sharing

After raising the number of irqs the system supports this function is no
longer necessary.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: make vector_irq per cpu
Eric W. Biederman [Wed, 4 Oct 2006 09:16:51 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: make vector_irq per cpu

This refactors the irq handling code to make the vectors a per cpu resource so
the same vector number can be simultaneously used on multiple cpus for
different irqs.

This should make systems that were hitting limits on the total number of irqs
much more livable.

[akpm@osdl.org: build fix]
[akpm@osdl.org: __target_IO_APIC_irq is unneeded on UP]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: Make the external irq handlers report their vector, not...
Eric W. Biederman [Wed, 4 Oct 2006 09:16:50 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: Make the external irq handlers report their vector, not the irq number

This is a small pessimization but it paves the way for making this information
per cpu.  Which allows the the maximum number of IRQS to become NR_CPUS*224.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: irq: generalize the check for HARDIRQ_BITS
Eric W. Biederman [Wed, 4 Oct 2006 09:16:49 +0000 (02:16 -0700)] 
[PATCH] genirq: irq: generalize the check for HARDIRQ_BITS

This patch adds support for systems that cannot receive every interrupt on a
single cpu simultaneously, in the check to see if we have enough HARDIRQ_BITS.

MAX_HARDIRQS_PER_CPU becomes the count of the maximum number of hardare
generated interrupts per cpu.

On architectures that support per cpu interrupt delivery this can be a
significant space savings and scalability bonus.

This patch adds support for systems that cannot receive every interrupt on

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: irq: remove msi hacks
Eric W. Biederman [Wed, 4 Oct 2006 09:16:48 +0000 (02:16 -0700)] 
[PATCH] genirq: irq: remove msi hacks

Because of the nasty way that CONFIG_PCI_MSI was implemented we wound up with
set_irq_info and set_native_irq_info, with move_irq and move_native_irq.  Both
functions did the same thing but they were built and called under different
circumstances.  Now that the msi hacks are gone we can kill move_irq and
set_irq_info.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: i386 irq: Remove the msi assumption that irq == vector
Eric W. Biederman [Wed, 4 Oct 2006 09:16:47 +0000 (02:16 -0700)] 
[PATCH] genirq: i386 irq: Remove the msi assumption that irq == vector

This patch removes the change in behavior of the irq allocation code when
CONFIG_PCI_MSI is defined.  Removing all instances of the assumption that irq
== vector.

create_irq is rewritten to first allocate a free irq and then to assign that
irq a vector.

assign_irq_vector is made static and the AUTO_ASSIGN case which allocates an
vector not bound to an irq is removed.

The ioapic vector methods are removed, and everything now works with irqs.

The definition of NR_IRQS no longer depends on CONFIG_PCI_MSI

[akpm@osdl.org: cleanup]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: Remove the msi assumption that irq == vector
Eric W. Biederman [Wed, 4 Oct 2006 09:16:46 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: Remove the msi assumption that irq == vector

This patch removes the change in behavior of the irq allocation code when
CONFIG_PCI_MSI is defined.  Removing all instances of the assumption that irq
== vector.

create_irq is rewritten to first allocate a free irq and then to assign that
irq a vector.

assign_irq_vector is made static and the AUTO_ASSIGN case which allocates an
vector not bound to an irq is removed.

The ioapic vector methods are removed, and everything now works with irqs.

The definition of NR_IRQS no longer depends on CONFIG_PCI_MSI

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: msi: only build msi-apic.c on ia64
Eric W. Biederman [Wed, 4 Oct 2006 09:16:45 +0000 (02:16 -0700)] 
[PATCH] genirq: msi: only build msi-apic.c on ia64

After the previous changes ia64 is the only architecture useing msi-apic.c

[akpm@osdl.org: unbreak MSI on ia64]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: i386 irq: Move msi message composition into io_apic.c
Eric W. Biederman [Wed, 4 Oct 2006 09:16:43 +0000 (02:16 -0700)] 
[PATCH] genirq: i386 irq: Move msi message composition into io_apic.c

This removes the hardcoded assumption that irq == vector in the msi
composition code, and it allows the msi message composition to setup logical
mode, or lowest priorirty delivery mode as we do for other apic interrupts,
and with the same selection criteria.

Basically this moves the problem of what is in the msi message into the
architecture irq management code where it belongs.  Not in a generic layer
that doesn't have enough information to compose msi messages properly.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: Move msi message composition into io_apic.c
Eric W. Biederman [Wed, 4 Oct 2006 09:16:42 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: Move msi message composition into io_apic.c

This removes the hardcoded assumption that irq == vector in the msi
composition code, and it allows the msi message composition to setup logical
mode, or lowest priorirty delivery mode as we do for other apic interrupts,
and with the same selection criteria.

Basically this moves the problem of what is in the msi message into the
architecture irq management code where it belongs.  Not in a generic layer
that doesn't have enough information to compose msi messages properly.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: msi: make the msi code irq based and not vector based
Eric W. Biederman [Wed, 4 Oct 2006 09:16:41 +0000 (02:16 -0700)] 
[PATCH] genirq: msi: make the msi code irq based and not vector based

The msi currently allocates irqs backwards.  First it allocates a platform
dependent routing value for an interrupt the ``vector'' and then it figures
out from the vector which irq you are on.

For ia64 this is fine.  For x86 and x86_64 this is complete nonsense and makes
an enourmous mess of the irq handling code and prevents some pretty
significant cleanups in the code for handling large numbers of irqs.

This patch refactors msi.c to work in terms of irqs and create_irq/destroy_irq
for dynamically managing irqs.

Hopefully this is finally a version of msi.c that is useful on more than just
x86 derivatives.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: x86_64 irq: Dynamic irq support
Eric W. Biederman [Wed, 4 Oct 2006 09:16:40 +0000 (02:16 -0700)] 
[PATCH] genirq: x86_64 irq: Dynamic irq support

The current implementation of create_irq() is a hack but it is the current
hack that msi.c uses, and unfortunately the ``generic'' apic msi ops depend on
this hack.  Thus we are this hack of assuming irq == vector until the
depencencies in the generic irq code are removed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: i386 irq: Dynamic irq support
Eric W. Biederman [Wed, 4 Oct 2006 09:16:39 +0000 (02:16 -0700)] 
[PATCH] genirq: i386 irq: Dynamic irq support

The current implementation of create_irq() is a hack but it is the current
hack that msi.c uses, and unfortunately the ``generic'' apic msi ops depend on
this hack.  Thus we are stuck this hack of assuming irq == vector until the
depencencies in the generic msi code are removed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: ia64 irq: Dynamic irq support
Eric W. Biederman [Wed, 4 Oct 2006 09:16:38 +0000 (02:16 -0700)] 
[PATCH] genirq: ia64 irq: Dynamic irq support

[akpm@osdl.org: build fix]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: irq: add a dynamic irq creation API
Eric W. Biederman [Wed, 4 Oct 2006 09:16:37 +0000 (02:16 -0700)] 
[PATCH] genirq: irq: add a dynamic irq creation API

With the msi support comes a new concept in irq handling, irqs that are
created dynamically at run time.

Currently the msi code allocates irqs backwards.  First it allocates a
platform dependent routing value for an interrupt the ``vector'' and then it
figures out from the vector which irq you are on.

This msi backwards allocator suffers from two basic problems.  The allocator
suffers because it is trying to do something that is architecture specific in
a generic way making it brittle, inflexible, and tied to tightly to the
architecture implementation.  The alloctor also suffers from it's very
backwards nature as it has tied things together that should have no
dependencies.

To solve the basic dynamic irq allocation problem two new architecture
specific functions are added: create_irq and destroy_irq.

create_irq takes no input and returns an unused irq number, that won't be
reused until it is returned to the free poll with destroy_irq.  The irq then
can be used for any purpose although the only initial consumer is the msi
code.

destroy_irq takes an irq number allocated with create_irq and returns it to
the free pool.

Making this functionality per architecture increases the simplicity of the irq
allocation code and increases it's flexibility.

dynamic_irq_init() and dynamic_irq_cleanup() are added to automate the
irq_desc initializtion that should happen for dynamic irqs.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: msi: simplify the msi irq limit policy
Eric W. Biederman [Wed, 4 Oct 2006 09:16:35 +0000 (02:16 -0700)] 
[PATCH] genirq: msi: simplify the msi irq limit policy

Currently we attempt to predict how many irqs we will be able to allocate with
msi using pci_vector_resources and some complicated accounting, and then we
only allow each device as many irqs as we think are available on average.

Only the s2io driver even takes advantage of this feature all other drivers
have a fixed number of irqs they need and bail if they can't get them.

pci_vector_resources is inaccurate if anyone ever frees an irq.  The whole
implmentation is racy.  The current irq limit policy does not appear to make
sense with current drivers.  So I have simplified things.  We can revisit this
we we need a more sophisticated policy.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: msi: refactor the msi_ops
Eric W. Biederman [Wed, 4 Oct 2006 09:16:34 +0000 (02:16 -0700)] 
[PATCH] genirq: msi: refactor the msi_ops

The current msi_ops are short sighted in a number of ways, this patch attempts
to fix the glaring deficiences.

- Report in msi_ops if a 64bit address is needed in the msi message, so we
  can fail 32bit only msi structures.

- Send and receive a full struct msi_msg in both setup and target.  This is
  a little cleaner and allows for architectures that need to modify the data
  to retarget the msi interrupt to a different cpu.

- In target pass in the full cpu mask instead of just the first cpu in case
  we can make use of the full cpu mask.

- Operate in terms of irqs and not vectors, currently there is still a 1-1
  relationship but on architectures other than ia64 I expect this will change.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] genirq: msi: implement helper functions read_msi_msg and write_msi_msg
Eric W. Biederman [Wed, 4 Oct 2006 09:16:33 +0000 (02:16 -0700)] 
[PATCH] genirq: msi: implement helper functions read_msi_msg and write_msi_msg

In support of this I also add a struct msi_msg that captures the the two
address and one data field ina typical msi message, and I remember the pos and
if the address is 64bit in struct msi_desc.

This makes the code a little more readable and easier to maintain, and paves
the way to further simplfications.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>