[rtems-libbsd commit] dpaa: Set portal interrupt affinity
Sebastian Huber
sebh at rtems.org
Mon Oct 23 07:27:51 UTC 2017
Module: rtems-libbsd
Branch: master
Commit: 3cfc31cb0c49218fa45b53867d38acf7cb60346d
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=3cfc31cb0c49218fa45b53867d38acf7cb60346d
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jul 11 14:53:42 2017 +0200
dpaa: Set portal interrupt affinity
---
linux/drivers/soc/fsl/qbman/bman.c | 16 ++++++++++++++++
linux/drivers/soc/fsl/qbman/qman.c | 16 ++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/linux/drivers/soc/fsl/qbman/bman.c b/linux/drivers/soc/fsl/qbman/bman.c
index 29a30dc..fec101c 100644
--- a/linux/drivers/soc/fsl/qbman/bman.c
+++ b/linux/drivers/soc/fsl/qbman/bman.c
@@ -550,6 +550,22 @@ static int bman_create_portal(struct bman_portal *portal,
dev_err(c->dev, "irq_set_affinity() failed\n");
goto fail_affinity;
}
+#else /* __rtems__ */
+ {
+ rtems_status_code sc;
+ cpu_set_t cpu;
+
+ sc = rtems_interrupt_server_move(
+ RTEMS_INTERRUPT_SERVER_DEFAULT, (uint32_t)c->irq,
+ (uint32_t)c->cpu);
+ BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
+
+ CPU_ZERO(&cpu);
+ CPU_SET(c->cpu, &cpu);
+ sc = rtems_interrupt_set_affinity((uint32_t)c->irq,
+ sizeof(cpu), &cpu);
+ BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
+ }
#endif /* __rtems__ */
/* Need RCR to be empty before continuing */
diff --git a/linux/drivers/soc/fsl/qbman/qman.c b/linux/drivers/soc/fsl/qbman/qman.c
index bb6b6b8..acb3a1d 100644
--- a/linux/drivers/soc/fsl/qbman/qman.c
+++ b/linux/drivers/soc/fsl/qbman/qman.c
@@ -1214,6 +1214,22 @@ static int qman_create_portal(struct qman_portal *portal,
dev_err(c->dev, "irq_set_affinity() failed\n");
goto fail_affinity;
}
+#else /* __rtems__ */
+ {
+ rtems_status_code sc;
+ cpu_set_t cpu;
+
+ sc = rtems_interrupt_server_move(
+ RTEMS_INTERRUPT_SERVER_DEFAULT, (uint32_t)c->irq,
+ (uint32_t)c->cpu);
+ BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
+
+ CPU_ZERO(&cpu);
+ CPU_SET(c->cpu, &cpu);
+ sc = rtems_interrupt_set_affinity((uint32_t)c->irq,
+ sizeof(cpu), &cpu);
+ BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
+ }
#endif /* __rtems__ */
/* Need EQCR to be empty before continuing */
More information about the vc
mailing list