types.h 864 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2011 Andes Technology Corporation
  3. * Copyright (C) 2010 Shawn Lin (nobuhiro@andestech.com)
  4. * Copyright (C) 2011 Macpaul Lin (macpaul@andestech.com)
  5. * Copyright (C) 2017 Rick Chen (rick@andestech.com)
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. */
  11. #ifndef __ASM_RISCV_TYPES_H
  12. #define __ASM_RISCV_TYPES_H
  13. #include <asm-generic/int-ll64.h>
  14. typedef unsigned short umode_t;
  15. /*
  16. * These aren't exported outside the kernel to avoid name space clashes
  17. */
  18. #ifdef __KERNEL__
  19. #ifdef CONFIG_ARCH_RV64I
  20. #define BITS_PER_LONG 64
  21. #else
  22. #define BITS_PER_LONG 32
  23. #endif
  24. #include <stddef.h>
  25. typedef u32 dma_addr_t;
  26. typedef unsigned long phys_addr_t;
  27. typedef unsigned long phys_size_t;
  28. #endif /* __KERNEL__ */
  29. #endif