summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-20 09:59:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-11-13 13:03:57 +0100
commit1d90e42327d8394a8fb5f404430fbef99350c6cc (patch)
treeb0cf7906c56b7e3e5704eb8bca615a6d7acb1f67
parentab4be9ec77c51939d94ff241b9746be38290a146 (diff)
downloadrtems-libbsd-1d90e42327d8394a8fb5f404430fbef99350c6cc.tar.bz2
NVME(4): Enable per-CPU IO queues
Update #3821.
-rw-r--r--freebsd/sys/dev/nvme/nvme_ctrlr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/freebsd/sys/dev/nvme/nvme_ctrlr.c b/freebsd/sys/dev/nvme/nvme_ctrlr.c
index 5ab6f813..1c2ab351 100644
--- a/freebsd/sys/dev/nvme/nvme_ctrlr.c
+++ b/freebsd/sys/dev/nvme/nvme_ctrlr.c
@@ -46,6 +46,13 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include "nvme_private.h"
+#ifdef __rtems__
+#include <rtems/score/smp.h>
+#undef curcpu
+#define curcpu _SMP_Get_current_processor()
+#undef mp_ncpus
+#define mp_ncpus _SMP_Get_processor_maximum()
+#endif /* __rtems__ */
#define B4_CHK_RDY_DELAY_MS 2300 /* work around controller bug */