kexec: i386: Fix 32-bit right shifts on 32-bit architectures
32-bit compilation makes compiler unhappy about too big right shifts.
Use a similar trick to Linux kernel project by replacing foo >> 32 by
(foo >> 16) >> 16.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Simon Horman <horms@kernel.org>
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index 73251b9..efb6e2c 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -99,11 +99,11 @@
if (real_mode->protocol_version >= 0x020c &&
(initrd_base & 0xffffffffUL) != initrd_base)
- real_mode->ext_ramdisk_image = initrd_base >> 32;
+ real_mode->ext_ramdisk_image = (initrd_base >> 16) >> 16;
if (real_mode->protocol_version >= 0x020c &&
(initrd_size & 0xffffffffUL) != initrd_size)
- real_mode->ext_ramdisk_size = initrd_size >> 32;
+ real_mode->ext_ramdisk_size = (initrd_size >> 16) >> 16;
/* The location of the command line */
/* if (real_mode_base == 0x90000) { */
@@ -117,7 +117,7 @@
real_mode->cmd_line_ptr = cmd_line_ptr & 0xffffffffUL;
if ((real_mode->protocol_version >= 0x020c) &&
((cmd_line_ptr & 0xffffffffUL) != cmd_line_ptr))
- real_mode->ext_cmd_line_ptr = cmd_line_ptr >> 32;
+ real_mode->ext_cmd_line_ptr = (cmd_line_ptr >> 16) >> 16;
}
/* Fill in the command line */
@@ -172,7 +172,7 @@
real_mode->vesapm_seg = 0;
if (fix.smem_start > 0xffffffffUL) {
- real_mode->ext_lfb_base = fix.smem_start >> 32;
+ real_mode->ext_lfb_base = (fix.smem_start >> 16) >> 16;
real_mode->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
}