mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 12:45:16 +07:00
a231b8839c
This patch only contains asid help code from arm for next patch to use. The asid allocator use five level check to reduce the cost of switch_mm. 1. Check if the asid version is the same (it's general) 2. Check reserved_asid which is set in rollover flush_context() and key point is to keep the same bit position with the current asid version instead of input version. 3. Check if the position of bitmap is free then it could be set & used directly. 4. find_next_zero_bit() (a little performance cost) 5. flush_context (this is the worst cost with increase current asid version) Check is level by level and cost is also higher with the next level. The reserved_asid and bitmap mechanism prevent unnecessary find_next_zero_bit(). The atomic 64 bit asid is also suitable for 32-bit system and it won't cost a lot in 1th 2th 3th level check. The operation of set/clear mm_cpumask was removed in arm64 compared to arm32. It seems no side effect on current arm64 system, but from software meaning it's wrong. Although csky also needn't it, we add it back for csky. The asid_per_ctxt is no use for csky and it reserves the lowest bits for other use, maybe: trust zone ? Ok, just keep it in csky copy. Seems it also could be used by other archs and it's worth to move asid code to generic in future. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Julien Grall <julien.grall@arm.com> |
||
---|---|---|
.. | ||
addrspace.h | ||
asid.h | ||
atomic.h | ||
barrier.h | ||
bitops.h | ||
bug.h | ||
cache.h | ||
cacheflush.h | ||
checksum.h | ||
cmpxchg.h | ||
elf.h | ||
fixmap.h | ||
ftrace.h | ||
highmem.h | ||
io.h | ||
irqflags.h | ||
Kbuild | ||
mmu_context.h | ||
mmu.h | ||
page.h | ||
perf_event.h | ||
pgalloc.h | ||
pgtable.h | ||
processor.h | ||
ptrace.h | ||
reg_ops.h | ||
segment.h | ||
shmparam.h | ||
smp.h | ||
spinlock_types.h | ||
spinlock.h | ||
string.h | ||
switch_to.h | ||
syscall.h | ||
syscalls.h | ||
thread_info.h | ||
tlb.h | ||
tlbflush.h | ||
traps.h | ||
uaccess.h | ||
unistd.h | ||
vdso.h |