History log of /freebsd-9.3-release/sys/dev/acpica/Osd/OsdSynch.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 249132 05-Apr-2013 mav

MFC r227293 (by ed):
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# 232087 23-Feb-2012 jkim

MFC: r231474

De-obfuscate acpi_acquire_global_lock().


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 194639 22-Jun-2009 jkim

Add a missing return in NULL mutex case.

Submitted by: Pawel Worach (pawel dot worach at gmail dot com)


# 193753 08-Jun-2009 jkim

Remove redundant checks for ACPI_WAIT_FOREVER cases.


# 193750 08-Jun-2009 jkim

Rewrite OsdSynch.c to reflect the latest ACPICA more closely:

- Implement ACPI semaphore (ACPI_SEMAPHORE) with condvar(9) and mutex(9).
- Implement ACPI mutex (ACPI_MUTEX) with mutex(9).
- Implement ACPI lock (ACPI_SPINLOCK) with spin mutex(9).


# 193530 05-Jun-2009 jkim

Import ACPICA 20090521.


# 177934 05-Apr-2008 takawata

GPE lock may recurse on resume path.


# 167918 26-Mar-2007 jkim

- Use '*h' instead of 'struct acpi_spinlock' for sizeof[1].
- Add a missing 'else' for 'if'[2].

Requested by: njl[1]
Submitted by: njl[2]


# 167915 26-Mar-2007 jkim

Correct ACPI semaphore function parameters.


# 167911 26-Mar-2007 jkim

Free the handle, not the lock. Pointy hat to me.


# 167910 26-Mar-2007 jkim

Correct ACPI spinlock function parameters and use known ACPI spinlock names.


# 167908 26-Mar-2007 njl

Use a unique name for each mutex now that acpi-ca is creating more than
one (hardware & global lock). This should address witness complaints that
a duplicate mutex is being acquired. Be sure to free the mutex to fix a
potential memory leak.

MFC after: 3 days


# 167814 22-Mar-2007 jkim

Catch up with ACPI-CA 20070320 import.


# 153706 24-Dec-2005 trhodes

Make tv_sec a time_t on all platforms but alpha. Brings us more in line with
POSIX. This also makes the struct correct we ever implement an i386-time64
architecture. Not that we need too.

Reviewed by: imp, brooks
Approved by: njl (acpica), des (no objects, touches procfs)
Tested with: make universe


# 151948 01-Nov-2005 jkim

Catch up with ACPI-CA 20051021 import


# 150003 11-Sep-2005 obrien

Canonize the include of acpi.h.


# 148318 22-Jul-2005 njl

Standardize __FBSDID identifiers.

MFC after: 2 days


# 130695 18-Jun-2004 njl

Remove compat code and unused lock declarations.


# 128981 05-May-2004 njl

Remove extra parentheses.


# 128979 05-May-2004 njl

Add an MI implementation of the ACPI global lock routines and retire the
individual asm versions. The global lock is shared between the BIOS and
OS and thus cannot use our mutexes. It is defined in section 5.2.9.1 of
the ACPI specification.

Reviewed by: marcel, bde, jhb


# 128227 14-Apr-2004 njl

Style cleanups, use M_ZERO instead of bzero, unify the !semaphore and
semaphore return paths.


# 120494 26-Sep-2003 njl

Make debug.acpi.level and debug.acpi.layer sysctls that can be set with
the strings found in acpi(4). Also make acpi_ca_version a string so it
is more readable.


# 117530 13-Jul-2003 njl

Update code to work with 0619 dist

* Use ACPI_BUFFER as the type for AcpiGetObjectInfo
* Remove AcpiEnableEvent/AcpiClearEvent for ACPI_EVENT_FIXED (power/sleep
buttons) as they are no longer needed
* Change calls to use the new GPE functions
* Add AcpiOs*Lock functions


# 107328 27-Nov-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20021118 import.


# 105278 16-Oct-2002 jhb

Implement the internal locks of an ACPI semaphore with splhigh() on
4-stable. -current uses a mutex for this purpose.

Sponsored by: The Weather Channel


# 99492 06-Jul-2002 iwasaki

Fix wrong use of ACPI_NO_UNIT_LIMIT which is for as_maxunits, not as_units.


# 96926 19-May-2002 peter

Brutally deal with __func__ being 'const char *' on gcc-3.1.


# 93818 04-Apr-2002 jhb

Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on: i386, alpha, sparc64


# 91128 23-Feb-2002 msmith

Match namespace cleanup changes in ACPI CA 20020217 update.


# 88420 22-Dec-2001 iwasaki

Add OS layer ACPI mutex and threading support.
- Temporary fix a bug of Intel ACPI CA core code.
- Add OS layer ACPI mutex support. This can be disabled by
specifying option ACPI_NO_SEMAPHORES.
- Add ACPI threading support. Now that we have a dedicate taskqueue for
ACPI tasks and more ACPI task threads can be created by specifying option
ACPI_MAX_THREADS.
- Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given
caller's buffer unless AE_BUFFER_OVERFLOW occurs. Also CM battery's
evaluations were changed to use acpi_EvaluateIntoBuffer().
- Add new utility function acpi_ConvertBufferToInteger().
- Add simple locking for CM battery and temperature updating.
- Fix a minor problem on EC locking.
- Make the thermal zone polling rate to be changeable.
- Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case,
entering Debugger is easier to investigate the problem rather than panic.


# 80071 21-Jul-2001 msmith

Update the OSD module to match the ACPI CA 20010717 import.

Submitted by: "Grover, Andrew" <andrew.grover@intel.com> (OsdHardware.c)


# 77466 30-May-2001 msmith

What I get for "fixing" at the last minute. Correct a mis-merge of takawata's
timeout fix and put proc.h into the right file.

Submitted by: nnd@mail.nsk.ru


# 77432 29-May-2001 msmith

- Updates for new constant naming in the ACPI CA 20010518 update.
- Use __func__ instead of __FUNCTION.
- Support power-off to S3 or S5 (takawata)
- Enable ACPI debugging earlier (with a sysinit)
- Fix a deadlock in the EC code (takawata)
- Improve arithmetic and reduce the risk of spurious wakeup in
AcpiOsSleep.
- Add AcpiOsGetThreadId.
- Simplify mutex code (still disabled).


# 74914 28-Mar-2001 jhb

Catch up to header include changes:
- <sys/mutex.h> now requires <sys/systm.h>
- <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>


# 72200 09-Feb-2001 bmilekic

Change and clean the mutex lock interface.

mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)


# 71876 31-Jan-2001 msmith

Add some debugging.

Turn off semaphores. Nobody else implements them, and there is lots of
AML out there which does totally absurd things with them, meaning that
if we try to do the right thing we are guaranteed to fail.


# 71359 22-Jan-2001 msmith

Plug a memory leak in AcpiOsDeleteSemaphore where the mutex is not properly
destroyed.

Submitted by: bmilekic


# 69776 08-Dec-2000 msmith

Staticise some malloc pools

Submitted by: phk


# 67760 28-Oct-2000 msmith

FreeBSD-specific OSD (operating system dependant) modules for the Intel
ACPICA code.