17 Oct, 2010

6 commits

  • The default hibernation image size is currently hard coded and euqal
    to 500 MB, which is not a reasonable default on many contemporary
    systems. Make it equal 2/5 of the total RAM size (this is slightly
    below the maximum, i.e. 1/2 of the total RAM size, and seems to be
    generally suitable).

    Signed-off-by: Rafael J. Wysocki
    Tested-by: M. Vefa Bicakci

    Rafael J. Wysocki
     
  • One comment in hibernate_preallocate_memory() is wrong, so fix it and
    add one more comment to clarify the meaning of the fixed one.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Although we need the PM workqueue to be freezable, we don't need it
    to be singlethread. Also, the number of concurrent work items
    running on a single CPU need not be constrained. For these reasons
    use alloc_workqueue() directly, with suitable arguments, instead of
    create_freezeable_workqueue(), to create the runtime PM workqueue.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Tejun Heo

    Rafael J. Wysocki
     
  • Fix the following build warning:

    warning: (PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || \
    ARCH_HIBERNATION_POSSIBLE) && PM_SLEEP) selects HOTPLUG_CPU which \
    has unmet direct dependencies (SMP && HOTPLUG)

    by selecting HOTPLUG along with CPU_HOTPLUG.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Randy Dunlap

    Rafael J. Wysocki
     
  • Compress hibernation image with LZO in order to save on I/O and
    therefore time to hibernate/thaw.

    [rjw: Added hibernate=nocompress command line option instead of just
    nocompress which would be confusing, fixed a couple of compiler
    warnings, fixed kerneldoc comments, minor cleanups.]

    Signed-off-by: Bojan Smojver
    Signed-off-by: Rafael J. Wysocki

    Bojan Smojver
     
  • Allow drivers, that belong to subsystems which use the generic
    runtime pm callbacks, not to define runtime pm suspend/resume handlers,
    by implicitly assuming success in such cases.

    This is needed to eliminate nop handlers that would otherwise be
    necessary by drivers which enable runtime pm, but don't need
    to do anything when their devices are runtime-suspended/resumed.

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Kevin Hilman
    Acked-by: Mark Brown
    Signed-off-by: Rafael J. Wysocki

    Ohad Ben-Cohen
     

16 Oct, 2010

