aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-9/+7
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)
2006-09-19Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov1-7/+0
2006-09-10Input: constify psmouse driverHelge Deller1-18/+24
Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-23Input: psmouse - fix Intellimouse 4.0 initializationPozsar Balazs1-7/+0
Revert the superfluous initilization causing some mice become jumpy. Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-26Input: psmouse - add support for Intellimouse 4.0Pozsar Balazs1-3/+30
Add support for the H-Wheel present on Microsoft Intellimouse 4.0 (AKA "tilt mouse") Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-26Input: fix potential overflows in driver/input/mouseDmitry Torokhov1-3/+3
Change all sprintfs into snprintfs to make sure we won't stomp on data adjacent to our buffers. Noticed by Wouter Paesen <wouter@kangaroot.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-04-29Input: psmouse - fix new device detection logicDmitry Torokhov1-1/+3
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-03-13Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov1-1/+1
2006-03-10[PATCH] Input: psmouse - disable autoresyncDmitry Torokhov1-1/+1
Automatic resynchronization in psmouse driver causes problems on some hardware so disable it by default for now. People with KVM switches that require resync can still enable it via module parameter or sysfs attribute. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-19Input: psmouse - semaphore to mutex conversionIngo Molnar1-18/+20
The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-29Input: psmouse - set name for Genius miceDmitry Torokhov1-0/+1
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14Input: psmouse - attempt to re-synchronize mouse every 5 secondsDmitry Torokhov1-64/+252
This should help driver to deal vith KVMs that reset mice when switching between boxes. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-12-21Input: psmouse - don't leave mouse asleepDmitry Torokhov1-9/+6
It looks like quite a few mice out there treat PSMOUSE_RESET_DIS as a powerdown request and turn off the light rendering the mouse unusable. Vojtech recommended to switch from PSMOUSE_RESET_DIS to full reset, however we don't want to do that everywhere as full reset is pretty slow. Instead we only use it before probing for "generic" protocols, such as IntelliMouse and Explorer, to make sure that the mouse will be woken up if it went to sleep as a result of PSMOUSE_RESET_DIS issued earlier. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-10-28[PATCH] drivers/input/mouse: convert to dynamic input_dev allocationDmitry Torokhov1-46/+53
Input: convert drivers/input/mouse to dynamic input_dev allocation This is required for input_dev sysfs integration Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-09Manual merge with LinusDmitry Torokhov1-1/+1
2005-09-07[PATCH] input: convert kcalloc to kzallocPekka Enberg1-1/+1
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-04Input: rework psmouse attributes to reduce module sizeDmitry Torokhov1-51/+66
Rearrange attribute code to use generic show and set handlers instead of replicating them for every attribute; switch to using attribute_group instead of creating all attributes manually. All this saves about 4K. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-08-08Input: psmouse - add support for IBM TrackPoint devices.Stephen Evanchik1-1/+14
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-07-15Input: psmouse - wheel mice (imps, exps) always have 3rd buttonVojtech Pavlik1-0/+2
There are wheel mice that respond to Logitech probes and report that they have only 2 buttons (such as e-Aser mouse) and this stops the wheel from being used as a middle button. Change the driver to always report BTN_MIDDLE capability if a wheel is present. Also, never reset BTN_RIGHT capability in logips2pp code - there are no Logitech mice that have only one button and if some other mice happen to respond to Logitech's query we could do the wrong thing. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-06-01Input: psmouse - export protocol as a sysfs per-device attributeDmitry Torokhov1-48/+243
to allow easy switching at run-time. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-06-01Input: pmouse - introduce proper locking so state-changingDmitry Torokhov1-10/+44
operations do not iterfere with each other. Also make sure that serio core takes serio->drv_sem not only for connect/disconnect but for reconnect too. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29Input: lifebook - adjust initialization routines to be in line withDmitry Torokhov1-2/+12
the rest of protocols in preparation to dynamic protocol switching. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29Input: lifebook - various cleanups:Dmitry Torokhov1-2/+0
- do not try to set rate and resolution in init method, let psmouse core do it for us. This also removes special quirks from the core; - do not disable mouse before doing full reset - meaningless; - some formatting and whitespace cleanups. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29Input: Add Fujitsu Lifebook B-series touchscreen driver.Kenan Esau1-3/+9
From: Kenan Esau <kenan.esau@conan.de> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-28Input: Workaround for Sunrex K8561 IR Keyboard/Mouse. The mouseVojtech Pavlik1-1/+4
sends an incorrect ID and wasn't recognized. Reported-by: Stefan Seyfried <seife@suse.de> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-28Input: Fix a warning in psmouse-base.cAndrew Morton1-1/+1
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+1011
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!