summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-12-18 12:30:50 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-12-18 12:30:50 +0000
commit876fce517737242d32c0237ce2a8aa24cfa5f4f7 (patch)
treeed0d229ba8a60464ffe8f32acc8e64754e750f36 /app-emulation/virtualbox-modules/files
parentCommit initd fixes from Alessio. (diff)
downloadgentoo-2-876fce517737242d32c0237ce2a8aa24cfa5f4f7.tar.gz
gentoo-2-876fce517737242d32c0237ce2a8aa24cfa5f4f7.tar.bz2
gentoo-2-876fce517737242d32c0237ce2a8aa24cfa5f4f7.zip
Proxy fix from Alessio.
(Portage version: 2.2_rc17/cvs/Linux 2.6.27-gentoo-r6 x86_64)
Diffstat (limited to 'app-emulation/virtualbox-modules/files')
-rw-r--r--app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch
new file mode 100644
index 000000000000..2fa70a28df4e
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch
@@ -0,0 +1,79 @@
+--- a/linux/SUPDrv-linux.c
++++ b/linux/SUPDrv-linux.c
+@@ -115,44 +115,6 @@
+ # error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time."
+ #endif
+
+-/*
+- * This sucks soooo badly on x86! Why don't they export __PAGE_KERNEL_EXEC so PAGE_KERNEL_EXEC would be usable?
+- */
+-#if defined(RT_ARCH_AMD64)
+-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC
+-#elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
+-#else
+-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL
+-#endif
+-
+-/*
+- * The redhat hack section.
+- * - The current hacks are for 2.4.21-15.EL only.
+- */
+-#ifndef NO_REDHAT_HACKS
+-/* accounting. */
+-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+-# ifdef VM_ACCOUNT
+-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c, 0) /* should it be 1 or 0? */
+-# endif
+-# endif
+-
+-/* backported remap_page_range. */
+-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+-# include <asm/tlb.h>
+-# ifdef tlb_vma /* probably not good enough... */
+-# define HAVE_26_STYLE_REMAP_PAGE_RANGE 1
+-# endif
+-# endif
+-
+-#endif /* !NO_REDHAT_HACKS */
+-
+-
+-#ifndef MY_DO_MUNMAP
+-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c)
+-#endif
+-
+
+ /** @def ONE_MSEC_IN_JIFFIES
+ * The number of jiffies that make up 1 millisecond. Must be at least 1! */
+--- a/r0drv/linux/alloc-r0drv-linux.c
++++ b/r0drv/linux/alloc-r0drv-linux.c
+@@ -131,11 +131,10 @@ PRTMEMHDR rtMemAlloc(size_t cb, uint32_t
+ }
+ else
+ # endif
+- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC);
+
+ #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM,
+- __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC));
++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC);
+ #else
+ pHdr = (PRTMEMHDR)vmalloc(cb + sizeof(*pHdr));
+ #endif
+--- a/r0drv/linux/the-linux-kernel.h
++++ b/r0drv/linux/the-linux-kernel.h
+@@ -174,7 +174,12 @@ DECLINLINE(unsigned long) msecs_to_jiffi
+ #if defined(RT_ARCH_AMD64)
+ # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC
+ #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
++# ifdef __PAGE_KERNEL_EXEC
++ /* >= 2.6.27 */
++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
++# else
++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
++# endif
+ #else
+ # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL
+ #endif