08 Sep, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: bus speed strings should be const
    PCI hotplug: Fix build with CONFIG_ACPI unset
    PCI: PCIe: Remove the port driver module exit routine
    PCI: PCIe: Move PCIe PME code to the pcie directory
    PCI: PCIe: Disable PCIe port services during port initialization
    PCI: PCIe: Ask BIOS for control of all native services at once
    ACPI/PCI: Negotiate _OSC control bits before requesting them
    ACPI/PCI: Do not preserve _OSC control bits returned by a query
    ACPI/PCI: Make acpi_pci_query_osc() return control bits
    ACPI/PCI: Reorder checks in acpi_pci_osc_control_set()
    PCI: PCIe: Introduce commad line switch for disabling port services
    PCI: PCIe AER: Introduce pci_aer_available()
    x86/PCI: only define pci_domain_nr if PCI and PCI_DOMAINS are set
    PCI: provide stub pci_domain_nr function for !CONFIG_PCI configs

    Linus Torvalds
     

25 Aug, 2010

5 commits

  • After commit 852972acff8f10f3a15679be2059bb94916cba5d (ACPI: Disable
    ASPM if the platform won't provide _OSC control for PCIe) control of
    the PCIe Capability Structure is unconditionally requested by
    acpi_pci_root_add(), which in principle may cause problems to
    happen in two ways. First, the BIOS may refuse to give control of
    the PCIe Capability Structure if it is not asked for any of the
    _OSC features depending on it at the same time. Second, the BIOS may
    assume that control of the _OSC features depending on the PCIe
    Capability Structure will be requested in the future and may behave
    incorrectly if that doesn't happen. For this reason, control of
    the PCIe Capability Structure should always be requested along with
    control of any other _OSC features that may depend on it (ie. PCIe
    native PME, PCIe native hot-plug, PCIe AER).

    Rework the PCIe port driver so that (1) it checks which native PCIe
    port services can be enabled, according to the BIOS, and (2) it
    requests control of all these services simultaneously. In
    particular, this causes pcie_portdrv_probe() to fail if the BIOS
    refuses to grant control of the PCIe Capability Structure, which
    means that no native PCIe port services can be enabled for the PCIe
    Root Complex the given port belongs to. If that happens, ASPM is
    disabled to avoid problems with mishandling it by the part of the
    PCIe hierarchy for which control of the PCIe Capability Structure
    has not been received.

    Make it possible to override this behavior using 'pcie_ports=native'
    (use the PCIe native services regardless of the BIOS response to the
    control request), or 'pcie_ports=compat' (do not use the PCIe native
    services at all).

    Accordingly, rework the existing PCIe port service drivers so that
    they don't request control of the services directly.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • It is possible that the BIOS will not grant control of all _OSC
    features requested via acpi_pci_osc_control_set(), so it is
    recommended to negotiate the final set of _OSC features with the
    query flag set before calling _OSC to request control of these
    features.

    To implement it, rework acpi_pci_osc_control_set() so that the caller
    can specify the mask of _OSC control bits to negotiate and the mask
    of _OSC control bits that are absolutely necessary to it. Then,
    acpi_pci_osc_control_set() will run _OSC queries in a loop until
    the mask of _OSC control bits returned by the BIOS is equal to the
    mask passed to it. Also, before running the _OSC request
    acpi_pci_osc_control_set() will check if the caller's required
    control bits are present in the final mask.

    Using this mechanism we will be able to avoid situations in which the
    BIOS doesn't grant control of certain _OSC features, because they
    depend on some other _OSC features that have not been requested.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • There is the assumption in acpi_pci_osc_control_set() that it is
    always sufficient to compare the mask of _OSC control bits to be
    requested with the result of an _OSC query where all of the known
    control bits have been checked. However, in general, that need not
    be the case. For example, if an _OSC feature A depends on an _OSC
    feature B and control of A, B plus another _OSC feature C is
    requested simultaneously, the BIOS may return A, B, C, while it would
    only return C if A and C were requested without B.

    That may result in passing a wrong mask of _OSC control bits to an
    _OSC control request, in which case the BIOS may only grant control
    of a subset of the requested features. Moreover, acpi_pci_run_osc()
    will return error code if that happens and the caller of
    acpi_pci_osc_control_set() will not know that it's been granted
    control of some _OSC features. Consequently, the system will
    generally not work as expected.

    Apart from this acpi_pci_osc_control_set() always uses the mask
    of _OSC control bits returned by the very first invocation of
    acpi_pci_query_osc(), but that is done with the second argument
    equal to OSC_PCI_SEGMENT_GROUPS_SUPPORT which generally happens
    to affect the returned _OSC control bits.

    For these reasons, make acpi_pci_osc_control_set() always check if
    control of the requested _OSC features will be granted before making
    the final control request. As a result, the osc_control_qry and
    osc_queried members of struct acpi_pci_root are not necessary any
    more, so drop them and remove the remaining code referring to them.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Make acpi_pci_query_osc() use an additional pointer argument to
    return the mask of control bits obtained from the BIOS to the
    caller.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Make acpi_pci_osc_control_set() attempt to find the handle of the
    _OSC object under the given PCI root bridge object after verifying
    that its second argument is correct and that there is a struct
    acpi_pci_root object for the given root bridge handle, which is
    more logical than the old code.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Hidetoshi Seto
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     

16 Aug, 2010

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    gcc-4.6: ACPI: fix unused but set variables in ACPI
    ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
    ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
    ACPI processor: remove deprecated ACPI procfs I/F
    ACPI power_resource: remove unused procfs I/F
    ACPI: remove deprecated ACPI procfs I/F
    ACPI: introduce drivers/acpi/sysfs.c
    ACPI: introduce module parameter acpi.aml_debug_output
    ACPI: introduce drivers/acpi/debugfs.c
    ACPI, APEI, ERST debug support
    ACPI, APEI, Manage GHES as platform devices
    ACPI, APEI, Rename CPER and GHES severity constants
    ACPI, APEI, Fix a typo of error path of apei_resources_request
    ACPI / ACPICA: Fix reference counting problems with GPE handlers
    ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
    ACPI / Sleep: Drop acpi_suspend_finish()
    ACPI / Sleep: Consolidate suspend and hibernation routines
    ACPI / Wakeup: Simplify enabling of wakeup devices
    ACPI / Sleep: Rework enabling wakeup devices
    ACPI / Sleep: Free NVS copy if suspending of devices fails

    Fixed up totally buggered "ACPI: fix unused but set variables in ACPI"
    patch that doesn't even compile in the merge.

    Thanks to Sedat Dilek for noticing the
    breakage before I even pulled. And a big "Grrr.." at Len for not even
    bothering to compile the tree before asking me to pull.

    Linus Torvalds
     

15 Aug, 2010

16 commits


13 Aug, 2010

1 commit

  • * 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits)
    param: don't deref arg in __same_type() checks
    param: update drivers/acpi/debug.c to new scheme
    param: use module_param in drivers/message/fusion/mptbase.c
    ide: use module_param_named rather than module_param_call
    param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
    param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
    param: lock myri10ge_fw_name against sysfs changes.
    param: simple locking for sysfs-writable charp parameters
    param: remove unnecessary writable charp
    param: add kerneldoc to moduleparam.h
    param: locking for kernel parameters
    param: make param sections const.
    param: use free hook for charp (fix leak of charp parameters)
    param: add a free hook to kernel_param_ops.
    param: silence .init.text references from param ops
    Add param ops struct for hvc_iucv driver.
    nfs: update for module_param_named API change
    AppArmor: update for module_param_named API change
    param: use ops in struct kernel_param, rather than get and set fns directly
    param: move the EXPORT_SYMBOL to after the definitions.
    ...

    Linus Torvalds
     

