31 Mar, 2011

1 commit


21 Jul, 2008

1 commit


01 Jul, 2008

1 commit

  • This contains the following cleanups:
    - make the following needlessly global code static:
    - adb.c: adb_controller
    - adb.c: adb_init()
    - adbhid.c: adb_to_linux_keycodes[] (also make it const)
    - via-pmu68k.c: backlight_level
    - via-pmu68k.c: backlight_enabled
    - remove the following unused code:
    - via-pmu68k.c: sleep_notifier_list

    Signed-off-by: Adrian Bunk
    Acked-by: Geert Uytterhoeven
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Adrian Bunk
     

17 May, 2008

2 commits

  • If the adbhid module parameter restore_capslock_events is used,
    pressing the power button may confuse the capslock state. This is
    because the power button release scancode (0xff) is sometimes the same
    as the capslock press/release scancode.

    This fix adds yet another flag to track the state of the power button
    so that it works independently of capslock.

    Signed-off-by: Rodney Lorrimar
    Signed-off-by: Dmitry Torokhov

    Rodney Lorrimar
     
  • If the adbhid module parameter restore_capslock_events is used,
    sometimes capslock will get stuck down after resuming.

    My fix is to remember the capslock state before suspend and then
    ignore the first 'caps lock key down' message after resume if the
    capslock LED was on before suspending.

    Signed-off-by: Rodney Lorrimar
    Signed-off-by: Dmitry Torokhov

    Rodney Lorrimar
     

15 Jan, 2008

1 commit

  • If the user has turned on the "restore_caplock_events" parameter, the
    code mangles the capslock events correctly, then erroneously ignores
    those events. Fix logic to allow correct fallthrough.

    Signed-off-by: Andy Wingo
    Acked-by: Andrew McNabb
    Cc: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Wingo
     

20 Oct, 2007

