.. | .. |
---|
1 | 1 | #ifndef _HFI1_USER_EXP_RCV_H |
---|
2 | 2 | #define _HFI1_USER_EXP_RCV_H |
---|
3 | 3 | /* |
---|
| 4 | + * Copyright(c) 2020 - Cornelis Networks, Inc. |
---|
4 | 5 | * Copyright(c) 2015 - 2017 Intel Corporation. |
---|
5 | 6 | * |
---|
6 | 7 | * This file is provided under a dual BSD/GPLv2 license. When using or |
---|
.. | .. |
---|
48 | 49 | */ |
---|
49 | 50 | |
---|
50 | 51 | #include "hfi.h" |
---|
51 | | - |
---|
52 | 52 | #include "exp_rcv.h" |
---|
53 | 53 | |
---|
54 | 54 | struct tid_pageset { |
---|
.. | .. |
---|
57 | 57 | }; |
---|
58 | 58 | |
---|
59 | 59 | struct tid_user_buf { |
---|
| 60 | + struct mmu_interval_notifier notifier; |
---|
| 61 | + struct mutex cover_mutex; |
---|
60 | 62 | unsigned long vaddr; |
---|
61 | 63 | unsigned long length; |
---|
62 | 64 | unsigned int npages; |
---|
.. | .. |
---|
66 | 68 | }; |
---|
67 | 69 | |
---|
68 | 70 | struct tid_rb_node { |
---|
69 | | - struct mmu_rb_node mmu; |
---|
| 71 | + struct mmu_interval_notifier notifier; |
---|
| 72 | + struct hfi1_filedata *fdata; |
---|
| 73 | + struct mutex invalidate_mutex; /* covers hw removal */ |
---|
70 | 74 | unsigned long phys; |
---|
71 | 75 | struct tid_group *grp; |
---|
72 | 76 | u32 rcventry; |
---|
73 | 77 | dma_addr_t dma_addr; |
---|
74 | 78 | bool freed; |
---|
75 | 79 | unsigned int npages; |
---|
76 | | - struct page *pages[0]; |
---|
| 80 | + struct page *pages[]; |
---|
77 | 81 | }; |
---|
78 | 82 | |
---|
79 | 83 | static inline int num_user_pages(unsigned long addr, |
---|
.. | .. |
---|
95 | 99 | int hfi1_user_exp_rcv_invalid(struct hfi1_filedata *fd, |
---|
96 | 100 | struct hfi1_tid_info *tinfo); |
---|
97 | 101 | |
---|
| 102 | +static inline struct mm_struct *mm_from_tid_node(struct tid_rb_node *node) |
---|
| 103 | +{ |
---|
| 104 | + return node->notifier.mm; |
---|
| 105 | +} |
---|
| 106 | + |
---|
98 | 107 | #endif /* _HFI1_USER_EXP_RCV_H */ |
---|