Skip to contentSkip to conversation

s390 (2/10): inline assemblies.

PATCH New Martin Schwidefsky 1 participant 1 message May 26, 2003 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 (2/10): inline assemblies.

Optimize s390 inline assemblies.

diffstat:

 arch/s390/kernel/smp.c      |    7 --
 include/asm-s390/system.h   |  147 ++++++++++++++++++++------------------------
 include/asm-s390/tlbflush.h |   11 ++-
 include/asm-s390/uaccess.h  |  106 ++++++++++++++++---------------
 4 files changed, 131 insertions(+), 140 deletions(-)
arch/s390/kernel/smp.c +3 -4
diff -urN linux-2.5/arch/s390/kernel/smp.c linux-2.5-s390/arch/s390/kernel/smp.c
@@ -513,10 +513,9 @@
 	cpu_lowcore->kernel_stack = (unsigned long)
 		idle->thread_info + (THREAD_SIZE);
 	__ctl_store(cpu_lowcore->cregs_save_area[0], 0, 15);
-	__asm__ __volatile__("la    1,%0\n\t"
-			     "stam  0,15,0(1)"
-			     : "=m" (cpu_lowcore->access_regs_save_area[0])
-			     : : "1", "memory");
+	__asm__ __volatile__("stam  0,15,0(%0)"
+			     : : "a" (&cpu_lowcore->access_regs_save_area)
+			     : "memory");
         eieio();
         signal_processor(cpu,sigp_restart);
 
include/asm-s390/system.h +67 -80

193 lines not on this page · raw message

include/asm-s390/tlbflush.h +7 -4
diff -urN linux-2.5/include/asm-s390/tlbflush.h linux-2.5-s390/include/asm-s390/tlbflush.h
@@ -76,13 +76,16 @@
 	}
 #endif /* __s390x__ */
 	{
-		long dummy = 0;
+		register unsigned long addr asm("4");
+		long dummy;
+
+		dummy = 0;
+		addr = ((unsigned long) &dummy) + 1;
 		__asm__ __volatile__ (
-			"    la   4,1(%0)\n"
 			"    slr  2,2\n"
 			"    slr  3,3\n"
-			"    csp  2,4"
-			: : "a" (&dummy) : "cc", "2", "3", "4" );
+			"    csp  2,%0"
+			: : "a" (addr) : "cc", "2", "3" );
 	}
 }
 
include/asm-s390/uaccess.h +54 -52

219 lines not on this page · raw message