diff options
Diffstat (limited to 'src/include/elog.h')
-rw-r--r-- | src/include/elog.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/include/elog.h b/src/include/elog.h index 77275456e1..5d360817da 100644 --- a/src/include/elog.h +++ b/src/include/elog.h @@ -20,8 +20,6 @@ #ifndef ELOG_H_ #define ELOG_H_ -#if CONFIG_ELOG - /* SMI command code for GSMI event logging */ #define ELOG_GSMI_APM_CNT 0xEF @@ -148,6 +146,7 @@ struct elog_event_data_me_extended { /* CPU Thermal Trip */ #define ELOG_TYPE_THERM_TRIP 0xa7 +#if CONFIG_ELOG /* Eventlog backing storage must be initialized before calling elog_init(). */ extern int elog_init(void); extern int elog_clear(void); @@ -158,6 +157,21 @@ extern void elog_add_event_word(u8 event_type, u16 data); extern void elog_add_event_dword(u8 event_type, u32 data); extern void elog_add_event_wake(u8 source, u32 instance); extern int elog_smbios_write_type15(unsigned long *current, int handle); +#else +/* Stubs to help avoid littering sources with #if CONFIG_ELOG */ +static inline int elog_init(void) { return -1; } +static inline int elog_clear(void) { return -1; } +static inline void elog_add_event_raw(void) { return; } +static inline void elog_add_event(u8 event_type) { return; } +static inline void elog_add_event_byte(u8 event_type, u8 data) { return; } +static inline void elog_add_event_word(u8 event_type, u16 data) { return; } +static inline void elog_add_event_dword(u8 event_type, u32 data) { return; } +static inline void elog_add_event_wake(u8 source, u32 instance) { return; } +static inline int elog_smbios_write_type15(unsigned long *current, + int handle) { + return 0; +} +#endif #if CONFIG_ELOG_GSMI extern u32 gsmi_exec(u8 command, u32 *param); @@ -170,6 +184,4 @@ u32 boot_count_increment(void); static inline u32 boot_count_read(void) { return 0; } #endif /* CONFIG_ELOG_BOOT_COUNT */ -#endif /* !CONFIG_ELOG */ - #endif /* ELOG_H_ */ |