diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-05-07 20:35:29 +0200 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-05-10 00:06:46 +0200 |
commit | 3f5f6d8368031710d4f5847ff285812fcde54009 (patch) | |
tree | 5031f39d3a5d9e21dc3bc31b56074bbceba4d344 /src/arch/x86 | |
parent | d654f42e271b2daa17a4daddcb7c9603aa25e018 (diff) | |
download | coreboot-3f5f6d8368031710d4f5847ff285812fcde54009.tar.xz |
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 <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/3216
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/include/arch/cpu.h | 14 |
1 files changed, 6 insertions, 8 deletions
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 <device/device.h> @@ -158,11 +157,7 @@ struct cpu_driver { struct acpi_cstate *cstates; }; -struct device; struct cpu_driver *find_cpu_driver(struct device *cpu); -#else -#include <arch/io.h> -#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 <arch/io.h> +#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 */ |