diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-09-13 02:10:45 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-09-14 08:16:37 +0000 |
commit | 75a62e76486f63f6dadb5492c205570ace81e9d5 (patch) | |
tree | c3338d2ddd7b2f9f51f35432a24087fc289999fb /src/include/cpu/amd | |
parent | cf9ea55473cde8b9a2b9494eca452df7783376e5 (diff) | |
download | coreboot-75a62e76486f63f6dadb5492c205570ace81e9d5.tar.xz |
complier.h: add __always_inline and use it in code base
Add a __always_inline macro that wraps __attribute__((always_inline))
and replace current users with the macro, excluding files under
src/vendorcode.
Change-Id: Ic57e474c1d2ca7cc0405ac677869f78a28d3e529
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/28587
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@google.com>
Diffstat (limited to 'src/include/cpu/amd')
-rw-r--r-- | src/include/cpu/amd/mtrr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/cpu/amd/mtrr.h b/src/include/cpu/amd/mtrr.h index b31648d0af..9661b636cc 100644 --- a/src/include/cpu/amd/mtrr.h +++ b/src/include/cpu/amd/mtrr.h @@ -38,13 +38,14 @@ #if !defined(__PRE_RAM__) && !defined(__ASSEMBLER__) +#include <compiler.h> #include <cpu/x86/msr.h> void amd_setup_mtrrs(void); struct device; void add_uma_resource_below_tolm(struct device *nb, int idx); -static inline __attribute__((always_inline)) msr_t rdmsr_amd(unsigned int index) +static __always_inline msr_t rdmsr_amd(unsigned int index) { msr_t result; __asm__ __volatile__ ( @@ -55,8 +56,7 @@ static inline __attribute__((always_inline)) msr_t rdmsr_amd(unsigned int index) return result; } -static inline __attribute__((always_inline)) void wrmsr_amd(unsigned int index, - msr_t msr) +static __always_inline void wrmsr_amd(unsigned int index, msr_t msr) { __asm__ __volatile__ ( "wrmsr" |