From: Jean Delvare <khali@linux-fr.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Subject: [PATCH] dmi: Clean-up dmi helper declarations
Date: Tue, 12 Feb 2008 16:24:22 +0100 [thread overview]
Message-ID: <20080212162422.3780e44c@hyperion.delvare> (raw)
The declaration of dmi helper functions is a bit messy and inconsistent
at the moment:
* On ia64 they are declared in <asm/io.h>.
* On x86-64 they are declared in <asm/dmi.h>.
* On i386 they are declared both in <asm/io.h> and <asm/dmi.h>.
Fix the header files so that the dmi helper functions are consistently
defined in <asm/dmi.h>.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
---
Only tested on i386 and x86-64, maybe Matt can test on ia64?
include/asm-ia64/dmi.h | 5 +++++
include/asm-ia64/io.h | 5 -----
include/asm-x86/dmi.h | 1 +
include/asm-x86/io_32.h | 5 -----
4 files changed, 6 insertions(+), 10 deletions(-)
--- linux-2.6.25-rc1.orig/include/asm-ia64/dmi.h 2007-02-04 19:44:54.000000000 +0100
+++ linux-2.6.25-rc1/include/asm-ia64/dmi.h 2008-02-12 14:44:31.000000000 +0100
@@ -3,4 +3,9 @@
#include <asm/io.h>
+/* Use normal IO mappings for DMI */
+#define dmi_ioremap ioremap
+#define dmi_iounmap(x,l) iounmap(x)
+#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
+
#endif
--- linux-2.6.25-rc1.orig/include/asm-ia64/io.h 2008-01-25 10:27:06.000000000 +0100
+++ linux-2.6.25-rc1/include/asm-ia64/io.h 2008-02-12 14:44:35.000000000 +0100
@@ -423,11 +423,6 @@ extern void __iomem * ioremap(unsigned l
extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
extern void iounmap (volatile void __iomem *addr);
-/* Use normal IO mappings for DMI */
-#define dmi_ioremap ioremap
-#define dmi_iounmap(x,l) iounmap(x)
-#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
-
/*
* String version of IO memory access ops:
*/
--- linux-2.6.25-rc1.orig/include/asm-x86/dmi.h 2008-02-11 09:49:09.000000000 +0100
+++ linux-2.6.25-rc1/include/asm-x86/dmi.h 2008-02-12 14:45:47.000000000 +0100
@@ -27,6 +27,7 @@ static inline void *dmi_alloc(unsigned l
#endif
+/* Use early IO mappings for DMI because it's initialized early */
#define dmi_ioremap early_ioremap
#define dmi_iounmap early_iounmap
--- linux-2.6.25-rc1.orig/include/asm-x86/io_32.h 2008-02-11 09:49:09.000000000 +0100
+++ linux-2.6.25-rc1/include/asm-x86/io_32.h 2008-02-12 14:45:54.000000000 +0100
@@ -139,11 +139,6 @@ extern void *early_ioremap(unsigned long
extern void early_iounmap(void *addr, unsigned long size);
extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
-/* Use early IO mappings for DMI because it's initialized early */
-#define dmi_ioremap early_ioremap
-#define dmi_iounmap early_iounmap
-#define dmi_alloc alloc_bootmem
-
/*
* ISA I/O bus memory addresses are 1:1 with the physical address.
*/
--
Jean Delvare
reply other threads:[~2008-02-12 15:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080212162422.3780e44c@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=Matt_Domsch@dell.com \
--cc=linux-kernel@vger.kernel.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