14 Apr, 2011

13 commits

  • In preparation of calling select_task_rq() without rq->lock held, drop
    the dependency on the rq argument.

    Reviewed-by: Frank Rowand
    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20110405152729.031077745@chello.nl
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Currently p->pi_lock already serializes p->sched_class, also put
    p->cpus_allowed and try_to_wake_up() under it, this prepares the way
    to do the first part of ttwu() without holding rq->lock.

    By having p->sched_class and p->cpus_allowed serialized by p->pi_lock,
    we prepare the way to call select_task_rq() without holding rq->lock.

    Reviewed-by: Frank Rowand
    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20110405152728.990364093@chello.nl
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Provide a generic p->on_rq because the p->se.on_rq semantics are
    unfavourable for lockless wakeups but needed for sched_fair.

    In particular, p->on_rq is only cleared when we actually dequeue the
    task in schedule() and not on any random dequeue as done by things
    like __migrate_task() and __sched_setscheduler().

    This also allows us to remove p->se usage from !sched_fair code.

    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.949545047@chello.nl

    Peter Zijlstra
     
  • Collect all ttwu() stat code into a single function and ensure its
    always called for an actual wakeup (changing p->state to
    TASK_RUNNING).

    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.908177058@chello.nl

    Peter Zijlstra
     
  • try_to_wake_up() would only return a success when it would have to
    place a task on a rq, change that to every time we change p->state to
    TASK_RUNNING, because that's the real measure of wakeups.

    This results in that success is always true for the tracepoints.

    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.866866929@chello.nl

    Peter Zijlstra
     
  • wq_worker_waking_up() needs to match wq_worker_sleeping(), since the
    latter is only called on deactivate, move the former near activate.

    Signed-off-by: Peter Zijlstra
    Cc: Tejun Heo
    Link: http://lkml.kernel.org/n/top-t3m7n70n9frmv4pv2n5fwmov@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Since we now have p->on_cpu unconditionally available, use it to
    re-implement mutex_spin_on_owner.

    Requested-by: Thomas Gleixner
    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.826338173@chello.nl

    Peter Zijlstra
     
  • Always provide p->on_cpu so that we can determine if its on a cpu
    without having to lock the rq.

    Reviewed-by: Frank Rowand
    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20110405152728.785452014@chello.nl
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • For future rework of try_to_wake_up() we'd like to push part of that
    function onto the CPU the task is actually going to run on.

    In order to do so we need a generic callback from the existing scheduler IPI.

    This patch introduces such a generic callback: scheduler_ipi() and
    implements it as a NOP.

    BenH notes: PowerPC might use this IPI on offline CPUs under rare conditions!

    Acked-by: Russell King
    Acked-by: Martin Schwidefsky
    Acked-by: Chris Metcalf
    Acked-by: Jesper Nilsson
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Ralf Baechle
    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.744338123@chello.nl

    Peter Zijlstra
     
  • Merge reason: Pick up this upstream commit:

    6631e635c65d: block: don't flush plugged IO on forced preemtion scheduling

    As it modifies the scheduler and we'll queue up dependent patches.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
    x86 platform drivers: Build fix for intel_pmic_gpio

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/avr32-2.6:
    avr32: add ATAG_BOARDINFO
    don't check platform_get_irq's return value against zero
    avr32: init cannot ignore signals sent by force_sig_info()
    avr32: fix deadlock when reading clock list in debugfs
    avr32: Fix .size directive for cpu_enter_idle
    avr32: At32ap: pio fix typo "))" on gpio_irq_unmask prototype
    fix the wrong argument of the functions definition

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (22 commits)
    Revert "i915: restore only the mode of this driver on lastclose"
    Revert "ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set."
    i915: select VIDEO_OUTPUT_CONTROL for ACPI_VIDEO
    drm/radeon/kms: properly program vddci on evergreen+
    drm/radeon/kms: add voltage type to atom set voltage function
    drm/radeon/kms: fix pcie_p callbacks on btc and cayman
    drm/radeon/kms: fix suspend on rv530 asics
    drm/radeon/kms: clean up gart dummy page handling
    drm/radeon/kms: make radeon i2c put/get bytes less noisy
    drm/radeon/kms: pll tweaks for rv6xx
    drm/radeon: Fix KMS legacy backlight support if CONFIG_BACKLIGHT_CLASS_DEVICE=m.
    radeon: Fix KMS CP writeback on big endian machines.
    i915: restore only the mode of this driver on lastclose
    drm/nvc0: improve vm flush function
    drm/nv50-nvc0: remove some code that doesn't belong here
    drm/nv50: use "nv86" tlb flush method on everything except 0x50/0xac
    drm/nouveau: quirk for XFX GT-240X-YA
    drm/nv50-nvc0: work around an evo channel hang that some people see
    drm/nouveau: implement init table opcode 0x5c
    drm/nouveau: fix oops on unload with disabled LVDS panel
    ...

    Linus Torvalds
     

13 Apr, 2011

27 commits

  • Fix an incorrect function name so the driver builds.

    Signed-off-by: Matthew Garrett

    Matthew Garrett
     
  • We really only want to unplug the pending IO when the process actually
    goes to sleep. So move the test for flushing the plug up to the place
    where we actually deactivate the task - where we have properly checked
    for preemption and for the process really sleeping.

    Acked-by: Jens Axboe
    Acked-by: Peter Zijlstra
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Commit 982134ba6261 ("mm: avoid wrapping vm_pgoff in mremap()") fixed
    the case of a expanding mapping causing vm_pgoff wrapping when you used
    mremap. But there was another case where we expand mappings hiding in
    plain sight: the automatic stack expansion.

    This fixes that case too.

    This one also found by Robert Święcki, using his nasty system call
    fuzzer tool. Good job.

    Reported-and-tested-by: Robert Święcki
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The ATAG_BOARDINFO is intended to hand over the information
    bd->bi_board_number from u-boot to the kernel.

    This piece of information can be used to implement some kind of board
    identification while booting the kernel. Therefore it is placed in .initdata
    section and can be accessed via the new symbol board_number only while
    initializing the kernel.

    Signed-off-by: Andreas Bießmann
    Signed-off-by: Hans-Christian Egtvedt

    Andreas Bießmann
     
  • platform_get_irq returns -ENXIO on failure, so !int_irq was probably
    always true. Better use (int)int_irq
    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Hans-Christian Egtvedt

    Uwe Kleine-König
     
  • We can delete the code that checks to see if we're sending an ignored
    signal to init because force_sig_info() already handles this case.
    force_sig_info() will kill init even if the signal handler is SIG_DFL
    and the scenario described in the comment where init might "generate
    the same exception over and over again" cannot occur (force_sig_info()
    clears SIGNAL_UNKILLABLE to ensure that init will die).

    Also, the use of is_global_init() is not correct in the multhreaded
    case, as Oleg Nesterov explains,

    "is_global_init() is not right in theory, /sbin/init can be
    multithreaded. And, this doesn't cover the sub-namespace
    inits... I'd suggest to check SIGNAL_UNKILLABLE, but looking
    closer I think you can simply remove this code."

    It seems this code was copied from arch/powerpc in March 2007 in commit

    623b0355d5b1 "[AVR32] Clean up exception handling code"

    but the code was deleted from arch/powerpc in November 2009 in commit

    a0592d42fe3e "powerpc: kill the obsolete code under is_global_init()"

    So catch up with powerpc and delete the bogus code.

    Signed-off-by: Matt Fleming
    Signed-off-by: Hans-Christian Egtvedt

    Matt Fleming
     
  • When writing out /sys/kernel/debug/at32ap_clk, clock list lock is being
    held while clk_get() is called. clk_get() attempts to take the same
    lock, which results in deadlock. Introduce and call lock free version,
    __clk_get(), instead.

    Signed-off-by: Ole Henrik Jahren
    Cc: Hans-Christian Egtvedt
    Signed-off-by: Hans-Christian Egtvedt

    Ole Henrik Jahren
     
  • gas used to accept (and ignore?) .size directives which referred to
    undefined symbols, as this does. In binutils 2.21 these are treated
    as errors.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Hans-Christian Egtvedt

    Ben Hutchings
     
  • introduce in commit d75f1bfdbccb

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Thomas Gleixner
    Cc: Hans-Christian Egtvedt
    Cc: Nicolas Ferre
    Cc: Patrice Vilchez
    Signed-off-by: Hans-Christian Egtvedt

    Jean-Christophe PLAGNIOL-VILLARD
     
  • The functions of eic_chip's memebers use the wrong argument .

    Signed-off-by: Wanlong Gao
    Signed-off-by: Hans-Christian Egtvedt

    Wanlong Gao
     
  • Signed-off-by: Geert Uytterhoeven
    Acked-by: Greg Ungerer
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    fix XEN_SAVE_RESTORE Kconfig dependencies
    PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS

    Linus Torvalds
     
  • This reverts commit 0a0883c8433c743dad0a4d9ebe2717558f2c209e.

    this was in my tree by accident, I meant to rebase it out and
    didn't realise in time.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • This reverts commit 69a07f0b117a40fcc1a479358d8e1f41793617f2.

    We've tracked a number of problems back to this, and Thomas
    thinks we should redesign this for .40/41 anyways so I'm
    happy to revert it.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • fix Kconfig warning:

    (DRM_I915 && STUB_POULSBO) selects ACPI_VIDEO which has unmet direct dependencies
    (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)

    Signed-off-by: Konstantin Khlebnikov
    Signed-off-by: Dave Airlie

    Konstantin Khlebnikov
     
  • Change vddci as well as vddc when changing power modes
    on evergreen/ni. Also, properly set vddci on boot up
    for ni cards. The vbios only sets the limited clocks
    and voltages on boot until the mc ucode is loaded. This
    should fix stability problems on some btc cards.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • This is needed for setting voltages other than vddc.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • btc and cayman asics use the same callback for
    pcie port registers.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Apparently only rv515 asics need the workaround
    added in f24d86f1a49505cdea56728b853a5d0a3f8e3d11
    (drm/radeon/kms: fix resume regression for some r5xx laptops).

    Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=34709

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • As per Konrad's original patch, the dummy page used
    by the gart code and allocated in radeon_gart_init()
    was not freed properly in radeon_gart_fini().

    At the same time r6xx and newer allocated and freed the
    dummy page on their own. So to do Konrad's patch one
    better, just remove the allocation and freeing of the
    dummy page in the r6xx, 7xx, evergreen, and ni code and
    allocate and free in the gart_init/fini() functions for
    all asics.

    Cc: Jerome Glisse
    Signed-off-by: Alex Deucher
    Acked-by: Konrad Rzeszutek Wilk
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3)
    [CIFS] Warn on requesting default security (ntlm) on mount
    [CIFS] cifs: clarify the meaning of tcpStatus == CifsGood
    cifs: wrap received signature check in srv_mutex
    cifs: clean up various nits in unicode routines (try #2)
    cifs: clean up length checks in check2ndT2
    cifs: set ra_pages in backing_dev_info
    cifs: fix broken BCC check in is_valid_oplock_break
    cifs: always do is_path_accessible check in cifs_mount
    various endian fixes to cifs
    Elminate sparse __CHECK_ENDIAN__ warnings on port conversion
    Max share size is too small
    Allow user names longer than 32 bytes
    cifs: replace /proc/fs/cifs/Experimental with a module parm
    cifs: check for private_data before trying to put it

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
    thinkpad-acpi fails to load with newer Thinkpad X201s BIOS
    acer-wmi: Fix capitalisation of GUID in module alias
    sony-laptop: keyboard backlight fixes
    sony-laptop: only show the handles sysfs file in debug mode
    samsung-laptop: set backlight type
    staging: samsung-laptop has moved to platform/x86
    samsung-laptop: Samsung R410P backlight driver
    samsung-laptop: add support for N230 model
    platform-drivers: x86: pmic: Restore the dropped buslock/unlock
    sony-laptop: fix early NULL pointer dereference
    msi-laptop: fix config-dependent build error
    eeepc-wmi: add keys found on EeePC 1215T
    asus-wmi: swap input name and phys
    asus-laptop: remove removed features from feature-removal-schedule.txt

    Linus Torvalds
     
  • Gaah. When commit be85bccaa5aa reverted the export of file system uuid
    via /proc//mountinfo, it also unintentionally removed the s_uuid
    field in struct super_block.

    I didn't mean to do that, since filesystems have been taught to fill it
    in (and we want to keep it for future re-introduction in the mountinfo
    file).

    Stupid of me. This adds it back in.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
    mfd: Fetch cell pointer from platform_device->mfd_cell

    Linus Torvalds
     
  • nfs_scan_commit() is called with the inode->i_lock held, but it then
    calls __mark_inode_dirty() while still holding the lock. This causes
    a deadlock.

    Push the inode->i_lock into nfs_scan_commit() so it can protect only
    the parts of the code it needs to and can be dropped before the call
    to __mark_inode_dirty() to avoid the deadlock.

    Signed-off-by: Dave Chinner
    Tested-by: Will Simoneau
    Signed-off-by: Linus Torvalds

    Dave Chinner
     
  • Commit 53a7706d5ed8 ("mlock: do not hold mmap_sem for extended periods
    of time") changed mlock() to care about the exact number of pages that
    __get_user_pages() had brought it. Before, it would only care about
    errors.

    And that doesn't work, because we also handled one page specially in
    __mlock_vma_pages_range(), namely the stack guard page. So when that
    case was handled, the number of pages that the function returned was off
    by one. In particular, it could be zero, and then the caller would end
    up not making any progress at all.

    Rather than try to fix up that off-by-one error for the mlock case
    specially, this just moves the logic to handle the stack guard page
    into__get_user_pages() itself, thus making all the counts come out
    right automatically.

    Reported-by: Robert Święcki
    Cc: Hugh Dickins
    Cc: Oleg Nesterov
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This reverts commit 93f1c20bc8cdb757be50566eff88d65c3b26881f.

    It turns out that libmount misparses it because it adds a '-' character
    in the uuid string, which libmount then incorrectly confuses with the
    separator string (" - ") at the end of all the optional arguments.

    Upstream libmount (in the util-linux tree) has been fixed, but until
    that fix actually percolates up to users, we'd better not expose this
    change in the kernel.

    Let's revisit this later (possibly by exposing the UUID without any '-'
    characters in it, avoiding the user-space bug).

    Reported-by: Dave Jones
    Cc: Aneesh Kumar K.V
    Cc: Al Viro
    Cc: Karel Zak
    Cc: Ram Pai
    Cc: Miklos Szeredi
    Cc: Eric Sandeen
    Signed-off-by: Linus Torvalds

    Linus Torvalds