- 05 Oct, 2006 1 commit
-
-
David Howells authored
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By:
David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
-
- 04 Oct, 2006 39 commits
-
-
Mark Assad authored
There is a bug in the current version of the itmtouch USB touchscreen driver. The if statment that checks if pressure is being applied to the touch screen is now missing a ! (not), so events are no longer being reported correctly. The original source code for this line was as follows: #define UCP(x) ((unsigned char*)(x)) #define UCOM(x,y,z) ((UCP((x)->transfer_buffer)[y]) & (z)) ... if (!UCOM(urb, 7, 0x20)) { And was cleaned to: unsigned char *data = urb->transfer_buffer; .... if (data[7] & 0x20) { (note the lack of '!') This has been tested on an LG L1510BF and an LG1510SF touch screen. Signed-off-by:
Mark Assad <massad@gmail.com> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Matthew Wilcox authored
klist_iter_exit() only takes one parameter. Also fix warning by adding additional brackets. Signed-off-by:
Matthew Wilcox <matthew@wil.cx>
-
David Somayajulu authored
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>
-
Jeff Garzik authored
Signed-off-by:
Jeff Garzik <jeff@garzik.org> Signed-off-by:
James Bottomley <James.Bottomley@SteelEye.com>
-
Jeff Garzik authored
- 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>
-
Jeff Garzik authored
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>
-
Jeff Garzik authored
- 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>
-
Jeff Garzik authored
- 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>
-
Jeff Garzik authored
- 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>
-
Henne authored
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>
-
Henne authored
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>
-
Peter Oberparleiter authored
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>
-
Peter Oberparleiter authored
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>
-
Ralph Wuerthner authored
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>
-
Cornelia Huck authored
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>
-
Sumant Patro authored
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>
-
Sumant Patro authored
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>
-
Sumant Patro authored
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>
-
Sumant Patro authored
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>
-
Sumant Patro authored
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>
-
Sumant Patro authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Alan Cox authored
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>
-
Jeff Garzik authored
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>
-
Alan Stern authored
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>
-
Eric W. Biederman authored
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>
-
Eric W. Biederman authored
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>
-
Eric W. Biederman authored
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>
-
Eric W. Biederman authored
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>
-