* [PATCH] x86_64: change dm_ioremap to ioremap
@ 2007-06-05 6:21 Yinghai Lu
2007-06-05 10:06 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Yinghai Lu @ 2007-06-05 6:21 UTC (permalink / raw)
To: Andi Kleen, Andrew Morton; +Cc: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
[PATCH] x86_64: change dmi_ioremap to ioremap
dmi_scan_machine==>dmi_present==>dmi_table==>dmi_ioremap uses
early_ioremap in mm/init.c
dmi_scan_machine is called after init_memory_mappings, and could use
ioremap instead.
also remove extra extern declaring about dmi_ioremap
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
[-- Attachment #2: 6x.diff --]
[-- Type: text/x-patch, Size: 912 bytes --]
diff --git a/include/asm-x86_64/dmi.h b/include/asm-x86_64/dmi.h
index 93b2b15..fc7b576 100644
--- a/include/asm-x86_64/dmi.h
+++ b/include/asm-x86_64/dmi.h
@@ -3,15 +3,12 @@
#include <asm/io.h>
-extern void *dmi_ioremap(unsigned long addr, unsigned long size);
-extern void dmi_iounmap(void *addr, unsigned long size);
-
#define DMI_MAX_DATA 2048
extern int dmi_alloc_index;
extern char dmi_alloc_data[DMI_MAX_DATA];
-/* This is so early that there is no good way to allocate dynamic memory.
+/* This is so early that there is no good way to allocate dynamic memory.
Allocate data in an BSS array. */
static inline void *dmi_alloc(unsigned len)
{
@@ -21,7 +18,7 @@ static inline void *dmi_alloc(unsigned len)
return dmi_alloc_data + idx;
}
-#define dmi_ioremap early_ioremap
-#define dmi_iounmap early_iounmap
+#define dmi_ioremap ioremap
+#define dmi_iounmap(x,l) iounmap(x)
#endif
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86_64: change dm_ioremap to ioremap
2007-06-05 6:21 [PATCH] x86_64: change dm_ioremap to ioremap Yinghai Lu
@ 2007-06-05 10:06 ` Andi Kleen
2007-06-06 4:14 ` Yinghai Lu
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2007-06-05 10:06 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Andrew Morton, Linux Kernel Mailing List
On Tuesday 05 June 2007 08:21:23 Yinghai Lu wrote:
> [PATCH] x86_64: change dmi_ioremap to ioremap
>
> dmi_scan_machine==>dmi_present==>dmi_table==>dmi_ioremap uses
> early_ioremap in mm/init.c
> dmi_scan_machine is called after init_memory_mappings, and could use
> ioremap instead.
> also remove extra extern declaring about dmi_ioremap
init_memory_mapping is not enough; it also needs a working
page allocator. But at this point there is only bootmem.
I don't think the patch is correct.
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86_64: change dm_ioremap to ioremap
2007-06-05 10:06 ` Andi Kleen
@ 2007-06-06 4:14 ` Yinghai Lu
0 siblings, 0 replies; 3+ messages in thread
From: Yinghai Lu @ 2007-06-06 4:14 UTC (permalink / raw)
To: Andi Kleen; +Cc: Andrew Morton, Linux Kernel Mailing List
On 6/5/07, Andi Kleen <ak@suse.de> wrote:
> init_memory_mapping is not enough; it also needs a working
> page allocator. But at this point there is only bootmem.
> I don't think the patch is correct.
you are right it failed with one 2G system.
YH
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-06 4:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-05 6:21 [PATCH] x86_64: change dm_ioremap to ioremap Yinghai Lu
2007-06-05 10:06 ` Andi Kleen
2007-06-06 4:14 ` Yinghai Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox