| .. | .. |
|---|
| 1 | 1 | #ifndef _HFI1_USER_SDMA_H |
|---|
| 2 | 2 | #define _HFI1_USER_SDMA_H |
|---|
| 3 | 3 | /* |
|---|
| 4 | + * Copyright(c) 2020 - Cornelis Networks, Inc. |
|---|
| 4 | 5 | * Copyright(c) 2015 - 2018 Intel Corporation. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * This file is provided under a dual BSD/GPLv2 license. When using or |
|---|
| .. | .. |
|---|
| 110 | 111 | SDMA_PKT_Q_DEFERRED, |
|---|
| 111 | 112 | }; |
|---|
| 112 | 113 | |
|---|
| 113 | | -/* |
|---|
| 114 | | - * Maximum retry attempts to submit a TX request |
|---|
| 115 | | - * before putting the process to sleep. |
|---|
| 116 | | - */ |
|---|
| 117 | | -#define MAX_DEFER_RETRY_COUNT 1 |
|---|
| 118 | | - |
|---|
| 119 | 114 | #define SDMA_IOWAIT_TIMEOUT 1000 /* in milliseconds */ |
|---|
| 120 | 115 | |
|---|
| 121 | 116 | #define SDMA_DBG(req, fmt, ...) \ |
|---|
| .. | .. |
|---|
| 139 | 134 | unsigned long unpinned; |
|---|
| 140 | 135 | struct mmu_rb_handler *handler; |
|---|
| 141 | 136 | atomic_t n_locked; |
|---|
| 142 | | - struct mm_struct *mm; |
|---|
| 143 | 137 | }; |
|---|
| 144 | 138 | |
|---|
| 145 | 139 | struct hfi1_user_sdma_comp_q { |
|---|
| .. | .. |
|---|
| 204 | 198 | s8 ahg_idx; |
|---|
| 205 | 199 | |
|---|
| 206 | 200 | /* Writeable fields shared with interrupt */ |
|---|
| 207 | | - u64 seqcomp ____cacheline_aligned_in_smp; |
|---|
| 208 | | - u64 seqsubmitted; |
|---|
| 201 | + u16 seqcomp ____cacheline_aligned_in_smp; |
|---|
| 202 | + u16 seqsubmitted; |
|---|
| 209 | 203 | |
|---|
| 210 | 204 | /* Send side fields */ |
|---|
| 211 | 205 | struct list_head txps ____cacheline_aligned_in_smp; |
|---|
| 212 | | - u64 seqnum; |
|---|
| 206 | + u16 seqnum; |
|---|
| 213 | 207 | /* |
|---|
| 214 | 208 | * KDETH.OFFSET (TID) field |
|---|
| 215 | 209 | * The offset can cover multiple packets, depending on the |
|---|
| .. | .. |
|---|
| 245 | 239 | struct list_head list; |
|---|
| 246 | 240 | struct user_sdma_request *req; |
|---|
| 247 | 241 | u16 flags; |
|---|
| 248 | | - u64 seqnum; |
|---|
| 242 | + u16 seqnum; |
|---|
| 249 | 243 | }; |
|---|
| 250 | 244 | |
|---|
| 251 | 245 | int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, |
|---|
| .. | .. |
|---|
| 256 | 250 | struct iovec *iovec, unsigned long dim, |
|---|
| 257 | 251 | unsigned long *count); |
|---|
| 258 | 252 | |
|---|
| 253 | +static inline struct mm_struct *mm_from_sdma_node(struct sdma_mmu_node *node) |
|---|
| 254 | +{ |
|---|
| 255 | + return node->rb.handler->mn.mm; |
|---|
| 256 | +} |
|---|
| 257 | + |
|---|
| 259 | 258 | #endif /* _HFI1_USER_SDMA_H */ |
|---|