From 98bff60df38757a260bfe58f5fca62a85eb97be8 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 2 Jun 2017 12:13:14 -0500 Subject: [PATCH] UPSTREAM: 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. BUG=none BRANCH=none TEST=none Change-Id: I2e78ef748b721b2a7ed08250ed0ffcda4dbffa08 Signed-off-by: Patrick Georgi Original-Commit-Id: d86e0e6638062b5d80f5d438f0741dd735734ad4 Original-Change-Id: Id6be6f613771380d5ce803eacf1a0c8b230790b6 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://review.coreboot.org/20018 Original-Reviewed-by: Furquan Shaikh Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Philippe Mathieu-Daud Reviewed-on: https://chromium-review.googlesource.com/524598 --- src/include/cpu/x86/mtrr.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 36b5c712d9..188cd17a19 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -86,13 +86,10 @@ void x86_mtrr_check(void); void mtrr_use_temp_range(uintptr_t begin, size_t size, int type); #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, unsigned int type); int get_free_var_mtrr(void); -#endif - -#if !defined(__ASSEMBLER__) && !defined(__ROMCC__) /* fms: find most significant bit set, stolen from Linux Kernel Source. */ static inline unsigned int fms(unsigned int x)