linux_dsm_epyc7002/arch/csky/include/asm
Guo Ren a231b8839c csky: Add new asid lib code from arm
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>
2019-07-19 14:21:36 +08:00
..
addrspace.h csky: MMU and page table management 2018-10-25 23:36:19 +08:00
asid.h csky: Add new asid lib code from arm 2019-07-19 14:21:36 +08:00
atomic.h csky: Atomic operations 2018-10-26 00:54:23 +08:00
barrier.h csky: Cache and TLB routines 2018-10-25 23:36:19 +08:00
bitops.h fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
bug.h csky: Debug and Ptrace GDB 2018-10-26 00:54:25 +08:00
cache.h csky: Cache and TLB routines 2018-10-25 23:36:19 +08:00
cacheflush.h csky: Cache and TLB routines 2018-10-25 23:36:19 +08:00
checksum.h csky: Misc headers 2018-10-26 00:54:26 +08:00
cmpxchg.h csky: Atomic operations 2018-10-26 00:54:23 +08:00
elf.h csky: Add EM_CSKY_OLD 39 2018-12-31 23:17:24 +08:00
fixmap.h csky: MMU and page table management 2018-10-25 23:36:19 +08:00
ftrace.h csky/ftrace: Add dynamic function tracer (include graph tracer) 2019-04-22 13:44:57 +08:00
highmem.h csky: MMU and page table management 2018-10-25 23:36:19 +08:00
io.h csky: fixup CACHEV1 store instruction fast retire 2019-01-08 23:42:42 +08:00
irqflags.h csky: IRQ handling 2018-10-26 00:54:22 +08:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
mmu_context.h csky: Revert mmu ASID mechanism 2019-07-19 14:21:36 +08:00
mmu.h csky: Revert mmu ASID mechanism 2019-07-19 14:21:36 +08:00
page.h csky: Use va_pa_offset instead of phys_offset 2019-04-22 13:44:57 +08:00
perf_event.h csky: Add perf_arch_fetch_caller_regs support 2019-04-22 13:44:57 +08:00
pgalloc.h csky: fixup compile error with pte_alloc 2019-01-09 00:18:33 +08:00
pgtable.h csky: Revert mmu ASID mechanism 2019-07-19 14:21:36 +08:00
processor.h csky: coding convention: Use task_stack_page 2019-02-13 09:48:14 +08:00
ptrace.h csky: Use in_syscall & forget_syscall instead of r11_sig 2019-04-22 13:44:57 +08:00
reg_ops.h csky: Misc headers 2018-10-26 00:54:26 +08:00
segment.h get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
shmparam.h csky: MMU and page table management 2018-10-25 23:36:19 +08:00
smp.h csky: CPU-hotplug supported for SMP 2018-12-31 23:03:53 +08:00
spinlock_types.h csky: Atomic operations 2018-10-26 00:54:23 +08:00
spinlock.h csky: Atomic operations 2018-10-26 00:54:23 +08:00
string.h csky: Library functions 2018-10-26 00:54:24 +08:00
switch_to.h csky: Process management and Signal 2018-10-26 00:54:13 +08:00
syscall.h arch/csky patches for 5.2-rc1 2019-05-08 11:41:08 -07:00
syscalls.h csky: System Call 2018-10-25 23:36:19 +08:00
thread_info.h csky: Update syscall_trace_enter/exit implementation 2019-04-22 13:44:57 +08:00
tlb.h csky: Cache and TLB routines 2018-10-25 23:36:19 +08:00
tlbflush.h csky: Cache and TLB routines 2018-10-25 23:36:19 +08:00
traps.h csky: Exception handling and mm-fault 2018-10-25 23:36:19 +08:00
uaccess.h Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
unistd.h csky: Update syscall_trace_enter/exit implementation 2019-04-22 13:44:57 +08:00
vdso.h csky: VDSO and rt_sigreturn 2018-10-26 00:54:22 +08:00