LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs > vimalkumar.s
User Name
Password

Notices

Rate this Entry

memcpy to access pci memory/ io space

Posted 12-29-2008 at 01:37 AM by vimalkumar.s

Hi everyone,

I am writing linux driver for custom pci module. In various linux device driver books i studied it is mentioned that readb/readw/readl and writeb/writew/writel functions should be used to access pci memory space and inb/outb functions should be used to access pci io space.

I want to do bulk data transfer and also it is time critical. In this case I through instead of using writeb/outb and readb/inb in a for loop it is better to use memcpy() which will avoid a for loop and so reduces the data transfer time.

So, I like to know whether it is advisable to use memcpy() for doing pci memory read/write and in what way readb/inb differs from memcpy().

Thanks in advances for your suggestions.

regards,
S.VimalKumar.
Posted in Uncategorized
Views 1776 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration