cpu/x86/mtrr: don't guard function declarations

set_var_mtrr() and get_free_var_mtrr() don't need to be guarded
against various stages. It just complicates code which lives
in a compilation unit that is compiled for multiple stages by
needing to reflect the same guarding. Instead, just drop the
declaration guard. earlymtrr.c is still just compiled for earlier
stages, but if needed it's easy to move to a mtrr_util.c that
is compiled for all stages.

Change-Id: Id6be6f613771380d5ce803eacf1a0c8b230790b6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20018
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
This commit is contained in:
Aaron Durbin 2017-06-02 12:13:14 -05:00
parent 74e1fb0b1a
commit d86e0e6638
1 changed files with 1 additions and 4 deletions

View File

@ -86,13 +86,10 @@ void x86_mtrr_check(void);
void mtrr_use_temp_range(uintptr_t begin, size_t size, int type); void mtrr_use_temp_range(uintptr_t begin, size_t size, int type);
#endif #endif
#if !defined(__ASSEMBLER__) && defined(__PRE_RAM__) && !defined(__ROMCC__) #if !defined(__ASSEMBLER__) && !defined(__ROMCC__)
void set_var_mtrr(unsigned int reg, unsigned int base, unsigned int size, void set_var_mtrr(unsigned int reg, unsigned int base, unsigned int size,
unsigned int type); unsigned int type);
int get_free_var_mtrr(void); int get_free_var_mtrr(void);
#endif
#if !defined(__ASSEMBLER__) && !defined(__ROMCC__)
/* fms: find most significant bit set, stolen from Linux Kernel Source. */ /* fms: find most significant bit set, stolen from Linux Kernel Source. */
static inline unsigned int fms(unsigned int x) static inline unsigned int fms(unsigned int x)