12 commits

  • Fixes build for me... these are what's tested in byteorder.h...

    Signed-off-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • Signed-off-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • Signed-off-by: Kyle McMartin
    Acked-by: Al "my fuckup" Viro
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • Commit a7f8388e accidentally removed it... Al explains:

    "Sorry, reordering breakage. In the signals tree here I have

    static inline void sig_set_blocked(struct sigset_t *set)
    ...

    and it's used all over the place (including quite a few places where
    we currently have sigprocmask(SIG_SETMASK, set, NULL), which is what
    it's equivalent to). With that done, m32r doesn't use _BLOCKABLE
    anywhere, so it got removed. And that chunk got picked when I'd been
    reordering the queue to pull the arch-specific fixes in front.
    Sorry."

    Signed-off-by: Kyle McMartin
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • We currently have a kernel internal type called aligned_u64 which aligns
    __u64's on 8 bytes boundaries even on systems which would normally align
    them on 4 byte boundaries. This patch creates a new type __aligned_u64
    which does the same thing but which is exposed to userspace rather than
    being kernel internal.

    [akpm: merge early as both the net and audit trees want this]

    [akpm@linux-foundation.org: enhance the comment describing the reasons for using aligned_u64. Via Andreas and Andi.]
    Based-on-patch-by: Andreas Gruenbacher
    Signed-off-by: Eric Paris
    Cc: Jan Engelhardt
    Cc: David Miller
    Cc: Andi Kleen
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Paris
     
  • Fix a build error introduced by d6d1b650ae6acce73d55dd024 ("param: simple
    locking for sysfs-writable charp parameters").

    CC arch/um/kernel/trap.o
    arch/um/drivers/hostaudio_kern.c: In function 'hostaudio_open':
    arch/um/drivers/hostaudio_kern.c:204: error: '__param_dsp' undeclared (first use in this function)
    arch/um/drivers/hostaudio_kern.c:204: error: (Each undeclared identifier is reported only once
    arch/um/drivers/hostaudio_kern.c:204: error: for each function it appears in.)
    arch/um/drivers/hostaudio_kern.c: In function 'hostmixer_open_mixdev':
    arch/um/drivers/hostaudio_kern.c:265: error: '__param_mixer' undeclared (first use in this function)
    arch/um/drivers/hostaudio_kern.c:272: error: '__param_dsp' undeclared (first use in this function)

    Reported-by: Toralf Förster
    Tested-by: Toralf Förster
    Cc: Rusty Russell
    Cc: Takashi Iwai
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • sysctl check complains with a WARN() when proc_doulongvec_minmax() or
    proc_doulongvec_ms_jiffies_minmax() are used by a vector of longs (with
    more than one element), with no min or max value specified.

    This is unexpected, given we had a bug on this min/max handling :)

    Reported-by: Jiri Slaby
    Signed-off-by: Eric Dumazet
    Cc: "Eric W. Biederman"
    Cc: David Miller
    Acked-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
    mmc: sdio: fix SDIO suspend/resume regression

    Linus Torvalds
     
  • Fix SDIO suspend/resume regression introduced by 4c2ef25fe0b "mmc: fix
    all hangs related to mmc/sd card insert/removal during suspend/resume":

    PM: Syncing filesystems ... done.
    Freezing user space processes ... (elapsed 0.01 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    Suspending console(s) (use no_console_suspend to debug)
    pm_op(): platform_pm_suspend+0x0/0x5c returns -38
    PM: Device pxa2xx-mci.0 failed to suspend: error -38
    PM: Some devices failed to suspend

    4c2ef25fe0b moved the card removal/insertion mechanism out of MMC's
    suspend/resume path and into pm notifiers (mmc_pm_notify), and that
    broke SDIO's expectation that mmc_suspend_host() will remove the card,
    and squash the error, in case -ENOSYS is returned from the bus suspend
    handler (mmc_sdio_suspend() in this case).

    mmc_sdio_suspend() is using this whenever at least one of the card's SDIO
    function drivers does not have suspend/resume handlers - in that case
    it is agreed to force removal of the entire card.

    This patch fixes this regression by trivially bringing back that part of
    mmc_suspend_host(), which was removed by 4c2ef25fe0b.

    Reported-and-tested-by: Sven Neumann
    Signed-off-by: Ohad Ben-Cohen
    Cc: Maxim Levitsky
    Cc:
    Acked-by: Nicolas Pitre
    Signed-off-by: Chris Ball

    Ohad Ben-Cohen
     
  • …nel/git/tip/linux-2.6-tip

    * 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    hrtimer: Preserve timer state in remove_hrtimer()

    Linus Torvalds
     
  • * 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: Add Cando touch screen 15.6-inch product id
    HID: Add MULTI_INPUT quirk for turbox/mosart touchscreen
    HID: hidraw, fix a NULL pointer dereference in hidraw_write
    HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    ubd: fix incorrect sector handling during request restart
    ps3disk: passing wrong variable to bvec_kunmap_irq()

    Linus Torvalds
     

15 Oct, 2010

6 commits

  • Commit f81f2f7c (ubd: drop unnecessary rq->sector manipulation)
    dropped request->sector manipulation in preparation for global request
    handling cleanup; unfortunately, it incorrectly assumed that the
    updated sector wasn't being used.

    ubd tries to issue as many requests as possible to io_thread. When
    issuing fails due to memory pressure or other reasons, the device is
    put on the restart list and issuing stops. On IO completion, devices
    on the restart list are scanned and IO issuing is restarted.

    ubd issues IOs sg-by-sg and issuing can be stopped in the middle of a
    request, so each device on the restart queue needs to remember where
    to restart in its current request. ubd needs to keep track of the
    issue position itself because,

    * blk_rq_pos(req) is now updated by the block layer to keep track of
    _completion_ position.

    * Multiple io_req's for the current request may be in flight, so it's
    difficult to tell where blk_rq_pos(req) currently is.

    Add ubd->rq_pos to keep track of the issue position and use it to
    correctly restart io_req issue.

    Signed-off-by: Tejun Heo
    Reported-by: Richard Weinberger
    Tested-by: Richard Weinberger
    Tested-by: Chris Frey
    Cc: stable@kernel.org
    Signed-off-by: Jens Axboe

    Tejun Heo
     
  • If you build aout support as a module, you'll want these exported.

    Reported-by: Tetsuo Handa
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Linus Torvalds
     
  • Tony Luck reports that the addition of the access_ok() check in commit
    0eead9ab41da ("Don't dump task struct in a.out core-dumps") broke the
    ia64 compile due to missing the necessary header file includes.

    Rather than add yet another include () to make everything
    happy, just uninline the silly core dump helper functions and move the
    bodies to fs/exec.c where they make a lot more sense.

    dump_seek() in particular was too big to be an inline function anyway,
    and none of them are in any way performance-critical. And we really
    don't need to mess up our include file headers more than they already
    are.

    Reported-and-tested-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ehea: Fix a checksum issue on the receive path
    net: allow FEC driver to use fixed PHY support
    tg3: restore rx_dropped accounting
    b44: fix carrier detection on bind
    net: clear heap allocations for privileged ethtool actions
    NET: wimax, fix use after free
    ATM: iphase, remove sleep-inside-atomic
    ATM: mpc, fix use after free
    ATM: solos-pci, remove use after free
    net/fec: carrier off initially to avoid root mount failure
    r8169: use device model DMA API
    r8169: allocate with GFP_KERNEL flag when able to sleep

    Linus Torvalds
     
  • akiphie points out that a.out core-dumps have that odd task struct
    dumping that was never used and was never really a good idea (it goes
    back into the mists of history, probably the original core-dumping
    code). Just remove it.

    Also do the access_ok() check on dump_write(). It probably doesn't
    matter (since normal filesystems all seem to do it anyway), but he
    points out that it's normally done by the VFS layer, so ...

    [ I suspect that we should possibly do "vfs_write()" instead of
    calling ->write directly. That also does the whole fsnotify and write
    statistics thing, which may or may not be a good idea. ]

    And just to be anal, do this all for the x86-64 32-bit a.out emulation
    code too, even though it's not enabled (and won't currently even
    compile)

    Reported-by: akiphie
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

