From b41914952d1f7e2e9f896edd05924deb5b610dff Mon Sep 17 00:00:00 2001 From: Sol Boucher Date: Thu, 12 Mar 2015 18:22:31 -0700 Subject: elog: Eliminate CONFIG_ELOG_FULL_THRESHOLD and CONFIG_ELOG_SHRINK_SIZE These Kconfig options provided a level of configurability that is almost never necessary, so they are being moved into ordinary preprocessor defines in elog_internal.h. The new threshold to trigger shrinking is relative to the number of additional (maximum-size) events that can fit, and the new target post-shrink size is a percentage of the total ELOG area size. BUG=chromium:467820 TEST=Add loop at the end of elog_init() that fills the ELOG area to just below full_threshold with dummy events. Observe successful shrinkage when the next event is logged. BRANCH=None Change-Id: I414c4955a2d819d112ae4f0c7d3571576f732336 Signed-off-by: Patrick Georgi Original-Commit-Id: ce439361e3954a2bf5186292f96936329171cf56 Original-Change-Id: I926097f86262888dcdd47d73fba474bb2e19856a Original-Signed-off-by: Sol Boucher Original-Reviewed-on: https://chromium-review.googlesource.com/260501 Original-Reviewed-by: Duncan Laurie Original-Reviewed-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/9869 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/drivers/elog/elog_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/drivers/elog/elog_internal.h') diff --git a/src/drivers/elog/elog_internal.h b/src/drivers/elog/elog_internal.h index dd282311a6..6194ef6c3e 100644 --- a/src/drivers/elog/elog_internal.h +++ b/src/drivers/elog/elog_internal.h @@ -31,6 +31,8 @@ struct elog_header { /* ELOG related constants */ #define ELOG_SIGNATURE 0x474f4c45 /* 'ELOG' */ #define ELOG_VERSION 1 +#define ELOG_MIN_AVAILABLE_ENTRIES 2 /* Shrink when this many can't fit */ +#define ELOG_SHRINK_PERCENTAGE 25 /* Percent of total area to remove */ /* SMBIOS event log header */ struct event_header { -- cgit v1.2.3