summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utmutex.c
Commit message (Collapse)AuthorAgeFilesLines
* ACPICA: Additional 2016 copyright changesBob Moore2016-01-151-1/+1
| | | | | | | | | All tool/utility signons. Dual-license module header. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Core: Major update for code formatting, no functional changesBob Moore2016-01-011-2/+3
| | | | | | | | | | | | ACPICA commit dfa394471f6c01b2ee9433dbc143ec70cb9bca72 Mostly indentation inconsistencies across the code. Split some long lines, etc. Link: https://github.com/acpica/acpica/commit/dfa39447 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Convert some mechanisms to OSPM specificLv Zheng2015-12-151-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following mechanisms are OSPM specific: 1. Redirect output destination to console: no file redirection will be needed by an in-kernel debugger, there is even no file can be accessed when the debugger is running in the kernel mode. 2. Output command prompts: programs other than acpiexec can have different prompt characters and the prompt characters may be implemented as a special character sequence to form a char device IO protocol. 3. Command ready/complete handshake: OSPM debugger may wait more conditions to implement OSPM specific semantics (for example, FIFO full/empty conditions for O_NONBLOCK or IO open/close conditions). Leaving such OSPM specific stuffs in the ACPICA debugger core blocks Linux debugger IO driver implementation. Several new OSL APIs are provided by this patch: 1. acpi_os_initialize_command_signals: initialize command handshake mechanism or any other OSPM specific stuffs. 2. acpi_os_terminate_command_signals: reversal of acpi_os_initialize_command_signals. 3. acpi_os_wait_command_ready: putting debugger task into wait state when a command is not ready. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wait_event() or wait_for_multiple_object() may be used to implement this API. 4. acpi_os_notify_command_complete: putting user task into running state when a command has been completed. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or set_event() may be used to implement this API. This patch also converts current command signaling implementation into a generic debugger layer (osgendbg.c) to be used by the existing OSPMs or acpiexec, in return, Linux can have chance to implement its own command handshake mechanism. This patch also implements acpiexec batch mode in a multi-threading mode comaptible style as a demo (this can be confirmed by configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode is still working). Lv Zheng. Note that the OSPM specific command handshake mechanism is required by Linux kernel because: 1. Linux kernel trends to use wait queue to synchronize two threads, using mutexes to achieve that will cause false "dead lock" warnings. 2. The command handshake mechanism implemented by ACPICA is implemented in this way because of a design issue in debugger IO streaming. Debugger IO outputs are simply cached using a giant buffer, this should be tuned by Linux in the future. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Update mutexes used for multithreaded debuggerBob Moore2015-10-221-0/+21
| | | | | | | | | | | | | | | | | ACPICA commit 6b2701f619040e803313363f516b200e362a9100 Make these mutex objects independent of the deadlock detection mechanism. This mechanism caused failures with the multithread debugger. This patch doesn't affect Linux kernel as debugger is currently not fully functioning in the Linux kernel. And the further debugger cleanups will take care of handling debugger command signalling correctly instead of using such kind of mutexes. So it is safe to leave this patch as it is. Link: https://github.com/acpica/acpica/commit/6b2701f6 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update Copyright headers to 2015David E. Box2015-02-051-1/+1
| | | | | | | | | | ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36 Link: https://github.com/acpica/acpica/commit/8990e73a Signed-off-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update ACPICA copyrights to 2014.Bob Moore2014-02-111-1/+1
| | | | | | | | | Update ACPICA copyrights to 2014. Includes all source headers and signons for the various tools. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add a lock to the internal object reference count mechanismBob Moore2013-04-121-1/+8
| | | | | | | | | | | | | Certain external interfaces need to update object references without holding the interpreter or namespace mutex objects. To prevent race conditions, add a spinlock around the increment and decrement of the reference counts for internal ACPI objects. Reported by Andriy Gapon (avg@FreeBSD.org). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Andriy Gapon <avg@FreeBSD.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update ACPICA copyrights to 2013Bob Moore2013-01-251-1/+1
| | | | | | | | Includes all source headers and signons for the various tools. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Remove extra spaces after periods within commentsBob Moore2012-11-151-6/+6
| | | | | | | | This makes all comments consistent. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Audit/update for ACPICA return macros and debug depth counterBob Moore2012-11-151-0/+2
| | | | | | | | | | | 1) Ensure that all functions that use the various TRACE macros also use the appropriate ACPICA return macros. 2) Ensure that all normal return statements surround the return expression (value) with parens. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: AcpiSrc: Fix some translation issues for Linux conversionBob Moore2012-07-171-4/+4
| | | | | | | | | | | | | | | | Fixes issues like this: i_aSL -> iASL 00-7_f -> 00-7F local_fADT -> local_FADT execute_oSI -> execute_OSI Also, in function headers, the parameters are now translated to lower case (with underscores if necessary.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Update all copyrights to 2012Bob Moore2012-01-171-1/+1
| | | | | | | | Update all copyrights to 2012. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Update for GCC 4Bob Moore2012-01-171-6/+3
| | | | | | | | | | | Fixes several issues with GCC 4.6 related to the new checks for unused variables. http://www.acpica.org/bugzilla/show_bug.cgi?id=935 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Fix code divergence of global lock handlingLin Ming2011-03-251-5/+0
| | | | | | | | | | | | | | | | Commit 9cd0314(ACPI / ACPICA: Fix global lock acquisition) was backported into ACPICA code base, and some divergence was introduced. This patch fixed it, - rename acpi_ev_global_lock_pending/acpi_ev_global_lock_pending_lock to acpi_gbl_global_lock_pending/acpi_gbl_global_lock_pending_lock. - move the initialization of acpi_gbl_global_lock_pending_lock from acpi_ut_mutex_initialize to acpi_ev_init_global_lock_handler. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Use acpi_os_create_lock interfaceLin Ming2011-03-251-3/+14
| | | | | | | Replace spin_lock_init with acpi_os_create_lock. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'acpica' of ↵Linus Torvalds2011-01-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPICA: Update version to 20110112 ACPICA: Update all ACPICA copyrights and signons to 2011 ACPICA: Fix issues/fault with automatic "serialized" method support ACPICA: Debugger: Lock namespace for duration of a namespace dump ACPICA: Fix namespace race condition ACPICA: Fix memory leak in acpi_ev_asynch_execute_gpe_method().
| * ACPICA: Update all ACPICA copyrights and signons to 2011Bob Moore2011-01-181-1/+1
| | | | | | | | | | | | Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI / ACPICA: Initialize the global lock spinlock as appropriateRafael J. Wysocki2011-01-141-0/+1
|/ | | | | | | | | | Commit 9cd0314 (ACPI / ACPICA: Fix global lock acquisition) forgot to initialize the spinlock it added. Fix that. Reported-and-tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ACPICA: Make acpi_thread_id no longer configurable, always u64Lin Ming2010-10-011-13/+16
| | | | | | | | | | | | | Change definition of acpi_thread_id to always be a u64. This simplifies the code, especially any printf output. u64 is the only common data type for all thread_id types across all operating systems. We now force the OSL to cast the native thread_id type to u64 before returning the value to ACPICA (via acpi_os_get_thread_id). Signed-off-by: Lin Ming <ming.m.lin@intel.com Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA/ACPI: Add new host interfaces for _OSI supportLin Ming2010-10-011-0/+8
| | | | | | | | | | | | | | | | | | | | Adds install/remove interfaces so that the host can dynamically alter the global _OSI table. Also adds support for _OSI handlers. Additional support: new debugger command (osi), and test support in the acpiexec utility. Adds new file, utilities/utosi.c. ACPICA bugzilla 836. The Linux OSL _OSI code is also changed. acpi_osi_setup can't call acpi_install/remove_interface because ACPICA is not initialized yet at this early time. So we just save the osi string in acpi_osi_setup and will handle it later in a new function acpi_osi_setup_late. http://www.acpica.org/bugzilla/show_bug.cgi?id=836 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com Signed-off-by: Len Brown <len.brown@intel.com>
* gcc-4.6: ACPI: fix unused but set variables in ACPIAndi Kleen2010-08-151-4/+1
| | | | | | | | | Some minor improvements in error handling, but overall it was mostly dead code. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Standardize integer output for ACPICA warnings/errorsBob Moore2010-04-201-2/+2
| | | | | | | | | Always use 0x prefix for hex output, use %u for integer output (all integers are unsigned.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Update all ACPICA copyrights and signons to 2010Bob Moore2010-01-221-1/+1
| | | | | | | | | | Add 2010 copyright to all module headers and signons, including the Linux header. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and all utilities. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Update for new gcc-4 warning optionsBob Moore2010-01-221-13/+3
| | | | | | | | | | | Added several new options for the gcc-4 generation, and updated the source accordingly. This includes some code restructuring to eliminate unreachable code, elimination of some gotos, elimination of unused return values, and some additional casting. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Fix possible warnings for ACPI_THREAD_ID on 64-bit buildBob Moore2009-05-271-13/+13
| | | | | | | | | | | Warnings can be generated for printf-like statements that output the ACPI_THREAD_ID on 64-bit builds, since this type can expand to 64-bits depending on how it is defined. Use the %p format specifier to allow the output to automatically expand to 64 bits. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Fix AcpiWalkNamespace race condition with table unloadBob Moore2009-03-271-8/+15
| | | | | | | | | | | | | | | Added a reader/writer locking mechanism to allow multiple concurrent namespace walks (readers), but a dynamic table unload will have exclusive access to the namespace. This fixes a problem where a table unload could delete the portion of the namespace that is currently being examined by a walk. Adds a new file, utlock.c that implements the reader/writer lock mechanism. ACPICA BZ 749. http://www.acpica.org/bugzilla/show_bug.cgi?id=749 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: hide private headersLen Brown2009-01-091-1/+1
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: create acpica/ directoryLen Brown2009-01-091-0/+342
also, delete sleep/ and delete ACPI_CFLAGS from Makefile Signed-off-by: Len Brown <len.brown@intel.com>
OpenPOWER on IntegriCloud