Changeset 2980 in vbox for trunk/src/VBox/HostDrivers/Support/linux
- Timestamp:
- Jun 1, 2007 3:56:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r2898 r2980 4 4 5 5 /* 6 * Copyright (C) 2006 InnoTek SystemberatungGmbH6 * Copyright (C) 2006-2007 innotek GmbH 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1274 1274 #ifdef CONFIG_SMP 1275 1275 unsigned i; 1276 #endif 1276 #endif 1277 1277 dprintf(("VBoxSupDrvInitGip:\n")); 1278 1278 … … 1319 1319 g_GipTimer.expires = jiffies; 1320 1320 #ifdef CONFIG_SMP 1321 for (i = 0; i < RT_ELEMENTS(pDevExt->aCPUs); i++) 1321 for (i = 0; i < RT_ELEMENTS(pDevExt->aCPUs); i++) 1322 1322 { 1323 1323 pDevExt->aCPUs[i].u64LastMonotime = pDevExt->u64LastMonotime; … … 1329 1329 pDevExt->aCPUs[i].Timer.expires = jiffies; 1330 1330 } 1331 #endif 1331 #endif 1332 1332 1333 1333 return 0; … … 1347 1347 #ifdef CONFIG_SMP 1348 1348 unsigned i; 1349 #endif 1349 #endif 1350 1350 dprintf(("VBoxSupDrvTermGip:\n")); 1351 1351 … … 1359 1359 if (timer_pending(&pDevExt->aCPUs[i].Timer)) 1360 1360 del_timer_sync(&pDevExt->aCPUs[i].Timer); 1361 #endif 1361 #endif 1362 1362 1363 1363 /* … … 1385 1385 /** 1386 1386 * Timer callback function. 1387 * 1388 * In ASYNC TSC mode this is called on the primary CPU, and we're 1387 * 1388 * In ASYNC TSC mode this is called on the primary CPU, and we're 1389 1389 * assuming that the CPU remains online. 1390 * 1390 * 1391 1391 * @param ulUser The device extension pointer. 1392 1392 */ … … 1407 1407 1408 1408 #ifdef CONFIG_SMP 1409 if (pGip && pGip->u32Mode == SUPGIPMODE_ASYNC_TSC) 1409 if (pGip && pGip->u32Mode == SUPGIPMODE_ASYNC_TSC) 1410 1410 { 1411 1411 uint8_t iCPU = ASMGetApicId(); … … 1443 1443 /** 1444 1444 * Timer callback function for the other CPUs. 1445 * 1445 * 1446 1446 * @param iTimerCPU The APIC ID of this timer. 1447 1447 */ … … 1459 1459 pGip = pDevExt->pGip; 1460 1460 iCPU = ASMGetApicId(); 1461 1461 1462 1462 if (RT_LIKELY(iCPU < RT_ELEMENTS(pGip->aCPUs))) 1463 1463 { 1464 if (RT_LIKELY(iTimerCPU == iCPU)) 1464 if (RT_LIKELY(iTimerCPU == iCPU)) 1465 1465 { 1466 1466 unsigned long ulNow = jiffies; … … 1483 1483 } 1484 1484 else 1485 printk("vboxdrv: error: APIC ID is bogus (GIP CPU update): apicid=%d max=%d cpuid=%d\n", 1485 printk("vboxdrv: error: APIC ID is bogus (GIP CPU update): apicid=%d max=%d cpuid=%d\n", 1486 1486 iCPU, RT_ELEMENTS(pGip->aCPUs), smp_processor_id()); 1487 1487 … … 1598 1598 ASMAtomicXchgU8(&pDevExt->fGIPSuspended, false); 1599 1599 #ifdef CONFIG_SMP 1600 if (pDevExt->pGip->u32Mode != SUPGIPMODE_ASYNC_TSC) 1600 if (pDevExt->pGip->u32Mode != SUPGIPMODE_ASYNC_TSC) 1601 1601 #endif 1602 1602 mod_timer(&g_GipTimer, jiffies); … … 1607 1607 smp_call_function(VBoxSupGipResumePerCpu, pDevExt, 0 /* retry */, 1 /* wait */); 1608 1608 } 1609 #endif 1609 #endif 1610 1610 } 1611 1611 … … 1614 1614 /** 1615 1615 * Callback for resuming GIP updating on the other CPUs. 1616 * 1616 * 1617 1617 * This is only used when the GIP is in async tsc mode. 1618 * 1618 * 1619 1619 * @param pvUser Pointer to the device instance. 1620 1620 */ … … 1626 1626 if (RT_UNLIKELY(iCPU >= RT_ELEMENTS(pDevExt->pGip->aCPUs))) 1627 1627 { 1628 printk("vboxdrv: error: apicid=%d max=%d cpuid=%d\n", 1628 printk("vboxdrv: error: apicid=%d max=%d cpuid=%d\n", 1629 1629 iCPU, RT_ELEMENTS(pDevExt->pGip->aCPUs), smp_processor_id()); 1630 1630 return; … … 1646 1646 #ifdef CONFIG_SMP 1647 1647 unsigned i; 1648 #endif 1648 #endif 1649 1649 dprintf2(("supdrvOSGipSuspend:\n")); 1650 1650 ASMAtomicXchgU8(&pDevExt->fGIPSuspended, true); … … 1656 1656 if (timer_pending(&pDevExt->aCPUs[i].Timer)) 1657 1657 del_timer_sync(&pDevExt->aCPUs[i].Timer); 1658 #endif 1658 #endif 1659 1659 } 1660 1660 … … 1674 1674 #else 1675 1675 return 1; 1676 #endif 1676 #endif 1677 1677 } 1678 1678 … … 1767 1767 module_exit(VBoxSupDrvUnload); 1768 1768 1769 MODULE_AUTHOR(" InnoTek SystemberatungGmbH");1769 MODULE_AUTHOR("innotek GmbH"); 1770 1770 MODULE_DESCRIPTION("VirtualBox Support Driver"); 1771 1771 MODULE_LICENSE("GPL");
Note:
See TracChangeset
for help on using the changeset viewer.