Re: Accessing shared physical memory

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 11 Nov 1999 18:50:23 +0000 (GMT)


> Access from a driver that does:
>
> ptr = (short *) ioremap(0xd0000, 0x10000);
> for(;;)
> *ptr = 0xdead;
>
> Does not ever produce address 0xD... anything on the ISA bus. Therefore,

Well I would guess the compiler optimised the above to

while(1);

You should use writew(). That would have sorted it and made it portable

ie

ptr= ... ioremap ...
for(;;)
writew(0xdead, ptr);

Alan

-
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/