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/host_command.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/host_command.c')
-rw-r--r-- | common/host_command.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/common/host_command.c b/common/host_command.c index 778eeab369..387f0d03a2 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -81,24 +81,6 @@ uint8_t *host_get_memmap(int offset) #endif } -static struct mutex memmap_write_mutex; - -void host_lock_memmap() -{ - mutex_lock(&memmap_write_mutex); -} - -/* Returns host memmap lock status */ -int host_memmap_is_locked(void) -{ - return (memmap_write_mutex.lock != 0); -} - -void host_unlock_memmap() -{ - mutex_unlock(&memmap_write_mutex); -} - int host_get_vboot_mode(void) { return g_vboot_mode; |