From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux-Kernel list <linux-kernel@vger.kernel.org>
Subject: PATCH 2.5.2.7: io.h cleanup and userspace nudge
Date: Fri, 04 Jan 2002 12:47:27 -0500 [thread overview]
Message-ID: <3C35EAAF.17636C6E@mandrakesoft.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 852 bytes --]
As we are now in 2.5.x series I figured it might be a good time to push
this out... The patch removes __KERNEL__ ifdefs from [only] io.h as a
nudge to userspace that they should not be including kernel headers.
MDK, RedHat, Caldera, and other distros already distribute a subset of
[sanitized?] kernel headers for glibc, so there is plenty of time to
notice and deal with any breakage this causes in userspace [which IMHO
should not have been including kernel headers in the first place...]
Finally, the patch includes a cosmetic cleanup to use standard
u8/u16/u32 types for {read,write}[bwl], similar to patches already
applied for sparc64, alpha, and other arches during 2.4.x series.
Jeff
--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno
[-- Attachment #2: trouble.patch --]
[-- Type: text/plain, Size: 1523 bytes --]
--- /spare/tmp/linux-2.5.2-pre7/include/asm-i386/io.h Sun Dec 16 18:43:31 2001
+++ linux_2_5/include/asm-i386/io.h Fri Jan 4 12:32:07 2002
@@ -41,8 +41,6 @@
#define XQUAD_PORTIO_BASE 0xfe400000
#define XQUAD_PORTIO_LEN 0x40000 /* 256k per quad. Only remapping 1st */
-#ifdef __KERNEL__
-
#include <linux/vmalloc.h>
/*
@@ -108,16 +106,16 @@
* memory location directly.
*/
-#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
-#define readw(addr) (*(volatile unsigned short *) __io_virt(addr))
-#define readl(addr) (*(volatile unsigned int *) __io_virt(addr))
+#define readb(addr) (*(volatile u8 *) __io_virt(addr))
+#define readw(addr) (*(volatile u16 *) __io_virt(addr))
+#define readl(addr) (*(volatile u32 *) __io_virt(addr))
#define __raw_readb readb
#define __raw_readw readw
#define __raw_readl readl
-#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
-#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b))
-#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b))
+#define writeb(b,addr) (*(volatile u8 *) __io_virt(addr) = (b))
+#define writew(b,addr) (*(volatile u16 *) __io_virt(addr) = (b))
+#define writel(b,addr) (*(volatile u32 *) __io_virt(addr) = (b))
#define __raw_writeb writeb
#define __raw_writew writew
#define __raw_writel writel
@@ -215,8 +213,6 @@
#define flush_write_buffers()
#endif
-
-#endif /* __KERNEL__ */
#ifdef SLOW_IO_BY_JUMPING
#define __SLOW_DOWN_IO "\njmp 1f\n1:\tjmp 1f\n1:"
next reply other threads:[~2002-01-04 17:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-04 17:47 Jeff Garzik [this message]
2002-01-04 18:00 ` PATCH 2.5.2.7: io.h cleanup and userspace nudge Dave Jones
2002-01-04 18:12 ` Jeff Garzik
2002-01-04 18:18 ` Dave Jones
2002-01-04 18:20 ` David Woodhouse
2002-01-04 18:39 ` Alan Cox
2002-01-04 18:46 ` including kernel headers (was Re: PATCH 2.5.2.7: io.h cleanup and userspace nudge) Jeff Garzik
2002-01-04 18:21 ` PATCH 2.5.2.7: io.h cleanup and userspace nudge Jeff Garzik
2002-01-04 18:24 ` Dave Jones
2002-01-04 18:31 ` Richard Gooch
2002-01-04 18:35 ` Jeff Garzik
2002-01-04 18:40 ` Dave Jones
2002-01-04 18:41 ` Richard Gooch
2002-01-04 19:16 ` Mike Castle
2002-01-04 23:28 ` Reid Hekman
2002-01-04 18:19 ` Oliver Xymoron
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=3C35EAAF.17636C6E@mandrakesoft.com \
--to=jgarzik@mandrakesoft.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