1. 25 7月, 2010 1 次提交
  2. 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
  3. 12 5月, 2010 1 次提交
  4. 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
  5. 07 1月, 2010 1 次提交
  6. 31 12月, 2009 1 次提交
  7. 17 12月, 2009 3 次提交
  8. 10 12月, 2009 1 次提交
  9. 19 9月, 2009 2 次提交
  10. 29 8月, 2009 1 次提交
    • F
      ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h · e55a5999
      Feng Tang 提交于
      linux/acpi.h is the top level header for interfacing
      with the ACPI sub-system, so acpi_disabled should be
      up there instead of down in asm/acpi.h -- particularly
      since asm/acpi.h doesn't exist for all architectures.
      
      Same story for acpi_table_parse(), which is a top-level
      API to Linux/ACPI.
      
      This is necessary for building some code that
      used to always depend on CONFIG_ACPI=y, but will soon
      also need to build with CONFIG_ACPI=n.
      Signed-off-by: NFeng Tang <feng.tang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e55a5999
  11. 13 6月, 2009 2 次提交
  12. 28 4月, 2009 1 次提交
    • Y
      irq: change ACPI GSI APIs to also take a device argument · a2f809b0
      Yinghai Lu 提交于
      We want to use dev_to_node() later on, to be aware of the 'home node'
      of the GSI in question.
      
      [ Impact: cleanup, prepare the IRQ code to be more NUMA aware ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NLen Brown <lenb@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-acpi@vger.kernel.org
      Cc: linux-ia64@vger.kernel.org
      LKML-Reference: <49F65560.20904@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a2f809b0
  13. 21 4月, 2009 1 次提交
  14. 04 4月, 2009 1 次提交
    • S
      x86, ACPI: add support for x2apic ACPI extensions · 7237d3de
      Suresh Siddha 提交于
      All logical processors with APIC ID values of 255 and greater will have their
      APIC reported through Processor X2APIC structure (type-9 entry type) and all
      logical processors with APIC ID less than 255 will have their APIC reported
      through legacy Processor Local APIC (type-0 entry type) only. This is the
      same case even for NMI structure reporting.
          
      The Processor X2APIC Affinity structure provides the association between the
      X2APIC ID of a logical processor and the proximity domain to which the logical
      processor belongs.
          
      For OSPM, Procssor IDs outside the 0-254 range are to be declared as Device()
      objects in the ACPI namespace.
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7237d3de
  15. 20 3月, 2009 1 次提交
  16. 16 2月, 2009 1 次提交
    • Y
      [IA64] fix __apci_unmap_table · 970ec1a8
      Yinghai Lu 提交于
      Impact: fix build error
      
      to fix:
      
        tip/arch/ia64/kernel/acpi.c:203: error: conflicting types for '__acpi_unmap_table'
        tip/include/linux/acpi.h:82: error: previous declaration of '__acpi_unmap_table' was here
        tip/arch/ia64/kernel/acpi.c:203: error: conflicting types for '__acpi_unmap_table'
        tip/include/linux/acpi.h:82: error: previous declaration of '__acpi_unmap_table' was here
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      970ec1a8
  17. 09 2月, 2009 1 次提交
    • Y
      acpi/x86: introduce __apci_map_table, v4 · 7d97277b
      Yinghai Lu 提交于
      to prevent wrongly overwriting fixmap that still want to use.
      
      ACPI used to rely on low mappings being all linearly mapped and
      grew a habit: it never really unmapped certain kinds of tables
      after use.
      
      This can cause problems - for example the hypothetical case
      when some spurious access still references it.
      
      v2: remove prev_map and prev_size in __apci_map_table
      v3: let acpi_os_unmap_memory() call early_iounmap too, so remove extral calling to
      early_acpi_os_unmap_memory
      v4: fix typo in one acpi_get_table_with_size calling
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Acked-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7d97277b
  18. 31 12月, 2008 1 次提交
  19. 19 12月, 2008 1 次提交
  20. 08 11月, 2008 1 次提交
    • T
      ACPI video: if no ACPI backlight support, use vendor drivers · c3d6de69
      Thomas Renninger 提交于
      If an ACPI graphics device supports backlight brightness functions (cmp. with
      latest ACPI spec Appendix B), let the ACPI video driver control backlight and
      switch backlight control off in vendor specific ACPI drivers (asus_acpi,
      thinkpad_acpi, eeepc, fujitsu_laptop, msi_laptop, sony_laptop, acer-wmi).
      
      Currently it is possible to load above drivers and let both poke on the
      brightness HW registers, the video and vendor specific ACPI drivers -> bad.
      
      This patch provides the basic support to check for BIOS capabilities before
      driver loading time. Driver specific modifications are in separate follow up
      patches.
      
      "acpi_backlight=vendor"
      	Prever vendor driver over ACPI driver for backlight.
      "acpi_backlight=video" (default)
      	Prever ACPI driver over vendor driver for backlight.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Acked-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c3d6de69
  21. 07 11月, 2008 1 次提交
    • B
      ACPI: remove CONFIG_ACPI_EC · 8950d89a
      Bjorn Helgaas 提交于
      Remove CONFIG_ACPI_EC.  It was always set the same as CONFIG_ACPI,
      and it had no menu label, so there was no way to set it to anything
      other than "y".
      
      Per section 6.5.4 of the ACPI 3.0b specification,
      
          OSPM must make Embedded Controller operation regions, accessed
          via the Embedded Controllers described in ECDT, available before
          executing any control method.
      
      The ECDT table is optional, but if it is present, the above text
      means that the EC it describes is a required part of the ACPI
      subsystem, so CONFIG_ACPI_EC=n wouldn't make sense.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Acked-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      8950d89a
  22. 11 10月, 2008 1 次提交
  23. 25 7月, 2008 1 次提交
  24. 08 7月, 2008 1 次提交
  25. 13 6月, 2008 1 次提交
    • R
      Suspend-related patches for 2.6.27 · d8f3de0d
      Rafael J. Wysocki 提交于
      ACPI PM: Add possibility to change suspend sequence
      
      There are some systems out there that don't work correctly with
      our current suspend/hibernation code ordering.  Provide a workaround
      for these systems allowing them to pass 'acpi_sleep=old_ordering' in
      the kernel command line so that it will use the pre-ACPI 2.0 ("old")
      suspend code ordering.
      
      Unfortunately, this requires us to add a platform hook to the
      resuming of devices for recovering the platform in case one of the
      device drivers' .suspend() routines returns error code.  Namely,
      ACPI 1.0 specifies that _PTS should be called before suspending
      devices, but _WAK still should be called before resuming them in
      order to undo the changes made by _PTS.  However, if there is an
      error during suspending devices, they are automatically resumed
      without returning control to the PM core, so the _WAK has to be
      called from within device_resume() in that cases.
      
      The patch also reorders and refactors the ACPI suspend/hibernation
      code to avoid duplication as far as reasonably possible.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d8f3de0d
  26. 27 4月, 2008 1 次提交
  27. 14 2月, 2008 1 次提交
  28. 07 2月, 2008 4 次提交
    • J
      ACPI: cleanup acpi.h · ee1ce6fc
      Jean Delvare 提交于
      Two cleanups to <linux/acpi.h>:
      * Stop defining acpi_mp_config, it isn't used anywhere.
      * Discard nested "#ifdef CONFIG_ACPI", they are useless and
        error-prone.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ee1ce6fc
    • T
      ACPI: Export acpi_check_resource_conflict · 443dea72
      Thomas Renninger 提交于
      Export acpi_check_resource_conflict(), sometimes drivers already have
      a struct resource at hand so no need to use the wrappers to build a new
      one.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      443dea72
    • T
      ACPI: track opregion names to avoid driver resource conflicts. · df92e695
      Thomas Renninger 提交于
      Small ACPICA extension to be able to store the name of operation regions in osl.c later
      
      In ACPI, AML can define accesses to IO ports and System Memory by Operation
      Regions.  Those are not registered as done by PNPACPI using resource templates
      (and _CRS/_SRS methods).
      
      The IO ports and System Memory regions may get accessed by arbitrary AML code.
       When native drivers are accessing the same resources bad things can happen
      (e.g.  a critical shutdown temperature of 3000 C every 2 months or so).
      
      It is not really possible to register the operation regions via
      request_resource, as they often overlap with pnp or other resources (e.g.
      statically setup IO resources below 0x100).
      
      This approach stores all Operation Region declarations (IO and System Memory
      only) at ACPI table parse time.  It offers a similar functionality like
      request_region and let drivers which are known to possibly use the same IO
      ports and Memory which are also often used by ACPI (hwmon and i2c) check for
      ACPI interference.
      
      A boot parameter acpi_enforce_resources=strict/lax/no is provided, which
      is default set to lax:
        - strict: let conflicting drivers fail to load with an error message
        - lax:    let conflicting driver work normal with a warning message
        - no:     no functional change at all
      Depending on the feedback and the kind of interferences we see, this
      should be set to strict at later time.
      
      Goal of this patch set is:
        - Identify ACPI interferences in bug reports (very hard to reproduce
          and to identify)
        - Find BIOSes for that an ACPI driver should exist for specific HW
          instead of a native one.
        - stability in general
      
      Provide acpi_check_{mem_}region.
      
      Drivers can additionally check against possible ACPI interference by also
      invoking this shortly before they call request_region.
      If -EBUSY is returned, the driver must not load.
      Use acpi_enforce_resources=strict/lax/no options to:
        - strict: let conflicting drivers fail to load with an error message
        - lax:    let conflicting driver work normal with a warning message
        - no:     no functional change at all
      
      Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      df92e695
    • L
      ACPI: create /sys/firmware/acpi/interrupts · 5229e87d
      Len Brown 提交于
      See Documentation/ABI/testing/sysfs-firmware-acpi
      Based-on-original-patch-by: NLuming Yu <luming.yu@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      5229e87d
  29. 06 2月, 2008 1 次提交
    • C
      ACPI: WMI: Add ACPI-WMI mapping driver · bff431e4
      Carlos Corbacho 提交于
      The following is an implementation of the Windows Management
      Instrumentation (WMI) ACPI interface mapper (PNP0C14).
      
      What it does:
      
      Parses the _WDG method and exports functions to process WMI method calls,
      data block query/ set commands (both based on GUID) and does basic event
      handling.
      
      How: WMI presents an in kernel interface here (essentially, a minimal
      wrapper around ACPI)
      
      (const char *guid assume the 36 character ASCII representation of
      a GUID - e.g. 67C3371D-95A3-4C37-BB61-DD47B491DAAB)
      
      wmi_evaluate_method(const char *guid, u8 instance, u32 method_id,
      const struct acpi_buffer *in, struct acpi_buffer *out)
      
      wmi_query_block(const char *guid, u8 instance,
      struct acpi_buffer *out)
      
      wmi_set_block(const char *guid, u38 instance,
      const struct acpi_buffer *in)
      
      wmi_install_notify_handler(acpi_notify_handler handler);
      
      wmi_remove_notify_handler(void);
      
      wmi_get_event_data(u32 event, struct acpi_buffer *out)
      
      wmi_has_guid(const char guid*)
      
      wmi_has_guid() is a helper function to find if a GUID exists or not on the
      system (a quick and easy way for WMI dependant drivers to see if the
      the method/ block they want exists, since GUIDs are supposed to be unique).
      
      Event handling - allow a WMI based driver to register a notifier handler
      for each GUID with WMI. When a notification is sent to a GUID in WMI, the
      handler registered with WMI is then called (it is left to the caller to
      ask for the WMI event data associated with the GUID, if needed).
      
      What it won't do:
      
      Unicode - The MS article[1] calls for converting between ASCII and Unicode (or
      vice versa) if a GUID is marked as "string". This is left up to the calling
      driver.
      
      Handle a MOF[1] - the WMI mapper just exports methods, data and events to
      userspace. MOF handling is down to userspace.
      
      Userspace interface - this will be added later.
      
      [1] http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx
      
      ===
      ChangeLog
      ==
      
      v1 (2007-10-02):
      
      * Initial release
      
      v2 (2007-10-05):
      
      * Cleaned up code - split up super "wmi_evaluate_block" -> each external
        symbol now handles its own ACPI calls, rather than handing off to
        a "super" method (and in turn, is a lot simpler to read)
      * Added a find_guid() symbol - return true if a given GUID exists on
        the system
      * wmi_* functions now return type acpi_status (since they are just
        fancy wrappers around acpi_evaluate_object())
      * Removed extra debug code
      
      v3 (2007-10-27)
      
      * More code clean up - now passes checkpatch.pl
      * Change data block calls - ref MS spec, method ID is not required for
        them, so drop it from the function parameters.
      * Const'ify guid in the function call parameters.
      * Fix _WDG buffer handling - copy the data to our own private structure.
      * Change WMI from tristate to bool - otherwise the external functions are
        not exported in linux/acpi.h if you try to build WMI as a module.
      * Fix more flag comparisons.
      * Add a maintainers entry - since I wrote this, I should take the blame
        for it.
      
      v4 (2007-10-30)
      
      * Add missing brace from after fixing checkpatch errors.
      * Rewrote event handling - allow external drivers to register with WMI to
        handle WMI events
      * Clean up flags and sanitise flag handling
      
      v5 (2007-11-03)
      
      * Add sysfs interface for userspace. Export events over netlink again.
      * Remove module left overs, fully convert to built-in driver.
      * Tweak in-kernel API to use u8 for instance, since this is what the GUID
        blocks use (so instance cannot be greater than u8).
      * Export wmi_get_event_data() for in kernel WMI drivers.
      
      v6 (2007-11-07)
      
      * Split out userspace into a different patch
      
      v7 (2007-11-20)
      
      * Fix driver to handle multiple PNP0C14 devices - store all GUIDs using
        the kernel's built in list functions, and just keep adding to the list
        every time we handle a PNP0C14 devices - GUIDs will always be unique,
        and WMI callers do not know or care about different devices.
      * Change WMI event handler registration to use its' own event handling
        struct; we should not pass an acpi_handle down to any WMI based drivers
        - they should be able to function with only the calls provided in WMI.
      * Update my e-mail address
      
      v8 (2007-11-28)
      
      * Convert back to a module.
      * Update Kconfig to default to building as a module.
      * Remove an erroneous printk.
      * Simply comments for string flag (since we now leave the handling to the
        caller).
      
      v9 (2007-12-07)
      
      * Add back missing MODULE_DEVICE_TABLE for autoloading
      * Checkpatch fixes
      
      v10 (2007-12-12)
      
      * Workaround broken GUIDs declared expensive without a WCxx method.
      * Minor cleanups
      
      v11 (2007-12-17)
      
      * More fixing for broken GUIDs declared expensive without a WCxx method.
      * Add basic EmbeddedControl region handling.
      
      v12 (2007-12-18)
      
      * Changed EC region handling code, as per Alexey's comments.
      
      v13 (2007-12-27)
      
      * Changed event handling so that we can have one event handler registered
        per GUID, as per Matthew Garrett's suggestion.
      
      v14 (2008-01-12)
      
      * Remove ACPI debug statements
      
      v15 (2008-02-01)
      
      * Replace two remaining 'x == NULL' type tests with '!x'
      
      v16 (2008-02-05)
      
      * Change MAINTAINERS entry, as I am not, and never have been, paid to work
        on WMI
      * Remove 'default' line from Kconfig
      Signed-off-by: NCarlos Corbacho <carlos@strangeworlds.co.uk>
      CC: Matthew Garrett <mjg59@srcf.ucam.org>
      CC: Alexey Starikovskiy <aystarik@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      bff431e4
  30. 24 1月, 2008 1 次提交
    • L
      ACPI: make _OSI(Linux) console messages smarter · d4b7dc49
      Len Brown 提交于
      If BIOS invokes _OSI(Linux), the kernel response
      depends on what the ACPI DMI list knows about the system,
      and that is reflectd in dmesg:
      
      1) System unknown to DMI:
      
      ACPI: BIOS _OSI(Linux) query ignored
      ACPI: DMI System Vendor: LENOVO
      ACPI: DMI Product Name: 7661W1P
      ACPI: DMI Product Version: ThinkPad T61
      ACPI: DMI Board Name: 7661W1P
      ACPI: DMI BIOS Vendor: LENOVO
      ACPI: DMI BIOS Date: 10/18/2007
      ACPI: Please send DMI info above to linux-acpi@vger.kernel.org
      ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org
      
      2) System known to DMI, but effect of OSI(Linux) unknown:
      
      ACPI: DMI detected: Lenovo ThinkPad T61
      ...
      ACPI: BIOS _OSI(Linux) query ignored via DMI
      ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org
      
      3) System known to DMI, which disables _OSI(Linux):
      
      ACPI: DMI detected: Lenovo ThinkPad T61
      ...
      ACPI: BIOS _OSI(Linux) query ignored via DMI
      
      4) System known to DMI, which enable _OSI(Linux):
      
      ACPI: DMI detected: Lenovo ThinkPad T61
      ACPI: Added _OSI(Linux)
      ...
      ACPI: BIOS _OSI(Linux) query honored via DMI
      
      cmdline overrides take precidence over the built-in
      default and the DMI prescribed default.
      cmdline "acpi_osi=Linux" results in:
      
      ACPI: BIOS _OSI(Linux) query honored via cmdline
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d4b7dc49
  31. 14 12月, 2007 1 次提交
    • L
      ACPI: tables: complete searching upon RSDP w/ bad checksum. · 239665a3
      Len Brown 提交于
      ACPI tables follow a tree structure in memory.
      The root of the tree is the RSDP (Root System Description Pointer).
      
      To find the RSDP, the OS searches for the signature "RSD PTR "
      in well known physical memory locations.  Then the OS computes
      a table checksum to verify that the signature is really part
      of a valid table header.
      
      Some systems have a proper signature but an invalid checksum;
      followed elsewhere by a proper signature with valid checksum.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=9444
      
      The Linux RSDP scanning code bailed out on those systems
      and as a result they booted with ACPI disabled.
      
      Fix this by deleting the Linux RSDP scanning code and
      plugging in the ACPICA RSDP scanning code.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      239665a3
  32. 20 11月, 2007 1 次提交