Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170946107
D59482.id186133.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
D59482.id186133.diff
View Options
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -265,7 +265,7 @@
/* Wait for devices to be ready */
while (!atomic_load_int(&aps_after_dev))
- __asm __volatile("wfe");
+ wfe();
install_cpu_errata();
enable_cpu_feat(CPU_FEAT_AFTER_DEV);
@@ -275,7 +275,7 @@
/* Wait until we can run the scheduler */
while (!atomic_load_int(&aps_ready))
- __asm __volatile("wfe");
+ wfe();
/* Initialize curthread */
KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
@@ -508,7 +508,7 @@
/* Wait for the target CPU to start */
while (atomic_load_64(&ap_cpuid) != 0)
- __asm __volatile("wfe");
+ wfe();
return (0);
}
diff --git a/sys/arm64/include/cpufunc.h b/sys/arm64/include/cpufunc.h
--- a/sys/arm64/include/cpufunc.h
+++ b/sys/arm64/include/cpufunc.h
@@ -165,6 +165,12 @@
"isb \n");
}
+static __inline void
+wfe(void)
+{
+ __asm __volatile("wfe");
+}
+
static __inline void
wfet(uint64_t val)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 8, 7:06 PM (5 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38531654
Default Alt Text
D59482.id186133.diff (1 KB)
Attached To
Mode
D59482: arm64: Add a wfe function
Attached
Detach File
Event Timeline
Log In to Comment