public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix bug in sparc64 user copy patch
@ 2004-08-20 22:52 David S. Miller
  2004-08-26 23:50 ` Joshua Kwan
  0 siblings, 1 reply; 4+ messages in thread
From: David S. Miller @ 2004-08-20 22:52 UTC (permalink / raw)
  To: joshk; +Cc: sparclinux, linux-kernel


There were a few slight bugs in the UltraSPARC-I/II/IIi/IIe
parts of that patch I sent you, here is the fix.

===== arch/sparc64/lib/U1copy_from_user.S 1.1 vs edited =====
--- 1.1/arch/sparc64/lib/U1copy_from_user.S	2004-08-19 20:10:28 -07:00
+++ edited/arch/sparc64/lib/U1copy_from_user.S	2004-08-20 10:22:41 -07:00
@@ -20,4 +20,14 @@
 #define LOAD_BLK(addr,dest)	ldda [addr] ASI_BLK_AIUS, dest
 #define EX_RETVAL(x)		0
 
+	/* Writing to %asi is _expensive_ so we hardcode it.
+	 * Reading %asi to check for KERNEL_DS is comparatively
+	 * cheap.
+	 */
+#define PREAMBLE					\
+	rd		%asi, %g1;			\
+	cmp		%g1, ASI_AIUS;			\
+	bne,pn		%icc, memcpy_user_stub;		\
+	 nop;						\
+
 #include "U1memcpy.S"
===== arch/sparc64/lib/U1memcpy.S 1.1 vs edited =====
--- 1.1/arch/sparc64/lib/U1memcpy.S	2004-08-19 20:10:30 -07:00
+++ edited/arch/sparc64/lib/U1memcpy.S	2004-08-20 11:37:27 -07:00
@@ -193,6 +193,7 @@
 	and		%g2, 7, %g2
 	andncc		%g3, 0x7, %g3
 	fmovd		%f0, %f2
+	sub		%g3, 0x8, %g3
 	sub		%o2, %o4, %o2
 
 	add		%g1, %o4, %g1
@@ -444,7 +445,7 @@
 2:	membar		#StoreLoad | #StoreStore
 	VISExit
 	retl
-	 mov		%g5, %o0
+	 mov		EX_RETVAL(%g5), %o0
 
 	.align		64
 70:	/* 16 < len <= (5 * 64) */
@@ -539,7 +540,7 @@
 	 add		%o1, 4, %o1
 
 85:	retl
-	 mov		%g5, %o0
+	 mov		EX_RETVAL(%g5), %o0
 
 	.align		32
 90:	EX_LD(LOAD(ldub, %o1, %g1))
@@ -548,4 +549,4 @@
 	bgu,pt		%XCC, 90b
 	 add		%o1, 1, %o1
 	retl
-	 mov		%g5, %o0
+	 mov		EX_RETVAL(%g5), %o0

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

* Re: [PATCH] fix bug in sparc64 user copy patch
  2004-08-20 22:52 [PATCH] fix bug in sparc64 user copy patch David S. Miller
@ 2004-08-26 23:50 ` Joshua Kwan
  2004-08-27  0:06   ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Kwan @ 2004-08-26 23:50 UTC (permalink / raw)
  To: David S. Miller; +Cc: sparclinux, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

David S. Miller wrote:
> There were a few slight bugs in the UltraSPARC-I/II/IIi/IIe
> parts of that patch I sent you, here is the fix.

This patch was merged into our kernel tree, thanks; I'm testing it now.

Since I have you 'on the line', would you know why serial output on 
sparc64 now:

1) clears the screen twice right after Remapping the kernel...
2) omits every other character when it does start printing messages? such as

Iv vrIv unln rvr

which means

IPv6 over IPv4 tunneling driver

Some stuff, though, appears intact:

Vno: PLEXTOR  oe: CD-ROM PX-20TS   e: 1.00

which really says

Vendor: PLEXTOR   Model: CD-ROM PX-20TS    Rev: 1.00

It looks to me that when formats are being expanded, there is no 
problem. Hope that helps.

Anyway.. yes, I've asked before, but at least a confident "I don't know" 
from the Man would be better than nothing :)

-- 
Joshua Kwan

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 894 bytes --]

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

* Re: [PATCH] fix bug in sparc64 user copy patch
  2004-08-26 23:50 ` Joshua Kwan
@ 2004-08-27  0:06   ` David S. Miller
  2004-08-27  0:22     ` Joshua Kwan
  0 siblings, 1 reply; 4+ messages in thread
From: David S. Miller @ 2004-08-27  0:06 UTC (permalink / raw)
  To: Joshua Kwan; +Cc: sparclinux, linux-kernel

On Thu, 26 Aug 2004 16:50:08 -0700
Joshua Kwan <joshk@triplehelix.org> wrote:

> 1) clears the screen twice right after Remapping the kernel...

No idea.

> 2) omits every other character when it does start printing messages? such as

You're not following the list I guess...  I even posted about
this to debian-sparc, ho hum.

There is a problem with sunsab serial consoles, we're still
trying to figure out exactly what.  Note that console output
starts working properly once userland starts up.

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

* Re: [PATCH] fix bug in sparc64 user copy patch
  2004-08-27  0:06   ` David S. Miller
@ 2004-08-27  0:22     ` Joshua Kwan
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Kwan @ 2004-08-27  0:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: sparclinux

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

David S. Miller wrote:
> You're not following the list I guess...  I even posted about
> this to debian-sparc, ho hum.

Oops. New newsreader. Missed it by mistake. Sorry.

-- 
Joshua Kwan

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 894 bytes --]

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

end of thread, other threads:[~2004-08-27  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-20 22:52 [PATCH] fix bug in sparc64 user copy patch David S. Miller
2004-08-26 23:50 ` Joshua Kwan
2004-08-27  0:06   ` David S. Miller
2004-08-27  0:22     ` Joshua Kwan

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