Message ID | 1472031083-20720-2-git-send-email-bmeng.cn@gmail.com |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
On 24 August 2016 at 03:31, Bin Meng <bmeng.cn@gmail.com> wrote: > U-Boot itself as EFI payload is still running in 32-bit mode. > So BITS_PER_LONG should still be 32. This fixes the warnings > when building EFI 64-bit payload. > > include/asm-generic/bitops/__fls.h:17:2: > warning: left shift count >= width of type > if (!(word & (~0ul << 32))) { > ^ > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > arch/x86/include/asm/types.h | 4 ---- > lib/efi/efi_stub.c | 1 - > 2 files changed, 5 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
On Wed, Aug 24, 2016 at 8:53 PM, Simon Glass <sjg@chromium.org> wrote: > On 24 August 2016 at 03:31, Bin Meng <bmeng.cn@gmail.com> wrote: >> U-Boot itself as EFI payload is still running in 32-bit mode. >> So BITS_PER_LONG should still be 32. This fixes the warnings >> when building EFI 64-bit payload. >> >> include/asm-generic/bitops/__fls.h:17:2: >> warning: left shift count >= width of type >> if (!(word & (~0ul << 32))) { >> ^ >> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> >> --- >> >> arch/x86/include/asm/types.h | 4 ---- >> lib/efi/efi_stub.c | 1 - >> 2 files changed, 5 deletions(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> Sorry this patch needs rework as 64-bit payload does not boot. I will work on a v2. Regards, Bin
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h index 766617f..880dcb4 100644 --- a/arch/x86/include/asm/types.h +++ b/arch/x86/include/asm/types.h @@ -44,11 +44,7 @@ typedef __INT64_TYPE__ s64; typedef __UINT64_TYPE__ u64; #endif -#ifdef CONFIG_EFI_STUB_64BIT -#define BITS_PER_LONG 64 -#else #define BITS_PER_LONG 32 -#endif /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index 1814960..a02d06c 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -297,7 +297,6 @@ efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table) size = 0; ret = boot->get_memory_map(&size, NULL, &key, &desc_size, &version); if (ret != EFI_BUFFER_TOO_SMALL) { - printhex2(BITS_PER_LONG); printhex2(ret); puts(" No memory map\n"); return ret;
U-Boot itself as EFI payload is still running in 32-bit mode. So BITS_PER_LONG should still be 32. This fixes the warnings when building EFI 64-bit payload. include/asm-generic/bitops/__fls.h:17:2: warning: left shift count >= width of type if (!(word & (~0ul << 32))) { ^ Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- arch/x86/include/asm/types.h | 4 ---- lib/efi/efi_stub.c | 1 - 2 files changed, 5 deletions(-)