diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2024-06-18 23:59:02 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2024-06-18 23:59:02 +0200 |
commit | edd98859027a0f970cbccedb4180a7893556350e (patch) | |
tree | ee76cf38ae7257aaa25cc49d34d4559b846be52d /driver/kmem.c | |
parent | 41e2dee6a212073beef2ef7d5d9fca8ed1845005 (diff) | |
download | pcitool-edd98859027a0f970cbccedb4180a7893556350e.tar.gz pcitool-edd98859027a0f970cbccedb4180a7893556350e.tar.bz2 pcitool-edd98859027a0f970cbccedb4180a7893556350e.tar.xz pcitool-edd98859027a0f970cbccedb4180a7893556350e.zip |
Support for kernels 6.x: compilation tested on Ubuntu 23.10 & 24.04 & operation on Debian 12.5. This still might contain incompatibilities for some earlier kernel versions as I was relaying on ChatGPT to find which exact kernel version was introducing particular changesHEADmaster
Diffstat (limited to 'driver/kmem.c')
-rw-r--r-- | driver/kmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/kmem.c b/driver/kmem.c index c1282be..aa367b7 100644 --- a/driver/kmem.c +++ b/driver/kmem.c @@ -613,8 +613,9 @@ int pcidriver_mmap_kmem(pcidriver_privdata_t *privdata, struct vm_area_struct *v } kmem_entry->refs += vma_size / PAGE_SIZE; + vma_flags_set_compat(vma, VM_RESERVED); // VM_DONTEXPAND | VM_DONTDUMP | VM_LOCKED; + - vma->vm_flags |= (VM_RESERVED); if ((kmem_entry->type&&PCILIB_KMEM_TYPE_MASK) == PCILIB_KMEM_TYPE_CONSISTENT) { // This is coherent memory, so it must not be cached. |