18 Oct, 2007

1 commit

  • Create an inline function for clflush(), with the proper arguments,
    and use it instead of hard-coding the instruction.

    This also removes one instance of hard-coded wbinvd, based on a patch
    by Bauder de Oliveira Costa.

    [ tglx: arch/x86 adaptation ]

    Cc: Andi Kleen
    Cc: Glauber de Oliveira Costa
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    H. Peter Anvin
     

17 Oct, 2007

23 commits

  • Fix bug flagged by a variable-used-uninitialized warning.

    [akpm@linux-foundation.org: coding-style]
    Signed-off-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     
  • Remove NULL initializers and clean whitespace a bit.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Signed-off-by: Rusty Russell
    Acked-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • This changes hvc_init() to be called only when someone actually uses the
    hvc_console driver. Dave Jones complained when profiling bootup.

    hvc_console used to only be for Power aka pSeries: now lguest and Xen both
    want it built-in in case the kernel is a guest under one of those, even
    though usually it will be a native boot.

    Signed-off-by: Rusty Russell
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • This adds three new functions (or in one case to be more exact makes it
    always available)

    tty_termios_copy_hw

    Copies all the hardware settings from one termios structure to the other.
    This is intended for drivers that support little or no hardware setting

    tty_termios_encode_baud_rate

    Allows you to set the input and output baud rate in a termios structure. A
    driver is supposed to set the resulting baud rate from a request so most
    will want to use this function to set the resulting input and output rates
    to match the hardware values. Internally it knows about keeping Bxxx
    encoding when possible to maximise compatibility.

    tty_encode_baud_rate

    As above but for the tty's own current termios structure

    I suspect this will initially need some tweaking as it gets enabled by
    driver patches over the next few mm cycles so consider this lot -mm only
    for the moment so it can stabilize and end up neat before it goes to base.

    I've tried not to break any obscure architectures - if you get a speed you
    can't represent the code will print warnings on non updated termios systems
    but not break.

    Once this is merged and seems sane I've got a growing pile of driver
    updates to use it - notably for USB serial drivers.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • As of now, the kernel defaults to non-unicode and XLATE for the keyboard.
    We've been changing this in Fedora, but that requires patching the defaults
    in the kernel.

    The attached introduces CONFIG_VT_UNICODE, which sets the console in
    unicode mode by default on boot, including both the virtual terminal and
    the keyboard driver.

    Signed-off-by: Bill Nottingham
    Cc: Samuel Thibault
    Cc: Dmitry Torokhov
    Cc: Jiri Kosina
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bill Nottingham
     
  • The Coverity checker spotted that we'd have already oops'ed if "tty"
    was NULL.

    Since "tty" can't be NULL when we reach this line of code this patch
    removes the NULL check.

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • We simply define it to the same value. Nowdays the TTY flip value is
    irrelevant but the value it used is as good as any so why risk breaking it

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • There have been issues with non-latin1 diacritics and unicode.
    http://bugzilla.kernel.org/show_bug.cgi?id=7746

    Git 759448f459234bfcf34b82471f0dba77a9aca498 `Kernel utf-8 handling'
    partly resolved it by adding conversion between diacritics and
    unicode. The patch below goes further by just turning diacritics into
    unicode, hence providing better future support. The kbd support can be
    fetched from
    http://bugzilla.kernel.org/attachment.cgi?id=12313

    This was tested in all of latin1, latin9, latin2 and unicode with french
    and czech dead keys.

    Turn the kernel accent_table into unicode, and extend ioctls KDGKBDIACR
    and KDSKBDIACR into their equivalents KDGKBDIACRUC and KDSKBDIACR.

    New function int conv_uni_to_8bit(u32 uni) for converting unicode into 8bit
    _input_. No, we don't want to store the translation, as it is potentially
    sparse and large.

    Signed-off-by: Samuel Thibault
    Cc: Jan Engelhardt
    Cc: "Antonino A. Daplas"
    Cc: David Woodhouse
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel Thibault
     
  • Driver does
    proc_mkdir("ipmi", NULL);
    but
    remove_proc_entry(proc_ipmi_root->name, &proc_root);

    This is OK and working if only slightly inconsistent. Also changing
    proc_root to NULL will help OpenVZ which has multiple proc roots and, as we
    now know, requires matching parents in such cases.

    Signed-off-by: Alexey Dobriyan
    Cc: Corey Minyard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • If we discover the TIS TPM device via PNP, use the PNP IRQ information rather
    than probing for an IRQ. If PNP shows no IRQ, run the TPM in polling mode.

    Tested-by:
    Signed-off-by: Bjorn Helgaas
    Cc: Kylene Hall
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • drivers/char/ip2/ip2main.c | 104398 -> 104346 (-52 bytes)
    drivers/char/ip2/ip2main.o | 210710 -> 210702 (-8 bytes)

    Signed-off-by: Mariusz Kozlowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mariusz Kozlowski
     
  • drivers/char/consolemap.c | 22678 -> 22650 (-28 bytes)
    drivers/char/consolemap.o | 90113 -> 90029 (-84 bytes)

    Signed-off-by: Mariusz Kozlowski
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mariusz Kozlowski
     
  • * Remove stupid comments, like, at the beginning of every function that
    function begins (twice per function) and at the end (once)
    * Remove trailing or otherwise broken whitespace as per let c_space_errors=1
    * Reformat comments to fit it into 80 columns and remove stupid ------------'s.
    * Indent case labels on the same column where switch begins
    * other minor CS tweaks not worth mentioning

    Signed-off-by: Alexey Dobriyan
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • It's *wrong* to have
    #define log2(n) ffz(~(n))
    It should be *reversed*:
    #define log2(n) flz(~(n))
    or
    #define log2(n) fls(n)
    or just use
    ilog2(n) defined in linux/log2.h.

    This patch follows the last solution, recommended by Andrew Morton.

    Cc:
    Cc: Mingming Cao
    Cc: Bjorn Helgaas
    Cc: Chris Ahna
    Cc: David Mosberger-Tang
    Cc: Kyle McMartin
    Cc: Dave Airlie
    Cc: Dave Jones
    Signed-off-by: Fengguang Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fengguang Wu
     
  • This patch cleans up duplicate includes in
    drivers/char/

    Signed-off-by: Jesper Juhl
    Cc: Richard Purdie
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Move the OOM killer's extern function prototypes to include/linux/oom.h and
    include it where necessary.

    [clg@fr.ibm.com: build fix]
    Cc: Andrea Arcangeli
    Acked-by: Christoph Lameter
    Signed-off-by: David Rientjes
    Signed-off-by: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • provide BDI constructor/destructor hooks

    [akpm@linux-foundation.org: compile fix]
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Move AGP and DRM menus into the video graphics support menu.
    They use 'menuconfig' so that they can all be disabled with
    one selection.
    Make the console menu use 'menuconfig' so that it can all be
    disabled with one selection.
    Make the frame buffer menu use 'menuconfig' so that it can all be
    disabled with one selection.

    Signed-off-by: Randy Dunlap
    Acked-by: Dave Airlie
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Various console drivers are able to resize the screen via the con_resize()
    hook. This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and
    VT_RESIZEX ioctl's. One particular utility, SVGATextMode, expects that
    con_resize() of the VGA console will always return success even if the
    resulting screen is not compatible with the hardware. However, this
    particular behavior of the VGA console, as reported in Kernel Bugzilla Bug
    7513, can cause undefined behavior if the user starts with a console size
    larger than 80x25.

    To work around this problem, add an extra parameter to con_resize(). This
    parameter is ignored by drivers except for vgacon. If this parameter is
    non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl
    and vgacon will always return success. If this parameter is zero, vgacon will
    return -EINVAL if the requested size is not compatible with the hardware. The
    latter is the more correct behavior.

    With this change, SVGATextMode should still work correctly while in-kernel and
    stty resize calls can expect correct behavior from vgacon.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • radeon_driver_vblank_do_wait() can become static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • The checks for node_online in the uncached allocator are made to make sure
    that memory is available on these nodes. Thus switch all the checks to use
    N_HIGH_MEMORY and to N_ONLINE.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Jes Sorensen
    Acked-by: Lee Schermerhorn
    Acked-by: Bob Picco
    Cc: Nishanth Aravamudan
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • The commit b5810039a54e5babf428e9a1e89fc1940fabff11 contains the note

    A last caveat: the ZERO_PAGE is now refcounted and managed with rmap
    (and thus mapcounted and count towards shared rss). These writes to
    the struct page could cause excessive cacheline bouncing on big
    systems. There are a number of ways this could be addressed if it is
    an issue.

    And indeed this cacheline bouncing has shown up on large SGI systems.
    There was a situation where an Altix system was essentially livelocked
    tearing down ZERO_PAGE pagetables when an HPC app aborted during startup.
    This situation can be avoided in userspace, but it does highlight the
    potential scalability problem with refcounting ZERO_PAGE, and corner
    cases where it can really hurt (we don't want the system to livelock!).

    There are several broad ways to fix this problem:
    1. add back some special casing to avoid refcounting ZERO_PAGE
    2. per-node or per-cpu ZERO_PAGES
    3. remove the ZERO_PAGE completely

    I will argue for 3. The others should also fix the problem, but they
    result in more complex code than does 3, with little or no real benefit
    that I can see.

    Why? Inserting a ZERO_PAGE for anonymous read faults appears to be a
    false optimisation: if an application is performance critical, it would
    not be doing many read faults of new memory, or at least it could be
    expected to write to that memory soon afterwards. If cache or memory use
    is critical, it should not be working with a significant number of
    ZERO_PAGEs anyway (a more compact representation of zeroes should be
    used).

    As a sanity check -- mesuring on my desktop system, there are never many
    mappings to the ZERO_PAGE (eg. 2 or 3), thus memory usage here should not
    increase much without it.

    When running a make -j4 kernel compile on my dual core system, there are
    about 1,000 mappings to the ZERO_PAGE created per second, but about 1,000
    ZERO_PAGE COW faults per second (less than 1 ZERO_PAGE mapping per second
    is torn down without being COWed). So removing ZERO_PAGE will save 1,000
    page faults per second when running kbuild, while keeping it only saves
    less than 1 page clearing operation per second. 1 page clear is cheaper
    than a thousand faults, presumably, so there isn't an obvious loss.

    Neither the logical argument nor these basic tests give a guarantee of no
    regressions. However, this is a reasonable opportunity to try to remove
    the ZERO_PAGE from the pagefault path. If it is found to cause regressions,
    we can reintroduce it and just avoid refcounting it.

    The /dev/zero ZERO_PAGE usage and TLB tricks also get nuked. I don't see
    much use to them except on benchmarks. All other users of ZERO_PAGE are
    converted just to use ZERO_PAGE(0) for simplicity. We can look at
    replacing them all and maybe ripping out ZERO_PAGE completely when we are
    more satisfied with this solution.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus "snif" Torvalds

    Nick Piggin
     

16 Oct, 2007

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits)
    Input: use full RCU API
    Input: remove tsdev interface
    Input: add support for Blackfin BF54x Keypad controller
    Input: appletouch - another fix for idle reset logic
    HWMON: hdaps - switch to using input-polldev
    Input: add support for SEGA Dreamcast keyboard
    Input: omap-keyboard - don't pretend we support changing keymap
    Input: lifebook - fix X and Y axis range
    Input: usbtouchscreen - add support for GeneralTouch devices
    Input: fix open count handling in input interfaces
    Input: keyboard - add CapsShift lock
    Input: adbhid - produce all CapsLock key events
    Input: ALPS - add signature for ThinkPad R61
    Input: jornada720_kbd - send MSC_SCAN events
    Input: add support for the HP Jornada 7xx (710/720/728) touchscreen
    Input: add support for HP Jornada 7xx onboard keyboard
    Input: add support for HP Jornada onboard keyboard (HP6XX)
    Input: ucb1400_ts - use schedule_timeout_uninterruptible
    Input: xpad - fix dependancy on LEDS class
    Input: auto-select INPUT for MAC_EMUMOUSEBTN option
    ...

    Resolved conflicts manually in drivers/hwmon/applesmc.c: converting from
    a class device to a device and converting to use input-polldev created a
    few apparently trivial clashes..

    Linus Torvalds
     

15 Oct, 2007

14 commits


13 Oct, 2007

1 commit