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

Submitted by Konstantin Khorenko on May 25, 2020, 2:55 p.m.

Details

Message ID 202005251455.04PEtvcJ005179@finist-ce7.sw.ru
State New
Series "Introduce down_read_killable()"
Headers show

Commit Message

Konstantin Khorenko May 25, 2020, 2:55 p.m.
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@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@linux.intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20170925230349.18834-1-miguel.bernal.marin@linux.intel.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    
    Signed-off-by: Kirill Tkhai <ktkhai@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(-)

Patch hide | download patch | download mbox

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");
 }