efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds
authorAtish Patra <atish.patra@wdc.com>
Thu, 25 Jun 2020 23:45:06 +0000 (16:45 -0700)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 9 Jul 2020 06:45:09 +0000 (09:45 +0300)
commit950accbabd4cfa83519fa920f99428bcc131c3c9
treed061b7f8c00e18417d62174940cc486decf6c47a
parentc1aac64ddc01112e137121a43645b96c3633c41b
efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds

32bit gcc doesn't support modulo operation on 64 bit data. It results in
a __umoddi3 error while building EFI for 32 bit.

Use bitwise operations instead of modulo operations to fix the issue.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Link: https://lore.kernel.org/r/20200625234516.31406-2-atish.patra@wdc.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/alignedmem.c