diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-08-15 16:21:05 +0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-08-20 18:15:28 +0400 |
commit | 3ef0296a0b77d70585e23be93a5144e764a2781e (patch) | |
tree | 1fea4c08b58d175328176b5d297c44651ac532ae /drivers | |
parent | e201bfcc5c4fe6d58ce2b21fb4f4c2a2f0ab7ab8 (diff) | |
download | linux-3ef0296a0b77d70585e23be93a5144e764a2781e.tar.xz |
xen/events: document behaviour when scanning the start word for events
The original comment on the scanning of the start word on the 2nd pass
did not reflect the actual behaviour (the code was incorrectly masking
bit_idx instead of the pending word itself).
The documented behaviour is not actually required since if event were
pending in the MSBs, they would be immediately scanned anyway as we go
through the loop again.
Update the documentation to reflect this (instead of trying to change
the behaviour).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/xen/events.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index c8b9d9fc77b5..0b14a9bbbb0a 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -1388,14 +1388,21 @@ static void __xen_evtchn_do_upcall(void) pending_bits = active_evtchns(cpu, s, word_idx); bit_idx = 0; /* usually scan entire word from start */ + /* + * We scan the starting word in two parts. + * + * 1st time: start in the middle, scanning the + * upper bits. + * + * 2nd time: scan the whole word (not just the + * parts skipped in the first pass) -- if an + * event in the previously scanned bits is + * pending again it would just be scanned on + * the next loop anyway. + */ if (word_idx == start_word_idx) { - /* We scan the starting word in two parts */ if (i == 0) - /* 1st time: start in the middle */ bit_idx = start_bit_idx; - else - /* 2nd time: mask bits done already */ - bit_idx &= (1UL << start_bit_idx) - 1; } do { |