[rtems commit] bsp/qoriq: Fix hypervisor guest irq vector max
Sebastian Huber
sebh at rtems.org
Mon Jan 22 09:39:46 UTC 2018
Module: rtems
Branch: master
Commit: 2fd684e233985eac6e7a7da02026b9e95a178ffd
Changeset: http://git.rtems.org/rtems/commit/?id=2fd684e233985eac6e7a7da02026b9e95a178ffd
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jan 16 11:42:34 2018 +0100
bsp/qoriq: Fix hypervisor guest irq vector max
Update #3085.
---
c/src/lib/libbsp/powerpc/qoriq/include/irq.h | 11 ++++++++++-
c/src/lib/libbsp/powerpc/qoriq/startup/bsprestart.c | 6 +++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/qoriq/include/irq.h b/c/src/lib/libbsp/powerpc/qoriq/include/irq.h
index 45bceee..e178057 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/include/irq.h
+++ b/c/src/lib/libbsp/powerpc/qoriq/include/irq.h
@@ -32,6 +32,12 @@
extern "C" {
#endif /* __cplusplus */
+#ifdef QORIQ_IS_HYPERVISOR_GUEST
+
+#define BSP_INTERRUPT_VECTOR_MAX 1023
+
+#else /* !QORIQ_IS_HYPERVISOR_GUEST */
+
#define QORIQ_IRQ_ERROR 0
#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
@@ -344,8 +350,12 @@ extern "C" {
#define QORIQ_IRQ_GT_B_2 (QORIQ_IRQ_GT_BASE + 6)
#define QORIQ_IRQ_GT_B_3 (QORIQ_IRQ_GT_BASE + 7)
+#define BSP_INTERRUPT_VECTOR_MAX QORIQ_IRQ_GT_B_3
+
/** @} */
+#endif /* QORIQ_IS_HYPERVISOR_GUEST */
+
/**
* @defgroup QorIQInterrupt QorIQ - Interrupt Support
*
@@ -357,7 +367,6 @@ extern "C" {
*/
#define BSP_INTERRUPT_VECTOR_MIN 0
-#define BSP_INTERRUPT_VECTOR_MAX QORIQ_IRQ_GT_B_3
#define QORIQ_PIC_PRIORITY_LOWEST 1
#define QORIQ_PIC_PRIORITY_HIGHEST 15
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bsprestart.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bsprestart.c
index 3558334..ac09971 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bsprestart.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bsprestart.c
@@ -48,7 +48,7 @@ static RTEMS_NO_RETURN void do_restart(void *addr)
bsp_fatal(QORIQ_FATAL_RESTART_FAILED);
}
-#ifdef RTEMS_SMP
+#if defined(RTEMS_SMP) && !defined(QORIQ_IS_HYPERVISOR_GUEST)
#include <rtems/score/smpimpl.h>
#include <rtems/score/smpbarrier.h>
@@ -133,7 +133,7 @@ void bsp_restart(void *addr)
bsp_fatal(QORIQ_FATAL_RESTART_INTERRUPT_FAILED);
}
-#else /* RTEMS_SMP */
+#else /* !RTEMS_SMP || QORIQ_IS_HYPERVISOR_GUEST */
void bsp_restart(void *addr)
{
@@ -144,4 +144,4 @@ void bsp_restart(void *addr)
do_restart(addr);
}
-#endif /* !RTEMS_SMP */
+#endif /* RTEMS_SMP && !QORIQ_IS_HYPERVISOR_GUEST */
More information about the vc
mailing list