| .. | .. |
|---|
| 1 | 1 | /* |
|---|
| 2 | + * Copyright(c) 2020 Cornelis Networks, Inc. |
|---|
| 2 | 3 | * Copyright(c) 2016 Intel Corporation. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * This file is provided under a dual BSD/GPLv2 license. When using or |
|---|
| .. | .. |
|---|
| 54 | 55 | unsigned long len; |
|---|
| 55 | 56 | unsigned long __last; |
|---|
| 56 | 57 | struct rb_node node; |
|---|
| 58 | + struct mmu_rb_handler *handler; |
|---|
| 57 | 59 | struct list_head list; |
|---|
| 58 | 60 | }; |
|---|
| 59 | 61 | |
|---|
| .. | .. |
|---|
| 71 | 73 | void *evict_arg, bool *stop); |
|---|
| 72 | 74 | }; |
|---|
| 73 | 75 | |
|---|
| 74 | | -int hfi1_mmu_rb_register(void *ops_arg, struct mm_struct *mm, |
|---|
| 76 | +struct mmu_rb_handler { |
|---|
| 77 | + struct mmu_notifier mn; |
|---|
| 78 | + struct rb_root_cached root; |
|---|
| 79 | + void *ops_arg; |
|---|
| 80 | + spinlock_t lock; /* protect the RB tree */ |
|---|
| 81 | + struct mmu_rb_ops *ops; |
|---|
| 82 | + struct list_head lru_list; |
|---|
| 83 | + struct work_struct del_work; |
|---|
| 84 | + struct list_head del_list; |
|---|
| 85 | + struct workqueue_struct *wq; |
|---|
| 86 | +}; |
|---|
| 87 | + |
|---|
| 88 | +int hfi1_mmu_rb_register(void *ops_arg, |
|---|
| 75 | 89 | struct mmu_rb_ops *ops, |
|---|
| 76 | 90 | struct workqueue_struct *wq, |
|---|
| 77 | 91 | struct mmu_rb_handler **handler); |
|---|