summaryrefslogtreecommitdiffstats
path: root/freebsd/sys
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-25 10:58:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-25 10:58:17 +0200
commit5f2d63683a773b37cbfb383513dfe50d07d97425 (patch)
tree470bdd580db4885f91672f308787ba7c50a8e5eb /freebsd/sys
parentFix warnings (diff)
downloadrtems-libbsd-5f2d63683a773b37cbfb383513dfe50d07d97425.tar.bz2
Add support for EARLY_COUNTER
Diffstat (limited to 'freebsd/sys')
-rw-r--r--freebsd/sys/kern/subr_counter.c3
-rw-r--r--freebsd/sys/sys/pcpu.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/freebsd/sys/kern/subr_counter.c b/freebsd/sys/kern/subr_counter.c
index 66cda02b..2855a5d2 100644
--- a/freebsd/sys/kern/subr_counter.c
+++ b/freebsd/sys/kern/subr_counter.c
@@ -174,3 +174,6 @@ counter_ratecheck(struct counter_rate *cr, int64_t limit)
return (val);
}
+#ifdef __rtems__
+uint64_t _bsd_early_counter[_BSD_EARLY_COUNTER_SIZE];
+#endif /* __rtems__ */
diff --git a/freebsd/sys/sys/pcpu.h b/freebsd/sys/sys/pcpu.h
index de5936f6..0ce30af7 100644
--- a/freebsd/sys/sys/pcpu.h
+++ b/freebsd/sys/sys/pcpu.h
@@ -227,7 +227,11 @@ extern struct pcpu *cpuid_to_pcpu[];
#endif
#define curvidata PCPU_GET(vidata)
+#ifndef __rtems__
#define UMA_PCPU_ALLOC_SIZE PAGE_SIZE
+#else /* __rtems__ */
+#define UMA_PCPU_ALLOC_SIZE (PAGE_SIZE / 32)
+#endif /* __rtems__ */
#ifndef __rtems__
#ifdef CTASSERT