Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 627822 | Differences between
and this patch

Collapse All | Expand All

(-)a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c (-2 / +19 lines)
Lines 902-907 Link Here
902
    union
902
    union
903
    {
903
    {
904
        pgd_t       Global;
904
        pgd_t       Global;
905
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
906
        p4d_t       Four;
907
#endif
905
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
908
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
906
        pud_t       Upper;
909
        pud_t       Upper;
907
#endif
910
#endif
Lines 917-925 Link Here
917
    u.Global = *pgd_offset(current->active_mm, ulAddr);
920
    u.Global = *pgd_offset(current->active_mm, ulAddr);
918
    if (RT_UNLIKELY(pgd_none(u.Global)))
921
    if (RT_UNLIKELY(pgd_none(u.Global)))
919
        return NULL;
922
        return NULL;
920
921
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
923
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
924
# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
925
    u.Four  = *p4d_offset(&u.Global, ulAddr);
926
    if (RT_UNLIKELY(p4d_none(u.Four)))
927
        return NULL;
928
    if (p4d_large(u.Four))
929
    {
930
        pPage = p4d_page(u.Four);
931
        AssertReturn(pPage, NULL);
932
        pfn   = page_to_pfn(pPage);      /* doing the safe way... */
933
        AssertCompile(P4D_SHIFT - PAGE_SHIFT < 31);
934
        pfn  += (ulAddr >> PAGE_SHIFT) & ((UINT32_C(1) << (P4D_SHIFT - PAGE_SHIFT)) - 1);
935
        return pfn_to_page(pfn);
936
    }
937
    u.Upper = *pud_offset(&u.Four, ulAddr);
938
# else /* < 4.12 */
922
    u.Upper = *pud_offset(&u.Global, ulAddr);
939
    u.Upper = *pud_offset(&u.Global, ulAddr);
940
# endif /* < 4.12 */
923
    if (RT_UNLIKELY(pud_none(u.Upper)))
941
    if (RT_UNLIKELY(pud_none(u.Upper)))
924
        return NULL;
942
        return NULL;
925
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
943
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
Lines 932-938 Link Here
932
        return pfn_to_page(pfn);
950
        return pfn_to_page(pfn);
933
    }
951
    }
934
# endif
952
# endif
935
936
    u.Middle = *pmd_offset(&u.Upper, ulAddr);
953
    u.Middle = *pmd_offset(&u.Upper, ulAddr);
937
#else  /* < 2.6.11 */
954
#else  /* < 2.6.11 */
938
    u.Middle = *pmd_offset(&u.Global, ulAddr);
955
    u.Middle = *pmd_offset(&u.Global, ulAddr);
(-)work/vboxdrv/r0drv/linux/the-linux-kernel.h (-1 / +6 lines)
Lines 49-55 Link Here
49
# include <generated/autoconf.h>
49
# include <generated/autoconf.h>
50
#else
50
#else
51
# ifndef AUTOCONF_INCLUDED
51
# ifndef AUTOCONF_INCLUDED
52
#  include <generated/autoconf.h>
52
#  include <linux/autoconf.h>
53
# endif
53
# endif
54
#endif
54
#endif
55
55
Lines 159-164 Link Here
159
# include <asm/tlbflush.h>
159
# include <asm/tlbflush.h>
160
#endif
160
#endif
161
161
162
/* for set_pages_x() */
163
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
164
# include <asm/set_memory.h>
165
#endif
166
162
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
167
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
163
# include <asm/smap.h>
168
# include <asm/smap.h>
164
#else
169
#else

Return to bug 627822