The HyperNews Linux KHG Discussion Pages

Question: How to invalidate a chache page

Forum: The Linux Kernel Hackers' Guide
Keywords: Chache Problem
Date: Wed, 21 May 1997 17:47:36 GMT
From: Gerhard Uttenthaler <[email protected]>

Hello everybody,

I have a problem with a char device driver, which I think is related to a chaching problem.

In my interrupt routine where I receive data from my device I have to handle a specific protocol depending on my device.

So I have to poll a specific address until a change at this address occurs. Something like this:

do{
  status = readb(0xc0000);
   timeout++;
}while(!(status & 0x80) && (timeout < 2000));

Sometimes I get timeouts, which can only occur if I read chache memory which is not up to date. The device is fast and works pretty well under DOS and Win311.

The situation is quite similiar on write access, where I must be sure to write directly to the device, not into the chache waiting for a flush.

The question is: Does anyone know how to invalidate the chache on my address or how to tell the chache not to chache my device at all???

Thank you very much!

G. Uttenthaler [email protected]


Messages

1. More: Read the rest of the KHG! by Michael K. Johnson newest