summaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/misc.c
diff options
context:
space:
mode:
authorPraneeth Bajjuri <praneeth@ti.com>2015-02-03 15:45:57 -0600
committerPraneeth Bajjuri <praneeth@ti.com>2015-02-03 15:45:57 -0600
commit95b851016f79c42a9e8a824c7c81e49015c17820 (patch)
tree61e096ff6a654315c40a00eaff682be00c50f861 /arch/x86/boot/compressed/misc.c
parentc73470c1da26dc543452fbff16a02beb62fec938 (diff)
parent94953719b7d459c72eede4a0164d49dfcfc76a94 (diff)
Merge branch 'p-ti-linux-3.14.y-android' of git://git.omapzoom.org/kernel/omap into p-ti-linux-3.14.y-android
* 'p-ti-linux-3.14.y-android' of git://git.omapzoom.org/kernel/omap: (216 commits) usb: dwc3: debugfs: dual role switch through debugfs entries ARM: DRA7: dts: Add coprocessor nodes for iva remoteproc/pruss: fix shutdown for manually booted PRU cores remoteproc/pruss: fix the cleanup path in pru_rproc_probe() UAPI: Increasing the max FRAME number to 128. gpio: mcp23s08: Set initial direction and value from DT firmware: Load VPDMA firmware from kernel iommu/omap: Fix a sleeping function invocation in atomic context bug media: ti-vpe: vpe: Add RGB565 and RGB5551 support media: ti-vpe: vpe: Post next descriptor only for list complete IRQ media: ti-vpe: vpe: Setup srcdst parameters in streamON omapdrm: Expose the OMAP pre-multiplied alpha property through DRM omapdrm: Expose the OMAP global alpha property through DRM ti_fragments: audio_display: enable BACKLIGHT_GPIO and PANEL_DPI ti_fragments: audio_display: clean up arm/dts: am57xx-evm: Add LCD support backlight: gpio-backlight: Add DT support arm/dts: dra7xx: fix display compatible strings OMAPDSS: add missing 'omapdss' prefixes to display drivers OMAPDSS: add dra7-dss to dt conversion list ... Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Diffstat (limited to 'arch/x86/boot/compressed/misc.c')
-rw-r--r--arch/x86/boot/compressed/misc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index eb25ca1eb6d..8f45c855f84 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -396,6 +396,8 @@ asmlinkage void *decompress_kernel(void *rmode, memptr heap,
unsigned long output_len,
unsigned long run_size)
{
+ unsigned char *output_orig = output;
+
real_mode = rmode;
sanitize_boot_params(real_mode);
@@ -444,7 +446,12 @@ asmlinkage void *decompress_kernel(void *rmode, memptr heap,
debug_putstr("\nDecompressing Linux... ");
decompress(input_data, input_len, NULL, NULL, output, NULL, error);
parse_elf(output);
- handle_relocations(output, output_len);
+ /*
+ * 32-bit always performs relocations. 64-bit relocations are only
+ * needed if kASLR has chosen a different load address.
+ */
+ if (!IS_ENABLED(CONFIG_X86_64) || output != output_orig)
+ handle_relocations(output, output_len);
debug_putstr("done.\nBooting the kernel.\n");
return output;
}