1 commit

  • get rid of input BIT* duplicate defines

    use newly global defined macros for input layer. Also remove includes of
    input.h from non-input sources only for BIT macro definiton. Define the
    macro temporarily in local manner, all those local definitons will be
    removed further in this patchset (to not break bisecting).
    BIT macro will be globally defined (1<
    Cc:
    Acked-by: Jiri Kosina
    Cc:
    Acked-by: Marcel Holtmann
    Cc:
    Acked-by: Mauro Carvalho Chehab
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

17 Oct, 2007

1 commit

  • This fixes a lost 'key' variable declaration that went missing in a
    mismerge (commit b981d8b3f5e008ff10d993be633ad00564fc22cd)

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

13 Oct, 2007

1 commit


11 Oct, 2007

1 commit

  • The ADB keyboard, which is used for Apple PowerBooks, has strange behavior
    with regard to the capslock key. It keeps track of capslock state
    internally, and it sends a keycode when capslock is engaged and a keycode
    when capslock is disengaged.

    When the current adbhid driver sees that the capslock key is pressed or
    released, it creates both a keypress event and a keyrelease event
    simultaneously. This results in normal capslock behavior.

    While this works, it makes it impossible to remap the capslock key to be a
    control key. However, by translating the 0xff keycode into capslock
    keycodes, we can restore the missing capslock events and make it possible
    to remap the capslock key.

    With this patch, the adbhid driver will translate these 0xff keycodes into
    capslock keypresses and keyreleases if
    /sys/module/adbhid/parameters/restore_capslock_events is set to 1.
    Otherwise it will retain the current behavior. This option is off by
    default because occasionally the 0xff keycode is not a capslock event, and
    a mistake may require the user to tap the capslock key.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Andrew McNabb
    Signed-off-by: Andrew Morton
    Signed-off-by: Dmitry Torokhov

    Andrew McNabb
     

22 Sep, 2007

1 commit

  • When a Fn key is used in combination with another key in ADB keyboards
    it will generate a Fn event and then a second event that can be a
    different key than pressed (Fn + F1 for instance can generate Fn +
    brightness down if it's configured like that). This enables the
    reporting of the Fn key to the input system.

    As Fn is a dead key for most purposes, it's useful to report it so
    applications can make use of it. One example is apple_mouse
    (https://jake.ruivo.org/uinputd/trunk/apple_mouse/) that emulates the
    second and third keys using a combination of keyboard keys and the mouse
    button. Other applications may use the KEY_FN as a modifier as well.
    I've been updating and using this patch for months without problems.

    Signed-off-by: Aristeu Rozanski
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Aristeu Rozanski
     

09 May, 2007

1 commit


13 Feb, 2007

1 commit


24 Nov, 2006

1 commit


05 Oct, 2006

1 commit

  • 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
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

04 Oct, 2006

1 commit


23 Sep, 2006

1 commit


01 Aug, 2006

1 commit

  • This patch fixes several problems:
    - The legacy backlight value might be set at interrupt time. Introduced
    a worker to prevent it from directly calling the backlight code.
    - via-pmu allows the backlight to be grabbed, in which case we need to
    prevent other kernel code from changing the brightness.
    - Don't send PMU requests in via-pmu-backlight when the machine is about
    to sleep or waking up.
    - More Kconfig fixes.

    Signed-off-by: Michael Hanselmann
    Cc: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann
     

01 Jul, 2006

1 commit


26 Jun, 2006

2 commits

  • Fix a mispelling of the korean alphabet name in the input subsystem.
    See http://en.wikipedia.org/wiki/Hangeul#Names for more details.

    KEY_HANGUEL left to not break people

    Signed-off-by: Jerome Pinot
    Signed-off-by: Dmitry Torokhov

    Jerome Pinot
     
  • This patch contains a total rewrite of the backlight infrastructure for
    portable Apple computers. Backward compatibility is retained. A sysfs
    interface allows userland to control the brightness with more steps than
    before. Userland is allowed to upload a brightness curve for different
    monitors, similar to Mac OS X.

    [akpm@osdl.org: add needed exports]
    Signed-off-by: Michael Hanselmann
    Acked-by: Benjamin Herrenschmidt
    Cc: Richard Purdie
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann
     

29 Mar, 2006

1 commit


28 Mar, 2006

2 commits

  • This removes statically assigned platform numbers and reworks the
    powerpc platform probe code to use a better mechanism. With this,
    board support files can simply declare a new machine type with a
    macro, and implement a probe() function that uses the flattened
    device-tree to detect if they apply for a given machine.

    We now have a machine_is() macro that replaces the comparisons of
    _machine with the various PLATFORM_* constants. This commit also
    changes various drivers to use the new macro instead of looking at
    _machine.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • The kernel's implementation of notifier chains is unsafe. There is no
    protection against entries being added to or removed from a chain while the
    chain is in use. The issues were discussed in this thread:

    http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2

    We noticed that notifier chains in the kernel fall into two basic usage
    classes:

    "Blocking" chains are always called from a process context
    and the callout routines are allowed to sleep;

    "Atomic" chains can be called from an atomic context and
    the callout routines are not allowed to sleep.

    We decided to codify this distinction and make it part of the API. Therefore
    this set of patches introduces three new, parallel APIs: one for blocking
    notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
    really just the old API under a new name). New kinds of data structures are
    used for the heads of the chains, and new routines are defined for
    registration, unregistration, and calling a chain. The three APIs are
    explained in include/linux/notifier.h and their implementation is in
    kernel/sys.c.

    With atomic and blocking chains, the implementation guarantees that the chain
    links will not be corrupted and that chain callers will not get messed up by
    entries being added or removed. For raw chains the implementation provides no
    guarantees at all; users of this API must provide their own protections. (The
    idea was that situations may come up where the assumptions of the atomic and
    blocking APIs are not appropriate, so it should be possible for users to
    handle these things in their own way.)

    There are some limitations, which should not be too hard to live with. For
    atomic/blocking chains, registration and unregistration must always be done in
    a process context since the chain is protected by a mutex/rwsem. Also, a
    callout routine for a non-raw chain must not try to register or unregister
    entries on its own chain. (This did happen in a couple of places and the code
    had to be changed to avoid it.)

    Since atomic chains may be called from within an NMI handler, they cannot use
    spinlocks for synchronization. Instead we use RCU. The overhead falls almost
    entirely in the unregister routine, which is okay since unregistration is much
    less frequent that calling a chain.

    Here is the list of chains that we adjusted and their classifications. None
    of them use the raw API, so for the moment it is only a placeholder.

    ATOMIC CHAINS
    -------------
    arch/i386/kernel/traps.c: i386die_chain
    arch/ia64/kernel/traps.c: ia64die_chain
    arch/powerpc/kernel/traps.c: powerpc_die_chain
    arch/sparc64/kernel/traps.c: sparc64die_chain
    arch/x86_64/kernel/traps.c: die_chain
    drivers/char/ipmi/ipmi_si_intf.c: xaction_notifier_list
    kernel/panic.c: panic_notifier_list
    kernel/profile.c: task_free_notifier
    net/bluetooth/hci_core.c: hci_notifier
    net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_chain
    net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_expect_chain
    net/ipv6/addrconf.c: inet6addr_chain
    net/netfilter/nf_conntrack_core.c: nf_conntrack_chain
    net/netfilter/nf_conntrack_core.c: nf_conntrack_expect_chain
    net/netlink/af_netlink.c: netlink_chain

    BLOCKING CHAINS
    ---------------
    arch/powerpc/platforms/pseries/reconfig.c: pSeries_reconfig_chain
    arch/s390/kernel/process.c: idle_chain
    arch/x86_64/kernel/process.c idle_notifier
    drivers/base/memory.c: memory_chain
    drivers/cpufreq/cpufreq.c cpufreq_policy_notifier_list
    drivers/cpufreq/cpufreq.c cpufreq_transition_notifier_list
    drivers/macintosh/adb.c: adb_client_list
    drivers/macintosh/via-pmu.c sleep_notifier_list
    drivers/macintosh/via-pmu68k.c sleep_notifier_list
    drivers/macintosh/windfarm_core.c wf_client_list
    drivers/usb/core/notify.c usb_notifier_list
    drivers/video/fbmem.c fb_notifier_list
    kernel/cpu.c cpu_chain
    kernel/module.c module_notify_list
    kernel/profile.c munmap_notifier
    kernel/profile.c task_exit_notifier
    kernel/sys.c reboot_notifier_list
    net/core/dev.c netdev_chain
    net/decnet/dn_dev.c: dnaddr_chain
    net/ipv4/devinet.c: inetaddr_chain

    It's possible that some of these classifications are wrong. If they are,
    please let us know or submit a patch to fix them. Note that any chain that
    gets called very frequently should be atomic, because the rwsem read-locking
    used for blocking chains is very likely to incur cache misses on SMP systems.
    (However, if the chain's callout routines may sleep then the chain cannot be
    atomic.)

    The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
    material written by Keith Owens and suggestions from Paul McKenney and Andrew
    Morton.

    [jes@sgi.com: restructure the notifier chain initialization macros]
    Signed-off-by: Alan Stern
    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Jes Sorensen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     

07 Nov, 2005

1 commit

  • This is the remaining misc drivers/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in misc files in
    drivers/.

    Signed-off-by: Jesper Juhl
    Acked-by: Aristeu Sergio Rozanski Filho
    Acked-by: Roland Dreier
    Acked-by: Pierre Ossman
    Acked-by: Jean Delvare
    Acked-by: Greg Kroah-Hartman
    Acked-by: Len Brown
    Acked-by: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

31 Oct, 2005

1 commit


29 Oct, 2005

1 commit


01 May, 2005

1 commit


17 Apr, 2005

1 commit

  • 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!

    Linus Torvalds