[coreboot] New patch to review for coreboot: c325a1b Prevent inclusion of tsc.h when not needed

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Nov 7 00:50:42 CET 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1753


commit c325a1b5e3a0b375ab60e87fdcd18f25faa58ea7
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Thu Sep 27 18:42:57 2012 -0700

    Prevent inclusion of tsc.h when not needed
    src/include/timestamp.h is an interface describing timestamp storage
    in coreboot. Exporting this interface is complicated by inclusion of
    tsc.h which is needed only for the API and is not used in structure
    definitions. Including this dependency only when needed fixes the
    Change-Id: Ie6b1460b1dab0f5b5781cb5a9fa89a1a52aa9f17
    Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
 src/include/timestamp.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/include/timestamp.h b/src/include/timestamp.h
index 65bdf21..8bf5287 100644
--- a/src/include/timestamp.h
+++ b/src/include/timestamp.h
@@ -20,8 +20,6 @@
 #ifndef __TIMESTAMP_H__
 #define __TIMESTAMP_H__
-#include <cpu/x86/tsc.h>
 struct timestamp_entry {
 	uint32_t	entry_id;
 	uint64_t	entry_stamp;
@@ -55,6 +53,7 @@ enum timestamp_id {
+#include <cpu/x86/tsc.h>
 void timestamp_init(tsc_t base);
 void timestamp_add(enum timestamp_id id, tsc_t ts_time);
 void timestamp_add_now(enum timestamp_id id);

More information about the coreboot mailing list