VirtualBox

Changeset 12360 in vbox


Ignore:
Timestamp:
Sep 10, 2008 3:02:01 PM (16 years ago)
Author:
vboxsync
Message:

2.6.27 vboxdrv compile fix

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r12115 r12360  
    123123# error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time."
    124124#endif
    125 
    126 /*
    127  * This sucks soooo badly on x86! Why don't they export __PAGE_KERNEL_EXEC so PAGE_KERNEL_EXEC would be usable?
    128  */
    129 #if defined(RT_ARCH_AMD64)
    130 # define MY_PAGE_KERNEL_EXEC    PAGE_KERNEL_EXEC
    131 #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
    132 # define MY_PAGE_KERNEL_EXEC    __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
    133 #else
    134 # define MY_PAGE_KERNEL_EXEC    PAGE_KERNEL
    135 #endif
    136 
    137 /*
    138  * The redhat hack section.
    139  *  - The current hacks are for 2.4.21-15.EL only.
    140  */
    141 #ifndef NO_REDHAT_HACKS
    142 /* accounting. */
    143 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    144 #  ifdef VM_ACCOUNT
    145 #   define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c, 0) /* should it be 1 or 0? */
    146 #  endif
    147 # endif
    148 
    149 /* backported remap_page_range. */
    150 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    151 #  include <asm/tlb.h>
    152 #  ifdef tlb_vma /* probably not good enough... */
    153 #   define HAVE_26_STYLE_REMAP_PAGE_RANGE 1
    154 #  endif
    155 # endif
    156 
    157 #endif /* !NO_REDHAT_HACKS */
    158 
    159 
    160 #ifndef MY_DO_MUNMAP
    161 # define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c)
    162 #endif
    163 
    164125
    165126#ifdef CONFIG_X86_LOCAL_APIC
  • trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c

    r8245 r12360  
    132132        else
    133133# endif
    134             pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
     134            pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC);
    135135
    136136#elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
    137         pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM,
    138                                     __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC));
     137        pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC);
    139138#else
    140139        pHdr = (PRTMEMHDR)vmalloc(cb + sizeof(*pHdr));
  • trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h

    r10935 r12360  
    188188# define MY_PAGE_KERNEL_EXEC    PAGE_KERNEL_EXEC
    189189#elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
    190 # define MY_PAGE_KERNEL_EXEC    __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
     190# ifdef __PAGE_KERNEL_EXEC
     191   /* >= 2.6.27 */
     192#  define MY_PAGE_KERNEL_EXEC   __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
     193# else
     194#  define MY_PAGE_KERNEL_EXEC   __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
     195# endif
    191196#else
    192197# define MY_PAGE_KERNEL_EXEC    PAGE_KERNEL
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette