View | Details | Raw Unified | Return to bug 1669 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.6.0-test10/include/asm-i386/acpi.h (-4 / +2 lines)
Lines 63-69 Link Here
63
 */
63
 */
64
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
64
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
65
    do { \
65
    do { \
66
        int dummy; \
67
        asm("1:     movl (%1),%%eax;" \
66
        asm("1:     movl (%1),%%eax;" \
68
            "movl   %%eax,%%edx;" \
67
            "movl   %%eax,%%edx;" \
69
            "andl   %2,%%edx;" \
68
            "andl   %2,%%edx;" \
Lines 73-91 Link Here
73
            "jnz    1b;" \
72
            "jnz    1b;" \
74
            "cmpb   $0x3,%%dl;" \
73
            "cmpb   $0x3,%%dl;" \
75
            "sbbl   %%eax,%%eax" \
74
            "sbbl   %%eax,%%eax" \
76
            :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \
75
            :"=a"(Acq):"r"(GLptr),"i"(~1L):"dx"); \
77
    } while(0)
76
    } while(0)
78
77
79
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
78
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
80
    do { \
79
    do { \
81
        int dummy; \
82
        asm("1:     movl (%1),%%eax;" \
80
        asm("1:     movl (%1),%%eax;" \
83
            "movl   %%eax,%%edx;" \
81
            "movl   %%eax,%%edx;" \
84
            "andl   %2,%%edx;" \
82
            "andl   %2,%%edx;" \
85
            "lock;  cmpxchgl %%edx,(%1);" \
83
            "lock;  cmpxchgl %%edx,(%1);" \
86
            "jnz    1b;" \
84
            "jnz    1b;" \
87
            "andl   $0x1,%%eax" \
85
            "andl   $0x1,%%eax" \
88
            :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
86
            :"=a"(Acq):"r"(GLptr),"i"(~3L):"dx"); \
89
    } while(0)
87
    } while(0)
90
88
91
89

Return to bug 1669