aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-01 13:42:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-01 13:42:35 -0500
commit4ca5ded2bdc09259ad89915bac2d218e72cda351 (patch)
tree0091afa0c67c4f111cf1840a4500a74763a23d08 /drivers
parented23690d507c557d048255c683af1e9d228bfbe1 (diff)
parent61684ceaad4f65d1a9832c722f7bd5e7fc714de9 (diff)
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86/agp: Fix agp_amd64_init regression x86: Add quirk for Intel DG45FC board to avoid low memory corruption x86: Add Dell OptiPlex 760 reboot quirk x86, UV: Fix RTC latency bug by reading replicated cachelines oprofile/x86: add Xeon 7500 series support oprofile/x86: fix crash when profiling more than 28 events lib/dma-debug.c: mark file-local struct symbol static. x86/amd-iommu: Fix deassignment of a device from the pt_domain x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt x86/amd-iommu: Fix NULL pointer dereference in __detach_device() x86/amd-iommu: Fix possible integer overflow
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/amd64-agp.c13
-rw-r--r--drivers/char/uv_mmtimer.c18
2 files changed, 20 insertions, 11 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 1afb8968a342..34cf04e21795 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -729,9 +729,6 @@ int __init agp_amd64_init(void)
729 if (agp_off) 729 if (agp_off)
730 return -EINVAL; 730 return -EINVAL;
731 731
732 if (gart_iommu_aperture)
733 return agp_bridges_found ? 0 : -ENODEV;
734
735 err = pci_register_driver(&agp_amd64_pci_driver); 732 err = pci_register_driver(&agp_amd64_pci_driver);
736 if (err < 0) 733 if (err < 0)
737 return err; 734 return err;
@@ -768,6 +765,14 @@ int __init agp_amd64_init(void)
768 return err; 765 return err;
769} 766}
770 767
768static int __init agp_amd64_mod_init(void)
769{
770 if (gart_iommu_aperture)
771 return agp_bridges_found ? 0 : -ENODEV;
772
773 return agp_amd64_init();
774}
775
771static void __exit agp_amd64_cleanup(void) 776static void __exit agp_amd64_cleanup(void)
772{ 777{
773 if (gart_iommu_aperture) 778 if (gart_iommu_aperture)
@@ -777,7 +782,7 @@ static void __exit agp_amd64_cleanup(void)
777 pci_unregister_driver(&agp_amd64_pci_driver); 782 pci_unregister_driver(&agp_amd64_pci_driver);
778} 783}
779 784
780module_init(agp_amd64_init); 785module_init(agp_amd64_mod_init);
781module_exit(agp_amd64_cleanup); 786module_exit(agp_amd64_cleanup);
782 787
783MODULE_AUTHOR("Dave Jones <davej@redhat.com>, Andi Kleen"); 788MODULE_AUTHOR("Dave Jones <davej@redhat.com>, Andi Kleen");
diff --git a/drivers/char/uv_mmtimer.c b/drivers/char/uv_mmtimer.c
index 867b67be9f0a..c7072ba14f48 100644
--- a/drivers/char/uv_mmtimer.c
+++ b/drivers/char/uv_mmtimer.c
@@ -89,13 +89,17 @@ static long uv_mmtimer_ioctl(struct file *file, unsigned int cmd,
89 switch (cmd) { 89 switch (cmd) {
90 case MMTIMER_GETOFFSET: /* offset of the counter */ 90 case MMTIMER_GETOFFSET: /* offset of the counter */
91 /* 91 /*
92 * UV RTC register is on its own page 92 * Starting with HUB rev 2.0, the UV RTC register is
93 * replicated across all cachelines of it's own page.
94 * This allows faster simultaneous reads from a given socket.
95 *
96 * The offset returned is in 64 bit units.
93 */ 97 */
94 if (PAGE_SIZE <= (1 << 16)) 98 if (uv_get_min_hub_revision_id() == 1)
95 ret = ((UV_LOCAL_MMR_BASE | UVH_RTC) & (PAGE_SIZE-1)) 99 ret = 0;
96 / 8;
97 else 100 else
98 ret = -ENOSYS; 101 ret = ((uv_blade_processor_id() * L1_CACHE_BYTES) %
102 PAGE_SIZE) / 8;
99 break; 103 break;
100 104
101 case MMTIMER_GETRES: /* resolution of the clock in 10^-15 s */ 105 case MMTIMER_GETRES: /* resolution of the clock in 10^-15 s */
@@ -115,8 +119,8 @@ static long uv_mmtimer_ioctl(struct file *file, unsigned int cmd,
115 ret = hweight64(UVH_RTC_REAL_TIME_CLOCK_MASK); 119 ret = hweight64(UVH_RTC_REAL_TIME_CLOCK_MASK);
116 break; 120 break;
117 121
118 case MMTIMER_MMAPAVAIL: /* can we mmap the clock into userspace? */ 122 case MMTIMER_MMAPAVAIL:
119 ret = (PAGE_SIZE <= (1 << 16)) ? 1 : 0; 123 ret = 1;
120 break; 124 break;
121 125
122 case MMTIMER_GETCOUNTER: 126 case MMTIMER_GETCOUNTER: