// JP opened flex table

Click to See Complete Forum and Search --> : Hyper-Threading problem with writes/reads


devans477
October 9th, 2004, 04:15 PM
Hi,

I am using WRITE_PORT_ULONG and READ_PORT_ULONG to get information from the PCI configuration space. First I write to port 0xCF8 a structure that points to the register I want access. Then I read port 0xCFC to retrieve the register value.

The problem:
Applications that use the same technique to obtain PCI information, conflict with my driver when run concurrently on my hyper-threaded workstation. My driver performs a WRITE_PORT_ULONG, but then another driver performs a WRITE_PORT_ULONG before my driver performs its READ_PORT_ULONG.

Is there any way to protect the read/write operation or reserve the ports for a brief period?

Any help is appreciated.

devans477
October 11th, 2004, 02:31 PM
Correction:

The problem doesn't occur only on hyper-threaded machines, but all systems. The problem is just more prounounced on hyper-threaded systems.

I'm looking for something like a spin lock for I/O ports or a way to make a block of code atomic.

//JP added flex table