From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus <torvalds@transmeta.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
anton@samba.org, "David S. Miller" <davem@redhat.com>,
ak@muc.de
Subject: [PATCH] Beginnings of conpat 32 code cleanups
Date: Fri, 22 Nov 2002 16:23:12 +1100 [thread overview]
Message-ID: <20021122162312.32ff4bd3.sfr@canb.auug.org.au> (raw)
Hi Linus,
There is a lot of duplicated code among the 32 compatibility layers in our
64 bit architectures. I am proposing to considate this as much as
possible. To that end, I first need to tidy up the relevant header files
and make them as common as possible. Discussions with Dave Miller, Andi
Kleen, and Anton Blanchard has led to the creation of compat32.h to
contain all the 32 compatibility data types.
This patch merely adds include/asm-generic/compat32.h which is the header
information that is common to all the 32 bit compatibility code across all
the architectures (except parisc as I don't pretend to understand that
:-)).
I will follow this up with patches for each architecture that I can. I
also intend to intruduce a CONFIG_COMPAT32 define that will be used to
wrap generic implementations of some of the 32 bit compatibility code in
our architecture independent code. The idea is to share as much of the
non compatibility code and where that is not possible, to keep the 32 bit
versions of code near their "normal" (i.e.64 bit) counterparts in order to
minimise the number of bugs introduced and maximise the number of bugs
fixed.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.48/include/asm-generic/compat32.h 2.5.48-32bit.1/include/asm-generic/compat32.h
--- 2.5.48/include/asm-generic/compat32.h 1970-01-01 10:00:00.000000000 +1000
+++ 2.5.48-32bit.1/include/asm-generic/compat32.h 2002-11-22 16:02:56.000000000 +1100
@@ -0,0 +1,31 @@
+#ifndef _ASM_GENERIC_COMPAT32_H
+#define _ASM_GENERIC_COMPAT32_H
+
+#include <linux/types.h>
+
+typedef unsigned int __kernel_size_t32;
+typedef int __kernel_ssize_t32;
+typedef int __kernel_time_t32;
+typedef int __kernel_clock_t32;
+typedef int __kernel_pid_t32;
+typedef unsigned int __kernel_ino_t32;
+typedef int __kernel_daddr_t32;
+typedef int __kernel_off_t32;
+typedef unsigned int __kernel_caddr_t32;
+typedef long __kernel_loff_t32;
+typedef __kernel_fsid_t __kernel_fsid_t32;
+
+struct timespec32 {
+ s32 tv_sec;
+ s32 tv_nsec;
+};
+
+struct flock32 {
+ short l_type;
+ short l_whence;
+ __kernel_off_t32 l_start;
+ __kernel_off_t32 l_len;
+ __kernel_pid_t32 l_pid;
+};
+
+#endif /* _ASM_GENERIC_COMPAT32_H */
next reply other threads:[~2002-11-22 5:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-22 5:23 Stephen Rothwell [this message]
2002-11-22 19:47 ` Linus Torvalds
2002-11-22 19:54 ` Larry McVoy
2002-11-22 20:13 ` Cort Dougan
2002-11-22 20:38 ` H. Peter Anvin
2002-11-23 0:28 ` Stephen Rothwell
2002-11-25 19:48 ` Linus Torvalds
2002-11-23 5:16 ` Anton Blanchard
2002-11-25 20:00 ` Linus Torvalds
2002-11-26 13:53 ` Pavel Machek
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=20021122162312.32ff4bd3.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=ak@muc.de \
--cc=anton@samba.org \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®