28 Jun, 2013

8 commits

  • * acpi-assorted:
    ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
    ACPI: Add CMOS RTC Operation Region handler support
    ACPI: Remove unused flags in acpi_device_flags
    ACPI: Remove useless initializers
    ACPI / battery: Make sure all spaces are in correct places
    ACPI: add _STA evaluation at do_acpi_find_child()
    ACPI / EC: access user space with get_user()/put_user()

    Rafael J. Wysocki
     
  • * acpi-lpss:
    ACPI / LPSS: override SDIO private register space size from ACPI tables
    ACPI / LPSS: mask the UART TX completion interrupt
    ACPI / LPSS: add support for Intel BayTrail

    Conflicts:
    drivers/acpi/acpi_lpss.c (with commit b9e95fc)

    Rafael J. Wysocki
     
  • * acpi-pm:
    ACPI / PM: Rework and clean up acpi_dev_pm_get_state()
    ACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c
    ACPI / PM: Rename function acpi_device_power_state() and make it static
    ACPI / PM: acpi_processor_suspend() can be static
    xen / ACPI / sleep: Register an acpi_suspend_lowlevel callback.
    x86 / ACPI / sleep: Provide registration for acpi_suspend_lowlevel.

    Rafael J. Wysocki
     
  • * acpi-scan:
    ACPI / scan: Do not bind ACPI drivers to objects with scan handlers
    ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery
    ACPI / scan: Simplify ACPI driver probing

    Rafael J. Wysocki
     
  • * acpica: (21 commits)
    ACPICA: Update version to 20130517
    ACPICA: _CST repair: Handle null package entries
    ACPICA: Add several repairs for _CST predefined name
    ACPICA: Move _PRT repair into the standard complex repair module
    ACPICA: Clear events initialized flag upon event component termination
    ACPICA: Fix possible memory leak in GPE init error path
    ACPICA: ACPICA Termination: Delete global lock pending lock
    ACPICA: Update interface to acpi_ut_valid_acpi_name()
    ACPICA: Do not use extended sleep registers unless HW-reduced bit is set
    ACPICA: Split table print utilities to a new a separate file
    ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
    ACPICA: Standardize all switch() blocks
    ACPICA: Split internal error msg routines to a separate file
    ACPICA: Split buffer dump routines into separate file
    ACPICA: Update version to 20130418
    ACPICA: Update for "orphan" embedded controller _REG method support
    ACPICA: Remove unused macros, no functional change
    ACPICA: Predefined name support: Remove unused local variable
    ACPICA: Add argument typechecking for all predefined ACPI names
    ACPICA: Add BIOS error interface for predefined name validation support
    ...

    Rafael J. Wysocki
     
  • * acpi-hotplug:
    ACPI: Do not use CONFIG_ACPI_HOTPLUG_MEMORY_MODULE
    ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq
    Memory hotplug: Move alternative function definitions to header
    ACPI / processor: Fix potential NULL pointer dereference in acpi_processor_add()
    Memory hotplug / ACPI: Simplify memory removal
    ACPI / scan: Add second pass of companion offlining to hot-remove code
    Driver core / MM: Drop offline_memory_block()
    ACPI / processor: Pass processor object handle to acpi_bind_one()
    ACPI: Drop removal_type field from struct acpi_device
    Driver core / memory: Simplify __memory_block_change_state()
    ACPI / processor: Initialize per_cpu(processors, pr->id) properly
    CPU: Fix sysfs cpu/online of offlined CPUs
    Driver core: Introduce offline/online callbacks for memory blocks
    ACPI / memhotplug: Bind removable memory blocks to ACPI device nodes
    ACPI / processor: Use common hotplug infrastructure
    ACPI / hotplug: Use device offline/online for graceful hot-removal
    Driver core: Use generic offline/online for CPU offline/online
    Driver core: Add offline/online device operations

    Rafael J. Wysocki
     
  • HP Folio 13's BIOS defines CMOS RTC Operation Region and the EC's
    _REG method will access that region. To allow the CMOS RTC region
    handler to be installed before the EC _REG method is first invoked,
    add ec_skip_dsdt_scan() as HP Folio 13's callback to ec_dmi_table.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=54621
    Reported-and-tested-by: Stefan Nagy
    Signed-off-by: Lan Tianyu
    Cc: 3.9+
    Signed-off-by: Rafael J. Wysocki

    Lan Tianyu
     
  • On HP Folio 13-2000, the BIOS defines a CMOS RTC Operation Region and
    the EC's _REG methord accesses that region. Thus an appropriate
    address space handler must be registered for that region before the
    EC driver is loaded.

    Introduce a mechanism for adding CMOS RTC address space handlers.
    Register an ACPI scan handler for CMOS RTC devices such that, when
    a device of that kind is detected during an ACPI namespace scan, a
    common CMOS RTC operation region address space handler will be
    installed for it.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=54621
    Reported-and-tested-by: Stefan Nagy
    Signed-off-by: Lan Tianyu
    Cc: 3.9+
    Signed-off-by: Rafael J. Wysocki

    Lan Tianyu
     

26 Jun, 2013

3 commits


25 Jun, 2013

1 commit

  • Commit 30dcf76acc69 "libata: migrate ACPI code over to new bindings"
    mistakenly dropped the code to register hotplug notificaion handler
    for ATA port/devices, causing regression for people using ATA bay,
    as kernel bug #59871 shows.

    Fix this by adding back the hotplug notification handler registration
    code. Since this code has to be run once and notification needs to
    be installed on every ATA port/devices handle no matter if there is
    actual device attached, we can't do this in binding time for ATA
    device ACPI handle, as the binding only occurs when a SCSI device is
    created, i.e. there is device attached. So introduce the
    ata_acpi_hotplug_init() function to loop scan all ATA ACPI handles
    and if it is available, install the notificaion handler for it during
    ATA init time.

    With the ATA ACPI handle binding to SCSI device tree, it is possible
    now that when the SCSI hotplug work removes the SCSI device, the ACPI
    unbind function will find that the corresponding ACPI device has
    already been deleted by dock driver, causing a scaring message like:
    [ 128.263966] scsi 4:0:0:0: Oops, 'acpi_handle' corrupt
    Fix this by waiting for SCSI hotplug task finish in our notificaion
    handler, so that the removal of ACPI device done in ACPI unbind
    function triggered by the removal of SCSI device is run earlier when
    ACPI device is still available.

    [rjw: Rebased]
    References: https://bugzilla.kernel.org/show_bug.cgi?id=59871
    Reported-bisected-and-tested-by: Dirk Griesbach
    Signed-off-by: Aaron Lu
    Acked-by: Tejun Heo
    Cc: 3.6+
    Signed-off-by: Rafael J. Wysocki

    Aaron Lu
     

24 Jun, 2013

