1. 16 7月, 2010 2 次提交
  2. 14 7月, 2010 1 次提交
  3. 04 7月, 2010 1 次提交
  4. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  5. 22 3月, 2010 1 次提交
  6. 10 3月, 2010 1 次提交
  7. 09 3月, 2010 1 次提交
  8. 04 2月, 2010 1 次提交
  9. 30 1月, 2010 1 次提交
    • D
      Input: implement input filters · ef7995f4
      Dmitry Torokhov 提交于
      Sometimes it is desirable to suppress certain events from reaching
      input handlers and thus user space. One such example is Mac mouse
      button emulation code which catches certain key presses and converts
      them into button clicks as if they were emitted by a virtual mouse.
      The original key press events should be completely suppressed,
      otherwise user space will be confused, and while keyboard driver
      does it on its own evdev is blissfully unaware of this arrangement.
      
      This patch adds notion of 'filter' to the standard input handlers,
      which may flag event as filtered thus preventing it from reaching
      other input handlers. Filters don't (nor will they ever) have a
      notion of priority relative to each other, input core will run all
      of them first and any one of them may mark event as filtered.
      
      This patch is inspired by similar patch by Matthew Garret but the
      implementation and intended usage are quite different.
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      ef7995f4
  10. 29 1月, 2010 1 次提交
  11. 13 1月, 2010 1 次提交
  12. 06 1月, 2010 2 次提交
  13. 12 12月, 2009 1 次提交
  14. 02 12月, 2009 1 次提交
  15. 13 11月, 2009 1 次提交
  16. 14 10月, 2009 1 次提交
    • D
      Input: fix locking issue in /proc/bus/input/ handlers · 1572ca2a
      Dmitry Torokhov 提交于
      input_devices_seq_start() uses mutex_lock_interruptible() to acquire
      the input_mutex, but doesn't properly handle the situation when the
      call fails (for example due to interrupt). Instead of returning NULL
      (which indicates that there is no more data) we should return
      ERR_PTR()-encoded error.
      
      We also need explicit flag indicating whether input_mutex was acquired
      since input_devices_seq_stop() is called whether input_devices_seq_start()
      was successful or not.
      
      The same applies to input_handlers_seq_start().
      Reported-by: Niceberg <strakh@ispras.ru>
      Reviewed-by: NJiri Kosina <jkosina@suse.cz>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      1572ca2a
  17. 05 10月, 2009 1 次提交
  18. 02 10月, 2009 1 次提交
  19. 20 9月, 2009 1 次提交
  20. 18 9月, 2009 1 次提交
  21. 16 9月, 2009 1 次提交
  22. 16 6月, 2009 1 次提交
  23. 24 5月, 2009 1 次提交
  24. 29 4月, 2009 2 次提交
    • H
      Input: add detailed multi-touch finger data report protocol · 5e5ee686
      Henrik Rydberg 提交于
      In order to utilize the full power of the new multi-touch devices, a
      way to report detailed finger data to user space is needed. This patch
      adds a multi-touch (MT) protocol which allows drivers to report details
      for an arbitrary number of fingers.
      
      The driver sends a SYN_MT_REPORT event via the input_mt_sync() function
      when a complete finger has been reported.
      
      In order to stay compatible with existing applications, the data
      reported in a finger packet must not be recognized as single-touch
      events. In addition, all finger data must bypass input filtering,
      since subsequent events of the same type refer to different fingers.
      
      A set of ABS_MT events with the desired properties are defined. The
      events are divided into categories, to allow for partial implementation.
      The minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and
      ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked.
      If the device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide
      the size of the approaching finger. Anisotropy and direction may be
      specified with ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and
      ABS_MT_ORIENTATION. Devices with more granular information may specify
      general shapes as blobs, i.e., as a sequence of rectangular shapes
      grouped together by a ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE
      may be used to specify whether the touching tool is a finger or a pen.
      Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      5e5ee686
    • H
      Input: allow certain EV_ABS events to bypass all filtering · 61994a61
      Henrik Rydberg 提交于
      With the upcoming multi-touch interface as an example, there is
      a need to make certain that all reported events actually get passed
      to the event handler. This patch equips the input core with the
      ability to bypass all filtering for certain EV_ABS events.
      Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      61994a61
  25. 12 4月, 2009 1 次提交
  26. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  27. 09 3月, 2009 1 次提交
  28. 30 1月, 2009 1 次提交
    • J
      Input: stop autorepeat timer on key release · e7b5c1ef
      Johannes Berg 提交于
      Whenever you press and then release a key, the CPU wakes up
      three times:
       * press
       * release
       * autorepeat timer exactly 250ms after press
      
      The autorepeat timer has nothing to do, obviously, since you already
      have released the key, so stop it on key release.
      
      [dtor@mail.ru: This changes autorepeat behavior a bit since we now stop
       autorepeat even if key that is being released is not the one that is
       being auto-repeated, but I believe the new behavior is better.]
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      e7b5c1ef
  29. 30 10月, 2008 1 次提交
  30. 30 6月, 2008 1 次提交
  31. 21 6月, 2008 1 次提交
  32. 29 4月, 2008 2 次提交
  33. 31 1月, 2008 1 次提交
  34. 21 1月, 2008 2 次提交
  35. 03 1月, 2008 1 次提交