Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37030 )
Change subject: lib/timestamp.c: Drop CAR_GLOBAL_MIGRATION support ......................................................................
lib/timestamp.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: I0ba97d7a2da02ba24de6932678c3bc936aa6554b Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/lib/timestamp.c 1 file changed, 6 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/37030/1
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index dcb3124..7c7210c 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -22,7 +22,6 @@ #include <symbols.h> #include <timer.h> #include <timestamp.h> -#include <arch/early_variables.h> #include <smp/node.h>
#define MAX_TIMESTAMPS 192 @@ -31,7 +30,7 @@
/* This points to the active timestamp_table and can change within a stage as CBMEM comes available. */ -static struct timestamp_table *glob_ts_table CAR_GLOBAL; +static struct timestamp_table *glob_ts_table;
static void timestamp_cache_init(struct timestamp_table *ts_cache, uint64_t base) @@ -94,21 +93,17 @@
static struct timestamp_table *timestamp_table_get(void) { - struct timestamp_table *ts_table; + if (glob_ts_table) + return glob_ts_table;
- ts_table = car_get_ptr(glob_ts_table); - if (ts_table) - return ts_table; + glob_ts_table = timestamp_cache_get();
- ts_table = timestamp_cache_get(); - car_set_ptr(glob_ts_table, ts_table); - - return ts_table; + return glob_ts_table; }
static void timestamp_table_set(struct timestamp_table *ts) { - car_set_ptr(glob_ts_table, ts); + glob_ts_table = ts; }
static const char *timestamp_name(enum timestamp_id id)
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37030 )
Change subject: lib/timestamp.c: Drop CAR_GLOBAL_MIGRATION support ......................................................................
Patch Set 8: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37030 )
Change subject: lib/timestamp.c: Drop CAR_GLOBAL_MIGRATION support ......................................................................
lib/timestamp.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: I0ba97d7a2da02ba24de6932678c3bc936aa6554b Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/37030 Reviewed-by: Kyösti Mälkki kyosti.malkki@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/lib/timestamp.c 1 file changed, 6 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index dcb3124..7c7210c 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -22,7 +22,6 @@ #include <symbols.h> #include <timer.h> #include <timestamp.h> -#include <arch/early_variables.h> #include <smp/node.h>
#define MAX_TIMESTAMPS 192 @@ -31,7 +30,7 @@
/* This points to the active timestamp_table and can change within a stage as CBMEM comes available. */ -static struct timestamp_table *glob_ts_table CAR_GLOBAL; +static struct timestamp_table *glob_ts_table;
static void timestamp_cache_init(struct timestamp_table *ts_cache, uint64_t base) @@ -94,21 +93,17 @@
static struct timestamp_table *timestamp_table_get(void) { - struct timestamp_table *ts_table; + if (glob_ts_table) + return glob_ts_table;
- ts_table = car_get_ptr(glob_ts_table); - if (ts_table) - return ts_table; + glob_ts_table = timestamp_cache_get();
- ts_table = timestamp_cache_get(); - car_set_ptr(glob_ts_table, ts_table); - - return ts_table; + return glob_ts_table; }
static void timestamp_table_set(struct timestamp_table *ts) { - car_set_ptr(glob_ts_table, ts); + glob_ts_table = ts; }
static const char *timestamp_name(enum timestamp_id id)