Accessing peripheral register directly from userspace

Previous thread: Re: USB transfer_buffer allocations on 64bit systems by Alan Stern on Monday, April 12, 2010 - 9:57 am. (11 messages)

Next thread: [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc. by Masami Hiramatsu on Monday, April 12, 2010 - 10:16 am. (30 messages)
From: Krishna Gopal
Date: Monday, April 12, 2010 - 10:01 am

Would there be any issues for optimization purpose I do a mmap to a
peripheral register to directly access it from userspace ? This is
considering the peripheral already has a Kernel driver through which
you can set the register bit.

Basically I want to avoid the additional context switch on entering
the Kernel to set that one bit in the Peripheral register.

I request you to please share your thoughts.

Best regards,
Krishna
--

From: Clemens Ladisch
Date: Tuesday, April 13, 2010 - 4:36 am

This means that userspace could access any register in the same page.

Usually this is done only with read-only pages and with devices that
are designed for this so that all accessible registers are 'safe'.


Regards,
Clemens
--

Previous thread: Re: USB transfer_buffer allocations on 64bit systems by Alan Stern on Monday, April 12, 2010 - 9:57 am. (11 messages)

Next thread: [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc. by Masami Hiramatsu on Monday, April 12, 2010 - 10:16 am. (30 messages)