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

Collapse All | Expand All

(-)a/include/iprt/cdefs.h.ORIG (-1 / +1 lines)
Lines 1166-1172 Link Here
1166
 * Tell the compiler that we're falling through to the next case in a switch.
1166
 * Tell the compiler that we're falling through to the next case in a switch.
1167
 * @sa RT_FALL_THRU  */
1167
 * @sa RT_FALL_THRU  */
1168
#if RT_GNUC_PREREQ(7, 0)
1168
#if RT_GNUC_PREREQ(7, 0)
1169
# define RT_FALL_THROUGH()      __attribute__((fallthrough))
1169
# define RT_FALL_THROUGH()      __attribute__((__fallthrough__))
1170
#else
1170
#else
1171
# define RT_FALL_THROUGH()      (void)0
1171
# define RT_FALL_THROUGH()      (void)0
1172
#endif
1172
#endif
(-)a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c.ORIG (-2 / +15 lines)
Lines 924-931 Link Here
924
    for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++)
924
    for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++)
925
    {
925
    {
926
        skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i];
926
        skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i];
927
        pSG->aSegs[iSeg].cb = pFrag->size;
927
# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
928
        pSG->aSegs[iSeg].cb = pFrag->bv_len;
929
        pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
930
# else /* < KERNEL_VERSION(5, 4, 0) */ 
931
        pSG->aSegs[iSeg].cb = pFrag->size; 
928
        pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
932
        pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
933
# endif /* >= KERNEL_VERSION(5, 4, 0) */ 
929
        Log6((" %p", pSG->aSegs[iSeg].pv));
934
        Log6((" %p", pSG->aSegs[iSeg].pv));
930
        pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
935
        pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
931
        Assert(iSeg <= pSG->cSegsAlloc);
936
        Assert(iSeg <= pSG->cSegsAlloc);
Lines 940-947 Link Here
940
        for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++)
945
        for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++)
941
        {
946
        {
942
            skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i];
947
            skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i];
943
            pSG->aSegs[iSeg].cb = pFrag->size;
948
# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) 
949
            pSG->aSegs[iSeg].cb = pFrag->bv_len; 
950
            pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; 
951
# else /* < KERNEL_VERSION(5, 4, 0) */             pSG->aSegs[iSeg].cb = pFrag->size;
944
            pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
952
            pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
953
# endif /* >= KERNEL_VERSION(5, 4, 0) */ 
945
            Log6((" %p", pSG->aSegs[iSeg].pv));
954
            Log6((" %p", pSG->aSegs[iSeg].pv));
946
            pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
955
            pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
947
            Assert(iSeg <= pSG->cSegsAlloc);
956
            Assert(iSeg <= pSG->cSegsAlloc);
Line 39 Link Here
39
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 
40
    #include <uapi/linux/sched/types.h> 
41
#endif /* >= KERNEL_VERSION(4, 11, 0) */ 
42
(-)a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h.ORIG (-1 / +11 lines)
Lines 130-135 Link Here
130
#endif
130
#endif
131
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
131
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
132
# include <uapi/linux/mman.h>
132
# include <uapi/linux/mman.h>
133
# include <uapi/linux/sched/types.h>
133
#endif
134
#endif
134
/* For the basic additions module */
135
/* For the basic additions module */
135
#include <linux/pci.h>
136
#include <linux/pci.h>
Lines 315-330 Link Here
315
 * to be a bug in one of the many patches that redhat applied.
316
 * to be a bug in one of the many patches that redhat applied.
316
 * It should be safe to do this on less buggy linux kernels too. ;-)
317
 * It should be safe to do this on less buggy linux kernels too. ;-)
317
 */
318
 */
319
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
318
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot) \
320
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot) \
319
    do { \
321
    do { \
320
        if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) \
322
        if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) \
321
            change_page_attr(pPages, cPages, prot); \
323
            change_page_attr(pPages, cPages, prot); \
322
        change_page_attr(pPages, cPages, prot); \
324
        change_page_attr(pPages, cPages, prot); \
323
    } while (0)
325
    } while (0)
