17 Jan, 2010

19 commits

  • Commit f50de2d3 (vmscan: have kswapd sleep for a short interval and double
    check it should be asleep) can cause kswapd to enter an infinite loop if
    running on a single-CPU system. If all zones are unreclaimble,
    sleeping_prematurely return 1 and kswapd will call balance_pgdat() again.
    but it's totally meaningless, balance_pgdat() doesn't anything against
    unreclaimable zone!

    Signed-off-by: KOSAKI Motohiro
    Cc: Mel Gorman
    Reported-by: Will Newton
    Reviewed-by: Minchan Kim
    Reviewed-by: Rik van Riel
    Tested-by: Will Newton
    Reviewed-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • The change in acpi_cpufreq to use smp_call_function_any causes a warning
    when it is called since the function erroneously passes the cpu id to
    cpumask_of_node rather than the node that the cpu is on. Fix this.

    cpumask_of_node(3): node > nr_node_ids(1)
    Pid: 1, comm: swapper Not tainted 2.6.33-rc3-00097-g2c1f189 #223
    Call Trace:
    [] cpumask_of_node+0x23/0x58
    [] smp_call_function_any+0x65/0xfa
    [] ? do_drv_read+0x0/0x2f
    [] get_cur_val+0xb0/0x102
    [] get_cur_freq_on_cpu+0x74/0xc5
    [] acpi_cpufreq_cpu_init+0x417/0x515
    [] ? __down_write+0xb/0xd
    [] cpufreq_add_dev+0x278/0x922

    Signed-off-by: David John
    Cc: Suresh Siddha
    Cc: Rusty Russell
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David John
     
  • Add BUILD_BUG_ON_NOT_POWER_OF_2()

    When code relies on a constant being a power of 2:

    #define FOO 512 /* must be a power of 2 */

    it would be nice to be able to do:

    BUILD_BUG_ON(!is_power_of_2(FOO));

    However applying an inline function does not result in a compile-time
    constant that can be used with BUILD_BUG_ON(), so trying that gives
    results in:

    error: bit-field '' width not an integer constant

    As suggested by akpm, rather than monkeying around with is_power_of_2()
    and risking gcc warts about constant expressions, just create a macro
    BUILD_BUG_ON_NOT_POWER_OF_2() to encapsulate this common requirement.

    Signed-off-by: Roland Dreier
    Cc: Bart Van Assche
    Cc: David Dillow
    Cc: "Robert P. J. Day"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland Dreier
     
  • The current check for 'backward merging' within add_active_range() does
    not seem correct. start_pfn must be compared against
    early_node_map[i].start_pfn (and NOT against .end_pfn) to find out whether
    the new region is backward-mergeable with the existing range.

    Signed-off-by: Kazuhisa Ichikawa
    Acked-by: David Rientjes
    Cc: KOSAKI Motohiro
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kazuhisa Ichikawa
     
  • On my first try using them I missed that the fifos need to be power of
    two, resulting in a runtime bug. Document that requirement everywhere
    (and fix one grammar bug)

    Signed-off-by: Andi Kleen
    Acked-by: Stefani Seibold
    Cc: Roland Dreier
    Cc: Dmitry Torokhov
    Cc: Andy Walls
    Cc: Vikram Dhillon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Simple inline that checks if kfifo_init() has been executed on a fifo.

    This is useful for walking all per CPU fifos, when some of them might not
    have been brought up yet.

    Signed-off-by: Andi Kleen
    Acked-by: Stefani Seibold
    Cc: Roland Dreier
    Cc: Dmitry Torokhov
    Cc: Andy Walls
    Cc: Vikram Dhillon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • In some upcoming code it's useful to peek into a FIFO without permanentely
    removing data. This patch implements a new kfifo_out_peek() to do this.

    Signed-off-by: Andi Kleen
    Acked-by: Stefani Seibold
    Cc: Roland Dreier
    Cc: Dmitry Torokhov
    Cc: Andy Walls
    Cc: Vikram Dhillon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Right now for kfifo_*_user it's not easily possible to distingush between
    a user copy failing and the FIFO not containing enough data. The problem
    is that both conditions are multiplexed into the same return code.

    Avoid this by moving the "copy length" into a separate output parameter
    and only return 0/-EFAULT in the main return value.

    I didn't fully adapt the weird "record" variants, those seem
    to be unused anyways and were rather messy (should they be just removed?)

    I would appreciate some double checking if I did all the conversions
    correctly.

    Signed-off-by: Andi Kleen
    Cc: Stefani Seibold
    Cc: Roland Dreier
    Cc: Dmitry Torokhov
    Cc: Andy Walls
    Cc: Vikram Dhillon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The pointers to user buffers are currently unsigned char *, which requires
    a lot of casting in the caller for any non-char typed buffers. Use void *
    instead.

    Signed-off-by: Andi Kleen
    Acked-by: Stefani Seibold
    Cc: Roland Dreier
    Cc: Dmitry Torokhov
    Cc: Andy Walls
    Cc: Vikram Dhillon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • I get a few dozen of these warnings when using
    gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2):

    In file included from mmotm-2010-0113-1217/init/do_mounts.c:5:
    mmotm-2010-0113-1217/include/linux/tty.h: In function 'tty_port_get':
    mmotm-2010-0113-1217/include/linux/tty.h:469: warning: '______f' is static but declared in inline function 'tty_port_get' which is not static

    so make the function static inline.

    [akpm@linux-foundation.org: may as well convert tty_port_users() also]
    Signed-off-by: Randy Dunlap
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • EDAC MC0: INTERNAL ERROR: channel-b out of range (4 >= 4)
    Kernel panic - not syncing: EDAC MC0: Uncorrected Error (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.

    This happens because FERR_NF_FBD bit 28 is not updated on i5000. Due to
    that, both bits 28 and 29 may be equal to one, returning channel = 3. As
    this value is invalid, EDAC core generates the panic.

    Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14568

    Signed-off-by: Tamas Vincze
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Doug Thompson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tamas Vincze
     
  • The m68knommu coldfire pit clocksource looks like it was incorrectly
    marked as a continuous clocksource. Running with it marked as a
    continuous clocksource could cause hangs when the system switches to
    highres mode or enables nohz.

    This patch removes the CLOCK_SOURCE_IS_CONTINUOUS flag on the coldfire pit
    clocksource. This will disallow systems using this clocksource from
    entering oneshot mode (disabling highres timers and nohz).

    Signed-off-by: John Stultz
    Acked-by: Greg Ungerer
    Cc: Steven King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • This is a new two finger touch Fujitsu Wacom Tablet PC.

    Signed-off-by: Ping Cheng
    Cc: Alan Cox
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ping
     
  • When I try to use markup_oops.pl in x86, I always get:

    cat 1 | perl markup_oops.pl ./vmlinux
    objdump: --start-address: bad number: NaN
    No matching code found

    This is because in line:
    if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
    $function = $1;
    $func_offset = $2;
    }

    $func_offset will get a number like "0x2"

    But in follow code:

    my $decodestart = Math::BigInt->from_hex("0x$target") -
    Math::BigInt->from_hex("0x$func_offset");

    It add other ox to ox2. Then this value will be set to NaN.

    So I made a small patch to fix it.

    Signed-off-by: Hui Zhu
    Acked-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hui Zhu
     
  • Fix a regression in hardware acceleration which made the accelerated
    framebuffer unusable on some chips. These need extra initialization and
    an extra flag which is no longer needed/available on current chips.

    Signed-off-by: Erik-Jan Post
    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Erik-Jan Post
     
  • Reorder viafb_set_par to allow using the updated variables in
    viafb_setmode. This fixes a regression that prevented proper runtime mode
    changes.

    Signed-off-by: Erik-Jan Post
    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Erik-Jan Post
     
  • Although I'd consider this a hardware bug, as there is hardware out that
    for whatever reason does not support hardware cursors on LCD output we
    have to care about it in the driver. This fixes a regression (invisible
    cursor) introduced by:

    viafb: cleanup viafb_cursor

    Signed-off-by: Florian Tobias Schandinat
    Reported-by: Julian Wollrath
    Tested-by: Julian Wollrath
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Fix a wrong optimization in include/linux/kfifo.h which could cause a race
    in kfifo_out_locked.

    Signed-off-by: Stefani Seibold
    Reported-by: Johan Hovold
    Cc: Pete Zaitcev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
    drm/i915: enable 36bit physical address for hardware status page
    drm/i915: fix eDP pipe mask
    drm/i915: fix pixel color depth setting on eDP
    drm/i915: parse eDP panel color depth from VBT block
    drm/i915: disable LVDS downclock by default
    drm/i915: Fix the incorrect cursor A bit definition in DSPFW2 register
    drm/i915: Remove chatty execbuf failure message.
    drm/i915: remove loop in Ironlake interrupt handler
    drm/i915: Don't wait interruptible for possible plane buffer flush
    drm/i915: try another possible DDC bus for the SDVO device with multiple outputs
    drm/i915: Read the response after issuing DDC bus switch command
    drm/i915: Don't use the child device parsed from VBT to setup HDMI/DP
    drm/i915: Fix resume regression on MSI Wind U100 w/o KMS
    drm/i915: Fix Ironlake M/N/P ranges to match the spec
    drm/i915: Use find_pll function to calculate DPLL setting for LVDS downclock
    drm/i915: Add HP nx9020/SamsungSX20S to ACPI LID quirk list
    drm/i915: disable TV hotplug status check

    Trivial conflicts in drivers/gpu/drm/i915/i915_drv.c due to i915
    non-modeset suspend fix with different comment.

    Linus Torvalds
     

