| .. | .. |
|---|
| 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 { |
|---|
| .. | .. |
|---|
| 66 | 66 | }; |
|---|
| 67 | 67 | |
|---|
| 68 | 68 | struct tid_rb_node { |
|---|
| 69 | | - struct mmu_rb_node mmu; |
|---|
| 69 | + struct mmu_interval_notifier notifier; |
|---|
| 70 | + struct hfi1_filedata *fdata; |
|---|
| 70 | 71 | unsigned long phys; |
|---|
| 71 | 72 | struct tid_group *grp; |
|---|
| 72 | 73 | u32 rcventry; |
|---|
| 73 | 74 | dma_addr_t dma_addr; |
|---|
| 74 | 75 | bool freed; |
|---|
| 75 | 76 | unsigned int npages; |
|---|
| 76 | | - struct page *pages[0]; |
|---|
| 77 | + struct page *pages[]; |
|---|
| 77 | 78 | }; |
|---|
| 78 | 79 | |
|---|
| 79 | 80 | static inline int num_user_pages(unsigned long addr, |
|---|
| .. | .. |
|---|
| 95 | 96 | int hfi1_user_exp_rcv_invalid(struct hfi1_filedata *fd, |
|---|
| 96 | 97 | struct hfi1_tid_info *tinfo); |
|---|
| 97 | 98 | |
|---|
| 99 | +static inline struct mm_struct *mm_from_tid_node(struct tid_rb_node *node) |
|---|
| 100 | +{ |
|---|
| 101 | + return node->notifier.mm; |
|---|
| 102 | +} |
|---|
| 103 | + |
|---|
| 98 | 104 | #endif /* _HFI1_USER_EXP_RCV_H */ |
|---|