Re: Recommended functions for accessing internal registers

2009-12-03 Thread Benjamin Herrenschmidt
On Thu, 2009-12-03 at 12:16 +0100, Fortini Matteo wrote: > I'm on an embedded system, so every resource counts. > One of the biggest impacts is when writing to a communication/memory > access FIFO or reading/writing configurations. > In these cases, I'd just need to make sure that there's no I/O

Re: Recommended functions for accessing internal registers

2009-12-03 Thread Fortini Matteo
I'm on an embedded system, so every resource counts. One of the biggest impacts is when writing to a communication/memory access FIFO or reading/writing configurations. In these cases, I'd just need to make sure that there's no I/O reordering and/or subsequent r/w are not optimized away, I belie

Re: Recommended functions for accessing internal registers

2009-12-02 Thread Benjamin Herrenschmidt
On Tue, 2009-12-01 at 17:44 +0100, Fortini Matteo wrote: > I see that throughout the kernel source, internal PPC registers are > accessed through [in|out]_be[32|16|8]() functions. However, they are > translated into 3 inline assembly instructions, one of which is an > isync, which has a huge per

Recommended functions for accessing internal registers

2009-12-01 Thread Fortini Matteo
I see that throughout the kernel source, internal PPC registers are accessed through [in|out]_be[32|16|8]() functions. However, they are translated into 3 inline assembly instructions, one of which is an isync, which has a huge performance hit. I tried using readl_be() which seems to be the righ