File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -774,7 +774,7 @@ vlapic_process_eoi(struct vlapic *vlapic)
774
774
tmrptr = & lapic -> tmr [0 ];
775
775
776
776
for (i = 7 ; i >= 0 ; i -- ) {
777
- bitpos = fls (isrptr [i ].val );
777
+ bitpos = fls32 (isrptr [i ].val );
778
778
if (bitpos != INVALID_BIT_INDEX ) {
779
779
if (vlapic -> isrvec_stk_top <= 0 ) {
780
780
panic ("invalid vlapic isrvec_stk_top %d" ,
@@ -1145,7 +1145,7 @@ vlapic_pending_intr(struct vlapic *vlapic, uint32_t *vecptr)
1145
1145
1146
1146
for (i = 7 ; i >= 0 ; i -- ) {
1147
1147
val = atomic_load ((int * )& irrptr [i ].val );
1148
- bitpos = fls (val );
1148
+ bitpos = fls32 (val );
1149
1149
if (bitpos != INVALID_BIT_INDEX ) {
1150
1150
vector = (uint32_t )(i * 32 ) + (uint32_t )bitpos ;
1151
1151
if (PRIO (vector ) > PRIO (lapic -> ppr )) {
Original file line number Diff line number Diff line change 42
42
43
43
/**
44
44
*
45
- * fls - Find the Last (most significant) bit Set in value and
45
+ * fls32 - Find the Last (most significant) bit Set in value and
46
46
* return the bit index of that bit.
47
47
*
48
48
* Bits are numbered starting at 0,the least significant bit.
49
49
* A return value of INVALID_BIT_INDEX means return value is
50
50
* invalid bit index when the input argument was zero.
51
51
*
52
52
* Examples:
53
- * fls (0x0) = INVALID_BIT_INDEX
54
- * fls (0x01) = 0
55
- * fls (0x80) = 7
53
+ * fls32 (0x0) = INVALID_BIT_INDEX
54
+ * fls32 (0x01) = 0
55
+ * fls32 (0x80) = 7
56
56
* ...
57
- * fls (0x80000001) = 31
57
+ * fls32 (0x80000001) = 31
58
58
*
59
59
* @param value: 'uint32_t' type value
60
60
*
63
63
* set and return the invalid bit index directly.
64
64
*
65
65
* **/
66
- static inline uint16_t fls (uint32_t value )
66
+ static inline uint16_t fls32 (uint32_t value )
67
67
{
68
68
uint32_t ret = 0U ;
69
69
if (value == 0U )
@@ -147,7 +147,7 @@ static inline uint16_t clz(uint32_t value)
147
147
if (value == 0U )
148
148
return 32U ;
149
149
else {
150
- return (31U - fls (value ));
150
+ return (31U - fls32 (value ));
151
151
}
152
152
}
153
153
You can’t perform that action at this time.
0 commit comments