Fix compilation of LinuxKPI for PowerPC.

Found by:		emaste @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-04-09 14:31:41 +00:00
parent 83a37350bf
commit 76fe8c9330
3 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ CTASSERT((VM_PROT_ALL & -(1 << 8)) == 0);
#define FAULT_FLAG_REMOTE (1 << 7)
#define FAULT_FLAG_INSTRUCTION (1 << 8)
typedef int (*pte_fn_t)(pte_t *, pgtable_t, unsigned long addr, void *data);
typedef int (*pte_fn_t)(linux_pte_t *, pgtable_t, unsigned long addr, void *data);
struct vm_area_struct {
vm_offset_t vm_start;

View File

@ -40,9 +40,9 @@
#include <vm/vm_page.h>
#include <vm/pmap.h>
typedef unsigned long pte_t;
typedef unsigned long pmd_t;
typedef unsigned long pgd_t;
typedef unsigned long linux_pte_t;
typedef unsigned long linux_pmd_t;
typedef unsigned long linux_pgd_t;
typedef unsigned long pgprot_t;
#define page vm_page

View File

@ -411,7 +411,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pindex_t pidx, int fault_type,
MPASS(vmap->vm_private_data == vm_obj->handle);
/* fill out VM fault structure */
vmf.virtual_address = (void *)(pidx << PAGE_SHIFT);
vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT);
vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0;
vmf.pgoff = 0;
vmf.page = NULL;