1. 11 1月, 2013 1 次提交
  2. 03 1月, 2013 1 次提交
  3. 05 12月, 2012 1 次提交
  4. 26 11月, 2012 1 次提交
  5. 22 11月, 2012 1 次提交
    • T
      ACPI: Add acpi_handle_<level>() interfaces · fbfddae6
      Toshi Kani 提交于
      This patch introduces acpi_handle_<level>(), where <level> is
      a kernel message level such as err/warn/info, to support improved
      logging messages for ACPI, esp. hot-plug operations.
      acpi_handle_<level>() appends "ACPI" prefix and ACPI object path
      to the messages.  This improves diagnosis of hotplug operations
      since an error message in a log file identifies an object that
      caused an issue.  This interface acquires the global namespace
      mutex to obtain an object path.  In interrupt context, it shows
      the object path as <n/a>.
      
      acpi_handle_<level>() takes acpi_handle as an argument, which is
      passed to ACPI hotplug notify handlers from the ACPICA.  Therefore,
      it is always available unlike other kernel objects, such as device.
      
      For example:
        acpi_handle_err(handle, "Device don't exist, dropping EJECT\n");
      logs an error message like this at KERN_ERR.
        ACPI: \_SB_.SCK4.CPU4: Device don't exist, dropping EJECT
      
      ACPI hot-plug drivers can use acpi_handle_<level>() when they need
      to identify a target ACPI object path in their messages, such as
      error cases.  The usage model is similar to dev_<level>().
      acpi_handle_<level>() can be used when a device is not created or
      is invalid during hot-plug operations.  ACPI object path is also
      consistent on the platform, unlike device name that gets incremented
      over hotplug operations.
      
      ACPI drivers should use dev_<level>() when a device object is valid.
      Device name provides more user friendly information, and avoids
      acquiring the global ACPI namespace mutex.  ACPI drivers also
      continue to use pr_<level>() when they do not need to specify device
      information, such as boot-up messages.
      
      Note: ACPI_[WARNING|INFO|ERROR]() are intended for the ACPICA and
      are not associated with the kernel message level.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Tested-by: NVijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fbfddae6
  6. 15 11月, 2012 7 次提交
    • R
      ACPI / PM: Fix build problem when CONFIG_ACPI or CONFIG_PM is not set · 5133375b
      Rafael J. Wysocki 提交于
      Commit e5cc8ef3 (ACPI / PM: Provide ACPI PM callback routines for
      subsystems) introduced a build problem occuring if CONFIG_ACPI is
      unset or CONFIG_PM is unset and errno.h is not included before
      acpi.h, because in that case ENODEV used in acpi.h is undefined.
      
      Fix the issue by making acpi.h include errno.h.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5133375b
    • R
      ACPI: Centralized processing of ACPI device resources · 8e345c99
      Rafael J. Wysocki 提交于
      Currently, whoever wants to use ACPI device resources has to call
      acpi_walk_resources() to browse the buffer returned by the _CRS
      method for the given device and create filters passed to that
      routine to apply to the individual resource items.  This generally
      is cumbersome, time-consuming and inefficient.  Moreover, it may
      be problematic if resource conflicts need to be resolved, because
      the different users of _CRS will need to do that in a consistent
      way.  However, if there are resource conflicts, the ACPI core
      should be able to resolve them centrally instead of relying on
      various users of acpi_walk_resources() to handle them correctly
      together.
      
      For this reason, introduce a new function, acpi_dev_get_resources(),
      that can be used by subsystems to obtain a list of struct resource
      objects corresponding to the ACPI device resources returned by
      _CRS and, if necessary, to apply additional preprocessing routine
      to the ACPI resources before converting them to the struct resource
      format.
      
      Make the ACPI code that creates platform device objects use
      acpi_dev_get_resources() for resource processing instead of executing
      acpi_walk_resources() twice by itself, which causes it to be much
      more straightforward and easier to follow.
      
      In the future, acpi_dev_get_resources() can be extended to meet
      the needs of the ACPI PNP subsystem and other users of _CRS in
      the kernel.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      8e345c99
    • R
      ACPI: Move device resources interpretation code from PNP to ACPI core · 046d9ce6
      Rafael J. Wysocki 提交于
      Move some code used for parsing ACPI device resources from the PNP
      subsystem to the ACPI core, so that other bus types (platform, SPI,
      I2C) can use the same routines for parsing resources in a consistent
      way, without duplicating code.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      046d9ce6
    • M
      ACPI: Provide generic functions for matching ACPI device nodes · cf761af9
      Mika Westerberg 提交于
      Introduce function acpi_match_device() allowing callers to match
      struct device objects with populated acpi_handle fields against
      arrays of ACPI device IDs.  Also introduce function
      acpi_driver_match_device() using acpi_match_device() internally and
      allowing callers to match a struct device object against an array of
      ACPI device IDs provided by a device driver.
      
      Additionally, introduce macro ACPI_PTR() that may be used by device
      drivers to escape pointers to data structures whose definitions
      depend on CONFIG_ACPI.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Acked-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cf761af9
    • Y
      ACPI: move acpi_no_s4_hw_signature() declaration into #ifdef CONFIG_HIBERNATION · 9743fdea
      Yuanhan Liu 提交于
      acpi_no_s4_hw_signature is defined in #ifdef CONFIG_HIBERNATION block,
      but the current code put the declaration in #ifdef CONFIG_PM_SLEEP block.
      
      I happened to meet this issue when I turned off PM_SLEEP config manually:
      arch/x86/kernel/acpi/sleep.c:100:4: error: implicit declaration of function ‘acpi_no_s4_hw_signature’ [-Werror=implicit-function-declaration]
      Signed-off-by: NYuanhan Liu <yuanhan.liu@linux.intel.com>
      Reviewed-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9743fdea
    • K
      ACPI / Sleep: add acpi_sleep=nonvs_s3 parameter · 1bad2f19
      Kristen Carlson Accardi 提交于
      The ACPI specificiation would like us to save NVS at hibernation time,
      but makes no mention of saving NVS over S3.  Not all versions of
      Windows do this either, and it is clear that not all machines need NVS
      saved/restored over S3.  Allow the user to improve their suspend/resume
      time by disabling the NVS save/restore at S3 time, but continue to do
      the NVS save/restore for S4 as specified.
      Signed-off-by: NKristen Carlson Accardi <kristen@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1bad2f19
    • R
      ACPI / PM: Provide ACPI PM callback routines for subsystems · e5cc8ef3
      Rafael J. Wysocki 提交于
      Some bus types don't support power management natively, but generally
      there may be device nodes in ACPI tables corresponding to the devices
      whose bus types they are (under ACPI 5 those bus types may be SPI,
      I2C and platform).  If that is the case, standard ACPI power
      management may be applied to those devices, although currently the
      kernel has no means for that.
      
      For this reason, provide a set of routines that may be used as power
      management callbacks for such devices.  This may be done in three
      different ways.
      
       (1) Device drivers handling the devices in question may run
           acpi_dev_pm_attach() in their .probe() routines, which (on
           success) will cause the devices to be added to the general ACPI
           PM domain and ACPI power management will be used for them going
           forward.  Then, acpi_dev_pm_detach() may be used to remove the
           devices from the general ACPI PM domain if ACPI power management
           is not necessary for them any more.
      
       (2) The devices' subsystems may use acpi_subsys_runtime_suspend(),
           acpi_subsys_runtime_resume(), acpi_subsys_prepare(),
           acpi_subsys_suspend_late(), acpi_subsys_resume_early() as their
           power management callbacks in the same way as the general ACPI
           PM domain does that.
      
       (3) The devices' drivers may execute acpi_dev_suspend_late(),
           acpi_dev_resume_early(), acpi_dev_runtime_suspend(),
           acpi_dev_runtime_resume() from their power management callbacks
           as appropriate, if that's absolutely necessary, but it is not
           recommended to do that, because such drivers may not work
           without ACPI support as a result.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e5cc8ef3
  7. 06 10月, 2012 1 次提交
  8. 01 10月, 2012 2 次提交
  9. 25 9月, 2012 2 次提交
  10. 03 8月, 2012 1 次提交
  11. 28 7月, 2012 1 次提交
    • C
      acpi: add a way to promote/demote vendor backlight drivers · f838eb5b
      Corentin Chary 提交于
      Instead of adding a big blacklist in video_detect.c to set
      ACPI_VIDEO_BACKLIGHT_DMI_VENDOR correctly, let external modules
      promote or demote themselves when they know the generic video
      module won't work.
      
      Currently drivers where using acpi_video_unregister() directly
      but:
      - That didn't respect any acpi_backlight=[video|vendor] parameter
        provided by the user.
      - Any later call to acpi_video_register() would still re-load the
        generic video module (and some gpu drivers are doing that).
      
      This patch fix those two issues.
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      f838eb5b
  12. 04 6月, 2012 1 次提交
    • T
      ACPI: Add an interface to evaluate _OST · 275c58d7
      Toshi Kani 提交于
      Added acpi_evaluate_hotplug_opt(). All ACPI hotplug handlers must call
      this function when evaluating _OST for hotplug operations. If the
      platform does not support _OST, this function returns AE_NOT_FOUND and
      has no effect on the platform.
      
      ACPI_HOTPLUG_OST is defined when all relevant ACPI hotplug operations,
      such as CPU, memory and container hotplug, are enabled. This assures
      consistent behavior among the hotplug operations with regarding the
      _OST support. When ACPI_HOTPLUG_OST is not defined, this function is
      a no-op.
      
      ACPI PCI hotplug is not enhanced to support _OST at this time since it
      is a legacy method being replaced by PCIe native hotplug. _OST support
      for ACPI PCI hotplug may be added in future if necessary.
      
      Some platforms may require the OS to support _OST in order to support
      ACPI hotplug operations. For example, if a platform has the management
      console where user can request a hotplug operation from, this _OST
      support would be required for the management console to show the result
      of the hotplug request to user.
      
      Added macro definitions of _OST source events and status codes.
      Also renamed OSC_SB_CPUHP_OST_SUPPORT to OSC_SB_HOTPLUG_OST_SUPPORT
      since this _OSC bit is not specific to CPU hotplug. This bit is
      defined in Table 6-147 of ACPI 5.0 as follows.
      
        Bits:       3
        Field Name: Insertion / Ejection _OST Processing Support
        Definition: This bit is set if OSPM will evaluate the _OST
                    object defined under a device when processing
                    insertion and ejection source event codes.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      275c58d7
  13. 21 3月, 2012 1 次提交
  14. 14 3月, 2012 1 次提交
  15. 17 1月, 2012 1 次提交
    • H
      ACPI, Record ACPI NVS regions · b54ac6d2
      Huang Ying 提交于
      Some firmware will access memory in ACPI NVS region via APEI.  That
      is, instructions in APEI ERST/EINJ table will read/write ACPI NVS
      region.  The original resource conflict checking in APEI code will
      check memory/ioport accessed by APEI via general resource management
      mechanism.  But ACPI NVS region is marked as busy already, so that the
      false resource conflict will prevent APEI ERST/EINJ to work.
      
      To fix this, this patch record ACPI NVS regions, so that we can avoid
      request resources for memory region inside it.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b54ac6d2
  16. 06 12月, 2011 1 次提交
    • R
      PCI/ACPI: Make acpiphp ignore root bridges using SHPC native hotplug · d90116ea
      Rafael J. Wysocki 提交于
      If the kernel has requested control of the SHPC native hotplug
      feature for a given root bridge, the acpiphp driver should not try
      to handle that root bridge and it should leave it to shpchp.
      Failing to do so causes problems to happen if shpchp is loaded
      and unloaded before loading acpiphp (ACPI-based hotplug won't work
      in that case anyway).
      
      To address this issue make find_root_bridges() ignore PCI root
      bridges with SHPC native hotplug enabled and make add_bridge()
      return error code if SHPC native hotplug is enabled for the given
      root bridge.  This causes acpiphp to refuse to load if SHPC native
      hotplug is enabled for all root bridges and to refuse binding to
      the root bridges with SHPC native hotplug enabled.
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d90116ea
  17. 03 8月, 2011 1 次提交
  18. 14 7月, 2011 1 次提交
    • H
      ACPI, APEI, Add APEI bit support in generic _OSC call · eccddd32
      Huang Ying 提交于
      In APEI firmware first mode, hardware error is reported by hardware to
      firmware firstly, then firmware reports the error to Linux in a GHES
      error record via POLL/SCI/IRQ/NMI etc.
      
      This may result in some issues if OS has no full APEI support.  So
      some firmware implementation will work in a back-compatible mode by
      default.  Where firmware will only notify OS in old-fashion, without
      GHES record.  For example, for a fatal hardware error, only NMI is
      signaled, no GHES record.
      
      To gain full APEI power on these machines, APEI bit in generic _OSC
      call can be specified to tell firmware that Linux has full APEI
      support.  This patch adds the APEI bit support in generic _OSC call.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Reviewed-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      eccddd32
  19. 01 4月, 2011 1 次提交
  20. 21 1月, 2011 1 次提交
    • R
      ACPI: Introduce acpi_os_ioremap() · 2d6d9fd3
      Rafael J. Wysocki 提交于
      Commit ca9b600b ("ACPI / PM: Make suspend_nvs_save() use
      acpi_os_map_memory()") attempted to prevent the code in osl.c and nvs.c
      from using different ioremap() variants by making the latter use
      acpi_os_map_memory() for mapping the NVS pages.  However, that also
      requires acpi_os_unmap_memory() to be used for unmapping them, which
      causes synchronize_rcu() to be executed many times in a row
      unnecessarily and introduces substantial delays during resume on some
      systems.
      
      Instead of using acpi_os_map_memory() for mapping the NVS pages in nvs.c
      introduce acpi_os_ioremap() calling ioremap_cache() and make the code in
      both osl.c and nvs.c use it.
      Reported-by: NJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d6d9fd3
  21. 13 1月, 2011 1 次提交
  22. 07 1月, 2011 1 次提交
  23. 11 12月, 2010 1 次提交
    • L
      acpi: fix _OSI string setup regression · d90aa92c
      Lin Ming 提交于
      commit b0ed7a91(ACPICA/ACPI: Add new host interfaces for _OSI suppor)
      introduced a regression that _OSI string setup fails.
      
      There are 2 paths to setup _OSI string.
      
      DMI:
      acpi_dmi_osi_linux -> set_osi_linux -> acpi_osi_setup -> copy _OSI
      string to osi_setup_string
      
      Boot command line:
      acpi_osi_setup -> copy _OSI string to osi_setup_string
      
      Later, acpi_osi_setup_late will be called to handle osi_setup_string.
      If _OSI string is "Linux" or "!Linux", then the call path is,
      
      acpi_osi_setup_late -> acpi_cmdline_osi_linux -> set_osi_linux ->
      acpi_osi_setup -> copy _OSI string to osi_setup_string
      
      This actually never installs _OSI string(acpi_install_interface not
      called), but just copy the _OSI string to osi_setup_string.
      
      This patch fixes the regression.
      Reported-and-tested-by: NLukas Hejtmanek <xhejtman@ics.muni.cz>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d90aa92c
  24. 25 10月, 2010 1 次提交
  25. 20 10月, 2010 1 次提交
  26. 25 8月, 2010 1 次提交
    • R
      ACPI/PCI: Negotiate _OSC control bits before requesting them · 75fb60f2
      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: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      75fb60f2
  27. 25 7月, 2010 1 次提交
  28. 28 5月, 2010 1 次提交
    • J
      hwmon: (asus_atk0110) Don't load if ACPI resources aren't enforced · 70dd6bea
      Jean Delvare 提交于
      When the user passes the kernel parameter acpi_enforce_resources=lax,
      the ACPI resources are no longer protected, so a native driver can
      make use of them. In that case, we do not want the asus_atk0110 to be
      loaded. Unfortunately, this driver loads automatically due to its
      MODULE_DEVICE_TABLE, so the user ends up with two drivers loaded for
      the same device - this is bad.
      
      So I suggest that we prevent the asus_atk0110 driver from loading if
      acpi_enforce_resources=lax.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NLuca Tettamanti <kronos.it@gmail.com>
      Cc: Len Brown <lenb@kernel.org>
      70dd6bea
  29. 12 5月, 2010 1 次提交
  30. 05 5月, 2010 2 次提交
    • E
      x86, acpi/irq: Teach acpi_get_override_irq to take a gsi not an isa_irq · 9a0a91bb
      Eric W. Biederman 提交于
      In perverse acpi implementations the isa irqs are not identity mapped
      to the first 16 gsi.  Furthermore at least the extended interrupt
      resource capability may return gsi's and not isa irqs.  So since
      what we get from acpi is a gsi teach acpi_get_overrride_irq to
      operate on a gsi instead of an isa_irq.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      LKML-Reference: <1269936436-7039-2-git-send-email-ebiederm@xmission.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      9a0a91bb
    • E
      x86, acpi/irq: Introduce apci_isa_irq_to_gsi · 2c2df841
      Eric W. Biederman 提交于
      There are a number of cases where the current code makes the assumption
      that isa irqs identity map to the first 16 acpi global system intereupts.
      In most instances that assumption is correct as that is the required
      behaviour in dual i8259 mode and the default behavior in ioapic mode.
      
      However there are some systems out there that take advantage of acpis
      interrupt remapping  for the isa irqs to have a completely different
      mapping of isa_irq to gsi.
      
      Introduce acpi_isa_irq_to_gsi to perform this mapping explicitly in the
      code that needs it.  Initially this will be just the current assumed
      identity mapping to ensure it's introduction does not cause regressions.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      LKML-Reference: <1269936436-7039-1-git-send-email-ebiederm@xmission.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      2c2df841
  31. 07 1月, 2010 1 次提交