De-duplicating this lets us delete a bit of code.
Ulterior motive: I'm working on a new set of the userspace-based unit
tests, which will need the atomics API too. That would involve even more
duplication, so while the win in this patchset alone is very minimal, it
looks a lot more significant with my other WIP patchset.
I've tested these commands:
make -C tools/testing/vma -j
tools/testing/vma/vma
make -C tools/testing/radix-tree -j
tools/testing/radix-tree/maple
Note the EXTRA_CFLAGS patch is actually orthogonal, let me know if you'd
prefer I send it separately.
Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
Changes in v2:
- Added some new operations to atomic.h (in support of the point below).
- Fixed garbage synchronization in mapping_map_writable(), thanks Pedro.
- Clarified commit messages:
- Mention where $(SRCARCH) comes from
- Don't talk about radix-tree for maple tree specifics stuff
- Link to v1: https://lore.kernel.org/r/20250827-b4-vma-no-atomic-h-v1-0-5d3a94ae670f@google.com
---
Brendan Jackman (4):
tools/include: Implement a couple of atomic_t ops
tools: testing: Allow importing arch headers in shared.mk
tools: testing: Support EXTRA_CFLAGS in shared.mk
tools: testing: Use existing atomic.h for vma/maple tests
tools/include/linux/atomic.h | 22 ++++++++++++++++++++++
tools/testing/shared/linux/maple_tree.h | 6 ++----
tools/testing/shared/shared.mk | 6 +++++-
tools/testing/vma/linux/atomic.h | 17 -----------------
tools/testing/vma/vma_internal.h | 12 +++---------
5 files changed, 32 insertions(+), 31 deletions(-)
---
base-commit: efa7612003b44c220551fd02466bfbad5180fc83
change-id: 20250827-b4-vma-no-atomic-h-0f8ebc2fe4f9
Best regards,
--
Brendan Jackman <jackmanb@google.com>