mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] s390 fixes (12/12).
@ 2003-02-03 19:48 Martin Schwidefsky
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2003-02-03 19:48 UTC (permalink / raw)
  To: linux-kernel, torvalds

trivial s390 fixes
diff -urN linux-2.5.59/arch/s390/kernel/setup.c linux-2.5.59-s390/arch/s390/kernel/setup.c
--- linux-2.5.59/arch/s390/kernel/setup.c	Fri Jan 17 03:21:38 2003
+++ linux-2.5.59-s390/arch/s390/kernel/setup.c	Mon Feb  3 20:50:22 2003
@@ -551,7 +551,7 @@
 
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
-	return *pos <= NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
+	return *pos < NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
 }
 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 {
diff -urN linux-2.5.59/arch/s390x/kernel/setup.c linux-2.5.59-s390/arch/s390x/kernel/setup.c
--- linux-2.5.59/arch/s390x/kernel/setup.c	Fri Jan 17 03:22:02 2003
+++ linux-2.5.59-s390/arch/s390x/kernel/setup.c	Mon Feb  3 20:50:22 2003
@@ -545,7 +545,7 @@
 
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
-	return *pos <= NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
+	return *pos < NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
 }
 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 {
diff -urN linux-2.5.59/fs/partitions/ibm.c linux-2.5.59-s390/fs/partitions/ibm.c
--- linux-2.5.59/fs/partitions/ibm.c	Fri Jan 17 03:22:56 2003
+++ linux-2.5.59-s390/fs/partitions/ibm.c	Mon Feb  3 20:50:22 2003
@@ -91,6 +91,11 @@
 	EBCASC(type, 4);
 	EBCASC(name, 6);
 
+/* FIXME: this no longer works.
+	if(name[0] != '\0')
+		register_disk_label(hd, name);
+*/
+
 	/*
 	 * Three different types: CMS1, VOL1 and LNX1/unlabeled
 	 */
diff -urN linux-2.5.59/include/asm-s390/spinlock.h linux-2.5.59-s390/include/asm-s390/spinlock.h
--- linux-2.5.59/include/asm-s390/spinlock.h	Fri Jan 17 03:23:01 2003
+++ linux-2.5.59-s390/include/asm-s390/spinlock.h	Mon Feb  3 20:50:22 2003
@@ -122,4 +122,17 @@
                      : "+m" ((rw)->lock) : "a" (&(rw)->lock) \
 		     : "2", "3", "cc" )
 
+extern inline int _raw_write_trylock(rwlock_t *rw)
+{
+	unsigned int result, reg;
+	
+	__asm__ __volatile__("   lhi  %0,1\n"
+			     "   sll  %0,31\n"
+			     "   basr %1,0\n"
+			     "0: cs   %0,%1,0(%3)\n"
+			     : "=&d" (result), "=&d" (reg), "+m" (rw->lock)
+			     : "a" (&rw->lock) : "cc" );
+	return !result;
+}
+
 #endif /* __ASM_SPINLOCK_H */
diff -urN linux-2.5.59/include/asm-s390x/spinlock.h linux-2.5.59-s390/include/asm-s390x/spinlock.h
--- linux-2.5.59/include/asm-s390x/spinlock.h	Fri Jan 17 03:21:41 2003
+++ linux-2.5.59-s390/include/asm-s390x/spinlock.h	Mon Feb  3 20:50:22 2003
@@ -139,5 +139,17 @@
 		     : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
 		     : "2", "3", "cc" )
 
+extern inline int _raw_write_trylock(rwlock_t *rw)
+{
+	unsigned int result, reg;
+	
+	__asm__ __volatile__("   llihh %0,0x8000\n"
+			     "   basr  %1,0\n"
+			     "0: csg %0,%1,0(%3)\n"
+			     : "=&d" (result), "=&d" (reg), "+m" (rw->lock)
+			     : "a" (&rw->lock) : "cc" );
+	return !result;
+}
+
 #endif /* __ASM_SPINLOCK_H */
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] s390 fixes (12/12).
@ 2003-02-03 14:50 Martin Schwidefsky
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2003-02-03 14:50 UTC (permalink / raw)
  To: linux-kernel, torvalds

trivial s390 fixes
diff -urN linux-2.5.59/arch/s390/kernel/setup.c 
linux-2.5.59-s390/arch/s390/kernel/setup.c
--- linux-2.5.59/arch/s390/kernel/setup.c	Fri Jan 17 03:21:38 2003
+++ linux-2.5.59-s390/arch/s390/kernel/setup.c	Mon Feb  3 15:20:40 2003
@@ -551,7 +551,7 @@
 
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
-	return *pos <= NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
+	return *pos < NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
 }
 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 {
diff -urN linux-2.5.59/arch/s390x/kernel/setup.c 
linux-2.5.59-s390/arch/s390x/kernel/setup.c
--- linux-2.5.59/arch/s390x/kernel/setup.c	Fri Jan 17 03:22:02 2003
+++ linux-2.5.59-s390/arch/s390x/kernel/setup.c	Mon Feb  3 15:20:40 2003
@@ -545,7 +545,7 @@
 
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
-	return *pos <= NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
+	return *pos < NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
 }
 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 {
diff -urN linux-2.5.59/include/asm-s390/spinlock.h 
linux-2.5.59-s390/include/asm-s390/spinlock.h
--- linux-2.5.59/include/asm-s390/spinlock.h	Fri Jan 17 03:23:01 2003
+++ linux-2.5.59-s390/include/asm-s390/spinlock.h	Mon Feb  3 15:20:40 2003
@@ -122,4 +122,17 @@
                      : "+m" ((rw)->lock) : "a" (&(rw)->lock) \
 		     : "2", "3", "cc" )
 
+extern inline int _raw_write_trylock(rwlock_t *rw)
+{
+	unsigned int result, reg;
+	
+	__asm__ __volatile__("   lhi  %0,1\n"
+			     "   sll  %0,31\n"
+			     "   basr %1,0\n"
+			     "0: cs   %0,%1,0(%3)\n"
+			     : "=&d" (result), "=&d" (reg), "+m" (rw->lock)
+			     : "a" (&rw->lock) : "cc" );
+	return !result;
+}
+
 #endif /* __ASM_SPINLOCK_H */
diff -urN linux-2.5.59/include/asm-s390x/spinlock.h 
linux-2.5.59-s390/include/asm-s390x/spinlock.h
--- linux-2.5.59/include/asm-s390x/spinlock.h	Fri Jan 17 03:21:41 2003
+++ linux-2.5.59-s390/include/asm-s390x/spinlock.h	Mon Feb  3 15:20:40 2003
@@ -139,5 +139,17 @@
 		     : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
 		     : "2", "3", "cc" )
 
+extern inline int _raw_write_trylock(rwlock_t *rw)
+{
+	unsigned int result, reg;
+	
+	__asm__ __volatile__("   llihh %0,0x8000\n"
+			     "   basr  %1,0\n"
+			     "0: csg %0,%1,0(%3)\n"
+			     : "=&d" (result), "=&d" (reg), "+m" (rw->lock)
+			     : "a" (&rw->lock) : "cc" );
+	return !result;
+}
+
 #endif /* __ASM_SPINLOCK_H */
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-03 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-03 19:48 [PATCH] s390 fixes (12/12) Martin Schwidefsky
  -- strict thread matches above, loose matches on Subject: below --
2003-02-03 14:50 Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®