17 Dec, 2009

12 commits

  • In order to remove the cfs_rq dependency from set_task_cpu() we
    need to ensure the task is cfs_rq invariant for all callsites.

    The simple approach is to substract cfs_rq->min_vruntime from
    se->vruntime on dequeue, and add cfs_rq->min_vruntime on
    enqueue.

    However, this has the downside of breaking FAIR_SLEEPERS since
    we loose the old vruntime as we only maintain the relative
    position.

    To solve this, we observe that we only migrate runnable tasks,
    we do this using deactivate_task(.sleep=0) and
    activate_task(.wakeup=0), therefore we can restrain the
    min_vruntime invariance to that state.

    The only other case is wakeup balancing, since we want to
    maintain the old vruntime we cannot make it relative on dequeue,
    but since we don't migrate inactive tasks, we can do so right
    before we activate it again.

    This is where we need the new pre-wakeup hook, we need to call
    this while still holding the old rq->lock. We could fold it into
    ->select_task_rq(), but since that has multiple callsites and
    would obfuscate the locking requirements, that seems like a
    fudge.

    This leaves the fork() case, simply make sure that ->task_fork()
    leaves the ->vruntime in a relative state.

    This covers all cases where set_task_cpu() gets called, and
    ensures it sees a relative vruntime.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • As will be apparent in the next patch, we need a pre wakeup hook
    for sched_fair task migration, hence rename the post wakeup hook
    and one pre wakeup.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Since kthread_bind() lost its dependencies on sched.c, move it
    back where it came from.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Since select_task_rq() is now responsible for guaranteeing
    ->cpus_allowed and cpu_active_mask, we need to verify this.

    select_task_rq_rt() can blindly return
    smp_processor_id()/task_cpu() without checking the valid masks,
    select_task_rq_fair() can do the same in the rare case that all
    SD_flags are disabled.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Since we access ->cpus_allowed without holding rq->lock we need
    a retry loop to validate the result, this comes for near free
    when we merge sched_migrate_task() into sched_exec() since that
    already does the needed check.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • In order to clean up the set_task_cpu() rq dependencies we need
    to ensure it is never called on blocked tasks because such usage
    does not pair with consistent rq->lock usage.

    This puts the migration burden on ttwu().

    Furthermore we need to close a race against changing
    ->cpus_allowed, since select_task_rq() runs with only preemption
    disabled.

    For sched_fork() this is safe because the child isn't in the
    tasklist yet, for wakeup we fix this by synchronizing
    set_cpus_allowed_ptr() against TASK_WAKING, which leaves
    sched_exec to be a problem

    This also closes a hole in (6ad4c1888 sched: Fix balance vs
    hotplug race) where ->select_task_rq() doesn't validate the
    result against the sched_domain/root_domain.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • For later convenience use TASK_WAKING for fresh tasks.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • We should skip !SD_LOAD_BALANCE domains.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    CC: stable@kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Make sure not to access sched_fair fields before verifying it is
    indeed a sched_fair task.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    CC: stable@kernel.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Sachin found cpu hotplug test failures on powerpc, which made
    the kernel hang on his POWER box.

    The problem is that we fail to re-activate a cpu when a
    hot-unplug fails. Fix this by moving the de-activation into
    _cpu_down after doing the initial checks.

    Remove the synchronize_sched() calls and rely on those implied
    by rebuilding the sched domains using the new mask.

    Reported-by: Sachin Sant
    Signed-off-by: Xiaotian Feng
    Tested-by: Sachin Sant
    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Xiaotian Feng
     
  • A UP machine has 1 active cpu, not having the boot-cpu in the
    active map when starting the scheduler confuses things.

    Signed-off-by: Peter Zijlstra
    Cc: Mike Galbraith
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Conflicts:
    kernel/sched_idletask.c

    Merge reason: resolve the conflicts, pick up latest changes.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

16 Dec, 2009

