diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-07-27 14:36:53 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-28 21:31:38 +0000 |
commit | a9527fd686dcdd0b04c4eac6690531d945e7f221 (patch) | |
tree | b094ce4302d22dcff233e9738fc71105f70adaca /common/fan.c | |
parent | 0183e3cc7ffc507bbb3fc7d4165b3b13a90b813e (diff) | |
download | chrome-ec-a9527fd686dcdd0b04c4eac6690531d945e7f221.tar.gz |
acpi: Ensure continuity of memmap data with a read cache
For multi-byte ACPI memmap reads, we previously had a mutex to ensure
data continuity. A better approach is to use a read cache. Since the
kernel will enable burst mode before reading a multi-byte memmap
variable and disable it afterward, we can populate the cache on the
first read after enabling burst. This solution removes deadlock bugs, is
contained entirely in acpi.c, and saves a deferred function.
BUG=chromium:514283
TEST=Manual on Glados. Add prints in acpi_read, verify that multi-byte
reads come from cache and non-burst reads continue to function as
before.
BRANCH=Cyan
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I74e4927bf2b433e31a9ff65d72820fa087c51722
Reviewed-on: https://chromium-review.googlesource.com/288871
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/fan.c')
-rw-r--r-- | common/fan.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/common/fan.c b/common/fan.c index 6cb64e777a..9c2a7c587e 100644 --- a/common/fan.c +++ b/common/fan.c @@ -484,10 +484,7 @@ static void pwm_fan_second(void) rpm = fan_get_rpm_actual(fans[fan].ch); } - /* Lock ACPI read access to memmap during multi-byte write */ - host_lock_memmap(); mapped[fan] = rpm; - host_unlock_memmap(); } /* |