[coreboot-gerrit] Patch set updated for coreboot: 9afc7fe boot state: remove drain timers option

Aaron Durbin (adurbin@google.com) gerrit at coreboot.org
Tue May 7 01:40:25 CEST 2013


Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3205

-gerrit

commit 9afc7fec4044c544125352e4fb69955ec2c1a5bd
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Mon May 6 10:52:24 2013 -0500

    boot state: remove drain timers option
    
    Internally there were states that had an attribute to
    indicate that the timers needed to be drained. Now that
    there is a way to block state transitions rely on this
    ability instead of draining timers. The timers will
    drain themselves when a state is blocked.
    
    Change-Id: I59be9a71b2fd5a17310854d2f91c2a8957aafc28
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/lib/hardwaremain.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 39aae6d..13aa512 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -87,13 +87,12 @@ struct boot_state {
 	boot_state_t (*run_state)(void *arg);
 	void *arg;
 	int complete : 1;
-	int timers_drain : 1;
 #if CONFIG_HAVE_MONOTONIC_TIMER
 	struct boot_state_times times;
 #endif
 };
 
-#define BS_INIT(state_, run_func_, drain_timers_)		\
+#define BS_INIT(state_, run_func_)				\
 	{							\
 		.name = #state_,				\
 		.id = state_,					\
@@ -101,12 +100,9 @@ struct boot_state {
 		.run_state = run_func_,				\
 		.arg = NULL,					\
 		.complete = 0,					\
-		.timers_drain = drain_timers_,			\
 	}
 #define BS_INIT_ENTRY(state_, run_func_)	\
-	[state_] = BS_INIT(state_, run_func_, 0)
-#define BS_INIT_ENTRY_DRAIN_TIMERS(state_, run_func_)	\
-	[state_] = BS_INIT(state_, run_func_, 1)
+	[state_] = BS_INIT(state_, run_func_)
 
 static struct boot_state boot_states[] = {
 	BS_INIT_ENTRY(BS_PRE_DEVICE, bs_pre_device),
@@ -117,10 +113,10 @@ static struct boot_state boot_states[] = {
 	BS_INIT_ENTRY(BS_DEV_INIT, bs_dev_init),
 	BS_INIT_ENTRY(BS_POST_DEVICE, bs_post_device),
 	BS_INIT_ENTRY(BS_OS_RESUME_CHECK, bs_os_resume_check),
-	BS_INIT_ENTRY_DRAIN_TIMERS(BS_OS_RESUME, bs_os_resume),
-	BS_INIT_ENTRY_DRAIN_TIMERS(BS_WRITE_TABLES, bs_write_tables),
-	BS_INIT_ENTRY_DRAIN_TIMERS(BS_PAYLOAD_LOAD, bs_payload_load),
-	BS_INIT_ENTRY_DRAIN_TIMERS(BS_PAYLOAD_BOOT, bs_payload_boot),
+	BS_INIT_ENTRY(BS_OS_RESUME, bs_os_resume),
+	BS_INIT_ENTRY(BS_WRITE_TABLES, bs_write_tables),
+	BS_INIT_ENTRY(BS_PAYLOAD_LOAD, bs_payload_load),
+	BS_INIT_ENTRY(BS_PAYLOAD_BOOT, bs_payload_boot),
 };
 
 static boot_state_t bs_pre_device(void *arg)
@@ -365,7 +361,7 @@ static void bs_walk_state_machine(void)
 
 		printk(BS_DEBUG_LVL, "BS: Entering %s state.\n", state->name);
 
-		bs_run_timers(state->timers_drain);
+		bs_run_timers(0);
 
 		bs_sample_time(state);
 



More information about the coreboot-gerrit mailing list