Balazs Gerofi
5a2f8388a6
HFI1: handle Linux queued_spin_locks in the receive path as well
2018-06-13 00:31:42 +09:00
Balazs Gerofi
8164b63fc2
HFI1: port to IFS 10.7 rpv1 and support queued_spin_lock in Linux 3.10.0-693.11.6
2018-06-13 00:31:42 +09:00
Balazs Gerofi
22992780cf
HFI1: use kmalloc_cache_free() in clear_tid_node() for TID nodes
2018-06-13 00:31:42 +09:00
Balazs Gerofi
3043591e9a
hfi1_user_exp_rcv_overlapping(): fix return value when overlapping
2018-06-13 00:31:42 +09:00
Balazs Gerofi
7193f165cc
HFI1: fix page border iteration bug in hfi1_user_exp_rcv_setup()
2018-06-13 00:31:42 +09:00
Balazs Gerofi
fcc8310454
HFI1: track receive TIDs in a tree
2018-06-13 00:31:40 +09:00
Balazs Gerofi
e2e773d883
HFI: fix tidinfo and length calculation in program_rcvarray()
2018-06-13 00:31:39 +09:00
Balazs Gerofi
5bea237581
HFI1: make kmalloc caches per-CPU and pre-allocate at boot time
2018-06-13 00:31:39 +09:00
Balazs Gerofi
6848c2ecf7
HFI1: move tid_rb_node to header
2018-06-13 00:31:39 +09:00
Balazs Gerofi
2900ce20f7
HFI1: hfi1_unmap_device_addresses() at process terminate time
2018-06-13 00:31:39 +09:00
Balazs Gerofi
7a1ad31183
HFI: call hfi1_map_device_addresses() at initialization time
...
Conflicts:
kernel/syscall.c
2018-06-13 00:31:38 +09:00
Balazs Gerofi
a5aa68744f
hfi1: use kmalloc_cache for tid_rb_node allocations
2018-06-13 00:31:38 +09:00
Balazs Gerofi
89c5aaa9e9
hfi1_user_exp_rcv_setup(): rewrite main loop
2018-06-13 00:31:37 +09:00
Dominique Martinet
de82cf8779
hfi1/user_exp_rcv/setup: keep track of position within page
...
ihk_mc_pt_lookup_pte + pte_get_phys will get us the physical address
for the start of the page we're looking at.
Re-offset it by position within buffer.
2018-06-13 00:31:37 +09:00
Dominique Martinet
662895c020
hfi1/user_exp_rcv: explicitely call hfi1_map_device_addresses
...
There were cases where nobody else did this mapping for us
2018-06-13 00:31:37 +09:00
Dominique Martinet
ce4eb0d409
hfi1/user_exp_rcv/setup: add access_ok check
2018-06-13 00:31:36 +09:00
Dominique Martinet
04434320fc
hfi1/user_exp_rcv/setup: do not skip over pages
...
If the vaddr we consider is not at the start of a page, we could skip
over (smaller, not contigous) areas.
For example consider this segment of virtual memory:
[ 2MB | 4k | 4k | ... ]
Starting at 1MB offset, we would get a pgsize of 2MB so would skip
straight over 1MB worth of 4k pages.
2018-06-13 00:31:36 +09:00
Dominique Martinet
50fafa6d71
hfi1/user_exp_rcv/setup: use cache_alloc for tidlist
2018-06-13 00:31:36 +09:00
Dominique Martinet
f5ced648ef
hfi1/user_exp_rcv: rework main loop
...
New loop now takes into account pages not physically contiguous.
Also some minor improvements, e.g. make the spin_lock used more locally,
reuse a group we had if we had one, etc.
2018-06-13 00:31:36 +09:00
Dominique Martinet
0f8f88ca46
hfi1/user_exp_rcv/invalid: Remove function
...
user_exp_rcv_invalid is only used together with the mmu cache
(its purpose is the delayed freeing of tids that were invalidated in cache)
Since we do not use that cache, the function can go
2018-06-13 00:31:36 +09:00
Dominique Martinet
e99f19e812
hfi1/user_exp_rcv/setup: set length in tidinfo
...
This was dropped early on by mistake/excessive haste, it's actually
pretty useful.
2018-06-13 00:31:36 +09:00
Dominique Martinet
9a36e5d213
hfi1/user_exp_rcv/setup: increment phys appropriately
...
Old code was always registering the same section with different size,
instead of properly covering the requested map
2018-06-13 00:31:36 +09:00
Dominique Martinet
4816f27639
hfi1/user_exp_rcv/setup: split into multiple tids
...
Do not round up to next power of two, but issue multiple requests
if necessary (e.g. 260k would be 256 + 4k in two registrations)
2018-06-13 00:31:36 +09:00
Dominique Martinet
23f178d718
hfi1/user_exp_rcv/clear: implement TID_FREE ioctl
2018-06-13 00:31:36 +09:00
Dominique Martinet
1847a3ac11
hfi1/user_exp_rcv/setup: cleanup locks/groups usage
2018-06-13 00:31:35 +09:00
Dominique Martinet
15b16ffbbb
hfi1/user_exp_rcv/setup: map is noop, skip it
...
In the original driver's dma.c hfi1_dma_map_single just passes
the physical address back, so directly use that.
2018-06-13 00:31:35 +09:00
Dominique Martinet
e64d89cd48
hfi: bases for user_exp_rcv
...
This implements a skeleton setup function and call it on ioctl
Many missing points:
- missing pci mapping to make setup work
- no clear (passed to linux, so will likely bug out)
- missing locks/safe-guards
Conflicts:
kernel/Makefile.build.in
2018-06-13 00:31:35 +09:00