Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141933459
D3668.id8761.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3668.id8761.diff
View Options
Index: sys/arm64/arm64/swtch.S
===================================================================
--- sys/arm64/arm64/swtch.S
+++ sys/arm64/arm64/swtch.S
@@ -41,6 +41,8 @@
* void cpu_throw(struct thread *old, struct thread *new)
*/
ENTRY(cpu_throw)
+ clrex
+
#ifdef VFP
/* Backup the new thread pointer around a call to C code */
mov x19, x1
@@ -98,6 +100,8 @@
* x3 to x7, x16 and x17 are caller saved
*/
ENTRY(cpu_switch)
+ clrex
+
/* Store the new curthread */
str x1, [x18, #PC_CURTHREAD]
/* And the new pcb */
Index: sys/arm64/arm64/trap.c
===================================================================
--- sys/arm64/arm64/trap.c
+++ sys/arm64/arm64/trap.c
@@ -156,5 +156,7 @@
int error, sig, ucode;
+ clrex();
+
#ifdef KDB
if (kdb_active) {
kdb_reenter();
Index: sys/arm64/include/cpufunc.h
===================================================================
--- sys/arm64/include/cpufunc.h
+++ sys/arm64/include/cpufunc.h
@@ -108,6 +108,17 @@
return (mpidr);
}
+static __inline void
+clrex(void)
+{
+
+ /*
+ * Ensure compiler barrier, otherwise the monitor clear might
+ * occur too late for us ?
+ */
+ __asm __volatile("clrex" : : : "memory");
+}
+
#define cpu_nullop() arm64_nullop()
#define cpufunc_nullop() arm64_nullop()
#define cpu_setttb(a) arm64_setttb(a)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 4:53 AM (17 h, 16 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27634369
Default Alt Text
D3668.id8761.diff (1 KB)
Attached To
Mode
D3668: clear excl monitor on context switches and data aborts
Attached
Detach File
Event Timeline
Log In to Comment