summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-07-11 14:53:42 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-23 09:24:07 +0200
commit3cfc31cb0c49218fa45b53867d38acf7cb60346d (patch)
tree6e35f6c4416708305a37524f9e01b8003ffb9263 /linux
parentef1655c144b72f28d74557f1fc07d09a9d251a2b (diff)
downloadrtems-libbsd-3cfc31cb0c49218fa45b53867d38acf7cb60346d.tar.bz2
dpaa: Set portal interrupt affinity
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/soc/fsl/qbman/bman.c16
-rw-r--r--linux/drivers/soc/fsl/qbman/qman.c16
2 files changed, 32 insertions, 0 deletions
diff --git a/linux/drivers/soc/fsl/qbman/bman.c b/linux/drivers/soc/fsl/qbman/bman.c
index 29a30dcb..fec101c8 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 bb6b6b86..acb3a1d9 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 */