From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: Introduce asm-generic/posix_types.h
Date: Fri, 22 May 2015 08:10:57 +0200 [thread overview]
Message-ID: <1432275071-28554-1-git-send-email-s.hauer@pengutronix.de> (raw)
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
next reply other threads:[~2015-05-22 6:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 6:10 Sascha Hauer [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432275071-28554-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox