<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/acpica/acpi_ec.c, branch stable/7</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2010-01-22T09:42:41Z</updated>
<entry>
<title>MFC r202567: acpi_ec: remove redundant acpi_disabled check</title>
<updated>2010-01-22T09:42:41Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2010-01-22T09:42:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7ee86647ecd121476f83464219d5d4fd026dca97'/>
<id>urn:sha1:7ee86647ecd121476f83464219d5d4fd026dca97</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MFC r202558: acpi_ec: clean up 'private' ivar when freeing memory</title>
<updated>2010-01-22T09:37:47Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2010-01-22T09:37:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f842b2ead53d7985f10edf72da4760b062589c08'/>
<id>urn:sha1:f842b2ead53d7985f10edf72da4760b062589c08</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MFC r199016: acpi: remove 'magic' ivar</title>
<updated>2009-12-01T06:15:19Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2009-12-01T06:15:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=3d9dd42b7136ceaf13f9e3d3e4768c2d47b9c559'/>
<id>urn:sha1:3d9dd42b7136ceaf13f9e3d3e4768c2d47b9c559</id>
<content type='text'>
Note that the ivar itself is kept in the stable branches, only its use is
dropped.
</content>
</entry>
<entry>
<title>MFC: poll EC during resume</title>
<updated>2007-11-08T21:21:27Z</updated>
<author>
<name>Nate Lawson</name>
<email>njl@FreeBSD.org</email>
</author>
<published>2007-11-08T21:21:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=46a00dd234a358bcffd0160b5bbb4a1b22ed2fdc'/>
<id>urn:sha1:46a00dd234a358bcffd0160b5bbb4a1b22ed2fdc</id>
<content type='text'>
Approved by:	re
</content>
</entry>
<entry>
<title>Rewrite the EC driver event model.  The main goal is to avoid</title>
<updated>2007-09-24T16:59:06Z</updated>
<author>
<name>Nate Lawson</name>
<email>njl@FreeBSD.org</email>
</author>
<published>2007-09-24T16:59:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=83dcc133d89dea69859b0bdf27399a8d31c1e88f'/>
<id>urn:sha1:83dcc133d89dea69859b0bdf27399a8d31c1e88f</id>
<content type='text'>
polling/interrupt-driven fallback and instead use polling only during
boot and pure interrupt-driven mode after boot.  Polled mode could be
relegated completely to a legacy role if we could enable interrupts
during boot.  Polled mode can be forced after boot by setting
debug.acpi.ec.polled="1", i.e. if there are timeouts.

- Use polling only during boot, shutdown, or if requested by the user.
  Otherwise, use a generation count of GPEs, incremented atomically.  This
  prevents an old status value from being used if the EC is really slow
  and the same condition (i.e. multiple IBEs for a write transaction) is
  being checked.
- Check for and run the query handler directly if the SCI bit is set in
  the status register during boot.  Previously, the query handler wouldn't
  run until interrupts were finally enabled late in boot.
- During boot and after starting a command, check if the event appears
  to already have occurred before we even start waiting.  If so, it's
  possible the EC is very slow and we might accept an old status value.
  Print a warning in this case.  Once we've booted, interrupt-driven mode
  should work just fine but polled mode could be unreliable.  There's not
  much more we can do about this until interrupts are enabled during boot.
- In the above case, we also do one final check if the interrupt-driven
  mode gets a timeout.  If the status is complete, it will force the
  system back into polled mode since interrupt mode doesn't work.  For
  polled mode during boot, if the status appears to be already complete
  before beginning the check loop, it waits 10 us before actually checking
  the status, just in case the EC is really slow and hasn't gotten to work
  on the new request yet.
- Use upper-case hex for the _Qxx method
- Use device_printf for errors, don't hide them under verbose
- Increase default total timeout to 750 ms and decrease polling interval
  to 5 us.
- Don't pass the status value via the softc.  Just read it directly.
- Remove the mutex. We use the sx lock for transaction serialization
  with the query handler.
- Remove the Intel copyright notice as no code of theirs was ever
  present in this file (verified against rev 1.1)
- Allow KTR module-only builds for ease of testing

Thanks to jkim and Alexey Starikovskiy for helpful discussions and testing.

Approved by:	re
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Convert magic to a uintptr_t.  This should get rid of some warnings on</title>
<updated>2007-06-15T18:02:34Z</updated>
<author>
<name>Nate Lawson</name>
<email>njl@FreeBSD.org</email>
</author>
<published>2007-06-15T18:02:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=70fa7bc0ac6b34af9c9a146449e3e87d6688997d'/>
<id>urn:sha1:70fa7bc0ac6b34af9c9a146449e3e87d6688997d</id>
<content type='text'>
gcc4.
</content>
</entry>
<entry>
<title>AcpiAcquireGlobalLock() can sometimes sleep if the mutex is contested.</title>
<updated>2007-06-02T19:21:40Z</updated>
<author>
<name>Nate Lawson</name>
<email>njl@FreeBSD.org</email>
</author>
<published>2007-06-02T19:21:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=35440dd3e92e214da7a1ceef46c8021b0f8d916a'/>
<id>urn:sha1:35440dd3e92e214da7a1ceef46c8021b0f8d916a</id>
<content type='text'>
The global lock is a memory region shared with the BIOS and thus
has some strange behavior like the fact that the sleep is 1 ms max.
We use standard mutexes to synchronize with the SCI so acquiring
the global lock after locking the mutex resulted in a witness
warning.

To deal with this for now, acquire the global lock before all other
locks, similar to Giant.  This should fix the witness "sleeping
with mutex held" issue on boot that occurred after the last ACPI-CA
import.  In the future, we hope to move to the new mutex interface
in ACPI-CA instead of the pseudo-semaphore version we have now.

Reviewed by:    jkim
</content>
</entry>
<entry>
<title>Optimize sx locks to use simple atomic operations for the common cases of</title>
<updated>2007-03-31T23:23:42Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2007-03-31T23:23:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4e7f640dfbe1f666c3857534899ee168776fbe67'/>
<id>urn:sha1:4e7f640dfbe1f666c3857534899ee168776fbe67</id>
<content type='text'>
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, &lt;sys/sx.h&gt; now
requires &lt;sys/lock.h&gt; to be included prior to &lt;sys/sx.h&gt;.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd
</content>
</entry>
<entry>
<title>Catch up with ACPI-CA 20070320 import.</title>
<updated>2007-03-22T18:16:43Z</updated>
<author>
<name>Jung-uk Kim</name>
<email>jkim@FreeBSD.org</email>
</author>
<published>2007-03-22T18:16:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=2be4e4713aac95323b389243f0f7fa00f6a6112a'/>
<id>urn:sha1:2be4e4713aac95323b389243f0f7fa00f6a6112a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>If we got an OBE/IBF event, we failed to re-enable the GPE.  This would</title>
<updated>2007-03-20T00:58:19Z</updated>
<author>
<name>Nate Lawson</name>
<email>njl@FreeBSD.org</email>
</author>
<published>2007-03-20T00:58:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6e141df20070ba7f2299331357ba36bd32ccbbcb'/>
<id>urn:sha1:6e141df20070ba7f2299331357ba36bd32ccbbcb</id>
<content type='text'>
cause the EC to stop handling future events because the GPE stayed masked.
Set a flag when queueing a GPE handler since it will ultimately re-enable
the GPE.  In all other cases, re-enable it ourselves.  I reworked the
patch from the submitter.

Submitted by:	Rong-en Fan &lt;grafan@gmail.com&gt;
</content>
</entry>
</feed>
