summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/include
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-10-11 05:45:34 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-10-11 05:45:34 +0000
commit8ffd9bd0b4dcade9f006648b9fbfdd29919be12e (patch)
tree7bf5618d4a1131b42a21a7e0ceb2e0de4ed156a6 /sys/dev/pci/drm/include
parentbd7e866240e812ce3b8ea40f542d2e79c315ba68 (diff)
Align pool items on CACHELINESIZE when replacing linux kmem_cache with
SLAB_HWCACHE_ALIGN flag. tested by semarie@
Diffstat (limited to 'sys/dev/pci/drm/include')
-rw-r--r--sys/dev/pci/drm/include/linux/processor.h4
-rw-r--r--sys/dev/pci/drm/include/linux/slab.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/include/linux/processor.h b/sys/dev/pci/drm/include/linux/processor.h
index 9ddf8c3a753..9386a526e3c 100644
--- a/sys/dev/pci/drm/include/linux/processor.h
+++ b/sys/dev/pci/drm/include/linux/processor.h
@@ -19,4 +19,8 @@ cpu_relax(void)
}
}
+#ifndef CACHELINESIZE
+#define CACHELINESIZE 64
+#endif
+
#endif
diff --git a/sys/dev/pci/drm/include/linux/slab.h b/sys/dev/pci/drm/include/linux/slab.h
index 0d5463ecc1b..c1d5ec8fa24 100644
--- a/sys/dev/pci/drm/include/linux/slab.h
+++ b/sys/dev/pci/drm/include/linux/slab.h
@@ -10,6 +10,8 @@
#include <linux/workqueue.h>
#include <linux/gfp.h>
+#include <linux/processor.h> /* for CACHELINESIZE */
+
static inline void *
kmalloc(size_t size, int flags)
{