From 3f5f6d8368031710d4f5847ff285812fcde54009 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 7 May 2013 20:35:29 +0200 Subject: Drop prototype guarding for romcc Commit "romcc: Don't fail on function prototypes" (11a7db3b) [1] made romcc not choke on function prototypes anymore. This allows us to get rid of a lot of ifdefs guarding __ROMCC__ . [1] http://review.coreboot.org/2424 Change-Id: Ib1be3b294e5b49f5101f2e02ee1473809109c8ac Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/3216 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/x86/include/arch/cpu.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index a3555d81d3..890c77f4f1 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -140,7 +140,6 @@ static inline unsigned int cpuid_edx(unsigned int op) #define X86_VENDOR_SIS 10 #define X86_VENDOR_UNKNOWN 0xff -#if !defined(__ROMCC__) #if !defined(__PRE_RAM__) && !defined(__SMM__) #include @@ -158,11 +157,7 @@ struct cpu_driver { struct acpi_cstate *cstates; }; -struct device; struct cpu_driver *find_cpu_driver(struct device *cpu); -#else -#include -#endif struct cpu_info { device_t cpu; @@ -187,7 +182,11 @@ static inline unsigned long cpu_index(void) ci = cpu_info(); return ci->index; } +#else +#include +#endif +#ifndef __ROMCC__ // romcc is segfaulting in some cases struct cpuinfo_x86 { uint8_t x86; /* CPU family */ uint8_t x86_vendor; /* CPU vendor */ @@ -195,7 +194,7 @@ struct cpuinfo_x86 { uint8_t x86_mask; }; -static void inline get_fms(struct cpuinfo_x86 *c, uint32_t tfms) +static inline void get_fms(struct cpuinfo_x86 *c, uint32_t tfms) { c->x86 = (tfms >> 8) & 0xf; c->x86_model = (tfms >> 4) & 0xf; @@ -206,9 +205,8 @@ static void inline get_fms(struct cpuinfo_x86 *c, uint32_t tfms) c->x86_model += ((tfms >> 16) & 0xF) << 4; } +#endif #define asmlinkage __attribute__((regparm(0))) -#endif - #endif /* ARCH_CPU_H */ -- cgit v1.2.3