Move compiler.h to commonlib
Its spreading copies got out of sync. And as it is not a standard header but used in commonlib code, it belongs into commonlib. While we are at it, always include it via GCC's `-include` switch. Some Windows and BSD quirk handling went into the util copies. We always guard from redefinitions now to prevent further issues. Change-Id: I850414e6db1d799dce71ff2dc044e6a000ad2552 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28927 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
#ifndef ARCH_HLT_H
|
||||
#define ARCH_HLT_H
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
static __always_inline void hlt(void)
|
||||
{
|
||||
for (;;) ;
|
||||
|
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <arch/stages.h>
|
||||
#include <arch/cache.h>
|
||||
#include <compiler.h>
|
||||
|
||||
/**
|
||||
* generic stage entry point. override this if board specific code is needed.
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <assert.h>
|
||||
#include <cbfs.h>
|
||||
#include <cbmem.h>
|
||||
#include <compiler.h>
|
||||
#include <program_loading.h>
|
||||
|
||||
/*
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#include <arch/transition.h>
|
||||
#include <arm_tf.h>
|
||||
#include <cbmem.h>
|
||||
#include <compiler.h>
|
||||
#include <console/console.h>
|
||||
#include <program_loading.h>
|
||||
#include <rules.h>
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#ifndef ARCH_HLT_H
|
||||
#define ARCH_HLT_H
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
static __always_inline void hlt(void)
|
||||
{
|
||||
for (;;) ;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
#include <arch/mmu.h>
|
||||
#include <arch/transition.h>
|
||||
#include <assert.h>
|
||||
#include <compiler.h>
|
||||
#include <console/console.h>
|
||||
|
||||
/* Litte-endian, No XN-forced, Instr cache disabled,
|
||||
|
@@ -16,8 +16,6 @@
|
||||
#ifndef __MIPS_ARCH_HLT_H
|
||||
#define __MIPS_ARCH_HLT_H
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
static inline __always_inline void hlt(void)
|
||||
{
|
||||
for (;;)
|
||||
|
@@ -11,8 +11,6 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
static __always_inline void hlt(void)
|
||||
{
|
||||
while (1)
|
||||
|
@@ -11,8 +11,6 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
static __always_inline void hlt(void)
|
||||
{
|
||||
while (1);
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <endian.h>
|
||||
#include <stdint.h>
|
||||
#include <compiler.h>
|
||||
|
||||
static __always_inline uint8_t read8(const volatile void *addr)
|
||||
{
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include <arch/acpigen.h>
|
||||
#include <device/pci.h>
|
||||
#include <cbmem.h>
|
||||
#include <compiler.h>
|
||||
#include <cpu/x86/lapic_def.h>
|
||||
#include <cpu/cpu.h>
|
||||
#include <cbfs.h>
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#include <string.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <compiler.h>
|
||||
#include <cpu/cpu.h>
|
||||
#include <fallback.h>
|
||||
#include <timestamp.h>
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <lib.h>
|
||||
#include <string.h>
|
||||
#include <arch/acpigen.h>
|
||||
#include <compiler.h>
|
||||
#include <console/console.h>
|
||||
#include <device/device.h>
|
||||
|
||||
|
@@ -13,7 +13,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cbmem.h>
|
||||
#include <compiler.h>
|
||||
#include <arch/acpi.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_LATE_CBMEM_INIT)
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include <arch/early_variables.h>
|
||||
#include <arch/exception.h>
|
||||
#include <commonlib/helpers.h>
|
||||
#include <compiler.h>
|
||||
#include <console/console.h>
|
||||
#include <console/streams.h>
|
||||
#include <cpu/x86/cr.h>
|
||||
|
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <string.h>
|
||||
#include <compiler.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include <cpu/x86/gdt.h>
|
||||
|
@@ -54,7 +54,6 @@
|
||||
|
||||
#if !defined(__ASSEMBLER__) && !defined(__ACPI__) && !defined(__ROMCC__)
|
||||
#include <stdint.h>
|
||||
#include <compiler.h>
|
||||
#include <rules.h>
|
||||
#include <commonlib/helpers.h>
|
||||
#include <device/device.h>
|
||||
|
@@ -20,8 +20,6 @@ static void hlt(void)
|
||||
__builtin_hlt();
|
||||
}
|
||||
#else
|
||||
#include <compiler.h>
|
||||
|
||||
static __always_inline void hlt(void)
|
||||
{
|
||||
asm("hlt");
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#ifndef _ASM_IO_H
|
||||
#define _ASM_IO_H
|
||||
|
||||
#include <compiler.h>
|
||||
#include <endian.h>
|
||||
#include <stdint.h>
|
||||
#include <rules.h>
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#ifndef _PCI_IO_CFG_H
|
||||
#define _PCI_IO_CFG_H
|
||||
|
||||
#include <compiler.h>
|
||||
#include <arch/io.h>
|
||||
|
||||
static __always_inline
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#define _PCI_MMIO_CFG_H
|
||||
|
||||
#include <arch/io.h>
|
||||
#include <compiler.h>
|
||||
|
||||
#define DEFAULT_PCIEXBAR CONFIG_MMCONF_BASE_ADDRESS
|
||||
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#define MAX_INTX_ENTRIES 4
|
||||
|
||||
#include <stdint.h>
|
||||
#include <compiler.h>
|
||||
|
||||
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
|
||||
#define PIRQ_VERSION 0x0100
|
||||
|
@@ -16,8 +16,6 @@
|
||||
#ifndef __ARCH_REGISTERS_H
|
||||
#define __ARCH_REGISTERS_H
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
#if !defined(__ASSEMBLER__)
|
||||
#define DOWNTO8(A) \
|
||||
union { \
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#ifndef ARCH_SMP_ATOMIC_H
|
||||
#define ARCH_SMP_ATOMIC_H
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
/*
|
||||
* Make sure gcc doesn't try to be clever and move things around
|
||||
* on us. We need to use _exactly_ the address the user gave us,
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#ifndef __ASM_MPSPEC_H
|
||||
#define __ASM_MPSPEC_H
|
||||
|
||||
#include <compiler.h>
|
||||
#include <device/device.h>
|
||||
#include <cpu/x86/lapic_def.h>
|
||||
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#ifndef ARCH_SMP_SPINLOCK_H
|
||||
#define ARCH_SMP_SPINLOCK_H
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
#if !defined(__PRE_RAM__) \
|
||||
|| IS_ENABLED(CONFIG_HAVE_ROMSTAGE_CONSOLE_SPINLOCK) \
|
||||
|| IS_ENABLED(CONFIG_HAVE_ROMSTAGE_NVRAM_CBFS_SPINLOCK) \
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#include <device/path.h>
|
||||
#include <device/pci_ids.h>
|
||||
#include <cpu/cpu.h>
|
||||
#include <compiler.h>
|
||||
#include <arch/smp/mpspec.h>
|
||||
#include <string.h>
|
||||
#include <arch/cpu.h>
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#include <console/console.h>
|
||||
#include <compiler.h>
|
||||
#include <arch/pirq_routing.h>
|
||||
#include <string.h>
|
||||
#include <device/pci.h>
|
||||
|
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <arch/cpu.h>
|
||||
#include <cbmem.h>
|
||||
#include <compiler.h>
|
||||
#include <console/console.h>
|
||||
#include <main_decl.h>
|
||||
#include <program_loading.h>
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <smbios.h>
|
||||
#include <compiler.h>
|
||||
#include <console/console.h>
|
||||
#include <version.h>
|
||||
#include <device/device.h>
|
||||
|
@@ -13,7 +13,6 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
#include <cpu/x86/tsc.h>
|
||||
#include <timestamp.h>
|
||||
|
||||
|
Reference in New Issue
Block a user