14 Oct, 2010

12 commits

  • The race is described as follows:

    CPU X CPU Y
    remove_hrtimer
    // state & QUEUED == 0
    timer->state = CALLBACK
    unlock timer base
    timer->f(n) //very long
    hrtimer_start
    lock timer base
    remove_hrtimer // no effect
    hrtimer_enqueue
    timer->state = CALLBACK |
    QUEUED
    unlock timer base
    hrtimer_start
    lock timer base
    remove_hrtimer
    mode = INACTIVE
    // CALLBACK bit lost!
    switch_hrtimer_base
    CALLBACK bit not set:
    timer->base
    changes to a
    different CPU.
    lock this CPU's timer base

    The bug was introduced with commit ca109491f (hrtimer: removing all ur
    callback modes) in 2.6.29

    [ tglx: Feed new state via local variable and add a comment. ]

    Signed-off-by: Salman Qazi
    Cc: akpm@linux-foundation.org
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Thomas Gleixner
    Cc: stable@kernel.org

    Salman Qazi
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
    ioat2: fix performance regression

    Linus Torvalds
     
  • * 'for-2.6.36' of git://linux-nfs.org/~bfields/linux:
    nfsd: fix BUG at fs/nfsd/nfsfh.h:199 on unlink

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    ring-buffer: Fix typo of time extends per page
    perf, MIPS: Support cross compiling of tools/perf for MIPS
    perf: Fix incorrect copy_from_user() usage

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: relax ioremap prohibition (309caa9) for -final and -stable
    ARM: 6440/1: ep93xx: DMA: fix channel_disable
    cpuimx27: fix i2c bus selection
    cpuimx27: fix compile when ULPI is selected
    ARM: 6435/1: Fix HWCAP_TLS flag for ARM11MPCore/Cortex-A9
    ARM: 6436/1: AT91: Fix power-saving in idle-mode on 926T processors
    ARM: fix section mismatch warnings in Versatile Express
    ARM: 6412/1: kprobes-decode: add support for MOVW instruction
    ARM: 6419/1: mmu: Fix MT_MEMORY and MT_MEMORY_NONCACHED pte flags
    ARM: 6416/1: errata: faulty hazard checking in the Store Buffer may lead to data corruption

    Linus Torvalds
     
  • …/git/tmlind/linux-omap-2.6

    * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
    omap: iommu-load cam register before flushing the entry

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon/kms: Silent spurious error message
    drm/radeon/kms: fix bad cast/shift in evergreen.c
    drm/radeon/kms: make TV/DFP table info less verbose
    drm/radeon/kms: leave certain CP int bits enabled
    drm/radeon/kms: avoid corner case issue with unmappable vram V2

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, numa: For each node, register the memory blocks actually used
    x86, AMD, MCE thresholding: Fix the MCi_MISCj iteration order
    x86, mce, therm_throt.c: Fix missing curly braces in error handling logic

    Linus Torvalds
     
  • Commit 0793448 "DMAENGINE: generic channel status v2" changed the interface for
    how dma channel progress is retrieved. It inadvertently exported an internal
    helper function ioat_tx_status() instead of ioat_dma_tx_status(). The latter
    polls the hardware to get the latest completion state, while the helper just
    evaluates the current state without touching hardware. The effect is that we
    end up waiting for completion timeouts or descriptor allocation errors before
    the completion state is updated.

    iperf (before fix):
    [SUM] 0.0-41.3 sec 364 MBytes 73.9 Mbits/sec

    iperf (after fix):
    [SUM] 0.0- 4.5 sec 499 MBytes 940 Mbits/sec

    This is a regression starting with 2.6.35.

    Cc:
    Cc: Dave Jiang
    Cc: Jesse Brandeburg
    Cc: Linus Walleij
    Cc: Maciej Sosnowski
    Reported-by: Richard Scobie
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Currently we set all skbs with CHECKSUM_UNNECESSARY, even
    those whose protocol we don't know. This patch just
    add the CHECKSUM_COMPLETE tag for non TCP/UDP packets.

    Reported-by: Eric Dumazet
    Signed-off-by: Breno Leitao
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Breno Leitao
     
  • As of commit 43a9aa64a2f4330a9cb59aaf5c5636566bce067c "NFSD:
    Fill in WCC data for REMOVE, RMDIR, MKNOD, and MKDIR", we sometimes call
    fh_unlock on a filehandle that isn't fully initialized.

    We should fix up the callers, but as a quick fix it is also sufficient
    just to remove this assertion.

    Reported-by: Marius Tolzmann
    Cc: Chuck Lever
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • At least one board using the FEC driver does not have a conventional
    PHY attached to it, it is directly connected to a somewhat simple
    ethernet switch (the board is the SnapGear/LITE, and the attached
    4-port ethernet switch is a RealTek RTL8305). This switch does not
    present the usual register interface of a PHY, it presents nothing.
    So a PHY scan will find nothing - it finds ID's of 0 for each PHY
    on the attached MII bus.

    After the FEC driver was changed to use phylib for supporting PHYs
    it no longer works on this particular board/switch setup.

    Add code support to use a fixed phy if no PHY is found on the MII bus.
    This is based on the way the cpmac.c driver solved this same problem.

    Signed-off-by: Greg Ungerer
    Signed-off-by: David S. Miller

    Greg Ungerer
     

13 Oct, 2010

4 commits