replace asm volatile("pause") with function
This commit is contained in:
+2
-1
@@ -6,6 +6,7 @@
|
||||
#include <zinnia/pmap.h>
|
||||
#include <zinnia/spin.h>
|
||||
#include <zinnia/vma.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <config.h>
|
||||
|
||||
// TODO: For now, we assume that we can do generic PTE lookups on every arch that has a MMU.
|
||||
@@ -231,7 +232,7 @@ void pmap_shootdown(struct pmap* pt) {
|
||||
const size_t req = atomic_load(percpu_ref_on(cpu, shootdown_req), ATOMIC_RELAXED);
|
||||
while ((ptrdiff_t)(req - atomic_load(percpu_ref_on(cpu, shootdown_ack), ATOMIC_ACQUIRE)) > 0) {
|
||||
pmap_shootdown_handle();
|
||||
asm volatile("pause");
|
||||
arch_cpu_pause();
|
||||
}
|
||||
}
|
||||
irq_unlock();
|
||||
|
||||
Reference in New Issue
Block a user