ia64/xen-unstable

view xen/arch/x86/rwlock.c @ 18806:ed8524f4a044

x86: Re-initialise HPET on resume from S3

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 18 15:55:14 2008 +0000 (2008-11-18)
parents 0e23f01219c6
children
line source
1 #include <asm/atomic.h>
2 #include <asm/rwlock.h>
4 #if defined(CONFIG_SMP)
5 asm(
6 ".align 4\n"
7 ".globl __write_lock_failed\n"
8 "__write_lock_failed:\n"
9 " " LOCK "addl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
10 "1: rep; nop\n"
11 " cmpl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
12 " jne 1b\n"
13 " " LOCK "subl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
14 " jnz __write_lock_failed\n"
15 " ret\n"
17 ".align 4\n"
18 ".globl __read_lock_failed\n"
19 "__read_lock_failed:\n"
20 " lock ; incl (%"__OP"ax)\n"
21 "1: rep; nop\n"
22 " cmpl $1,(%"__OP"ax)\n"
23 " js 1b\n"
24 " lock ; decl (%"__OP"ax)\n"
25 " js __read_lock_failed\n"
26 " ret\n"
27 );
28 #endif