30 May, 2011

9 commits

  • The n_voltages initializer for the TWL6030_ADJUSTABLE_LDO macro is
    off by one, causing the the highest supported voltage to be
    unreachable. Setting the machine constraints to only allow the
    highest voltage causes errors:

    machine_constraints_voltage: VAUX3_6030: unsupportable voltage constraints
    twl_reg twl_reg.39: can't register VAUX3_6030, -22
    twl_reg: probe of twl_reg.39 failed with error -22

    This patch fixes the off by one error. Tested by setting
    VAUX3_6030 to 3.3V.

    Signed-off-by: Colin Cross
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Colin Cross
     
  • The WM8994 regulator driver is perfectly happy if the GPIO used to enable
    the regulator sleeps so call the appropriate GPIO API.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     
  • In order to reduce the impact of ramp times rather than enabling the
    regulators for a device in series use async tasks to run the actual
    enables. This means that the delays which the enables implement can all
    run in parallel, though it does mean that the order in which the
    supplies come on may be unstable.

    For super bonus fun points if any of the regulators are shared between
    multiple supplies on the same device (as is rather likely) then this
    will test our locking. Note that in this case we only delay once for
    each physical regulator so the threads shouldn't block each other while
    delaying.

    It'd be even nicer if we could coalesce writes to a shared enable registers
    in PMICs but that's definitely future work, and it may also be useful
    and is certainly more achievable to optimise out the parallelism if none
    of the regulators implement ramp delays.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     
  • We had a few drivers move from arch/arm into drivers/gpio, but they
    don't actually compile without the ARM platform headers etc. As a
    result they were messing up allyesconfig on x86.

    Make them depend on ARM.

    Reported-by: Ingo Molnar
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (43 commits)
    acer-wmi: support integer return type from WMI methods
    msi-laptop: fix section mismatch in reference from the function load_scm_model_init
    acer-wmi: support to set communication device state by new wmid method
    acer-wmi: allow 64-bits return buffer from WMI methods
    acer-wmi: check the existence of internal 3G device when set capability
    platform/x86:delete two unused variables
    support wlan hotkey on Acer Travelmate 5735Z
    platform-x86: intel_mid_thermal: Fix memory leak
    platform/x86: Fix Makefile for intel_mid_powerbtn
    platform/x86: Simplify intel_mid_powerbtn
    acer-wmi: Delete out-of-date documentation
    acerhdf: Clean up includes
    acerhdf: Drop pointless dependency on THERMAL_HWMON
    acer-wmi: Update MAINTAINERS
    wmi: Orphan ACPI-WMI driver
    tc1100-wmi: Orphan driver
    acer-wmi: does not allow negative number set to initial device state
    platform/oaktrail: ACPI EC Extra driver for Oaktrail
    thinkpad_acpi: Convert printks to pr_
    thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning
    ...

    Linus Torvalds
     
  • Matthew Garrett
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
    dm kcopyd: return client directly and not through a pointer
    dm kcopyd: reserve fewer pages
    dm io: use fixed initial mempool size
    dm kcopyd: alloc pages from the main page allocator
    dm kcopyd: add gfp parm to alloc_pl
    dm kcopyd: remove superfluous page allocation spinlock
    dm kcopyd: preallocate sub jobs to avoid deadlock
    dm kcopyd: avoid pointless job splitting
    dm mpath: do not fail paths after integrity errors
    dm table: reject devices without request fns
    dm table: allow targets to support discards internally

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI EC: remove redundant code
    ACPI: Add D3 cold state
    ACPI: processor: fix processor_physically_present in UP kernel
    ACPI: Split out custom_method functionality into an own driver
    ACPI: Cleanup custom_method debug stuff
    ACPI EC: enable MSI workaround for Quanta laptops
    ACPICA: Update to version 20110413
    ACPICA: Execute an orphan _REG method under the EC device
    ACPICA: Move ACPI_NUM_PREDEFINED_REGIONS to a more appropriate place
    ACPICA: Update internal address SpaceID for DataTable regions
    ACPICA: Add more methods eligible for NULL package element removal
    ACPICA: Split all internal Global Lock functions to new file - evglock
    ACPI: EC: add another DMI check for ASUS hardware
    ACPI EC: remove dead code
    ACPICA: Fix code divergence of global lock handling
    ACPICA: Use acpi_os_create_lock interface
    ACPI: osl, add acpi_os_create_lock interface
    ACPI:Fix goto flows in thermal-sys

    Linus Torvalds
     
  • * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    x86 idle: deprecate mwait_idle() and "idle=mwait" cmdline param
    x86 idle: deprecate "no-hlt" cmdline param
    x86 idle APM: deprecate CONFIG_APM_CPU_IDLE
    x86 idle floppy: deprecate disable_hlt()
    x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it
    x86 idle: clarify AMD erratum 400 workaround
    idle governor: Avoid lock acquisition to read pm_qos before entering idle
    cpuidle: menu: fixed wrapping timers at 4.294 seconds

    Linus Torvalds
     

29 May, 2011

29 commits

  • Return client directly from dm_kcopyd_client_create, not through a
    parameter, making it consistent with dm_io_client_create.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Reserve just the minimum of pages needed to process one job.

    Because we allocate pages from page allocator, we don't need to reserve
    a large number of pages. The maximum job size is SUB_JOB_SIZE and we
    calculate the number of reserved pages based on this.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Replace the arbitrary calculation of an initial io struct mempool size
    with a constant.

    The code calculated the number of reserved structures based on the request
    size and used a "magic" multiplication constant of 4. This patch changes
    it to reserve a fixed number - itself still chosen quite arbitrarily.
    Further testing might show if there is a better number to choose.

    Note that if there is no memory pressure, we can still allocate an
    arbitrary number of "struct io" structures. One structure is enough to
    process the whole request.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • This patch changes dm-kcopyd so that it allocates pages from the main
    page allocator with __GFP_NOWARN | __GFP_NORETRY flags (so that it can
    fail in case of memory pressure). If the allocation fails, dm-kcopyd
    allocates pages from its own reserve.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Introduce a parameter for gfp flags to alloc_pl() for use in following
    patches.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Remove the spinlock protecting the pages allocation. The spinlock is only
    taken on initialization or from single-threaded workqueue. Therefore, the
    spinlock is useless.

    The spinlock is taken in kcopyd_get_pages and kcopyd_put_pages.

    kcopyd_get_pages is only called from run_pages_job, which is only
    called from process_jobs called from do_work.

    kcopyd_put_pages is called from client_alloc_pages (which is initialization
    function) or from run_complete_job. run_complete_job is only called from
    process_jobs called from do_work.

    Another spinlock, kc->job_lock is taken each time someone pushes or pops
    some work for the worker thread. Once we take kc->job_lock, we
    guarantee that any written memory is visible to the other CPUs.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • There's a possible theoretical deadlock in dm-kcopyd because multiple
    allocations from the same mempool are required to finish a request.
    Avoid this by preallocating sub jobs.

    There is a mempool of 512 entries. Each request requires up to 9
    entries from the mempool. If we have at least 57 concurrent requests
    running, the mempool may overflow and mempool allocations may start
    blocking until another entry is freed to the mempool. Because the same
    thread is used to free entries to the mempool and allocate entries from
    the mempool, this may result in a deadlock.

    This patch changes it so that one mempool entry contains all 9 "struct
    kcopyd_job" required to fulfill the whole request. The allocation is
    done only once in dm_kcopyd_copy and no further mempool allocations are
    done during request processing.

    If dm_kcopyd_copy is not run in the completion thread, this
    implementation is deadlock-free.

    MIN_JOBS needs reducing accordingly and we've chosen to reduce it
    further to 8.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Don't split SUB_JOB_SIZE jobs

    If the job size equals SUB_JOB_SIZE, there is no point in splitting it.
    Splitting it just unnecessarily wastes time, because the split job size
    is SUB_JOB_SIZE too.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Integrity errors need to be passed to the owner of the integrity
    metadata for processing. Consequently EILSEQ should be passed up the
    stack.

    Cc: stable@kernel.org
    Signed-off-by: Martin K. Petersen
    Acked-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon

    Martin K. Petersen
     
  • This patch adds a check that a block device has a request function
    defined before it is used. Otherwise, misconfiguration can cause an oops.

    Because we are allowing devices with zero size e.g. an offline multipath
    device as in commit 2cd54d9bedb79a97f014e86c0da393416b264eb3
    ("dm: allow offline devices") there needs to be an additional check
    to ensure devices are initialised. Some block devices, like a loop
    device without a backing file, exist but have no request function.

    Reproducer is trivial: dm-mirror on unbound loop device
    (no backing file on loop devices)

    dmsetup create x --table "0 8 mirror core 2 8 sync 2 /dev/loop0 0 /dev/loop1 0"

    and mirror resync will immediatelly cause OOps.

    BUG: unable to handle kernel NULL pointer dereference at (null)
    ? generic_make_request+0x2bd/0x590
    ? kmem_cache_alloc+0xad/0x190
    submit_bio+0x53/0xe0
    ? bio_add_page+0x3b/0x50
    dispatch_io+0x1ca/0x210 [dm_mod]
    ? read_callback+0x0/0xd0 [dm_mirror]
    dm_io+0xbb/0x290 [dm_mod]
    do_mirror+0x1e0/0x748 [dm_mirror]

    Signed-off-by: Milan Broz
    Reported-by: Zdenek Kabelac
    Acked-by: Mike Snitzer
    Cc: stable@kernel.org
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Permit a target to support discards regardless of whether or not all its
    underlying devices do.

    Signed-off-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon

    Mike Snitzer
     
  • Conflicts:
    drivers/platform/x86/compal-laptop.c

    Len Brown
     
  • …old', 'ec-asus' and 'thermal-fix' into release

    Len Brown
     
  • Plan to remove floppy_disable_hlt in 2012, an ancient
    workaround with comments that it should be removed.

    This allows us to remove clutter and a run-time branch
    from the idle code.

    WARN_ONCE() on invocation until it is removed.

    cc: x86@kernel.org
    cc: stable@kernel.org # .39.x
    Signed-off-by: Len Brown

    Len Brown
     
  • The workaround for AMD erratum 400 uses the term "c1e" falsely suggesting:
    1. Intel C1E is somehow involved
    2. All AMD processors with C1E are involved

    Use the string "amd_c1e" instead of simply "c1e" to clarify that
    this workaround is specific to AMD's version of C1E.
    Use the string "e400" to clarify that the workaround is specific
    to AMD processors with Erratum 400.

    This patch is text-substitution only, with no functional change.

    cc: x86@kernel.org
    Acked-by: Borislav Petkov
    Signed-off-by: Len Brown

    Len Brown
     
  • ec->handle is set in ec_parse_device(), so don't bother to set it again.

    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Zhang Rui
     
  • _SxW returns an Integer containing the lowest D-state supported in state
    Sx. If OSPM has not indicated that it supports _PR3, then the value “3”
    corresponds to D3. If it has indicated _PR3 support, the value “3”
    represents D3hot and the value “4” represents D3cold.

    Linux does set _OSC._PR3, so we should fix it to expect that _SxW can
    return 4.

    Signed-off-by: Lin Ming
    Acked-by: Jesse Barnes
    Signed-off-by: Len Brown

    Lin Ming
     
  • Usually, there are multiple processors defined in ACPI table, for
    example

    Scope (_PR)
    {
    Processor (CPU0, 0x00, 0x00000410, 0x06) {}
    Processor (CPU1, 0x01, 0x00000410, 0x06) {}
    Processor (CPU2, 0x02, 0x00000410, 0x06) {}
    Processor (CPU3, 0x03, 0x00000410, 0x06) {}
    }

    processor_physically_present(...) will be called to check whether those
    processors are physically present.

    Currently we have below codes in processor_physically_present,

    cpuid = acpi_get_cpuid(...);
    if ((cpuid == -1) && (num_possible_cpus() > 1))
    return false;
    return true;

    In UP kernel, acpi_get_cpuid(...) always return -1 and
    num_possible_cpus() always return 1, so
    processor_physically_present(...) always returns true for all passed in
    processor handles.

    This is wrong for UP processor or SMP processor running UP kernel.

    This patch removes the !SMP version of acpi_get_cpuid(), so both UP and
    SMP kernel use the same acpi_get_cpuid function.

    And for UP kernel, only processor 0 is valid.

    https://bugzilla.kernel.org/show_bug.cgi?id=16548
    https://bugzilla.kernel.org/show_bug.cgi?id=16357

    Tested-by: Anton Kochkov
    Tested-by: Ambroz Bizjak
    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Lin Ming
     
  • Fix kernel-doc warnings in scsi_proc.c:

    Warning(drivers/scsi/scsi_proc.c:390): No description found for parameter 'dev'
    Warning(drivers/scsi/scsi_proc.c:390): No description found for parameter 'data'
    Warning(drivers/scsi/scsi_proc.c:390): Excess function parameter 's' description in 'always_match'
    Warning(drivers/scsi/scsi_proc.c:390): Excess function parameter 'p' description in 'always_match'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • With /sys/kernel/debug/acpi/custom_method root can write
    to arbitrary memory and increase his priveleges, even if
    these are restricted.

    -> Make this an own debug .config option and warn about the
    security issue in the config description.

    -> Still keep acpi/debugfs.c which now only creates an empty
    /sys/kernel/debug/acpi directory. There might be other
    users of it later.

    Signed-off-by: Thomas Renninger
    Acked-by: Rafael J. Wysocki
    Acked-by: rui.zhang@intel.com
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • - Move param aml_debug_output to other params into sysfs.c
    - Split acpi_debugfs_init to prepare custom_method to be
    an own .config option and driver.

    Signed-off-by: Thomas Renninger
    Acked-by: Rafael J. Wysocki
    Acked-by: rui.zhang@intel.com
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • Enable MSI workaround for Quanta laptops.
    https://bugzilla.kernel.org/show_bug.cgi?id=20242

    Tested-by: Jan-Matthias Braun
    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Zhang Rui
     
  • Cpuidle menu governor is using u32 as a temporary datatype for storing
    nanosecond values which wrap around at 4.294 seconds. This causes errors
    in predicted sleep times resulting in higher than should be C state
    selection and increased power consumption. This also breaks cpuidle
    state residency statistics.

    cc: stable@kernel.org # .32.x through .39.x
    Signed-off-by: Tero Kristo
    Signed-off-by: Len Brown

    Tero Kristo
     
  • …l/git/tip/linux-2.6-tip

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
    perf: Fix SIGIO handling
    perf top: Don't stop if no kernel symtab is found
    perf top: Handle kptr_restrict
    perf top: Remove unused macro
    perf events: initialize fd array to -1 instead of 0
    perf tools: Make sure kptr_restrict warnings fit 80 col terms
    perf tools: Fix build on older systems
    perf symbols: Handle /proc/sys/kernel/kptr_restrict
    perf: Remove duplicate headers
    ftrace: Add internal recursive checks
    tracing: Update btrfs's tracepoints to use u64 interface
    tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine
    ftrace: Set ops->flag to enabled even on static function tracing
    tracing: Have event with function tracer check error return
    ftrace: Have ftrace_startup() return failure code
    jump_label: Check entries limit in __jump_label_update
    ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
    scripts/tags.sh: Add magic for trace-events for etags too
    scripts/tags.sh: Fix ctags for DEFINE_EVENT()
    x86/ftrace: Fix compiler warning in ftrace.c
    ...

    Linus Torvalds
     
  • * 'for-usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
    Intel xhci: Limit number of active endpoints to 64.
    Intel xhci: Ignore spurious successful event.
    Intel xhci: Support EHCI/xHCI port switching.
    Intel xhci: Add PCI id for Panther Point xHCI host.
    xhci: STFU: Be quieter during URB submission and completion.
    xhci: STFU: Don't print event ring dequeue pointer.
    xhci: STFU: Remove function tracing.
    xhci: Don't submit commands when the host is dead.
    xhci: Clear stopped_td when Stop Endpoint command completes.

    Linus Torvalds
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (33 commits)
    x86: poll waiting for I/OAT DMA channel status
    maintainers: add dma engine tree details
    dmaengine: add TODO items for future work on dma drivers
    dmaengine: Add API documentation for slave dma usage
    dmaengine/dw_dmac: Update maintainer-ship
    dmaengine: move link order
    dmaengine/dw_dmac: implement pause and resume in dwc_control
    dmaengine/dw_dmac: Replace spin_lock* with irqsave variants and enable submission from callback
    dmaengine/dw_dmac: Divide one sg to many desc, if sg len is greater than DWC_MAX_COUNT
    dmaengine/dw_dmac: set residue as total len in dwc_tx_status if status is !DMA_SUCCESS
    dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called
    dmaengine: at_hdmac: pause: no need to wait for FIFO empty
    pch_dma: modify pci device table definition
    pch_dma: Support new device ML7223 IOH
    pch_dma: Support I2S for ML7213 IOH
    pch_dma: Fix DMA setting issue
    pch_dma: modify for checkpatch
    pch_dma: fix dma direction issue for ML7213 IOH video-in
    dmaengine: at_hdmac: use descriptor chaining help function
    dmaengine: at_hdmac: implement pause and resume in atc_control
    ...

    Fix up trivial conflict in drivers/dma/dw_dmac.c

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
    mfd: Fix build breakage caused by tps65910 gpio directory move
    mfd: Use mfd cell platform_data for db8500-prcmu cells platform bits

    Linus Torvalds
     
  • * 'spi/next' of git://git.secretlab.ca/git/linux-2.6:
    spi/spi_bfin_sport: new driver for a SPI bus via the Blackfin SPORT peripheral
    spi/tle620x: add missing device_remove_file()

    Linus Torvalds
     
  • * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6:
    gpio/pch_gpio: Support new device ML7223
    gpio: make gpio_{request,free}_array gpio array parameter const
    GPIO: OMAP: move to drivers/gpio
    GPIO: OMAP: move register offset defines into
    gpio: Convert gpio_is_valid to return bool
    gpio: Move the s5pc100 GPIO to drivers/gpio
    gpio: Move the s5pv210 GPIO to drivers/gpio
    gpio: Move the exynos4 GPIO to drivers/gpio
    gpio: Move to Samsung common GPIO library to drivers/gpio
    gpio/nomadik: add function to read GPIO pull down status
    gpio/nomadik: show all pins in debug
    gpio: move Nomadik GPIO driver to drivers/gpio
    gpio: move U300 GPIO driver to drivers/gpio
    langwell_gpio: add runtime pm support
    gpio/pca953x: Add support for pca9574 and pca9575 devices
    gpio/cs5535: Show explicit dependency between gpio_cs5535 and mfd_cs5535

    Linus Torvalds
     

28 May, 2011

2 commits