File tree Expand file tree Collapse file tree 2 files changed +12
-21
lines changed
drivers/infiniband/hw/ipath Expand file tree Collapse file tree 2 files changed +12
-21
lines changed Original file line number Diff line number Diff line change 55
55
#define __IPATH_PKTDBG 0x80 /* print packet data */
56
56
/* print process startup (init)/exit messages */
57
57
#define __IPATH_PROCDBG 0x100
58
- /* print mmap/nopage stuff, not using VDBG any more */
58
+ /* print mmap/fault stuff, not using VDBG any more */
59
59
#define __IPATH_MMDBG 0x200
60
60
#define __IPATH_ERRPKTDBG 0x400
61
61
#define __IPATH_USER_SEND 0x1000 /* use user mode send */
81
81
#define __IPATH_VERBDBG 0x0 /* very verbose debug */
82
82
#define __IPATH_PKTDBG 0x0 /* print packet data */
83
83
#define __IPATH_PROCDBG 0x0 /* process startup (init)/exit messages */
84
- /* print mmap/nopage stuff, not using VDBG any more */
84
+ /* print mmap/fault stuff, not using VDBG any more */
85
85
#define __IPATH_MMDBG 0x0
86
86
#define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */
87
87
#define __IPATH_IPATHDBG 0x0 /* Ethernet (IPATH) table dump on */
Original file line number Diff line number Diff line change @@ -1120,33 +1120,24 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma,
1120
1120
}
1121
1121
1122
1122
/*
1123
- * ipath_file_vma_nopage - handle a VMA page fault.
1123
+ * ipath_file_vma_fault - handle a VMA page fault.
1124
1124
*/
1125
- static struct page * ipath_file_vma_nopage (struct vm_area_struct * vma ,
1126
- unsigned long address , int * type )
1125
+ static int ipath_file_vma_fault (struct vm_area_struct * vma ,
1126
+ struct vm_fault * vmf )
1127
1127
{
1128
- unsigned long offset = address - vma -> vm_start ;
1129
- struct page * page = NOPAGE_SIGBUS ;
1130
- void * pageptr ;
1128
+ struct page * page ;
1131
1129
1132
- /*
1133
- * Convert the vmalloc address into a struct page.
1134
- */
1135
- pageptr = (void * )(offset + (vma -> vm_pgoff << PAGE_SHIFT ));
1136
- page = vmalloc_to_page (pageptr );
1130
+ page = vmalloc_to_page ((void * )(vmf -> pgoff << PAGE_SHIFT ));
1137
1131
if (!page )
1138
- goto out ;
1139
-
1140
- /* Increment the reference count. */
1132
+ return VM_FAULT_SIGBUS ;
1141
1133
get_page (page );
1142
- if (type )
1143
- * type = VM_FAULT_MINOR ;
1144
- out :
1145
- return page ;
1134
+ vmf -> page = page ;
1135
+
1136
+ return 0 ;
1146
1137
}
1147
1138
1148
1139
static struct vm_operations_struct ipath_file_vm_ops = {
1149
- .nopage = ipath_file_vma_nopage ,
1140
+ .fault = ipath_file_vma_fault ,
1150
1141
};
1151
1142
1152
1143
static int mmap_kvaddr (struct vm_area_struct * vma , u64 pgaddr ,
You can’t perform that action at this time.
0 commit comments