Rev 3424 | Rev 4377 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3424 | Rev 3425 | ||
---|---|---|---|
Line 106... | Line 106... | ||
106 | #ifdef CONFIG_HT |
106 | #ifdef CONFIG_HT |
107 | "pause\n" |
107 | "pause\n" |
108 | #endif |
108 | #endif |
109 | "mov %0, %1\n" |
109 | "mov %0, %1\n" |
110 | "testq %1, %1\n" |
110 | "testq %1, %1\n" |
111 | "jnz 0b\n" /* Lightweight looping on locked spinlock */ |
111 | "jnz 0b\n" /* lightweight looping on locked spinlock */ |
112 | 112 | ||
113 | "incq %1\n" /* now use the atomic operation */ |
113 | "incq %1\n" /* now use the atomic operation */ |
114 | "xchgq %0, %1\n" |
114 | "xchgq %0, %1\n" |
115 | "testq %1, %1\n" |
115 | "testq %1, %1\n" |
116 | "jnz 0b\n" |
116 | "jnz 0b\n" |
117 | : "+m" (val->count), "=r"(tmp) |
117 | : "+m" (val->count), "=&r" (tmp) |
118 | ); |
118 | ); |
119 | /* |
119 | /* |
120 | * Prevent critical section code from bleeding out this way up. |
120 | * Prevent critical section code from bleeding out this way up. |
121 | */ |
121 | */ |
122 | CS_ENTER_BARRIER(); |
122 | CS_ENTER_BARRIER(); |