VirtualBox

Changeset 6845 in vbox


Ignore:
Timestamp:
Feb 7, 2008 12:50:50 PM (17 years ago)
Author:
vboxsync
Message:

Fix a soon to appear post-2.6.24 linux kernel issue dropping a macro definition. Used the opportunity to make the linux support driver use the-linux-kernel.h, too, and move common hacks there. Left the host driver specific things where they were.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r5999 r6845  
    163163vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
    164164endif
    165 vboxdrv_INCS         := $(PATH_SUB_CURRENT)
     165vboxdrv_INCS         := \
     166        $(PATH_SUB_CURRENT) \
     167        $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
    166168vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
    167169vboxdrv_LIBS.debug    = $(vboxdrv_LIBS) $(VBOX_GCC_LIBGCC)
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r6418 r6845  
    3030*******************************************************************************/
    3131#include "SUPDRV.h"
     32#include "the-linux-kernel.h"
    3233#include "version-generated.h"
    3334
     
    4041#include <iprt/mem.h>
    4142
    42 #include <linux/module.h>
    43 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    44 # include <linux/moduleparam.h>
    45 #endif
    46 #include <linux/kernel.h>
    47 #include <linux/init.h>
    48 #include <linux/fs.h>
    49 #include <linux/mm.h>
    50 #include <linux/pagemap.h>
    5143#include <linux/sched.h>
    52 #include <linux/slab.h>
    53 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    54 # include <linux/jiffies.h>
    55 #endif
    56 #include <asm/mman.h>
    57 #include <asm/io.h>
    58 #include <asm/uaccess.h>
    5944#ifdef CONFIG_DEVFS_FS
    6045# include <linux/devfs_fs_kernel.h>
     
    6954# endif
    7055#endif
    71 #ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
    72 # include <linux/smp_lock.h>
    73 #endif
    7456
    7557#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    76 # ifndef page_to_pfn
    77 #  define page_to_pfn(page) ((page) - mem_map)
    78 # endif
    7958# include <asm/pgtable.h>
    8059# define global_flush_tlb __flush_tlb_global
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.mod.c

    r5999 r6845  
    2727
    2828#include "SUPDRV.h" /* for KBUILD_STR */
    29 #include <linux/module.h>
    30 #include <linux/vermagic.h>
    31 #include <linux/compiler.h>
     29#include "the-linux-kernel.h"
    3230
    3331MODULE_INFO(vermagic, VERMAGIC_STRING);
  • trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h

    r5999 r6845  
    6464#include <asm/semaphore.h>
    6565#include <linux/module.h>
     66#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     67# include <linux/moduleparam.h>
     68#endif
     69#include <linux/vermagic.h>
    6670#include <linux/kernel.h>
    6771#include <linux/init.h>
     
    8084#include <linux/interrupt.h>
    8185#include <linux/completion.h>
     86#include <linux/compiler.h>
     87#ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
     88# include <linux/smp_lock.h>
     89#endif
    8290/* For the shared folders module */
    8391#include <linux/vmalloc.h>
     
    227235#undef bool
    228236
    229 #endif
    230 
     237/*
     238 * There are post-2.6.24 kernels (confusingly with unchanged version number)
     239 * which eliminate macros which were marked as deprecated.
     240 */
     241#ifndef __attribute_used__
     242#define __attribute_used__ __used
     243#endif
     244
     245#endif
     246
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