The use of `volatile' in vgacon_startup is useless. The definition of
scr_readw (at least on alpha) obviates it. If you want real read-after-write
semantics we need something else, but since nothing else in vgacon seems
to require it, I'm lothe to add memory barriers where they're not needed.
r~
diff -rup linux/drivers/video/vgacon.c 2.3.38/drivers/video/vgacon.c
--- linux/drivers/video/vgacon.c Sat Oct 2 07:46:33 1999
+++ 2.3.38/drivers/video/vgacon.c Fri Jan 7 19:01:45 2000
@@ -166,7 +166,7 @@ static const char __init *vgacon_startup
{
const char *display_desc = NULL;
u16 saved1, saved2;
- volatile u16 *p;
+ u16 *p;
if (ORIG_VIDEO_ISVGA == VIDEO_TYPE_VLFB) {
no_vga:
@@ -285,18 +285,22 @@ static const char __init *vgacon_startup
* Find out if there is a graphics card present.
* Are there smarter methods around?
*/
- p = (volatile u16 *)vga_vram_base;
+ p = (u16 *)vga_vram_base;
saved1 = scr_readw(p);
saved2 = scr_readw(p + 1);
+
scr_writew(0xAA55, p);
scr_writew(0x55AA, p + 1);
+ mb();
if (scr_readw(p) != 0xAA55 || scr_readw(p + 1) != 0x55AA) {
scr_writew(saved1, p);
scr_writew(saved2, p + 1);
goto no_vga;
}
+
scr_writew(0x55AA, p);
scr_writew(0xAA55, p + 1);
+ mb();
if (scr_readw(p) != 0x55AA || scr_readw(p + 1) != 0xAA55) {
scr_writew(saved1, p);
scr_writew(saved2, p + 1);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:12 EST