From 8c4a41f9835d56437c44631d97ef592e948385d9 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sat, 17 Nov 2012 03:43:57 -0800 Subject: fix spinlocks; add --disable-atomics cfg opt --- pk/frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pk/frontend.c') diff --git a/pk/frontend.c b/pk/frontend.c index 4e4c138..1818b0f 100644 --- a/pk/frontend.c +++ b/pk/frontend.c @@ -17,11 +17,13 @@ sysret_t frontend_syscall(long n, long a0, long a1, long a2, long a3) magic_mem[3] = a2; magic_mem[4] = a3; - asm volatile ("cflush; fence"); + mb(); mtpcr(PCR_TOHOST, magic_mem); while (mtpcr(PCR_FROMHOST, 0) == 0); + mb(); + sysret_t ret = {magic_mem[0],magic_mem[1]}; spinlock_unlock(&lock); -- cgit v1.1