uboot/arch/sandbox/include/asm/types.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0+ */
   2/*
   3 * Copyright (c) 2011 The Chromium OS Authors.
   4 */
   5
   6#ifndef __ASM_SANDBOX_TYPES_H
   7#define __ASM_SANDBOX_TYPES_H
   8
   9typedef unsigned short umode_t;
  10
  11/*
  12 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  13 * header files exported to user space
  14 */
  15
  16typedef __signed__ char __s8;
  17typedef unsigned char __u8;
  18
  19typedef __signed__ short __s16;
  20typedef unsigned short __u16;
  21
  22typedef __signed__ int __s32;
  23typedef unsigned int __u32;
  24
  25#if defined(__GNUC__)
  26__extension__ typedef __signed__ long long __s64;
  27__extension__ typedef unsigned long long __u64;
  28#endif
  29
  30/*
  31 * These aren't exported outside the kernel to avoid name space clashes
  32 */
  33#ifdef __KERNEL__
  34
  35typedef signed char s8;
  36typedef unsigned char u8;
  37
  38typedef signed short s16;
  39typedef unsigned short u16;
  40
  41typedef signed int s32;
  42typedef unsigned int u32;
  43
  44#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
  45typedef signed long long s64;
  46typedef unsigned long long u64;
  47#else
  48typedef __INT64_TYPE__ s64;
  49typedef __UINT64_TYPE__ u64;
  50#endif
  51
  52/*
  53 * Number of bits in a C 'long' on this architecture.
  54 */
  55#ifdef  CONFIG_PHYS64
  56#define BITS_PER_LONG 64
  57#else   /* CONFIG_PHYS64 */
  58#define BITS_PER_LONG 32
  59#endif  /* CONFIG_PHYS64 */
  60
  61#ifdef  CONFIG_PHYS64
  62typedef unsigned long long dma_addr_t;
  63typedef u64 phys_addr_t;
  64typedef u64 phys_size_t;
  65#else   /* CONFIG_PHYS64 */
  66typedef unsigned long dma_addr_t;
  67typedef u32 phys_addr_t;
  68typedef u32 phys_size_t;
  69#endif  /* CONFIG_PHYS64 */
  70
  71#endif /* __KERNEL__ */
  72
  73#endif
  74