12 Aug, 2010

1 commit

  • The ACPI_PREEMPTION_POINT() logic was introduced in commit 8bd108d
    (ACPICA: add preemption point after each opcode parse). The follow up
    commits abe1dfab6, 138d15692, c084ca70 tried to fix the preemption logic
    back and forth, but nobody noticed that the usage of
    in_atomic_preempt_off() in that context is wrong.

    The check which guards the call of cond_resched() is:

    if (!in_atomic_preempt_off() && !irqs_disabled())

    in_atomic_preempt_off() is not intended for general use as the comment
    above the macro definition clearly says:

    * Check whether we were atomic before we did preempt_disable():
    * (used by the scheduler, *after* releasing the kernel lock)

    On a CONFIG_PREEMPT=n kernel the usage of in_atomic_preempt_off() works by
    accident, but with CONFIG_PREEMPT=y it's just broken.

    The whole purpose of the ACPI_PREEMPTION_POINT() is to reduce the latency
    on a CONFIG_PREEMPT=n kernel, so make ACPI_PREEMPTION_POINT() depend on
    CONFIG_PREEMPT=n and remove the in_atomic_preempt_off() check.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16210

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Thomas Gleixner
    Cc: Len Brown
    Cc: Francois Valenduc
    Cc: Lin Ming
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