16 Jan, 2010

15 commits

  • * 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux:
    ARM: MINI2440: Fixup __initdata usage
    ARM: MINI2440: Fix crash on boot due to improper __initdata qualifier
    ARM: SMDK6410: Specify no GPIO for B_PWR_5V regulator
    ARM: S3C: NAND: Check the existence of nr_map before copying

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    amd64_edac: Ensure index stays within bounds in amd64_get_scrub_rate

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: sentelic - fix left/right horizontal scroll mapping
    Input: pmouse - move Sentelic probe down the list
    Input: add compat support for sysfs and /proc capabilities output
    Input: i8042 - add Dritek quirk for Acer Aspire 5610.
    Input: xbox - do not use GFP_KERNEL under spinlock
    Input: psmouse - fix Synaptics detection when protocol is disabled
    Input: bcm5974 - report ABS_MT events
    Input: davinci_keyscan - add device_enable method to platform data
    Input: evdev - be less aggressive about sending SIGIO notifies
    Input: atkbd - fix canceling event_work in disconnect
    Input: serio - fix potential deadlock when unbinding drivers
    Input: gf2k - fix &&/|| confusion in gf2k_connect()

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
    alpha: cpumask_of_node() should handle -1 as a node
    alpha: add myself as a maintainer, and drop mention of 2.4

    Linus Torvalds
     
  • * 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
    serial: sh-sci: using correct fifo size for SCIF and SCIFA ports.
    sh: mach-ecovec24: Add motion sensor driver support.

    Linus Torvalds
     
  • This enables possible 36bit address mask on 965G that use physical
    address for hw status page.

    Signed-off-by: Zhenyu Wang
    Signed-off-by: Eric Anholt

    Zhenyu Wang
     
  • inotify will WARN() if it finds that the idr and the fsnotify internals
    somehow got out of sync. It was only supposed to do this once but due
    to this stupid bug it would warn every single time a problem was
    detected.

    Signed-off-by: Eric Paris
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Eric Paris
     
  • Since commit 7e790dd5fc937bc8d2400c30a05e32a9e9eef276 ("inotify: fix
    error paths in inotify_update_watch") inotify changed the manor in which
    it gave watch descriptors back to userspace. Previous to this commit
    inotify acted like the following:

    inotify_add_watch(X, Y, Z) = 1
    inotify_rm_watch(X, 1);
    inotify_add_watch(X, Y, Z) = 2

    but after this patch inotify would return watch descriptors like so:

    inotify_add_watch(X, Y, Z) = 1
    inotify_rm_watch(X, 1);
    inotify_add_watch(X, Y, Z) = 1

    which I saw as equivalent to opening an fd where

    open(file) = 1;
    close(1);
    open(file) = 1;

    seemed perfectly reasonable. The issue is that quite a bit of userspace
    apparently relies on the behavior in which watch descriptors will not be
    quickly reused. KDE relies on it, I know some selinux packages rely on
    it, and I have heard complaints from other random sources such as debian
    bug 558981.

    Although the man page implies what we do is ok, we broke userspace so
    this patch almost reverts us to the old behavior. It is still slightly
    racey and I have patches that would fix that, but they are rather large
    and this will fix it for all real world cases. The race is as follows:

    - task1 creates a watch and blocks in idr_new_watch() before it updates
    the hint.
    - task2 creates a watch and updates the hint.
    - task1 updates the hint with it's older wd
    - task removes the watch created by task2
    - task adds a new watch and will reuse the wd originally given to task2

    it requires moving some locking around the hint (last_wd) but this should
    solve it for the real world and be -stable safe.

    As a side effect this patch papers over a bug in the lib/idr code which
    is causing a large number WARN's to pop on people's system and many
    reports in kerneloops.org. I'm working on the root cause of that idr
    bug seperately but this should make inotify immune to that issue.

    Signed-off-by: Eric Paris
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Eric Paris
     
  • eDP could be on pipe A or B.

    Signed-off-by: Zhenyu Wang
    Signed-off-by: Eric Anholt

    Zhenyu Wang
     
  • Original DP mode_valid check didn't take pixel color depth into account,
    which made one 1600x900 eDP panel's mode check invalid because of overclock,
    but actually this 6bpc panel does can work with x1 lane at 2.7G. This one
    trys to take bpp value properly both in mode validation and mode setting.

    Signed-off-by: Zhenyu Wang
    Signed-off-by: Eric Anholt

    Zhenyu Wang
     
  • Signed-off-by: Zhenyu Wang
    Signed-off-by: Eric Anholt

    Zhenyu Wang
     
  • Many platform support this feature, and it can provide significant
    power savings when the reduced refresh rate is low. However, on some
    platforms a secondary (reduced) timing is provided but not actually
    supported by the hardware. This results in undesirable flicker at
    runtime.

    So disable the feature by default, but allow users to opt-in to the
    reduced clock behavior with a new module parameter, lvds_downclock,
    that can be set to 1 to enable the feature.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Eric Anholt

    Jesse Barnes
     
  • Signed-off-by: Zhao Yakui
    Reviewed-by: Eric Anholt
    Signed-off-by: Eric Anholt

    Zhao Yakui
     
  • Suggested-by: Chris Wilson >
    Acked-by: Jesse Barnes (in principle)
    Signed-off-by: Eric Anholt

    Eric Anholt
     
  • On Ironlake, there is an interrupt master control bit. With the bit
    disabled before clearing IIR, we do not need to handle extra interrupt
    in a loop. This patch removes the loop in Ironlake interrupt handler.
    It fixed irq lost issue on some Ironlake platforms.

    Cc: Stable Team
    Signed-off-by: Zou Nan hai
    Signed-off-by: Zhenyu Wang
    Signed-off-by: Eric Anholt

    Zou Nan hai
     

15 Jan, 2010

6 commits