types.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef _PPC64_TYPES_H
  2. #define _PPC64_TYPES_H
  3. #ifndef __ASSEMBLY__
  4. /*
  5. * This file is never included by application software unless
  6. * explicitly requested (e.g., via linux/types.h) in which case the
  7. * application is Linux specific so (user-) name space pollution is
  8. * not a major issue. However, for interoperability, libraries still
  9. * need to be careful to avoid a name clashes.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License
  13. * as published by the Free Software Foundation; either version
  14. * 2 of the License, or (at your option) any later version.
  15. */
  16. typedef unsigned int umode_t;
  17. /*
  18. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  19. * header files exported to user space
  20. */
  21. typedef __signed__ char __s8;
  22. typedef unsigned char __u8;
  23. typedef __signed__ short __s16;
  24. typedef unsigned short __u16;
  25. typedef __signed__ int __s32;
  26. typedef unsigned int __u32;
  27. typedef __signed__ long __s64;
  28. typedef unsigned long __u64;
  29. typedef struct {
  30. __u32 u[4];
  31. } __attribute((aligned(16))) __vector128;
  32. #endif /* __ASSEMBLY__ */
  33. #ifdef __KERNEL__
  34. /*
  35. * These aren't exported outside the kernel to avoid name space clashes
  36. */
  37. #define BITS_PER_LONG 64
  38. #ifndef __ASSEMBLY__
  39. typedef signed char s8;
  40. typedef unsigned char u8;
  41. typedef signed short s16;
  42. typedef unsigned short u16;
  43. typedef signed int s32;
  44. typedef unsigned int u32;
  45. typedef signed long s64;
  46. typedef unsigned long u64;
  47. typedef __vector128 vector128;
  48. typedef u32 dma_addr_t;
  49. typedef u64 dma64_addr_t;
  50. typedef struct {
  51. unsigned long entry;
  52. unsigned long toc;
  53. unsigned long env;
  54. } func_descr_t;
  55. #endif /* __ASSEMBLY__ */
  56. #endif /* __KERNEL__ */
  57. #endif /* _PPC64_TYPES_H */