1 commit

  • The interactions between the ACPI dock driver and the ACPI-based PCI
    hotplug (acpiphp) are currently problematic because of ordering
    issues during hot-remove operations.

    First of all, the current ACPI glue code expects that physical
    devices will always be deleted before deleting the companion ACPI
    device objects. Otherwise, acpi_unbind_one() will fail with a
    warning message printed to the kernel log, for example:

    [ 185.026073] usb usb5: Oops, 'acpi_handle' corrupt
    [ 185.035150] pci 0000:1b:00.0: Oops, 'acpi_handle' corrupt
    [ 185.035515] pci 0000:18:02.0: Oops, 'acpi_handle' corrupt
    [ 180.013656] port1: Oops, 'acpi_handle' corrupt

    This means, in particular, that struct pci_dev objects have to
    be deleted before the struct acpi_device objects they are "glued"
    with.

    Now, the following happens the during the undocking of an ACPI-based
    dock station:
    1) hotplug_dock_devices() invokes registered hotplug callbacks to
    destroy physical devices associated with the ACPI device objects
    depending on the dock station. It calls dd->ops->handler() for
    each of those device objects.
    2) For PCI devices dd->ops->handler() points to
    handle_hotplug_event_func() that queues up a separate work item
    to execute _handle_hotplug_event_func() for the given device and
    returns immediately. That work item will be executed later.
    3) hotplug_dock_devices() calls dock_remove_acpi_device() for each
    device depending on the dock station. This runs acpi_bus_trim()
    for each of them, which causes the underlying ACPI device object
    to be destroyed, but the work items queued up by
    handle_hotplug_event_func() haven't been started yet.
    4) _handle_hotplug_event_func() queued up in step 2) are executed
    and cause the above failure to happen, because the PCI devices
    they handle do not have the companion ACPI device objects any
    more (those objects have been deleted in step 3).

    The possible breakage doesn't end here, though, because
    hotplug_dock_devices() may return before at least some of the
    _handle_hotplug_event_func() work items spawned by it have a
    chance to complete and then undock() will cause _DCK to be
    evaluated and that will cause the devices handled by the
    _handle_hotplug_event_func() to go away possibly while they are
    being accessed.

    This means that dd->ops->handler() for PCI devices should not point
    to handle_hotplug_event_func(). Instead, it should point to a
    function that will do the work of _handle_hotplug_event_func()
    synchronously. For this reason, introduce such a function,
    hotplug_event_func(), and modity acpiphp_dock_ops to point to
    it as the handler.

    Unfortunately, however, this is not sufficient, because if the dock
    code were not changed further, hotplug_event_func() would now
    deadlock with hotplug_dock_devices() that called it, since it would
    run unregister_hotplug_dock_device() which in turn would attempt to
    acquire the dock station's hp_lock mutex already acquired by
    hotplug_dock_devices().

    To resolve that deadlock use the observation that
    unregister_hotplug_dock_device() won't need to acquire hp_lock
    if PCI bridges the devices on the dock station depend on are
    prevented from being removed prematurely while the first loop in
    hotplug_dock_devices() is in progress.

    To make that possible, introduce a mechanism by which the callers of
    register_hotplug_dock_device() can provide "init" and "release"
    routines that will be executed, respectively, during the addition
    and removal of the physical device object associated with the
    given ACPI device handle. Make acpiphp use two new functions,
    acpiphp_dock_init() and acpiphp_dock_release(), that call
    get_bridge() and put_bridge(), respectively, on the acpiphp bridge
    holding the given device, for this purpose.

    In addition to that, remove the dock station's list of
    "hotplug devices" and make the dock code always walk the whole list
    of "dependent devices" instead in such a way that the loops in
    hotplug_dock_devices() and dock_event() (replacing the loops over
    "hotplug devices") will take references to the list entries that
    register_hotplug_dock_device() has been called for. That prevents
    the "release" routines associated with those entries from being
    called while the given entry is being processed and for PCI
    devices this means that their bridges won't be removed (by a
    concurrent thread) while hotplug_event_func() handling them is
    being executed.

    This change is based on two earlier patches from Jiang Liu.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=59501
    Reported-and-tested-by: Alexander E. Patrakov
    Tracked-down-by: Jiang Liu
    Tested-by: Illya Klymov
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Yinghai Lu
    Cc: 3.9+

    Rafael J. Wysocki
     

23 Jun, 2013

10 commits

  • On x86 platforms, the kernel respects PCI resource assignments from
    the BIOS and only reassigns resources for unassigned BARs at boot
    time. However, with the ACPI-based hotplug (acpiphp), it ignores the
    BIOS' PCI resource assignments completely and reassigns all resources
    by itself. This causes differences in PCI resource allocation
    between boot time and runtime hotplug to occur, which is generally
    undesirable and sometimes actively breaks things.

    Namely, if there are enough resources, reassigning all PCI resources
    during runtime hotplug should work, but it may fail if the resources
    are constrained. This may happen, for instance, when some PCI
    devices with huge MMIO BARs are involved in the runtime hotplug
    operations, because the current PCI MMIO alignment algorithm may
    waste huge chunks of MMIO address space in those cases.

    On the Alexander's Sony VAIO VPCZ23A4R the BIOS allocates limited
    MMIO resources for the dock station which contains a device
    (graphics adapter) with a 256MB MMIO BAR. An attempt to reassign
    that during runtime hotplug causes the dock station MMIO window to be
    exhausted and acpiphp fails to allocate resources for the majority
    of devices on the dock station as a result.

    To prevent that from happening, modify acpiphp to follow the boot
    time resources allocation behavior so that the BIOS' resource
    assignments are respected during runtime hotplug too.

    [rjw: Changelog]
    References: https://bugzilla.kernel.org/show_bug.cgi?id=56531
    Reported-and-tested-by: Alexander E. Patrakov
    Tested-by: Illya Klymov
    Signed-off-by: Jiang Liu
    Acked-by: Yinghai Lu
    Cc: 3.9+
    Signed-off-by: Rafael J. Wysocki

    Jiang Liu
     
  • Commit 3b63aaa70e1 (PCI: acpiphp: Do not use ACPI PCI subdriver
    mechanism) introduced an ACPI dock support regression, because it
    changed the relative initialization order of the ACPI dock subsystem
    and the ACPI-based PCI hotplug (acpiphp).

    Namely, the ACPI dock subsystem has to be initialized before
    acpiphp_enumerate_slots() is first run, which after commit
    3b63aaa70e1 happens during the initial enumeration of the PCI
    hierarchy triggered by the initial ACPI namespace scan in
    acpi_scan_init(). For this reason, the dock subsystem has to be
    initialized before the initial ACPI namespace scan in
    acpi_scan_init().

    To make that happen, modify the ACPI dock subsystem to be
    non-modular and add the invocation of its initialization routine,
    acpi_dock_init(), to acpi_scan_init() directly before the initial
    namespace scan.

    [rjw: Changelog, removal of dock_exit().]
    References: https://bugzilla.kernel.org/show_bug.cgi?id=59501
    Reported-and-tested-by: Alexander E. Patrakov
    Tested-by: Illya Klymov
    Signed-off-by: Jiang Liu
    Acked-by: Yinghai Lu
    Cc: 3.9+
    Signed-off-by: Rafael J. Wysocki

    Jiang Liu
     
  • Linus Torvalds
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "These are two fixes that came in this week, one for a regression we
    introduced in 3.10 in the GIC interrupt code, and the other one fixes
    a typo in newly introduced code"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case
    ARM: dts: Correct the base address of pinctrl_3 on Exynos5250

    Linus Torvalds
     
  • Pull driver core fix from Greg Kroah-Hartman:
    "Here's a single patch for the firmware core that resolves a reported
    oops in the firmware core that people have been hitting."

    * tag 'driver-core-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    firmware loader: fix use-after-free by double abort

    Linus Torvalds
     
  • Pull USB fixes from Greg Kroah-Hartman:
    "Here are two USB patches for 3.10.

    One updates the Kconfig wording for CONFIG_USB_PHY to make it,
    hopefully, more obvious what this option is (I know you complained
    about this when it hit the tree.) The other is a new device id for a
    driver"

    * tag 'usb-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable
    usb: phy: Improve Kconfig help for CONFIG_USB_PHY

    Linus Torvalds
     
  • Pul tty fixes from Greg Kroah-Hartman:
    "Here are two tty core fixes that resolve some regressions that have
    been reported recently. Both tiny fixes, but needed"

    * tag 'tty-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    tty: Fix transient pty write() EIO
    tty/vt: Return EBUSY if deallocating VT1 and it is busy

    Linus Torvalds
     
  • Pull SCSI target fixes from Nicholas Bellinger:
    "Included is the recent tcm_qla2xxx residual underrun length fix from
    Roland, along with Joern's iscsi-target patch for session_lock
    breakage within iscsit_stop_time2retain_timer() code. Both are CC'ed
    to stable.

    The remaining two are specific to recent iscsi-target + iser
    conversion changes. One drops some left-over debug noise, and Andy's
    patch fixes configfs attribute handling during an explicit network
    portal feature bit disable when iser-target is unsupported."

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    iscsi-target: Remove left over v3.10-rc debug printks
    target/iscsi: Fix op=disable + error handling cases in np_store_iser
    tcm_qla2xxx: Fix residual for underrun commands that fail
    target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "Another set of fixes for Kernel 3.10.

    This series contain:
    - two Kbuild fixes for randconfig
    - a buffer overflow when using rtl28xuu with r820t tuner
    - one clk fixup on exynos4-is driver"

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] Fix build when drivers are builtin and frontend modules
    [media] s5p makefiles: don't override other selections on obj-[ym]
    [media] exynos4-is: Fix FIMC-IS clocks initialization
    [media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner

    Linus Torvalds
     
  • Pull vfs fixes from Al Viro:
    "Several fixes for bugs caught while looking through f_pos (ab)users"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    aout32 coredump compat fix
    splice: don't pass the address of ->f_pos to methods
    mconsole: we'd better initialize pos before passing it to vfs_read()...

    Linus Torvalds
     

22 Jun, 2013

7 commits

  • dump_seek() does SEEK_CUR, not SEEK_SET; native binfmt_aout
    handles it correctly (seeks by PAGE_SIZE - sizeof(struct user),
    getting the current position to PAGE_SIZE), compat one seeks
    by PAGE_SIZE and ends up at PAGE_SIZE + already written...

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull x86 fixes from Peter Anvin:
    "This series fixes a couple of build failures, and fixes MTRR cleanup
    and memory setup on very specific memory maps.

    Finally, it fixes triggering backtraces on all CPUs, which was
    inadvertently disabled on x86."

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/efi: Fix dummy variable buffer allocation
    x86: Fix trigger_all_cpu_backtrace() implementation
    x86: Fix section mismatch on load_ucode_ap
    x86: fix build error and kconfig for ia32_emulation and binfmt
    range: Do not add new blank slot with add_range_with_merge
    x86, mtrr: Fix original mtrr range get for mtrr_cleanup

    Linus Torvalds
     
  • Pull drm radeon fixes from Dave Airlie:
    "One core fix, but mostly radeon fixes for s/r and big endian UVD
    support, and a fix to stop the GPU being reset for no good reason, and
    crashing people's machines."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon: update lockup tracking when scheduling in empty ring
    drm/prime: Honor requested file flags when exporting a buffer
    drm/radeon: fix UVD on big endian
    drm/radeon: fix write back suspend regression with uvd v2
    drm/radeon: do not try to uselessly update virtual memory pagetable

    Linus Torvalds
     
  • Pull ACPI fixes from Rafael Wysocki:

    - Fix for a regression causing a failure to turn on some devices on
    some systems during initialization introduced by a recent revert of
    an ACPI PM change that broke something else. Fortunately, we know
    exactly what devices are affected, so we can add a fix just for them
    leaving everyone else alone.

    - ACPI power resources initialization fix preventing a NULL pointer
    from being dereferenced in the acpi_add_power_resource() error code
    path.

    - ACPI dock station driver fix that adds missing locking to
    write_undock().

    - ACPI resources allocation fix changing the scope of an old workaround
    so that it doesn't affect systems that aren't actually buggy. This
    was reported a couple of days ago to fix DMA problems on some new
    platforms so we need it in -stable. From Mika Westerberg.

    * tag 'acpi-3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / LPSS: Power up LPSS devices during enumeration
    ACPI / PM: Fix error code path for power resources initialization
    ACPI / dock: Take ACPI scan lock in write_undock()
    ACPI / resources: call acpi_get_override_irq() only for legacy IRQ resources

    Linus Torvalds
     
  • Pull KVM fixes from Paolo Bonzini:
    "Three one-line fixes for my first pull request; one for x86 host, one
    for x86 guest, one for PPC"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    x86: kvmclock: zero initialize pvclock shared memory area
    kvm/ppc/booke: Delay kvmppc_lazy_ee_enable
    KVM: x86: remove vcpu's CPL check in host-invoked XCR set

    Linus Torvalds
     
  • Pull crypto fix from Herbert Xu:
    "This fixes an unaligned crash in XTS mode when using aseni_intel"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: aesni_intel - fix accessing of unaligned memory

    Linus Torvalds
     
  • Pull Ceph fix from Sage Weil:
    "This fixes a problem preventing the kernel and userland librbd
    libraries from sharing data with the new format 2 images"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    rbd: use the correct length for format 2 object names

    Linus Torvalds
     

21 Jun, 2013

10 commits