Re: Adpter card read old memory value

From: Arjan van de Ven (arjanv@redhat.com)
Date: Tue Oct 01 2002 - 09:45:52 EST


On Tue, Oct 01, 2002 at 05:44:07PM +0300, Eitan Ben-Nun wrote:
> ok thanks,
> An adapter card on the pci bus send a message to pc i386 Linux to update a memory address.
> Then it reads the address and sees an old value, even though the pc cpu have performed an update to this memory address. Here is referance to my driver code:
> int update_cluster_operation_mode(unsigned long new_mode,
> unsigned long phys_addr);
> {
> unsigned long* vir_addr = 0;
> vir_addr = __ioremap(phys_addr, PAGE_SIZE, _PAGE_PWT | _PAGE_PCD);
> *vir_addr = new_mode;
> return 0;
> }
> phys_addr - is always on page bonderies and the address is between 512M-640M.

this is only a part of the source, is there a full source available?

also your code is already buggy; you should use writel(); and also read up
on PCI posting....

Greetings,
   Arjan van de Ven
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:26 EST