|
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 |
|