Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes needed to compile on newer kernel #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified Bin/Plx_load
100644 → 100755
Empty file.
Empty file modified Bin/Plx_unload
100644 → 100755
Empty file.
Empty file modified Bin/startlog
100644 → 100755
Empty file.
8 changes: 5 additions & 3 deletions Driver/Source.Plx9000/Dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,14 @@ Dispatch_mmap(
**********************************************************/

// Set the region as page-locked
vma->vm_flags |= VM_RESERVED;

//vma->vm_flags |= VM_RESERVED; arun
vm_flags_set(vma, VM_RESERVED);

if (bDeviceMem)
{
// Set flag for I/O resource
vma->vm_flags |= VM_IO;
//vma->vm_flags |= VM_IO; arun
vm_flags_set(vma, VM_IO);

// Set caching based on BAR properties
if (pdx->PciBar[offset].Properties.Flags & PLX_BAR_FLAG_PREFETCHABLE)
Expand Down
3 changes: 2 additions & 1 deletion Driver/Source.Plx9000/Driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/version.h>
#include <linux/vermagic.h>
//#include <linux/vermagic.h> Arun
#include <generated/utsrelease.h>
#include "ApiFunc.h"
#include "Dispatch.h"
#include "Driver.h"
Expand Down
6 changes: 4 additions & 2 deletions Driver/Source.Plx9000/SuppFunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ PlxLockBufferAndBuildSgl(
}

// Obtain the mmap reader/writer semaphore
down_read( &current->mm->mmap_sem );
//down_read( &current->mm->mmap_sem ); arun
mmap_read_lock(current->mm);

// Attempt to lock the user buffer into memory
rc =
Expand All @@ -966,7 +967,8 @@ PlxLockBufferAndBuildSgl(
);

// Release mmap semaphore
up_read( &current->mm->mmap_sem );
//up_read( &current->mm->mmap_sem ); arun
mmap_read_unlock(current->mm);

if (rc != TotalDescr)
{
Expand Down
12 changes: 11 additions & 1 deletion Include/Plx_sysdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,18 @@
) \
)
#else
#define Plx_get_user_pages get_user_pages
#define Plx_get_user_pages(start, nr_pages, gup_flags, pages, vmas) \
( \
get_user_pages( \
(start), \
(nr_pages), \
((gup_flags) & FOLL_WRITE) ? 1 : 0, \
(pages) \
) \
)
#endif
// #else
// #define Plx_get_user_pages get_user_pages // arun



Expand Down