* [PATCH] fix linux ioremap() of domain local memory
@ 2006-06-22 18:08 Avi Kivity
2006-06-25 10:17 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2006-06-22 18:08 UTC (permalink / raw)
To: xen-devel
is_local_lowmem() treats its physical address input as a machine
address; this causes agpgart to fail while calling ioremap_nocache().
X still does not load on my Athlon 64 / Via S3 Unichrome, so perhaps
best not to apply just yet.
Signed-off-by: Avi Kivity <avi@qumranet.com>
--- xen-ioremap-fix/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c~ioremap 2006-06-22 20:30:20.000000000 +0300
+++ xen-ioremap-fix/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c 2006-06-22 20:31:09.000000000 +0300
@@ -206,13 +206,11 @@
/*
* Does @address reside within a non-highmem page that is local to this virtual
* machine (i.e., not an I/O page, nor a memory page belonging to another VM).
- * See the comment that accompanies mfn_to_local_pfn() in page.h to understand
- * why this works.
*/
static inline int is_local_lowmem(unsigned long address)
{
extern unsigned long max_low_pfn;
- return (mfn_to_local_pfn(address >> PAGE_SHIFT) < max_low_pfn);
+ return ((address >> PAGE_SHIFT) < max_low_pfn);
}
/*
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix linux ioremap() of domain local memory
2006-06-22 18:08 [PATCH] fix linux ioremap() of domain local memory Avi Kivity
@ 2006-06-25 10:17 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2006-06-25 10:17 UTC (permalink / raw)
To: xen-devel
Avi Kivity wrote:
> is_local_lowmem() treats its physical address input as a machine
> address; this causes agpgart to fail while calling ioremap_nocache().
>
> X still does not load on my Athlon 64 / Via S3 Unichrome, so perhaps
> best not to apply just yet.
This is bogus: ioremap_nocache() does accept machine addresses, but
x86_64 agpgart passes it a physical address. This is because x86_64
lacks the address translation bits:
--- /dev/null 2006-06-25 13:08:55.714359750 +0300
+++ include/asm-x86_64/mach-xen/asm/agp.h 2006-06-25 13:15:12.000000000 +0300
@@ -0,0 +1 @@
+#include "../../../asm-i386/mach-xen/asm/agp.h"
Still locks up hard when starting up X, but now the gart table is
remapped correctly at least.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-25 10:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-22 18:08 [PATCH] fix linux ioremap() of domain local memory Avi Kivity
2006-06-25 10:17 ` Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.