Quoting Ian McDonald:
|  On 6/29/07, Gerrit Renker <[EMAIL PROTECTED]> wrote:
|  > [DCCP]: Unaligned pointer access
|  >
|  > Signed-off-by: Gerrit Renker <[EMAIL PROTECTED]>
|  
|  Signed-off-by: Ian McDonald <[EMAIL PROTECTED]>
|  (I don't really understand the alignment stuff but trust you!)
The described exceptions happened on a sparc64 machine (I don't have x86_64).

As far as I know on an i386 you can access unaligned data without performance
penalty, on other machines (such as sparc64), unaligned access is handled by
an exception handler - and this is very expensive.

The get|put_unaligned in include/asm-xxx/unaligned.h avoid triggering the 
unaligned
exception. 

It is not complicated, a nice summary is in Linux Device Drivers #3, Chapter 11
and examples are in include/asm-generic/unaligned.h
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to