mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Introduce asm-generic/posix_types.h
@ 2015-05-22  6:10 Sascha Hauer
  2015-05-22  6:10 ` [PATCH 01/14] dma: Use generic place for dma_addr_t typedef Sascha Hauer
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Sascha Hauer @ 2015-05-22  6:10 UTC (permalink / raw)
  To: Barebox List

asm/posix_types.h adds several posix variable types for each architecture.
This is unnecessary code duplication. Since the files are derived from
Linux they have some real differences, but they are irrelevant to barebox.
For example __kernel_mode_t is unsigned int on some architectures and
unsigned short on others. Since we have no userspace we have to stay
compatible to we can use the same type for all architectures. Some
32bit architectures use unsigned long where others use unsigned int, but
since both are 32bit types we can use the same type for all architectures.
Finally there are types which are different between 32bit and 64bit
architectures, these are handled by the BITS_PER_LONG macro defined
in asm/bitsperlong.h which is added for the architectures that do not
have this file already.

----------------------------------------------------------------
Sascha Hauer (14):
      dma: Use generic place for dma_addr_t typedef
      drop __BITS_PER_LONG
      introduce bitsperlong.h for remaining architectures
      introduce generic posix_types.h
      remove unused nlink_t
      ARM: use generic posix_types.h
      blackfin: use generic posix_types.h
      x86: use generic posix_types.h
      openrisc: use generic posix_types.h
      mips: use generic posix_types.h
      ppc: use generic posix_types.h
      sandbox: use generic posix_types.h
      efi: use generic posix_types.h
      nios2: use generic posix_types.h

 arch/arm/include/asm/bitsperlong.h      |   1 +
 arch/arm/include/asm/posix_types.h      |  79 +------------------
 arch/arm/include/asm/types.h            |   7 +-
 arch/blackfin/include/asm/posix_types.h |  86 +--------------------
 arch/blackfin/include/asm/types.h       |   6 +-
 arch/efi/include/asm/bitsperlong.h      |  10 +++
 arch/efi/include/asm/posix_types.h      |  94 +----------------------
 arch/efi/include/asm/types.h            |  10 +--
 arch/mips/Kconfig                       |   1 +
 arch/mips/include/asm/bitsperlong.h     |   4 +-
 arch/mips/include/asm/posix_types.h     | 130 +-------------------------------
 arch/mips/include/asm/types.h           |  12 ---
 arch/nios2/include/asm/posix_types.h    |  78 +------------------
 arch/nios2/include/asm/types.h          |   3 -
 arch/openrisc/include/asm/bitsperlong.h |   1 +
 arch/openrisc/include/asm/posix_types.h |  72 +-----------------
 arch/openrisc/include/asm/types.h       |   6 +-
 arch/ppc/include/asm/bitsperlong.h      |   1 +
 arch/ppc/include/asm/posix_types.h      | 109 +-------------------------
 arch/ppc/include/asm/types.h            |   5 +-
 arch/sandbox/include/asm/bitsperlong.h  |  10 +++
 arch/sandbox/include/asm/posix_types.h  |  94 +----------------------
 arch/sandbox/include/asm/types.h        |   6 +-
 arch/x86/include/asm/bitsperlong.h      |   1 +
 arch/x86/include/asm/posix_types.h      |  45 +----------
 arch/x86/include/asm/types.h            |   2 +-
 common/Kconfig                          |   3 +
 include/asm-generic/bitsperlong.h       |  22 ------
 include/asm-generic/posix_types.h       |  90 ++++++++++++++++++++++
 include/asm-generic/swab.h              |   2 +-
 include/linux/types.h                   |   8 +-
 31 files changed, 143 insertions(+), 855 deletions(-)
 create mode 100644 arch/arm/include/asm/bitsperlong.h
 create mode 100644 arch/efi/include/asm/bitsperlong.h
 create mode 100644 arch/openrisc/include/asm/bitsperlong.h
 create mode 100644 arch/ppc/include/asm/bitsperlong.h
 create mode 100644 arch/sandbox/include/asm/bitsperlong.h
 create mode 100644 arch/x86/include/asm/bitsperlong.h
 create mode 100644 include/asm-generic/posix_types.h

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-05-22  6:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22  6:10 Introduce asm-generic/posix_types.h Sascha Hauer
2015-05-22  6:10 ` [PATCH 01/14] dma: Use generic place for dma_addr_t typedef Sascha Hauer
2015-05-22  6:10 ` [PATCH 02/14] drop __BITS_PER_LONG Sascha Hauer
2015-05-22  6:11 ` [PATCH 03/14] introduce bitsperlong.h for remaining architectures Sascha Hauer
2015-05-22  6:11 ` [PATCH 04/14] introduce generic posix_types.h Sascha Hauer
2015-05-22  6:11 ` [PATCH 05/14] remove unused nlink_t Sascha Hauer
2015-05-22  6:11 ` [PATCH 06/14] ARM: use generic posix_types.h Sascha Hauer
2015-05-22  6:11 ` [PATCH 07/14] blackfin: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 08/14] x86: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 09/14] openrisc: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 10/14] mips: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 11/14] ppc: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 12/14] sandbox: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 13/14] efi: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 14/14] nios2: " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox