apic : Refactor some macros into a header
Moving few macros into a header file. Change-Id: I975e19ba518bd6184038d6c1715224be7190b3ad Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
This commit is contained in:
parent
bc04903bdd
commit
7c29fefd7d
2 changed files with 45 additions and 25 deletions
|
@ -26,33 +26,9 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <drivers/ioapic.h>
|
||||
#include <drivers/loapic.h>
|
||||
#include <drivers/sysapic.h>
|
||||
#include <irq.h>
|
||||
|
||||
#if !defined(LOAPIC_IRQ_BASE) && !defined (LOAPIC_IRQ_COUNT)
|
||||
|
||||
/* Default IA32 system APIC definitions with local APIC IRQs after IO APIC. */
|
||||
|
||||
#define LOAPIC_IRQ_BASE CONFIG_IOAPIC_NUM_RTES
|
||||
#define LOAPIC_IRQ_COUNT 6 /* Default to LOAPIC_TIMER to LOAPIC_ERROR */
|
||||
|
||||
#define IS_IOAPIC_IRQ(irq) (irq < LOAPIC_IRQ_BASE)
|
||||
|
||||
#define HARDWARE_IRQ_LIMIT ((LOAPIC_IRQ_BASE + LOAPIC_IRQ_COUNT) - 1)
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
Assumption for boards that define LOAPIC_IRQ_BASE & LOAPIC_IRQ_COUNT that
|
||||
local APIC IRQs are within IOAPIC RTE range.
|
||||
*/
|
||||
|
||||
#define IS_IOAPIC_IRQ(irq) ((irq < LOAPIC_IRQ_BASE) || \
|
||||
(irq >= (LOAPIC_IRQ_BASE + LOAPIC_IRQ_COUNT)))
|
||||
|
||||
#define HARDWARE_IRQ_LIMIT (CONFIG_IOAPIC_NUM_RTES - 1)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* forward declarations */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue