From owner-p4-projects@FreeBSD.ORG Fri May 30 12:47:19 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A429537B404; Fri, 30 May 2003 12:47:18 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55A5337B401 for ; Fri, 30 May 2003 12:47:18 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE9B843FB1 for ; Fri, 30 May 2003 12:47:17 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4UJlH0U066125 for ; Fri, 30 May 2003 12:47:17 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4UJlHPJ066122 for perforce@freebsd.org; Fri, 30 May 2003 12:47:17 -0700 (PDT) Date: Fri, 30 May 2003 12:47:17 -0700 (PDT) Message-Id: <200305301947.h4UJlHPJ066122@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 32113 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 19:47:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=32113 Change 32113 by peter@peter_hammer on 2003/05/30 12:47:01 clean up locking code, again thanks to jhb. Affected files ... .. //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#4 edit Differences ... ==== //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#4 (text+ko) ==== @@ -72,27 +72,27 @@ */ #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - asm("1: movl (%1),%%eax;" \ + asm("1: movl %1,%%eax;" \ "movl %%eax,%%edx;" \ "andl %2,%%edx;" \ "btsl $0x1,%%edx;" \ "adcl $0x0,%%edx;" \ - "lock; cmpxchgl %%edx,(%1);" \ + "lock; cmpxchgl %%edx,%1;" \ "jnz 1b;" \ "cmpb $0x3,%%dl;" \ "sbbl %%eax,%%eax" \ - : "=a" (Acq), "+c" (GLptr) : "i" (~1L) : "edx"); \ + : "=a" (Acq), "+m" (GLptr) : "i" (~1L) : "edx"); \ } while(0) #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - asm("1: movl (%1),%%eax;" \ + asm("1: movl %1,%%eax;" \ "movl %%eax,%%edx;" \ "andl %2,%%edx;" \ - "lock; cmpxchgl %%edx,(%1);" \ + "lock; cmpxchgl %%edx,%1;" \ "jnz 1b;" \ "andl $0x1,%%eax" \ - : "=a" (Acq), "+c" (GLptr) : "i" (~3L) : "edx"); \ + : "=a" (Acq), "+m" (GLptr) : "i" (~3L) : "edx"); \ } while(0)