1. 21 4月, 2014 1 次提交
    • L
      ACPICA: Tables: Clean up split INSTALLED/VALIDATED table state logics. · 7f9fc99c
      Lv Zheng 提交于
      This patch is mainly a naming cleanup to clarify hidden logics, no
      functional changes.
      
      acpi_initialize_tables() is used by Linux to install table addresses for
      early boot steps.  During this stage, table addresses are mapped by
      early_ioremap() mechanism which is different from the runtime IO mappings.
      Thus it is not safe for ACPICA to keep mapped pointers in struct acpi_table_desc
      structure during this stage.
      
      In order to support this in ACPICA, table states are divided into
      1. "INSTALLED" (where struct acpi_table_desc.Pointer is always NULL) and
      2. "VALIDATED" (where struct acpi_table_desc.Pointer is always not NULL).
      During acpi_initialize_tables(), table state are ensured to be "INSTALLED"
      but not "VALIDATED".  This logic is ensured by the original code in very
      ambigious way.  For example, currently acpi_tb_delete_table() is invoked in
      some place to perform an uninstallation while it is invoked in other place
      to perform an invalidation.  They happen to work just because no one enters
      the penalty where the 2 behaviours are not equivalent.
      
      The naming cleanups are made in this patch:
      A. For installation and validation:
         There is code setting struct acpi_table_desc.Pointer first and delete it
         immediately to keep the descriptor's state as "INSTALLED" during the
         installation.  This patch implements this in more direct way.  After
         applying it, struct acpi_table_desc.Pointer will never be set in
         acpi_tb_install_table() and acpi_tb_override_table() as they are the only
         functions invoked during acpi_initialize_tables(). This is achieved by:
      1. Rename acpi_tb_verify_table() to acpi_tb_validate_table() to clarify this
         change.
      2. Rename acpi_tb_table_override() to acpi_tb_override_table() to keep nameing
         consistencies as other APIs (verb. Table).
      3. Stops setting struct acpi_table_desc.Pointer in acpi_tb_install_table() and
         acpi_tb_table_override().
      4. Introduce acpi_tb_acquire_table() to acquire the table pointer that is not
         maintained in the struct acpi_table_desc of the global root table list and
         rewrite acpi_tb_validate_table() using this new function to reduce
         redundancies.
      5. Replace the table pointer using the overridden table pointer in
         acpi_tb_add_table(). As acpi_tb_add_table() is not invoked during early boot
         stage, tables returned from this functions should be "VALIDATED".  As
         acpi_tb_override_table() is modified by this patch to return a "INSTALLED"
         but not "VALIDATED" descriptor, to keep acpi_tb_add_table() unchanged,
         struct acpi_table_desc.Pointer is filled in acpi_tb_add_table().
      B. For invalidation and uninstallation:
         The original code invalidate table by invoking acpi_tb_delete_table() here
         and there, but actually this function should only be used to uninstall
         tables.  This can work just because its invocations are equivalent to
         invalidation in some cases.
         This patch splits acpi_tb_delete_table() into acpi_tb_invalidate_table() and
         acpi_tb_uninstall_table() and cleans up the hidden logic using the new
         APIs.  This is achieved by:
      1. Rename acpi_tb_delete_table() to acpi_tb_uninstall_table() as it is mainly
         called before resetting struct acpi_table_desc.Address.  Thus the table
         descriptor is in "not INSTALLED" state.  This patch enforces this by
         setting struct acpi_table_desc.Address to NULL in this function.
      2. Introduce acpi_tb_invalidate_table() to be the reversal of
         acpi_tb_validate_table() and invoke it in acpi_tb_uninstall_table().
      3. Introduce acpi_tb_release_table() to release the table pointer that is not
         maintained in acpi_gbl_root_table_list and rewrite acpi_tb_invalidate_table()
         using this new function to reduce redundancies.
      
      After cleaning up, the maintainability of the internal APIs are also
      improved:
      1. acpi_tb_acquire_table: Acquire struct acpi_table_header according to
                             ACPI_TABLE_ORIGIN_xxx flags.
      2. acpi_tb_release_table: Release struct acpi_table_header according to
                             ACPI_TABLE_ORIGIN_xxx flags.
      3. acpi_tb_install_table: Make struct acpi_table_desc.Address not NULL according to
                             ACPI_TABLE_ORIGIN_xxx flags.
      4. acpi_tb_uninstall_table: Make struct acpi_table_desc.Address NULL according to
                               ACPI_TABLE_ORIGIN_xxx flags.
      5. acpi_tb_validate_table: Make struct acpi_table_desc.Pointer not NULL according to
                              ACPI_TABLE_ORIGIN_xxx flags.
      6. acpi_tb_invalidate_table: Make struct acpi_table_desc.Pointer NULL according to
                                ACPI_TABLE_ORIGIN_xxx flags.
      7. acpi_tb_override_table: Replace struct acpi_table_desc.Address and
                              struct acpi_table_desc.Flags.  It only happens in
                              "INSTALLED" state.
      
      The patch has been unit tested in acpi_exec by:
      1. Initializing;
      2. Executing exc_tbl ASLTS tests;
      3. Executing "Load" command.
      So that all original acpi_tb_install_table() and acpi_tb_override_table()
      invocations are covered.
      
      Known Issues:
      1. Cleanup acpi_tb_add_table() to Kill Code Redundancies
         Current implementation in acpi_tb_add_table() is not very clean, further
         patch can rewrite acpi_tb_add_table() with ordered acpi_tb_install_table(),
         acpi_tb_override_table() and acpi_tb_validate_table(). It is not done in this
         patch so that it is easy for the reviewers to understand the changes in
         this patch.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7f9fc99c
  2. 11 2月, 2014 1 次提交
  3. 25 1月, 2013 1 次提交
  4. 15 11月, 2012 1 次提交
  5. 17 7月, 2012 1 次提交
  6. 17 1月, 2012 1 次提交
  7. 19 1月, 2011 1 次提交
  8. 06 5月, 2010 1 次提交
  9. 23 1月, 2010 1 次提交
  10. 09 1月, 2009 2 次提交
  11. 31 12月, 2008 1 次提交
  12. 17 7月, 2008 1 次提交
  13. 24 4月, 2008 1 次提交
  14. 23 4月, 2008 1 次提交
  15. 03 2月, 2007 2 次提交
  16. 14 6月, 2006 1 次提交
    • B
      ACPI: ACPICA 20060421 · b229cf92
      Bob Moore 提交于
      Removed a device initialization optimization introduced in
      20051216 where the _STA method was not run unless an _INI
      was also present for the same device. This optimization
      could cause problems because it could allow _INI methods
      to be run within a not-present device subtree (If a
      not-present device had no _INI, _STA would not be run,
      the not-present status would not be discovered, and the
      children of the device would be incorrectly traversed.)
      
      Implemented a new _STA optimization where namespace
      subtrees that do not contain _INI are identified and
      ignored during device initialization. Selectively running
      _STA can significantly improve boot time on large machines
      (with assistance from Len Brown.)
      
      Implemented support for the device initialization case
      where the returned _STA flags indicate a device not-present
      but functioning. In this case, _INI is not run, but the
      device children are examined for presence, as per the
      ACPI specification.
      
      Implemented an additional change to the IndexField support
      in order to conform to MS behavior. The value written to
      the Index Register is not simply a byte offset, it is a
      byte offset in units of the access width of the parent
      Index Field. (Fiodor Suietov)
      
      Defined and deployed a new OSL interface,
      acpi_os_validate_address().  This interface is called during
      the creation of all AML operation regions, and allows
      the host OS to exert control over what addresses it will
      allow the AML code to access. Operation Regions whose
      addresses are disallowed will cause a runtime exception
      when they are actually accessed (will not affect or abort
      table loading.)
      
      Defined and deployed a new OSL interface,
      acpi_os_validate_interface().  This interface allows the host OS
      to match the various "optional" interface/behavior strings
      for the _OSI predefined control method as appropriate
      (with assistance from Bjorn Helgaas.)
      
      Restructured and corrected various problems in the
      exception handling code paths within DsCallControlMethod
      and DsTerminateControlMethod in dsmethod (with assistance
      from Takayoshi Kochi.)
      
      Modified the Linux source converter to ignore quoted string
      literals while converting identifiers from mixed to lower
      case. This will correct problems with the disassembler
      and other areas where such strings must not be modified.
      
      The ACPI_FUNCTION_* macros no longer require quotes around
      the function name. This allows the Linux source converter
      to convert the names, now that the converter ignores
      quoted strings.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b229cf92
  17. 31 3月, 2006 1 次提交
  18. 20 1月, 2006 1 次提交
    • B
      [ACPI] ACPICA 20060113 · 4a90c7e8
      Bob Moore 提交于
      Added 2006 copyright.
      
      At SuSE's suggestion, enabled all error messages
      without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n
      
      Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at
      the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with
      the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros,
      respectively. This preserves all error and warning messages
      in the non-debug version of the ACPICA code (this has been
      referred to as the "debug lite" option.) Over 200 cases
      were converted to create a total of over 380 error/warning
      messages across the ACPICA code. This increases the code
      and data size of the default non-debug version by about 13K.
      Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages.
      The size of the debug version remains about the same.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4a90c7e8
  19. 05 8月, 2005 1 次提交
  20. 12 7月, 2005 1 次提交
    • R
      ACPICA 20050408 from Bob Moore · 44f6c012
      Robert Moore 提交于
      Fixed three cases in the interpreter where an "index"
      argument to an ASL function was still (internally) 32
      bits instead of the required 64 bits.  This was the Index
      argument to the Index, Mid, and Match operators.
      
      The "strupr" function is now permanently local
      (acpi_ut_strupr), since this is not a POSIX-defined
      function and not present in most kernel-level C
      libraries. References to the C library strupr function
      have been removed from the headers.
      
      Completed the deployment of static
      functions/prototypes. All prototypes with the static
      attribute have been moved from the headers to the owning
      C file.
      
      ACPICA 20050329 from Bob Moore
      
      An error is now generated if an attempt is made to create
      a Buffer Field of length zero (A CreateField with a length
      operand of zero.)
      
      The interpreter now issues a warning whenever executable
      code at the module level is detected during ACPI table
      load. This will give some idea of the prevalence of this
      type of code.
      
      Implemented support for references to named objects (other
      than control methods) within package objects.
      
      Enhanced package object output for the debug
      object. Package objects are now completely dumped, showing
      all elements.
      
      Enhanced miscellaneous object output for the debug
      object. Any object can now be written to the debug object
      (for example, a device object can be written, and the type
      of the object will be displayed.)
      
      The "static" qualifier has been added to all local
      functions across the core subsystem.
      
      The number of "long" lines (> 80 chars) within the source
      has been significantly reduced, by about 1/3.
      
      Cleaned up all header files to ensure that all CA/iASL
      functions are prototyped (even static functions) and the
      formatting is consistent.
      
      Two new header files have been added, acopcode.h and
      acnames.h.
      
      Removed several obsolete functions that were no longer
      used.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      44f6c012
  21. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4