Commit 640f842
LoongArch: KVM: Rework kvm_send_pv_ipi()
The function in fact traverses a "bitmap" stored in GPR regs A1 and A2,
but does it in a non-obvious way by creating a single-word bitmap twice.
This patch switches the function to create a single 2-word bitmap, and
also employs for_each_set_bit() macro, as it helps to drop most of the
housekeeping code.
While there, convert the function to return void to not confuse readers
with unchecked result.
Reviewed-by: Bibo Mao <[email protected]>
Signed-off-by: Yury Norov (NVIDIA) <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>1 parent 89be9a8 commit 640f842
1 file changed
+12
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
| 824 | + | |
825 | 825 | | |
826 | | - | |
827 | | - | |
| 826 | + | |
828 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
829 | 832 | | |
830 | 833 | | |
831 | | - | |
832 | | - | |
833 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
834 | 837 | | |
835 | 838 | | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
847 | 842 | | |
848 | | - | |
849 | | - | |
850 | 843 | | |
851 | 844 | | |
852 | 845 | | |
| |||
0 commit comments