From: jbeulich@novell.com Subject: fix intel-agp address handling Patch-mainline: obsolete References: 254208 Index: head-2007-08-22/drivers/char/agp/intel-agp.c =================================================================== --- head-2007-08-22.orig/drivers/char/agp/intel-agp.c 2007-08-22 09:32:13.000000000 +0200 +++ head-2007-08-22/drivers/char/agp/intel-agp.c 2007-08-22 10:10:29.000000000 +0200 @@ -208,6 +208,13 @@ static void *i8xx_alloc_pages(void) if (page == NULL) return NULL; +#ifdef CONFIG_XEN + if (xen_create_contiguous_region((unsigned long)page_address(page), 2, 32)) { + __free_pages(page, 2); + return NULL; + } +#endif + if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) { change_page_attr(page, 4, PAGE_KERNEL); global_flush_tlb(); @@ -231,6 +238,9 @@ static void i8xx_destroy_pages(void *add page = virt_to_page(addr); change_page_attr(page, 4, PAGE_KERNEL); global_flush_tlb(); +#ifdef CONFIG_XEN + xen_destroy_contiguous_region((unsigned long)page_address(page), 2); +#endif put_page(page); unlock_page(page); __free_pages(page, 2);