Changeset 8837 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- May 15, 2008 9:35:01 AM (17 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDRV.h
r8789 r8837 711 711 /** Flag to force async GIP timer mode. */ 712 712 BOOLEAN fForceAsyncTsc; 713 /** Current CPU affinity mask. */ 714 KAFFINITY uAffinityMask; 713 715 #endif 714 716 #ifdef RT_OS_LINUX … … 760 762 void VBOXCALL supdrvOSGipResume(PSUPDRVDEVEXT pDevExt); 761 763 void VBOXCALL supdrvOSGipSuspend(PSUPDRVDEVEXT pDevExt); 762 unsigned VBOXCALL supdrvOSGetCPUCount( void);764 unsigned VBOXCALL supdrvOSGetCPUCount(PSUPDRVDEVEXT pDevExt); 763 765 bool VBOXCALL supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt); 764 766 #endif -
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r8810 r8837 3916 3916 * can be relied upon to have somewhat uniform TSC between the cpus. 3917 3917 */ 3918 if (supdrvOSGetCPUCount( ) > 1)3918 if (supdrvOSGetCPUCount(pDevExt) > 1) 3919 3919 { 3920 3920 uint32_t uEAX, uEBX, uECX, uEDX; -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r8789 r8837 1386 1386 * @returns Number of cpus. 1387 1387 */ 1388 unsigned VBOXCALL supdrvOSGetCPUCount( void)1388 unsigned VBOXCALL supdrvOSGetCPUCount(PSUPDRVDEVEXT pDevExt) 1389 1389 { 1390 1390 #ifdef CONFIG_SMP -
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r8833 r8837 537 537 } 538 538 539 /* Note: We need to register a callback handler for added cpus (only available in win2k8: KeRegisterProcessorChangeCallback) */ 540 /* Note: We are not allowed to call KeQueryActiveProcessors at DPC_LEVEL, so we now assume cpu affinity mask does NOT change. */ 541 pDevExt->uAffinityMask = KeQueryActiveProcessors(); 542 539 543 dprintf(("VBoxDrvNtGipInit: ulClockFreq=%ld ulClockInterval=%ld ulClockIntervalActual=%ld Phys=%x%08x\n", 540 544 ulClockFreq, ulClockInterval, ulClockIntervalActual, Phys.HighPart, Phys.LowPart)); … … 626 630 KIRQL oldIrql; 627 631 628 /* KeQueryActiveProcessors must be executed at IRQL < DISPATCH_LEVEL */ 629 Assert(KeGetCurrentIrql() < DISPATCH_LEVEL); 630 KAFFINITY Mask = KeQueryActiveProcessors(); 632 KAFFINITY Mask = pDevExt->uAffinityMask; 631 633 632 634 /* Raise the IRQL to DISPATCH_LEVEL so we can't be rescheduled to another cpu */ … … 756 758 * Get the current CPU count. 757 759 * @returns Number of cpus. 758 * /759 unsigned VBOXCALL supdrvOSGetCPUCount(void) 760 { 761 /* KeQueryActiveProcessors must be executed at IRQL < DISPATCH_LEVEL */ 762 Assert(KeGetCurrentIrql() < DISPATCH_LEVEL); 763 KAFFINITY Mask = KeQueryActiveProcessors();760 * 761 * @param pDevExt Instance data. 762 */ 763 unsigned VBOXCALL supdrvOSGetCPUCount(PSUPDRVDEVEXT pDevExt) 764 { 765 KAFFINITY Mask = pDevExt->uAffinityMask; 764 766 unsigned cCpus = 0; 765 767 unsigned iBit;
Note:
See TracChangeset
for help on using the changeset viewer.