2006-03-22 13:51:00

by yogeshwar sonawane

[permalink] [raw]
Subject: writing to a device through driver entrypoint or directly from user space after mapping it

Hi all,

If I want to write to a register of a PCI device which is in BAR
region, there are two ways:-
1) inside write() entrypoint of my driver, i can write to that
particular register.
2) if i have mapped my BAR region to user space, then writing to the
required register directly from user space.

So is there any difference in performance or time required to write to
a device from write() entrypoint of a driver or mapping a BAR region
to user space & then writing to it from user space?

are there any advantages / disadvantages ?

If i am wrong, correct me please.
Thanks in advance.