[Devel] [PATCH RHEL7 COMMIT] locking/x86: Use named operands in rwsem.h

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 25 17:55:57 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.8.2.vz7.161.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.8.2.vz7.161.1
------>
commit 65eff9fd231409142e6eb90ecf7d80bad2bc4cbe
Author: Miguel Bernal Marin <miguel.bernal.marin at linux.intel.com>
Date:   Mon May 25 17:55:57 2020 +0300

    locking/x86: Use named operands in rwsem.h
    
    ms commit 30c23f29d2d5
    
    Since GCC version 3.1 it is possible to specify input and output
    operands using symbolic names, which can be referenced within the
    assembler code.
    
    Converting to named operands makes it easier to understand and maintain
    the code in the future.
    
    Update operands in asm/rwsem.h accordingly.
    
    Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin at linux.intel.com>
    Cc: Andy Lutomirski <luto at kernel.org>
    Cc: Borislav Petkov <bp at alien8.de>
    Cc: Brian Gerst <brgerst at gmail.com>
    Cc: Denys Vlasenko <dvlasenk at redhat.com>
    Cc: H. Peter Anvin <hpa at zytor.com>
    Cc: Josh Poimboeuf <jpoimboe at redhat.com>
    Cc: Linus Torvalds <torvalds at linux-foundation.org>
    Cc: Peter Zijlstra <peterz at infradead.org>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Link: http://lkml.kernel.org/r/20170925230349.18834-1-miguel.bernal.marin@linux.intel.com
    Signed-off-by: Ingo Molnar <mingo at kernel.org>
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    This ports support for down_read_killable(),
    which is a prerequisite for pernet_ops_rwsem.
    
    https://jira.sw.ru/browse/PSBM-104158
---
 arch/x86/include/asm/rwsem.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 9bb3d8f94ba6e..ce4cc45576492 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -63,14 +63,14 @@
 static inline void __down_read(struct rw_semaphore *sem)
 {
 	asm volatile("# beginning down_read\n\t"
-		     LOCK_PREFIX _ASM_INC "(%1)\n\t"
+		     LOCK_PREFIX _ASM_INC "(%[sem])\n\t"
 		     /* adds 0x00000001 */
 		     "  jns        1f\n"
 		     "  call call_rwsem_down_read_failed\n"
 		     "1:\n\t"
 		     "# ending down_read\n\t"
 		     : "+m" (sem->count)
-		     : "a" (sem)
+		     : [sem] "a" (sem)
 		     : "memory", "cc");
 }
 


More information about the Devel mailing list