File tree Expand file tree Collapse file tree 5 files changed +22
-3
lines changed
Documentation/features/sched/membarrier-sync-core Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 5
5
#
6
6
# Architecture requirements
7
7
#
8
- # * arm/arm64
8
+ # * arm/arm64/powerpc
9
9
#
10
10
# Rely on implicit context synchronization as a result of exception return
11
11
# when returning from IPI handler, and when returning to user-space.
45
45
| nios2: | TODO |
46
46
| openrisc: | TODO |
47
47
| parisc: | TODO |
48
- | powerpc: | TODO |
48
+ | powerpc: | ok |
49
49
| riscv: | TODO |
50
50
| s390: | TODO |
51
51
| sh: | TODO |
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ config PPC
131
131
select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
132
132
select ARCH_HAS_PTE_SPECIAL
133
133
select ARCH_HAS_MEMBARRIER_CALLBACKS
134
+ select ARCH_HAS_MEMBARRIER_SYNC_CORE
134
135
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
135
136
select ARCH_HAS_STRICT_KERNEL_RWX if (PPC32 && !HIBERNATION)
136
137
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
Original file line number Diff line number Diff line change @@ -204,7 +204,11 @@ exc_##label##_book3e:
204
204
LOAD_REG_ADDR(r3,interrupt_base_book3e);\
205
205
ori r3,r3,vector_offset@l; \
206
206
mtspr SPRN_IVOR##vector_number,r3;
207
-
207
+ /*
208
+ * powerpc relies on return from interrupt/syscall being context synchronising
209
+ * (which rfi is) to support ARCH_HAS_MEMBARRIER_SYNC_CORE without additional
210
+ * synchronisation instructions.
211
+ */
208
212
#define RFI_TO_KERNEL \
209
213
rfi
210
214
Original file line number Diff line number Diff line change 68
68
*
69
69
* The nop instructions allow us to insert one or more instructions to flush the
70
70
* L1-D cache when returning to userspace or a guest.
71
+ *
72
+ * powerpc relies on return from interrupt/syscall being context synchronising
73
+ * (which hrfid, rfid, and rfscv are) to support ARCH_HAS_MEMBARRIER_SYNC_CORE
74
+ * without additional synchronisation instructions.
75
+ *
76
+ * soft-masked interrupt replay does not include a context-synchronising rfid,
77
+ * but those always return to kernel, the sync is only required when returning
78
+ * to user.
71
79
*/
72
80
#define RFI_FLUSH_SLOT \
73
81
RFI_FLUSH_FIXUP_SECTION; \
Original file line number Diff line number Diff line change 35
35
36
36
#include "head_32.h"
37
37
38
+ /*
39
+ * powerpc relies on return from interrupt/syscall being context synchronising
40
+ * (which rfi is) to support ARCH_HAS_MEMBARRIER_SYNC_CORE without additional
41
+ * synchronisation instructions.
42
+ */
43
+
38
44
/*
39
45
* Align to 4k in order to ensure that all functions modyfing srr0/srr1
40
46
* fit into one page in order to not encounter a TLB miss between the
You can’t perform that action at this time.
0 commit comments