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>
This commit is contained in:
committed by
Ronald G. Minnich
parent
d654f42e27
commit
3f5f6d8368
@@ -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 */
|
||||
|
Reference in New Issue
Block a user