On 10/05/2017 12:07 PM, Himanshu Jha wrote:

In this case, the key is CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. It
seems that asm-generic/unaligned.h is set up to include different
headers, based on the expected architecture behavior.

Yes, asm-generic/unaligned.h looks more appopriate and is most generic
implementation of unaligned accesses and  arc specific.


Probably the idea is that each ARCH knows exactly what is the best way to do unaligned access, so common code (like drivers) should include ARCH-specific asm/unaligned.h only. It will then decide how to do that and will include asm-generic/unaligned.h itself, if required.

Reply via email to