[PATCH 1/5] ARM: findbit: document ARMv5 bit offset calculation

Linus Torvalds torvalds at linux-foundation.org
Fri Oct 28 12:10:16 PDT 2022


On Fri, Oct 28, 2022 at 12:01 PM Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> In contrast, the arm code doesn't do the "min()" at all, and if there
> are bits after the bitmap (in a partial byte), it will just return
> those bits.

No, I did misread the code. It returns 'size' for the no bits case,
and the 'movlo r0, r1'; does the right thing for the "bits past the
end" case too.

I guess I need to get better at reading arm asm.

                Linus



More information about the linux-arm-kernel mailing list