hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/infiniband/hw/hfi1/user_exp_rcv.h
....@@ -1,6 +1,7 @@
11 #ifndef _HFI1_USER_EXP_RCV_H
22 #define _HFI1_USER_EXP_RCV_H
33 /*
4
+ * Copyright(c) 2020 - Cornelis Networks, Inc.
45 * Copyright(c) 2015 - 2017 Intel Corporation.
56 *
67 * This file is provided under a dual BSD/GPLv2 license. When using or
....@@ -48,7 +49,6 @@
4849 */
4950
5051 #include "hfi.h"
51
-
5252 #include "exp_rcv.h"
5353
5454 struct tid_pageset {
....@@ -66,14 +66,15 @@
6666 };
6767
6868 struct tid_rb_node {
69
- struct mmu_rb_node mmu;
69
+ struct mmu_interval_notifier notifier;
70
+ struct hfi1_filedata *fdata;
7071 unsigned long phys;
7172 struct tid_group *grp;
7273 u32 rcventry;
7374 dma_addr_t dma_addr;
7475 bool freed;
7576 unsigned int npages;
76
- struct page *pages[0];
77
+ struct page *pages[];
7778 };
7879
7980 static inline int num_user_pages(unsigned long addr,
....@@ -95,4 +96,9 @@
9596 int hfi1_user_exp_rcv_invalid(struct hfi1_filedata *fd,
9697 struct hfi1_tid_info *tinfo);
9798
99
+static inline struct mm_struct *mm_from_tid_node(struct tid_rb_node *node)
100
+{
101
+ return node->notifier.mm;
102
+}
103
+
98104 #endif /* _HFI1_USER_EXP_RCV_H */