types.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef _PPC_TYPES_H
  2. #define _PPC_TYPES_H
  3. #ifndef __ASSEMBLY__
  4. typedef __signed__ char __s8;
  5. typedef unsigned char __u8;
  6. typedef __signed__ short __s16;
  7. typedef unsigned short __u16;
  8. typedef __signed__ int __s32;
  9. typedef unsigned int __u32;
  10. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  11. typedef __signed__ long long __s64;
  12. typedef unsigned long long __u64;
  13. #endif
  14. typedef struct {
  15. __u32 u[4];
  16. } __vector128;
  17. /*
  18. * XXX allowed outside of __KERNEL__ for now, until glibc gets
  19. * a proper set of asm headers of its own. -- paulus
  20. */
  21. typedef unsigned short umode_t;
  22. #endif /* __ASSEMBLY__ */
  23. #ifdef __KERNEL__
  24. /*
  25. * These aren't exported outside the kernel to avoid name space clashes
  26. */
  27. #define BITS_PER_LONG 32
  28. #ifndef __ASSEMBLY__
  29. #include <linux/config.h>
  30. typedef signed char s8;
  31. typedef unsigned char u8;
  32. typedef signed short s16;
  33. typedef unsigned short u16;
  34. typedef signed int s32;
  35. typedef unsigned int u32;
  36. typedef signed long long s64;
  37. typedef unsigned long long u64;
  38. typedef __vector128 vector128;
  39. /* DMA addresses are 32-bits wide */
  40. typedef u32 dma_addr_t;
  41. typedef u64 dma64_addr_t;
  42. #ifdef CONFIG_LBD
  43. typedef u64 sector_t;
  44. #define HAVE_SECTOR_T
  45. #endif
  46. typedef unsigned int kmem_bufctl_t;
  47. #endif /* __ASSEMBLY__ */
  48. #endif /* __KERNEL__ */
  49. #endif