- Timestamp:
- Oct 5, 2016 12:34:24 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
r62477 r64153 39 39 #include "r0drv/mp-r0drv.h" 40 40 41 #ifdef nr_cpumask_bits 42 # define VBOX_NR_CPUMASK_BITS nr_cpumask_bits 43 #else 44 # define VBOX_NR_CPUMASK_BITS NR_CPUS 45 #endif 41 46 42 47 RTDECL(RTCPUID) RTMpCpuId(void) … … 63 68 RTDECL(int) RTMpCpuIdToSetIndex(RTCPUID idCpu) 64 69 { 65 return idCpu < RTCPUSET_MAX_CPUS && idCpu < NR_CPUS ? (int)idCpu : -1;70 return idCpu < RTCPUSET_MAX_CPUS && idCpu < VBOX_NR_CPUMASK_BITS ? (int)idCpu : -1; 66 71 } 67 72 RT_EXPORT_SYMBOL(RTMpCpuIdToSetIndex); … … 70 75 RTDECL(RTCPUID) RTMpCpuIdFromSetIndex(int iCpu) 71 76 { 72 return iCpu < NR_CPUS ? (RTCPUID)iCpu : NIL_RTCPUID;77 return iCpu < VBOX_NR_CPUMASK_BITS ? (RTCPUID)iCpu : NIL_RTCPUID; 73 78 } 74 79 RT_EXPORT_SYMBOL(RTMpCpuIdFromSetIndex); … … 77 82 RTDECL(RTCPUID) RTMpGetMaxCpuId(void) 78 83 { 79 return NR_CPUS - 1; //???84 return VBOX_NR_CPUMASK_BITS - 1; //??? 80 85 } 81 86 RT_EXPORT_SYMBOL(RTMpGetMaxCpuId); … … 85 90 { 86 91 #if defined(CONFIG_SMP) 87 if (RT_UNLIKELY(idCpu >= NR_CPUS))92 if (RT_UNLIKELY(idCpu >= VBOX_NR_CPUMASK_BITS)) 88 93 return false; 89 94 … … 140 145 { 141 146 #ifdef CONFIG_SMP 142 if (RT_UNLIKELY(idCpu >= NR_CPUS))147 if (RT_UNLIKELY(idCpu >= VBOX_NR_CPUMASK_BITS)) 143 148 return false; 144 149 # ifdef cpu_online
Note:
See TracChangeset
for help on using the changeset viewer.