1 # 2 # Feature name: membarrier-sync-core 3 # Kconfig: ARCH_HAS_MEMBARRIER_SYNC_CORE 4 # description: arch supports core serializing membarrier 5 # 6 # Architecture requirements 7 # 8 # * arm/arm64/powerpc/s390 9 # 10 # Rely on implicit context synchronization as a result of exception return 11 # when returning from IPI handler, and when returning to user-space. 12 # 13 # * riscv 14 # 15 # riscv uses xRET as return from interrupt and to return to user-space. 16 # 17 # Given that xRET is not core serializing, we rely on FENCE.I for providing 18 # core serialization: 19 # 20 # - by calling sync_core_before_usermode() on return from interrupt (cf. 21 # ipi_sync_core()), 22 # 23 # - via switch_mm() and sync_core_before_usermode() (respectively, for 24 # uthread->uthread and kthread->uthread transitions) before returning 25 # to user-space. 26 # 27 # The serialization in switch_mm() is activated by prepare_sync_core_cmd(). 28 # 29 # * x86 30 # 31 # x86-32 uses IRET as return from interrupt, which takes care of the IPI. 32 # However, it uses both IRET and SYSEXIT to go back to user-space. The IRET 33 # instruction is core serializing, but not SYSEXIT. 34 # 35 # x86-64 uses IRET as return from interrupt, which takes care of the IPI. 36 # However, it can return to user-space through either SYSRETL (compat code), 37 # SYSRETQ, or IRET. 38 # 39 # Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely 40 # instead on write_cr3() performed by switch_mm() to provide core serialization 41 # after changing the current mm, and deal with the special case of kthread -> 42 # uthread (temporarily keeping current mm into active_mm) by issuing a 43 # sync_core_before_usermode() in that specific case. 44 # 45 ----------------------- 46 | arch |status| 47 ----------------------- 48 | alpha: | TODO | 49 | arc: | TODO | 50 | arm: | ok | 51 | arm64: | ok | 52 | csky: | TODO | 53 | hexagon: | TODO | 54 | loongarch: | TODO | 55 | m68k: | TODO | 56 | microblaze: | TODO | 57 | mips: | TODO | 58 | nios2: | TODO | 59 | openrisc: | TODO | 60 | parisc: | TODO | 61 | powerpc: | ok | 62 | riscv: | ok | 63 | s390: | ok | 64 | sh: | TODO | 65 | sparc: | TODO | 66 | um: | TODO | 67 | x86: | ok | 68 | xtensa: | TODO | 69 -----------------------
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.