Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/72859 )
Change subject: arch/ax86/cpu: move cpuid_match to corresponding header file ......................................................................
arch/ax86/cpu: move cpuid_match to corresponding header file
Since the functionality of cpuid_match is also useful outside of arch/x86/cpu.c and it's a relatively simple function, move its definition as inline function to the header file.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: Ic96746b33b01781543f60cf91904af35418e572d --- M src/arch/x86/cpu.c M src/arch/x86/include/arch/cpu.h 2 files changed, 19 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/72859/1
diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c index 53c9a7b..b0227c2 100644 --- a/src/arch/x86/cpu.c +++ b/src/arch/x86/cpu.c @@ -188,11 +188,6 @@ } }
-static bool cpuid_match(uint32_t a, uint32_t b, uint32_t mask) -{ - return (a & mask) == (b & mask); -} - struct cpu_driver *find_cpu_driver(struct device *cpu) { struct cpu_driver *driver; diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index 414acc0..70b2ea9 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -124,6 +124,11 @@ #define CPUID_EXACT_MATCH_MASK 0xffffffff #define CPUID_ALL_STEPPINGS_MASK 0xfffffff0
+inline bool cpuid_match(uint32_t a, uint32_t b, uint32_t mask) +{ + return (a & mask) == (b & mask); +} + struct cpu_device_id { unsigned int vendor; uint32_t device;