From edd98859027a0f970cbccedb4180a7893556350e Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 18 Jun 2024 23:59:02 +0200 Subject: 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 changes --- driver/kmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'driver/kmem.c') 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. -- cgit v1.2.3