 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re: [Xen-devel] [PATCH 2/2] linux/x86: use shared page indicating the need for an EOI notification)
 >>> Isaku Yamahata <yamahata@xxxxxxxxxxxxx> 10.12.08 05:09 >>>
>Like this?
Almost.
>--- a/include/asm-i386/mach-xen/asm/pgtable.h
>+++ b/include/asm-i386/mach-xen/asm/pgtable.h
>@@ -488,6 +488,17 @@ void make_pages_writable(void *va, unsig
>       (((maddr_t)pte_mfn(*virt_to_ptep(va)) << PAGE_SHIFT)            \
>        | ((unsigned long)(va) & (PAGE_SIZE - 1)))
> 
>+#ifdef CONFIG_HIGHPTE
>+#define ptep_to_machine(ptep)                                         \
>+({                                                                    \
>+      (unsigned long)(ptep) >= (unsigned long)high_memory?            \
>+              arbitrary_virt_to_machine(ptep) :                       \
>+              virt_to_machine(ptep);                                  \
>+})
I was intending to make use of kmap_atomic_to_page() here. Due to the
check at the beginning of that function, it would even be possible to get
away without a conditional in the highpte case of the macro:
#define ptep_to_machine(ptep) page_to_phys(kmap_atomic_to_page(ptep))
page_to_phys() and page_to_bus() could be used here interchangeably due
to them being identical on x86.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |