From 8ffd9bd0b4dcade9f006648b9fbfdd29919be12e Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Sun, 11 Oct 2020 05:45:34 +0000 Subject: Align pool items on CACHELINESIZE when replacing linux kmem_cache with SLAB_HWCACHE_ALIGN flag. tested by semarie@ --- sys/dev/pci/drm/include/linux/processor.h | 4 ++++ sys/dev/pci/drm/include/linux/slab.h | 2 ++ 2 files changed, 6 insertions(+) (limited to 'sys/dev/pci/drm/include') 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 #include +#include /* for CACHELINESIZE */ + static inline void * kmalloc(size_t size, int flags) { -- cgit v1.2.3