From f1e78a1349d40f2e8a74b15471fc5560976a566f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 6 Dec 2022 18:23:30 +0100 Subject: [PATCH] arch/x86/ioapic.c: Move macros to compilation unit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of these macros are too generic like "NONE" and create conflicts in other compilation units. Change-Id: I6131a576f115df20df4d3df712d4c3f59c6dceb7 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/70429 Reviewed-by: Felix Held Reviewed-by: Kyösti Mälkki Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/ioapic.h | 15 --------------- src/arch/x86/ioapic.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/arch/x86/include/arch/ioapic.h b/src/arch/x86/include/arch/ioapic.h index 12f9387632..a91ac14220 100644 --- a/src/arch/x86/include/arch/ioapic.h +++ b/src/arch/x86/include/arch/ioapic.h @@ -11,21 +11,6 @@ #include -#define ALL (0xff << 24) -#define NONE (0) -#define INT_DISABLED (1 << 16) -#define INT_ENABLED (0 << 16) -#define TRIGGER_EDGE (0 << 15) -#define TRIGGER_LEVEL (1 << 15) -#define POLARITY_HIGH (0 << 13) -#define POLARITY_LOW (1 << 13) -#define PHYSICAL_DEST (0 << 11) -#define LOGICAL_DEST (1 << 11) -#define ExtINT (7 << 8) -#define NMI (4 << 8) -#define SMI (2 << 8) -#define INT (1 << 8) - u8 get_ioapic_id(void *ioapic_base); u8 get_ioapic_version(void *ioapic_base); diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c index 28bbcb14f2..e30b6caa84 100644 --- a/src/arch/x86/ioapic.c +++ b/src/arch/x86/ioapic.c @@ -6,6 +6,21 @@ #include #include +#define ALL (0xff << 24) +#define NONE (0) +#define INT_DISABLED (1 << 16) +#define INT_ENABLED (0 << 16) +#define TRIGGER_EDGE (0 << 15) +#define TRIGGER_LEVEL (1 << 15) +#define POLARITY_HIGH (0 << 13) +#define POLARITY_LOW (1 << 13) +#define PHYSICAL_DEST (0 << 11) +#define LOGICAL_DEST (1 << 11) +#define ExtINT (7 << 8) +#define NMI (4 << 8) +#define SMI (2 << 8) +#define INT (1 << 8) + static u32 io_apic_read(void *ioapic_base, u32 reg) { write32(ioapic_base, reg);