- remove volatile from *regkva member in struct grfabs_et_priv

and use temporary variables on register accesses
- also remove volatile from *memkva member in struct grfabs_et_priv
  because it isn't used to refer memory
XXX: I'm not sure if bm->plane should be volatile or not
     but I don't think previous code treats it as volatile anyway.
     (though I'm not sure how compiler handled "volatile caddr_t")
This commit is contained in:
tsutsui 2007-03-06 14:40:25 +00:00
parent 7bad4d945e
commit 35788e9981
1 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grfabs_et.c,v 1.26 2007/03/04 05:59:40 christos Exp $ */
/* $NetBSD: grfabs_et.c,v 1.27 2007/03/06 14:40:25 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grfabs_et.c,v 1.26 2007/03/04 05:59:40 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: grfabs_et.c,v 1.27 2007/03/06 14:40:25 tsutsui Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@ -154,8 +154,8 @@ static bmap_t con_bm; /* XXX */
struct grfabs_et_priv {
pcitag_t pci_tag;
volatile void * regkva;
volatile void * memkva;
void *regkva;
void *memkva;
u_int linbase;
int regsz;
int memsz;
@ -250,11 +250,14 @@ view_t *v;
int sv_size;
u_short *src, *dst;
save_area_t *sa;
volatile u_char *ba;
if (!atari_realconfig)
return;
if (RGfx(et_priv.regkva, GCT_ID_MISC) & 1) {
ba = et_priv.regkva;
if (RGfx(ba, GCT_ID_MISC) & 1) {
#if 0 /* XXX: Can't use printf here.... */
printf("et_save_view: Don't know how to save"
" a graphics mode\n");
@ -267,7 +270,7 @@ view_t *v;
/*
* Calculate the size of the copy
*/
font_height = RCrt(et_priv.regkva, CRT_ID_MAX_ROW_ADDRESS) & 0x1f;
font_height = RCrt(ba, CRT_ID_MAX_ROW_ADDRESS) & 0x1f;
sv_size = bm->bytes_per_row * (bm->rows / (font_height + 1));
sv_size = min(SAVEBUF_SIZE, sv_size);
@ -472,8 +475,8 @@ et_probe_card()
/*
* The things below are setup in atari_init.c
*/
et_priv.regkva = (volatile void *)pci_io_addr;
et_priv.memkva = (volatile void *)pci_mem_addr;
et_priv.regkva = (void *)pci_io_addr;
et_priv.memkva = (void *)pci_mem_addr;
et_priv.linbase = PCI_LINMEMBASE; /* XXX pci_conf_read??? */
et_priv.memsz = PCI_VGA_SIZE;
et_priv.regsz = PCI_IO_SIZE;