11 Aug, 2010

1 commit


09 Aug, 2010

3 commits


08 Aug, 2010

2 commits

  • * 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (27 commits)
    ACPI / ACPICA: Simplify acpi_ev_initialize_gpe_block()
    ACPI / ACPICA: Fail acpi_gpe_wakeup() if ACPI_GPE_CAN_WAKE is unset
    ACPI / ACPICA: Do not execute _PRW methods during initialization
    ACPI: Fix bogus GPE test in acpi_bus_set_run_wake_flags()
    ACPICA: Update version to 20100702
    ACPICA: Fix for Alias references within Package objects
    ACPICA: Fix lint warning for 64-bit constant
    ACPICA: Remove obsolete GPE function
    ACPICA: Update debug output components
    ACPICA: Add support for WDDT - Watchdog Descriptor Table
    ACPICA: Drop acpi_set_gpe
    ACPICA: Use low-level GPE enable during GPE block initialization
    ACPI / EC: Do not use acpi_set_gpe
    ACPI / EC: Drop suspend and resume routines
    ACPICA: Remove wakeup GPE reference counting which is not used
    ACPICA: Introduce acpi_gpe_wakeup()
    ACPICA: Rename acpi_hw_gpe_register_bit
    ACPICA: Update version to 20100528
    ACPICA: Add signatures for undefined tables: ATKG, GSCI, IEIT
    ACPICA: Optimization: Reduce the number of namespace walks
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (55 commits)
    workqueue: mark init_workqueues() as early_initcall()
    workqueue: explain for_each_*cwq_cpu() iterators
    fscache: fix build on !CONFIG_SYSCTL
    slow-work: kill it
    gfs2: use workqueue instead of slow-work
    drm: use workqueue instead of slow-work
    cifs: use workqueue instead of slow-work
    fscache: drop references to slow-work
    fscache: convert operation to use workqueue instead of slow-work
    fscache: convert object to use workqueue instead of slow-work
    workqueue: fix how cpu number is stored in work->data
    workqueue: fix mayday_mask handling on UP
    workqueue: fix build problem on !CONFIG_SMP
    workqueue: fix locking in retry path of maybe_create_worker()
    async: use workqueue for worker pool
    workqueue: remove WQ_SINGLE_CPU and use WQ_UNBOUND instead
    workqueue: implement unbound workqueue
    workqueue: prepare for WQ_UNBOUND implementation
    libata: take advantage of cmwq and remove concurrency limitations
    workqueue: fix worker management invocation without pending works
    ...

    Fixed up conflicts in fs/cifs/* as per Tejun. Other trivial conflicts in
    include/linux/workqueue.h, kernel/trace/Kconfig and kernel/workqueue.c

    Linus Torvalds
     

07 Aug, 2010

4 commits

  • If a handler is installed for a GPE associated with an AML method and
    such that it cannot wake up the system from sleep states, the GPE
    remains enabled after the handler has been installed, although it
    should be disabled in that case to avoid spurious execution of the
    handler.

    Fix this issue by making acpi_install_gpe_handler() disable GPEs
    that were previously associated with AML methods and cannot wake up
    the system from sleep states.

    Analogously, make acpi_remove_gpe_handler() enable the GPEs that
    are associated with AML methods after their handlers have been
    removed and cannot wake up the system from sleep states. In addition
    to that, fix a code ordering issue in acpi_remove_gpe_handler() that
    renders the locking ineffective (ACPI_MTX_EVENTS is released
    temporarily in the middle of the routine to wait for the completion
    of events already in progress).

    For this purpose introduce acpi_raw_disable_gpe() and
    acpi_raw_enable_gpe() to be called with acpi_gbl_gpe_lock held
    and rework acpi_disable_gpe() and acpi_enable_gpe(), respectively, to
    use them. Also rework acpi_gpe_can_wake() to use
    acpi_raw_disable_gpe() instead of calling acpi_disable_gpe() after
    releasing the lock to avoid the possible theoretical race with
    acpi_install_gpe_handler().

    Signed-off-by: Rafael J. Wysocki
    Cc: "Moore, Robert"
    Cc: Lin Ming
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • …x/kernel/git/tip/linux-2.6-tip

    * 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    um: Fix read_persistent_clock fallout
    kgdb: Do not access xtime directly
    powerpc: Clean up obsolete code relating to decrementer and timebase
    powerpc: Rework VDSO gettimeofday to prevent time going backwards
    clocksource: Add __clocksource_updatefreq_hz/khz methods
    x86: Convert common clocksources to use clocksource_register_hz/khz
    timekeeping: Make xtime and wall_to_monotonic static
    hrtimer: Cleanup direct access to wall_to_monotonic
    um: Convert to use read_persistent_clock
    timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
    powerpc: Cleanup xtime usage
    powerpc: Simplify update_vsyscall
    time: Kill off CONFIG_GENERIC_TIME
    time: Implement timespec_add
    x86: Fix vtime/file timestamp inconsistencies

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
    per Thomas' earlier merge commit 47916be4e28c ("Merge branch
    'powerpc.cherry-picks' into timers/clocksource")

    Linus Torvalds
     
  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (30 commits)
    PCI: update for owner removal from struct device_attribute
    PCI: Fix warnings when CONFIG_DMI unset
    PCI: Do not run NVidia quirks related to MSI with MSI disabled
    x86/PCI: use for_each_pci_dev()
    PCI: use for_each_pci_dev()
    PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
    PCI: export SMBIOS provided firmware instance and label to sysfs
    PCI: Allow read/write access to sysfs I/O port resources
    x86/PCI: use host bridge _CRS info on ASRock ALiveSATA2-GLAN
    PCI: remove unused HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_{SIZE|BOUNDARY}
    PCI: disable mmio during bar sizing
    PCI: MSI: Remove unsafe and unnecessary hardware access
    PCI: Default PCIe ASPM control to on and require !EMBEDDED to disable
    PCI: kernel oops on access to pci proc file while hot-removal
    PCI: pci-sysfs: remove casts from void*
    ACPI: Disable ASPM if the platform won't provide _OSC control for PCIe
    PCI hotplug: make sure child bridges are enabled at hotplug time
    PCI hotplug: shpchp: Removed check for hotplug of display devices
    PCI hotplug: pciehp: Fixed return value sign for pciehp_unconfigure_device
    PCI: Don't enable aspm before drivers have had a chance to veto it
    ...

    Linus Torvalds
     
  • * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix keeping track of AMD C1E
    x86, cpu: Package Level Thermal Control, Power Limit Notification definitions
    x86, cpu: Export AMD errata definitions
    x86, cpu: Use AMD errata checking framework for erratum 383
    x86, cpu: Clean up AMD erratum 400 workaround
    x86, cpu: AMD errata checking framework
    x86, cpu: Split addon_cpuid_features.c
    x86, cpu: Clean up formatting in cpufeature.h, remove override
    x86, cpu: Enumerate xsaveopt
    x86, cpu: Add xsaveopt cpufeature
    x86, cpu: Make init_scattered_cpuid_features() consider cpuid subleaves
    x86, cpu: Support the features flags in new CPUID leaf 7
    x86, cpu: Add CPU flags for F16C and RDRND
    x86: Look for IA32_ENERGY_PERF_BIAS support
    x86, AMD: Extend support to future families
    x86, cacheinfo: Carve out L3 cache slot accessors
    x86, xsave: Cleanup return codes in check_for_xstate()

    Linus Torvalds
     

03 Aug, 2010

5 commits

  • - Set Kconfig option default n
    - Only allow root to read/write io file (sever bug!)
    - Introduce write support module param -> default off
    - Properly clean up if any debugfs files cannot be created

    Signed-off-by: Thomas Renninger
    CC: mjg59@srcf.ucam.org
    CC: platform-driver-x86@vger.kernel.org
    CC: linux-acpi@vger.kernel.org
    CC: astarikovskiy@suse.de
    Signed-off-by: Matthew Garrett

    Thomas Renninger
     
  • which will result in a harmless but ugly WARN message on
    some machines.

    Signed-off-by: Thomas Renninger
    CC: mjg59@srcf.ucam.org
    CC: platform-driver-x86@vger.kernel.org
    CC: linux-acpi@vger.kernel.org
    CC: astarikovskiy@suse.de
    CC: akpm@linux-foundation.org
    Signed-off-by: Matthew Garrett

    Thomas Renninger
     
  • Formerly these have been exposed through /proc/..
    Better register them where all IO ports should get registered
    and scream loud if someone else claims to use them.

    EC data and command port typically should show up like this
    then:
    ...
    0060-0060 : keyboard
    0062-0062 : EC data
    0064-0064 : keyboard
    0066-0066 : EC command
    0070-0071 : rtc0
    ...

    Signed-off-by: Thomas Renninger

    CC: Alexey Starikovskiy
    CC: Len Brown
    CC: linux-kernel@vger.kernel.org
    CC: linux-acpi@vger.kernel.org
    CC: Bjorn Helgaas
    CC: platform-driver-x86@vger.kernel.org
    Signed-off-by: Matthew Garrett

    Thomas Renninger
     
  • A userspace app to easily read/write the EC can be found here:
    ftp://ftp.suse.com/pub/people/trenn/sources/ec/ec_access.c

    Multiple ECs are not supported, but shouldn't be hard to add as soon
    as the ec driver itself will support them.

    Signed-off-by: Thomas Renninger
    CC: Alexey Starikovskiy
    CC: Len Brown
    CC: linux-kernel@vger.kernel.org
    CC: linux-acpi@vger.kernel.org
    CC: platform-driver-x86@vger.kernel.org
    Signed-off-by: Matthew Garrett

    Thomas Renninger
     
  • This patch provides the same information through debugfs, which previously was
    provided through /proc/acpi/embedded_controller/*/info

    This is the gpe the EC is connected to and whether the global lock
    gets used.
    The io ports used are added to /proc/ioports in another patch.
    Beside the fact that /proc/acpi is deprecated for quite some time,
    this info is not needed for applications and thus can be moved
    to debugfs instead of a public interface like /sys.

    Signed-off-by: Thomas Renninger

    CC: Alexey Starikovskiy
    CC: Len Brown
    CC: linux-kernel@vger.kernel.org
    CC: linux-acpi@vger.kernel.org
    CC: Bjorn Helgaas
    CC: platform-driver-x86@vger.kernel.org
    Signed-off-by: Matthew Garrett

    Thomas Renninger