|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] fix compile failure on x86-64 in arch/xen/x86_64/mm/
Compiling unstable on x86-64 (RHEL 3, gcc 3.2.3) fails with this
error:
CC arch/xen/x86_64/mm/ioremap.o
arch/xen/x86_64/mm/ioremap.c:145:1: directives may not be used inside
a macro argument
This is on x86-64, RHEL 3, gcc 3.2.3. I'm curious if anyone else is
seeing it?
The attached patch fixes it for me. This issue is also tracked in
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=178
Signed-off-by: Muli Ben-Yehuda <mulix@xxxxxxxxx>
diff -r 43d91cbb1bfb -r 84ef495eb414
linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c Mon Aug 22 23:07:37 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c Tue Aug 23 17:31:10 2005
@@ -93,6 +93,7 @@
struct vm_struct * area;
unsigned long offset, last_addr;
domid_t domid = DOMID_IO;
+ unsigned long prot;
/* Don't allow wraparound or zero size */
last_addr = phys_addr + size - 1;
@@ -139,13 +140,12 @@
return NULL;
area->phys_addr = phys_addr;
addr = (void __iomem *) area->addr;
+ prot = _PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | flags;
+#if defined(__x86_64__)
+ prot |= _PAGE_USER;
+#endif
if (direct_remap_area_pages(&init_mm, (unsigned long) addr, phys_addr,
- size, __pgprot(_PAGE_PRESENT | _PAGE_RW |
- _PAGE_DIRTY | _PAGE_ACCESSED
-#if defined(__x86_64__)
- | _PAGE_USER
-#endif
- | flags), domid)) {
+ size, __pgprot(prot), domid)) {
vunmap((void __force *) addr);
return NULL;
}
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] fix compile failure on x86-64 in arch/xen/x86_64/mm/ioremap.c,
Muli Ben-Yehuda <=
|
|
|
|
|