Re: What does pci_map_single do ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- shesha bhushan <bhushan_vadulas@hotmail.com> wrote:

> 1. pci_map_single will transfer the data from RAM (kernel
> area) to the  hardware accessible area and will provide
> with a pointer which can then be passed to the hardware.
> 2. In the above function the "size" parameter indicates
> the amount of DMA transfer.
> Am I correct in the above two points? If I am wrong please
> correct me.

 pci_map_single() is architecture specific. On Intel i386,
it just returns the physical address corresponding to the
virtual address passed in as parameter, no copying is done.
The size parameter is ignored.
 
> In the Linux Device driver book (page 408), he says, data
> must be explicitly flushed from the processor cache. And
> data flushed this way is not avaliable to the device.
> 
> This means that we must flush the processor cache before
> calling pci_map_single. How can we achieve this.
 
 I didn't understand that fully. But I guess the call to
flush_write_buffers() in pci_map_single() (again, this is
for Intel i386) does what you are looking for.

Hope this helps.

-Ravi.

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux