mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-09-21 17:13:50 +08:00
libmetal: set ept address loop++ in bitmap
CPU0 CPU1
create_ept1:addr1 create_ept1
OK <====== msg1
OK <====== msg2
OK <====== msg3
msg4
<====== msg4 on the virtioqueue
close_ept1 close_ept1
create_ept2:addr1 create_ept1
(same addr with ept1)
msg4
ept2 recv ept1 msg ERROR <======
The msg4 which belong to ep1, error received by ept2.
For the issue, I give a resolve method,
for the rpmsg_get_address(), always return a new increased num.
Signed-off-by: Guiding Li <liguiding1@xiaomi.com>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
e087ea5d38
commit
694620ff25
+2
-2
@@ -134,10 +134,10 @@ metal_bitmap_next_clear_bit(unsigned long *bitmap, unsigned int start,
|
||||
unsigned int bit;
|
||||
|
||||
for (bit = start;
|
||||
bit < max && !metal_bitmap_is_bit_clear(bitmap, bit);
|
||||
bit < max + start && !metal_bitmap_is_bit_clear(bitmap, bit % max);
|
||||
bit++)
|
||||
;
|
||||
return bit;
|
||||
return bit % max;
|
||||
}
|
||||
|
||||
#define metal_bitmap_for_each_clear_bit(bitmap, bit, max) \
|
||||
|
||||
Reference in New Issue
Block a user