326
#else
327
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot)
328
#endif
324
# endif  /* !RT_ARCH_AMD64 */
329
# endif  /* !RT_ARCH_AMD64 */
325
#endif /* !NO_REDHAT_HACKS */
330
#endif /* !NO_REDHAT_HACKS */
326
331
327
#ifndef MY_CHANGE_PAGE_ATTR
332
#ifndef MY_CHANGE_PAGE_ATTR
333
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
334
328
# ifdef RT_ARCH_AMD64 /** @todo This is a cheap hack, but it'll get around that 'else BUG();' in __change_page_attr().  */
335
# ifdef RT_ARCH_AMD64 /** @todo This is a cheap hack, but it'll get around that 'else BUG();' in __change_page_attr().  */
329
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot) \
336
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot) \
330
    do { \
337
    do { \
Lines 334-342 Link Here
334
# else
341
# else
335
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot) change_page_attr(pPages, cPages, prot)
342
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot) change_page_attr(pPages, cPages, prot)
336
# endif
343
# endif
344
#else
345
#  define MY_CHANGE_PAGE_ATTR(pPages, cPages, prot)
346
#endif
337
#endif
347
#endif
338
348
339
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
349
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) && LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
340
# define MY_SET_PAGES_EXEC(pPages, cPages)    set_pages_x(pPages, cPages)
350
# define MY_SET_PAGES_EXEC(pPages, cPages)    set_pages_x(pPages, cPages)
341
# define MY_SET_PAGES_NOEXEC(pPages, cPages)  set_pages_nx(pPages, cPages)
351
# define MY_SET_PAGES_NOEXEC(pPages, cPages)  set_pages_nx(pPages, cPages)
342
#else
352
#else
(-)a/src/VBox/Additions/linux/drm/vbox_drv.c.ORIG (+5 lines)
Lines 270-281 Link Here
270
}
270
}
271
271
272
static struct drm_driver driver = {
272
static struct drm_driver driver = {
273
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) 
273
	.driver_features =
274
	.driver_features =
274
	    DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ |
275
	    DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ |
275
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81)
276
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81)
276
	    DRIVER_IRQ_SHARED |
277
	    DRIVER_IRQ_SHARED |
277
#endif
278
#endif
279
# endif /* < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81) */ 
278
	    DRIVER_PRIME,
280
	    DRIVER_PRIME,
281
#else /* >= KERNEL_VERSION(5, 4, 0) */ 
282
        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, 
283
#endif /* < KERNEL_VERSION(5, 4, 0) */ 
279
	.dev_priv_size = 0,
284
	.dev_priv_size = 0,
280
285
281
	.load = vbox_driver_load,
286
	.load = vbox_driver_load,
(-)a/src/VBox/Additions/linux/drm/vbox_main.c.ORIG (+4 lines)
Lines 617-626 Link Here
617
static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
617
static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
618
{
618
{
619
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
619
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
620
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) 
621
        return drm_vma_node_offset_addr(&bo->bo.base.vma_node); 
622
#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70) 
620
	return bo->bo.addr_space_offset;
623
	return bo->bo.addr_space_offset;
621
#else
624
#else
622
	return drm_vma_node_offset_addr(&bo->bo.vma_node);
625
	return drm_vma_node_offset_addr(&bo->bo.vma_node);
623
#endif
626
#endif
627
#endif /* >= KERNEL_VERSION(5, 4, 0) */
624
}
628
}
625
629
626
int
630
int
(-)a/src/VBox/Runtime/common/fs/ntfsvfs.cpp.ORIG (-1 / +1 lines)
Lines 1052-1058 Link Here
1052
                    case 4: cClustersInRun |= (uint32_t)pbPairs[offPairs + 3] << 24; RT_FALL_THRU();
1052
                    case 4: cClustersInRun |= (uint32_t)pbPairs[offPairs + 3] << 24; RT_FALL_THRU();
1053
                    case 3: cClustersInRun |= (uint32_t)pbPairs[offPairs + 2] << 16; RT_FALL_THRU();
1053
                    case 3: cClustersInRun |= (uint32_t)pbPairs[offPairs + 2] << 16; RT_FALL_THRU();
1054
                    case 2: cClustersInRun |= (uint16_t)pbPairs[offPairs + 1] <<  8; RT_FALL_THRU();
1054
                    case 2: cClustersInRun |= (uint16_t)pbPairs[offPairs + 1] <<  8; RT_FALL_THRU();
1055
                    case 1: cClustersInRun |= (uint16_t)pbPairs[offPairs + 0] <<  0; RT_FALL_THRU();
1055
                    case 1: cClustersInRun |= (uint16_t)pbPairs[offPairs + 0] <<  0;
1056
                }
1056
                }
1057
                offPairs += cbRunField;
1057
                offPairs += cbRunField;
1058
                AssertBreakStmt(cClustersInRun <= cMaxClustersInRun,
1058
                AssertBreakStmt(cClustersInRun <= cMaxClustersInRun,
(-)a/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c.ORIG (+3 lines)
Lines 36-41 Link Here
36
#include <iprt/errcore.h>
36
#include <iprt/errcore.h>
37
#include "internal/thread.h"
37
#include "internal/thread.h"
38
38
39
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 
40
    #include <uapi/linux/sched/types.h> 
41
#endif /* >= KERNEL_VERSION(4, 11, 0) */ 
39
42
40
RTDECL(RTTHREAD) RTThreadSelf(void)
43
RTDECL(RTTHREAD) RTThreadSelf(void)
41
{
44
{

Return to bug 701266