All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohan Kumar M <mohan@in.ibm.com>
To: Milton Miller <miltonm@bga.com>
Cc: Simon Horman <horms@verge.net.au>,
	Vivek Goyal <vgoyal@in.ibm.com>,
	fastboot@lists.osdl.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH kexec-tools] ppc64: correct @ha relocation
Date: Thu, 12 Apr 2007 13:47:16 +0530	[thread overview]
Message-ID: <20070412081716.GE4281@in.ibm.com> (raw)
In-Reply-To: <boot-4-kexec-02.miltonm@bga.com>

On Wed, Apr 11, 2007 at 03:30:00AM -0500, Milton Miller wrote:
> 
> The @ha relocation is supposed to account for the @l relocation being
> a signed quantity by adding 1 if the msb of @l is set.
> 
> The trick of adding 0x8000 stolen from the linux kernel file
> arch/powerpc/kernel/module_64.c which credits binutils.
> 
> Signed-off-by: Milton Miller <miltonm@bga.com>
>
Acked-by: Mohan Kumar M <mohan@in.ibm.com>


Cross checked with PPC64 ELF ABI also.
 
> --- 
> This relocation is used in v2wrap.S to hold and release the slave cpus.
> Without this fix the memory location may be 64k off the initialized variable
> which is checked against 0.
> 
> 
> --- kexec-tools-testing/kexec/arch/ppc64/kexec-elf-rel-ppc64.c.orig	2007-04-10 22:29:59.000000000 -0500
> +++ kexec-tools-testing/kexec/arch/ppc64/kexec-elf-rel-ppc64.c	2007-04-10 22:29:59.000000000 -0500
> @@ -97,7 +97,7 @@ void machine_apply_elf_rel(struct mem_eh
>  		break;
> 
>  	case R_PPC64_ADDR16_HA:
> -		*(uint16_t *)location = ((value>>16)  & 0xffff);
> +		*(uint16_t *)location = (((value+0x8000)>>16)  & 0xffff);
>  		break;
> 
>  	case R_PPC64_ADDR16_HIGHEST:

  parent reply	other threads:[~2007-04-12  8:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11  8:28 [PATCH 0/3+2+8] powerpc zImage kexec Milton Miller
2007-04-11  8:29 ` [PATCH HACK kexec-tools-testing] malloc corruption hack Milton Miller
2007-04-11  8:30 ` [PATCH kexec-tools] ppc64: correct @ha relocation Milton Miller
2007-04-12  3:24   ` Simon Horman
2007-04-12  3:57     ` [Fastboot] " Simon Horman
2007-04-12  8:17   ` Mohan Kumar M [this message]
2007-04-13  1:35     ` Simon Horman
2007-04-11  8:30 ` [PATCH kexec-tools] ppc64: use kernels slave loop for purgatory Milton Miller
2007-04-13  1:34   ` Simon Horman
2007-04-11  8:31 ` [PATCH] export retained initrd in debugfs Milton Miller
2007-04-12  6:17   ` Michael Neuling
2007-04-11  8:32 ` [PATCH] kexec: send slaves to new kernel earlier Milton Miller
2007-04-11  8:32 ` [PATCH 1/8] boot: more verbose gunzip error message Milton Miller
2007-04-12  7:46   ` David Gibson
2007-04-11  8:32 ` [PATCH 2/8] bootwrapper: smp support code Milton Miller
2007-04-11  8:32 ` [PATCH 3/8] bootwrapper: occuppied memory ranges Milton Miller
2007-04-11  8:33 ` [PATCH 4/8] bootwrapper: help for 64 bit cpus Milton Miller
2007-04-12  7:43   ` Segher Boessenkool
2007-04-12  8:49     ` Benjamin Herrenschmidt
2007-04-11  8:33 ` [PATCH 5/8] bootwrapper: Add kexec callable zImage wrapper Milton Miller
2007-04-11  8:33 ` [PATCH 6/8] bootwrapper: convert flatdevtree to version 16 Milton Miller
2007-04-11 16:30   ` Scott Wood
2007-04-12 16:56     ` Milton Miller
2007-04-11  8:34 ` [PATCH 7/8] bootwrapper: rtas support Milton Miller
2007-04-11  8:34 ` [PATCH 8/8] bootwrapper: example sreset marshalling Milton Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070412081716.GE4281@in.ibm.com \
    --to=mohan@in.ibm.com \
    --cc=fastboot@lists.osdl.org \
    --cc=horms@verge.net.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=vgoyal@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.