28 commits

  • Caused by commit 0b83ddebc6e884dc0221358cf68c461520fbdd8e ("MFD:
    twl4030: add twl4030_codec MFD as a new child to the core") interacting
    with commit b07682b6056eb6701f8cb86aa5800e6f2ea7919b ("mfd: Rename
    twl4030* driver files to enable re-use").

    This file seems to have been missed in the renaming.

    Signed-off-by: Stephen Rothwell
    Acked-by: Peter Ujfalusi
    Acked-by: Mark Brown
    Acked-by: Tony Lindgren
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    xfs: event tracing support
    xfs: change the xfs_iext_insert / xfs_iext_remove
    xfs: cleanup bmap extent state macros

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (80 commits)
    dm snapshot: use merge origin if snapshot invalid
    dm snapshot: report merge failure in status
    dm snapshot: merge consecutive chunks together
    dm snapshot: trigger exceptions in remaining snapshots during merge
    dm snapshot: delay merging a chunk until writes to it complete
    dm snapshot: queue writes to chunks being merged
    dm snapshot: add merging
    dm snapshot: permit only one merge at once
    dm snapshot: support barriers in snapshot merge target
    dm snapshot: avoid allocating exceptions in merge
    dm snapshot: rework writing to origin
    dm snapshot: add merge target
    dm exception store: add merge specific methods
    dm snapshot: create function for chunk_is_tracked wait
    dm snapshot: make bio optional in __origin_write
    dm mpath: reject messages when device is suspended
    dm: export suspended state to targets
    dm: rename dm_suspended to dm_suspended_md
    dm: swap target postsuspend call and setting suspended flag
    dm crypt: add plain64 iv
    ...

    Linus Torvalds
     
  • * 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block:
    cfq: set workload as expired if it doesn't have any slice left
    Fix a CFQ crash in "for-2.6.33" branch of block tree
    cfq: Remove wait_request flag when idle time is being deleted
    cfq-iosched: commenting non-obvious initialization
    cfq-iosched: Take care of corner cases of group losing share due to deletion
    cfq-iosched: Get rid of cfqq wait_busy_done flag
    cfq: Optimization for close cooperating queue searching
    block,xd: Delay allocation of DMA buffers until device is known
    drbd: Following the hmac change to SHASH (see linux commit 8bd1209cfff)
    cfq-iosched: reduce write depth only if sync was delayed

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: ac97_codec - increase timeout for analog sections to 5 second
    ASoC: Correct code taking the size of a pointer
    ALSA: hda - Add PCI IDs for Nvidia G2xx-series
    ALSA: sound/isa/gus: Correct code taking the size of a pointer
    ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
    ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)

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

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits)
    clockevents: Convert to raw_spinlock
    clockevents: Make tick_device_lock static
    debugobjects: Convert to raw_spinlocks
    perf_event: Convert to raw_spinlock
    hrtimers: Convert to raw_spinlocks
    genirq: Convert irq_desc.lock to raw_spinlock
    smp: Convert smplocks to raw_spinlocks
    rtmutes: Convert rtmutex.lock to raw_spinlock
    sched: Convert pi_lock to raw_spinlock
    sched: Convert cpupri lock to raw_spinlock
    sched: Convert rt_runtime_lock to raw_spinlock
    sched: Convert rq->lock to raw_spinlock
    plist: Make plist debugging raw_spinlock aware
    bkl: Fixup core_lock fallout
    locking: Cleanup the name space completely
    locking: Further name space cleanups
    alpha: Fix fallout from locking changes
    locking: Implement new raw_spinlock
    locking: Convert raw_rwlock functions to arch_rwlock
    locking: Convert raw_rwlock to arch_rwlock
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
    avr32: update default configurations for ATNGW100, ATSTK1002 and ATSTK1006
    avr32: add default configurations for ATNGW100 mkII and EVKLCD10X
    avr32: add support for ATNGW100 mkII board
    avr32: convert to asm-generic/hardirq.h
    avr32: add two new at91 to cpu.h definition
    avr32: clean up linker script using standard macros.
    avr32: MRMT: correct setup of SPI slaves
    avr32: function for independently setting up SPI slaves
    avr32: re-instate MCI WP/CD pin assignments for ATNGW100

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix clock event multiplier printf format.
    sparc64: Use clock{source,events}_calc_mult_shift().
    sparc64: Use free_bootmem_late() in mdesc_lmb_free().
    sparc: Add alignment and emulation fault perf events.
    sparc64: Add syscall tracepoint support.
    sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}()
    sparc: Use __builtin_object_size() to validate the buffer size for copy_from_user()
    sparc64: Add some missing __kprobes annotations to kernel fault paths.
    sparc64: Use kprobes_built_in() to avoid ifdefs in fault_64.c
    sparc: Validate that kprobe address is 4-byte aligned.
    sparc64: Don't specify IRQF_SHARED for LDC interrupts.
    sparc64: Fix stack debugging IRQ stack regression.
    sparc64: Fix overly strict range type matching for PCI devices.

    Linus Torvalds
     
  • * git://git.infradead.org/battery-2.6:
    power_supply_sysfs: Handle -ENODATA in a special way
    wm831x_backup: Remove unused variables
    gta02: Set pcf50633 charger_reference_current_ma
    pcf50633: Query charger status directly
    pcf50633: Properly reenable charging when the supply conditions change
    pcf50633: Get rid of charging restart software auto-triggering
    pcf50633: introduces battery charging current control
    pcf50633: Add ac power supply class to the charger
    wm831x: Factor out WM831x backup battery charger

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
    USB: Close usb_find_interface race v3
    Revert "USB: Close usb_find_interface race"

    Linus Torvalds
     
  • [akpm@linux-foundation.org: s/q/g/ (Randy)]
    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Report output values as 1/1000 of earth gravity.

    Output values from lis3 can be read from sysfs position entry and from
    input device. Input device can be accessed as event device and as
    joystick device. Joystick device can be in two modes. Meaning of the
    output values varies from case to case depending on the chip type and
    configuration (scale). Only joystick interface in JS_CORR_BROKEN mode
    returned somehow similar output values in different configurations.
    Joystick device is in that state by default in case of lis3.

    Position sysfs entry, input event device and raw joystick device have been
    little bit broken since meaning of the output values has been varied
    between 12 and 8 bit devices. Applications which relayed on those methods
    failed if the chip is different than the expected one.

    This patch converts output values to mean similar thing in different
    configurations. Both 8 and 12 bit devices reports now same acceleration
    values. If somebody implements full scale support to the driver, output
    values will still mean the same. Scaling factor and input device range
    must be updated in that case.

    Joystick interface in JS_CORR_BROKEN mode is not touched by this patch.
    All other interfaces have different scale after this change. For 12 bit
    device scaling factor is 0.977 which keeps scaled and unscaled values are
    quite close to each others. For 8 bit device, scaled values are 18 times
    bigger than unscaled values.

    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • It is possible to read position information at the chip measurement rate
    via sysfs. This patch adds possibility to configure chip measurement
    rate.

    Signed-off-by: Samu Onkalo
    Signed-off-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Chip is calibrated by the manufacturer. There is no need to calibarate it
    at driver level. If the chip is used as a joystick, calibaration can be
    done using joystick device calibration mechanism.

    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Implement selftest feature as specified by chip manufacturer. Control:
    read selftest sysfs entry

    Response: "OK x y z" or "FAIL x y z"

    where x, y, and z are difference between selftest mode and normal mode.
    Test is passed when values are within acceptance limit values.

    Acceptance limits are provided via platform data. See chip spesifications
    for acceptance limits. If limits are not properly set, OK / FAIL decision
    is meaningless. However, userspace application can still make decision
    based on the numeric x, y, z values.

    Selftest is meant for HW diagnostic purposes. It is not meant to be
    called during normal use of the chip. It may cause false interrupt
    events. Selftest mode delays polling of the normal results but it doesn't
    cause wrong values. Chip must be in static state during selftest. Any
    acceration during the test causes most probably failure.

    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Lis3 accelerometer sensors have quite long power on delay (up to 125
    ms). This patch adds necessary delay to power on sequence for currently
    supported lis3 chips.

    Signed-off-by: Samu Onkalo
    Tested-by: Éric Piel
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Originally the driver was only targeted to 12bits sensors. When support
    for 8bits sensors was added, some slight difference in the registers were
    overlooked. This should fix it, both for initialization, and for
    displaying the rate.

    Reported-by: Kalhan Trisal
    Reported-by: Christoph Plattner
    Tested-by: Christoph Plattner
    Tested-by: Samu Onkalo
    Signed-off-by: Éric Piel
    Signed-off-by: Samu Onkalo
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Éric Piel
     
  • Most of the documentation and comments were written when the driver was
    only supporting one type of chip, only via ACPI/HP. Update the info to
    the much clearer understanding that we have now.

    Signed-off-by: Éric Piel
    Signed-off-by: Samu Onkalo
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Éric Piel
     
  • polled input device itself was not free'd.

    Signed-off-by: Samu Onkalo
    Tested-by: Éric Piel
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Send input_sync after each measurement round. This helps userspace to
    detect which reported values belongs to the same measurement.

    Signed-off-by: Samu Onkalo
    Tested-by: Éric Piel
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Add control of fan minimum turn-on output levels, decoupling it from the
    fan turn-off output level. Add control of rate of change of fan output
    level. These in turn allow lower turn-off rotor speed and smoother
    transitions for better thermal and acoustic control authority. Add
    support for constant fan speed and proportional-response operations modes.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Daniel J Blueman
    Cc: Jean Delvare
    Cc: David Hubbard
    Cc: Hans de Goede
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel J Blueman
     
  • Add the possibility to remap axes via platform data. Function pointers
    for resource setup and release purposes

    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Cc: Jean Delvare
    Cc: "Trisal, Kalhan"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Move common crc body to new function crc32_body() cleaup and micro
    optimize crc32_body for speed and less size.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     
  • Improve the /proc/interrupts output so the irq number can be mapped to
    platform device on boards with multiple tmio_mmc instances.

    Signed-off-by: Magnus Damm
    Cc:
    Cc: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • Add SD host driver for Blackfin BF54x and BF51x.

    [akpm@linux-foundation.org: fix layout, c99 warning]
    Signed-off-by: Cliff Cai
    Signed-off-by: Bryan Wu
    Signed-off-by: Mike Frysinger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cliff Cai
     
  • This new revision of the IP adds some improvements to the MCI already
    present in several Atmel SOC.

    Some new registers are added and a particular way of handling DMA
    interaction lead to a new sequence in function call which is backward
    compatible: On MCI2, we must set the DMAEN bit to enable the DMA
    handshaking interface. This must happen before the data transfer command
    is sent.

    A new function is able to differentiate MCI2 code and is based on
    knowledge of processor id (cpu_is_xxx()).

    Signed-off-by: Nicolas Ferre
    Signed-off-by: Haavard Skinnemoen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas Ferre
     
  • Allow the use of another DMA controller driver in atmel-mci sd/mmc driver.
    This adds a generic dma_slave pointer to the mci platform structure where
    we can store DMA controller information. In atmel-mci we use information
    provided by this structure to initialize the driver (with new helper
    functions that are architecture dependant).

    This also adds at32/avr32 chip modifications to cope with this new access
    method.

    Signed-off-by: Nicolas Ferre
    Cc: Haavard Skinnemoen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas Ferre
     
  • Some people run general-purpose distribution kernels on netbooks with
    a card that is physically non-removable or logically non-removable
    (e.g. used for /home) and cannot be cleanly unmounted during suspend.
    Add a module parameter to set whether cards are assumed removable or
    non-removable, with the default set by CONFIG_MMC_UNSAFE_RESUME.

    In general, it is not possible to tell whether a card present in an MMC
    slot after resume is the same that was there before suspend. So there are
    two possible behaviours, each of which will cause data loss in some cases:

    CONFIG_MMC_UNSAFE_RESUME=n (default): Cards are assumed to be removed
    during suspend. Any filesystem on them must be unmounted before suspend;
    otherwise, buffered writes will be lost.

    CONFIG_MMC_UNSAFE_RESUME=y: Cards are assumed to remain present during
    suspend. They must not be swapped during suspend; otherwise, buffered
    writes will be flushed to the wrong card.

    Currently the choice is made at compile time and this allows that to be
    overridden at module load time.

    Signed-off-by: Ben Hutchings
    Cc: Wouter van Heyst
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Hutchings