Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <rth@dot.cygnus.com>
To: mj@atrey.karlin.mff.cuni.cz
Cc: linux-kernel@vger.rutgers.edu,
	Quant-X Alpha Linux Support <stefan@sime.com>,
	axp-list@redhat.com
Subject: vgacon oops [Re: 2.1.111 strange ...]
Date: Fri, 18 Jun 1999 18:27:36 -0700	[thread overview]
Message-ID: <19990618182736.A1216@dot.cygnus.com> (raw)
In-Reply-To: <199807260104.DAA01714@stefan.sime.com>; from Quant-X Alpha Linux Support on Sun, Jul 26, 1998 at 03:04:12AM +0200

On Sun, Jul 26, 1998 at 03:04:12AM +0200, Quant-X Alpha Linux Support wrote:
> Hi Stefan !
> 
> [2.1.111 on AlphaPC LX164]
> 
> > Some times my internal modem card refuses to work and, the worst thing:
> > gpm produces a kernel oops with the first mouseclick... 
> 
> I can reproduce it here (mouse). 

Tsk, tsk, Martin.  You forgot to use the screen access functions.
Also its always good to hoist comparisons out of such small loops.


r~


--- 2.1.111/drivers/video/vgacon.c	Fri Jun 18 18:20:30 1999
+++ 2.1.111-axp/drivers/video/vgacon.c	Sun Jul 26 18:50:54 1998
@@ -347,13 +347,19 @@ static void vgacon_invert_region(struct 
 {
 	int col = vga_can_do_color;
 
-	while (count--) {
-		u16 a = *p;
-		if (col)
-			a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4);
-		else
+	if (col) {
+		while (count--) {
+			u16 a = scr_readw(p);
+			a = (((a) & 0x88ff) | (((a) & 0x7000) >> 4)
+			     | (((a) & 0x0700) << 4));
+			scr_writew(a, p++);
+		}
+	} else {
+		while (count--) {
+			u16 a = scr_readw(p);
 			a ^= ((a & 0x0700) == 0x0100) ? 0x7000 : 0x7700;
-		*p++ = a;
+			scr_writew(a, p++);
+		}
 	}
 }
 


      reply	other threads:[~1998-07-27  2:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-25 20:47 2.1.111 strange Stefan Reinauer
1998-07-26  1:04 ` Quant-X Alpha Linux Support
1999-06-19  1:27   ` Richard Henderson [this message]
read-only archive

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