View | Details | Raw Unified | Return to bug 115800
Collapse All | Expand All

(-)NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv-linux.h (-5 / +5 lines)
Lines 120-135 Link Here
120
#include <linux/agpgart.h>
120
#include <linux/agpgart.h>
121
#include <asm/agp.h>
121
#include <asm/agp.h>
122
#endif
122
#ifndef phys_to_gart
123
#ifndef phys_to_gart
123
#define phys_to_gart(x) (virt_to_bus(phys_to_virt(x)))
124
#define phys_to_gart(x) virt_to_bus(phys_to_virt(x))
124
#define gart_to_phys(x) (virt_to_phys(bus_to_virt(x)))
125
#define gart_to_phys(x) virt_to_phys(bus_to_virt(x))
125
#define virt_to_gart(x) (virt_to_bus(x))
126
#define virt_to_gart(x) virt_to_bus(x)
126
#define gart_to_virt(x) (bus_to_virt(x))
127
#define gart_to_virt(x) bus_to_virt(x)
127
#else
128
#else
128
#ifndef virt_to_gart
129
#ifndef virt_to_gart
129
#define virt_to_gart(x) (phys_to_gart(virt_to_phys(x)))
130
#define virt_to_gart(x) (phys_to_gart(virt_to_phys(x)))
130
#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x)))
131
#define gart_to_virt(x) (phys_to_virt(gart_to_phys(x)))
131
#endif
132
#endif
132
#endif
133
#endif
133
#endif
134
134
135
#if defined(NVCPU_X86) || defined(NVCPU_X86_64)
135
#if defined(NVCPU_X86) || defined(NVCPU_X86_64)
(-)NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv.orig/nv.c (+15 lines)
Lines 35-41 static struct pm_dev *apm_nv_dev[NV_MAX_ Link Here
35
35
36
int nv_pat_enabled = 0;
36
int nv_pat_enabled = 0;
37
37
38
#ifdef CONFIG_XEN
39
static int nv_enable_xen=0;
40
NV_MODULE_PARAMETER(nv_enable_xen);
41
static int nv_disable_pat = 1;
42
#else
38
static int nv_disable_pat = 0;
43
static int nv_disable_pat = 0;
44
#endif
39
NV_MODULE_PARAMETER(nv_disable_pat);
45
NV_MODULE_PARAMETER(nv_disable_pat);
40
46
41
/*
47
/*
Lines 751-758 static inline void __nv_disable_caches(u Link Here
751
    unsigned long cr0 = read_cr0();
757
    unsigned long cr0 = read_cr0();
752
    write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
758
    write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
753
    wbinvd();
759
    wbinvd();
760
#ifndef CONFIG_XEN
754
    *cr4 = read_cr4();
761
    *cr4 = read_cr4();
755
    if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
762
    if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
763
#endif
756
    __flush_tlb();
764
    __flush_tlb();
757
}
765
}
758
766
Lines 762-768 static inline void __nv_enable_caches(un Link Here
762
    wbinvd();
770
    wbinvd();
763
    __flush_tlb();
771
    __flush_tlb();
764
    write_cr0((cr0 & 0x9fffffff));
772
    write_cr0((cr0 & 0x9fffffff));
773
#ifndef CONFIG_XEN
765
    if (cr4 & 0x80) write_cr4(cr4);
774
    if (cr4 & 0x80) write_cr4(cr4);
775
#endif
766
}
776
}
767
777
768
static int __check_pat_support()
778
static int __check_pat_support()
Lines 993-998 static int __init nvidia_init_module(voi Link Here
993
        nv_printf(NV_DBG_ERRORS, "NVRM: No NVIDIA graphics adapter found!\n");
1003
        nv_printf(NV_DBG_ERRORS, "NVRM: No NVIDIA graphics adapter found!\n");
994
        return -ENODEV;
1004
        return -ENODEV;
995
    }
1005
    }
1006
#ifdef CONFIG_XEN
1007
    printk("NVIDIA driver not yet supported on xen, override with nv_enable_xen=1\n");
1008
    if (!nv_enable_xen)
1009
	    return -ENODEV;
1010
#endif
996
1011
997
    memset(nv_linux_devices, 0, sizeof(nv_linux_devices));
1012
    memset(nv_linux_devices, 0, sizeof(nv_linux_devices));
998
1013

Return to bug 115800