Made declaration of handleReservedIRQ optional, refactored consequently
This commit is contained in:
parent
7b019e3def
commit
330cbfbdad
22 changed files with 35 additions and 162 deletions
|
|
@ -20,6 +20,33 @@ exception_t Arch_decodeIRQControlInvocation(word_t invLabel, word_t length,
|
|||
cte_t *srcSlot, extra_caps_t excaps,
|
||||
word_t *buffer);
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
#define DEF_HANDLE_RESERVED_IRQ
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
#ifdef CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT
|
||||
if (irq == KERNEL_PMU_IRQ) {
|
||||
handleOverflowIRQ();
|
||||
}
|
||||
#endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */
|
||||
|
||||
#ifdef CONFIG_ARM_HYPERVISOR_SUPPORT
|
||||
if ((config_set(CONFIG_ARM_HYPERVISOR_SUPPORT)) && (irq == INTERRUPT_VGIC_MAINTENANCE)) {
|
||||
VGICMaintenance();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM_SMMMU
|
||||
if (config_set(CONFIG_ARM_SMMU) && (irq == INTERRUPT_SMMU)) {
|
||||
plat_smmu_handle_interrupt();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline exception_t
|
||||
Arch_checkIRQ(word_t irq_w)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,16 +11,6 @@
|
|||
#ifndef __PLAT_MACHINE_HARDWARE_H
|
||||
#define __PLAT_MACHINE_HARDWARE_H
|
||||
|
||||
#include <util.h>
|
||||
#include <basic_types.h>
|
||||
#include <linker.h>
|
||||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@
|
|||
#ifndef __PLAT_MACHINE_HARDWARE_H
|
||||
#define __PLAT_MACHINE_HARDWARE_H
|
||||
|
||||
#include <basic_types.h>
|
||||
#include <linker.h>
|
||||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
#include <plat/machine/interrupt.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -101,12 +101,6 @@ maskInterrupt(bool_t disable, interrupt_t irq)
|
|||
}
|
||||
}
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
ackInterrupt(irq_t irq)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,10 +16,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -132,14 +132,6 @@ enum irqNumbers {
|
|||
irqInvalid = (irq_t) - 1
|
||||
};
|
||||
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
if (config_set(CONFIG_IRQ_REPORTING)) {
|
||||
printf("Received reserved IRQ: %d\n", (int)irq);
|
||||
}
|
||||
}
|
||||
|
||||
interrupt_t
|
||||
getActiveIRQ(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -18,15 +18,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
if ((config_set(CONFIG_ARM_HYPERVISOR_SUPPORT)) &&
|
||||
(irq == INTERRUPT_VGIC_MAINTENANCE)) {
|
||||
VGICMaintenance();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -17,10 +17,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -84,17 +84,6 @@ maskInterrupt(bool_t disable, interrupt_t irq)
|
|||
}
|
||||
}
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
#ifdef CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT
|
||||
if (irq == KERNEL_PMU_IRQ) {
|
||||
handleOverflowIRQ();
|
||||
}
|
||||
#endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */
|
||||
}
|
||||
|
||||
static inline void
|
||||
ackInterrupt(irq_t irq)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,21 +11,6 @@
|
|||
#ifndef __PLAT_MACHINE_HARDWARE_H
|
||||
#define __PLAT_MACHINE_HARDWARE_H
|
||||
|
||||
#include <config.h>
|
||||
#include <basic_types.h>
|
||||
#include <linker.h>
|
||||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
#include <arch/benchmark_overflowHandler.h>
|
||||
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
#ifdef CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT
|
||||
if (irq == KERNEL_PMU_IRQ) {
|
||||
handleOverflowIRQ();
|
||||
}
|
||||
#endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -16,10 +16,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -91,16 +91,6 @@ maskInterrupt(bool_t disable, interrupt_t irq)
|
|||
}
|
||||
}
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
/* We shouldn't be receiving any reserved IRQs anyway. */
|
||||
maskInterrupt(true, irq);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void
|
||||
ackInterrupt(irq_t irq)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <plat/machine/intel-vtd.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
#define DEF_HANDLE_RESERVED_IRQ
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ bool_t add_avail_p_reg(p_region_t reg);
|
|||
void map_kernel_devices(void);
|
||||
|
||||
bool_t CONST isReservedIRQ(irq_t irq);
|
||||
void handleReservedIRQ(irq_t irq);
|
||||
void ackInterrupt(irq_t irq);
|
||||
bool_t isIRQPending(void);
|
||||
/** MODIFIES: [*] */
|
||||
|
|
|
|||
|
|
@ -24,25 +24,4 @@
|
|||
#include <mode/api/constants.h>
|
||||
#include <arch/benchmark_overflowHandler.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
#ifdef CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT
|
||||
if (irq == KERNEL_PMU_IRQ) {
|
||||
handleOverflowIRQ();
|
||||
}
|
||||
#endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */
|
||||
|
||||
if ((config_set(CONFIG_ARM_HYPERVISOR_SUPPORT)) && (irq == INTERRUPT_VGIC_MAINTENANCE)) {
|
||||
VGICMaintenance();
|
||||
return;
|
||||
}
|
||||
|
||||
if (config_set(CONFIG_ARM_SMMU) && (irq == INTERRUPT_SMMU)) {
|
||||
plat_smmu_handle_interrupt();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,15 +20,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
if ((config_set(CONFIG_ARM_HYPERVISOR_SUPPORT)) && (irq == INTERRUPT_VGIC_MAINTENANCE)) {
|
||||
VGICMaintenance();
|
||||
return;
|
||||
}
|
||||
printf("spurious irq %d\n", (int)irq);
|
||||
}
|
||||
|
||||
#endif /* __PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -20,11 +20,4 @@
|
|||
#include <plat/machine.h>
|
||||
#include <plat/machine/devices_gen.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
printf("spurious irq %d\n", (int)irq);
|
||||
}
|
||||
|
||||
#endif /* __PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -18,15 +18,4 @@
|
|||
#include <plat/machine/devices_gen.h>
|
||||
#include <arch/benchmark_overflowHandler.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
#ifdef CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT
|
||||
if (irq == KERNEL_PMU_IRQ) {
|
||||
handleOverflowIRQ();
|
||||
}
|
||||
#endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -27,10 +27,4 @@
|
|||
#include <plat/machine/devices_gen.h>
|
||||
#include <machine/io.h>
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !__PLAT_MACHINE_HARDWARE_H */
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@
|
|||
#include <plat/machine/timer.h>
|
||||
#include <smp/ipi.h>
|
||||
|
||||
#ifndef DEF_HANDLE_RESERVED_IRQ
|
||||
static inline void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
exception_t
|
||||
decodeIRQControlInvocation(word_t invLabel, word_t length,
|
||||
cte_t *srcSlot, extra_caps_t excaps,
|
||||
|
|
|
|||
|
|
@ -110,13 +110,6 @@ isReservedIRQ(irq_t irq)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Handle a platform-reserved IRQ. */
|
||||
void
|
||||
handleReservedIRQ(irq_t irq)
|
||||
{
|
||||
printf("handleReservedIRQ \n");
|
||||
}
|
||||
|
||||
void
|
||||
ackInterrupt(irq_t irq)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue