unaligned.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. #ifndef _ASM_TILE_UNALIGNED_H
  15. #define _ASM_TILE_UNALIGNED_H
  16. /*
  17. * We could implement faster get_unaligned_[be/le]64 using the ldna
  18. * instruction on tilegx; however, we need to either copy all of the
  19. * other generic functions to here (which is pretty ugly) or else
  20. * modify both the generic code and other arch code to allow arch
  21. * specific unaligned data access functions. Given these functions
  22. * are not often called, we'll stick with the generic version.
  23. */
  24. #include <asm-generic/unaligned.h>
  25. /*
  26. * Is the kernel doing fixups of unaligned accesses? If <0, no kernel
  27. * intervention occurs and SIGBUS is delivered with no data address
  28. * info. If 0, the kernel single-steps the instruction to discover
  29. * the data address to provide with the SIGBUS. If 1, the kernel does
  30. * a fixup.
  31. */
  32. extern int unaligned_fixup;
  33. /* Is the kernel printing on each unaligned fixup? */
  34. extern int unaligned_printk;
  35. /* Number of unaligned fixups performed */
  36. extern unsigned int unaligned_fixup_count;
  37. #endif /* _ASM_TILE_UNALIGNED_H */