All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki Poulose <suzuki@in.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Scott Wood <scottwood@freescale.com>,
	Josh Poimboeuf <jpoimboe@linux.vnet.ibm.com>,
	linux ppc dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [UPDATED] [PATCH v4 3/7] [ppc] Process dynamic relocations for kernel
Date: Tue, 13 Dec 2011 07:54:24 +0530	[thread overview]
Message-ID: <4EE6B758.9070902@in.ibm.com> (raw)
In-Reply-To: <485863B3-91BC-4488-9CA8-4F902D85D8F6@kernel.crashing.org>

On 12/11/11 01:32, Segher Boessenkool wrote:
> Hi Suzuki,
>
> Looks quite good, a few comments...
>
>> +get_type:
>> + /* r4 holds the relocation type */
>> + extrwi r4, r4, 8, 24 /* r4 = ((char*)r4)[3] */
>
> This comment is confusing (only makes sense together with the
> lwz a long way up).

Agree, will fix them.
>
>> +nxtrela:
>> + /*
>> + * We have to flush the modified instructions to the
>> + * main storage from the d-cache. And also, invalidate the
>> + * cached instructions in i-cache which has been modified.
>> + *
>> + * We delay the msync / isync operation till the end, since
>> + * we won't be executing the modified instructions until
>> + * we return from here.
>> + */
>> + dcbst r4,r7
>> + icbi r4,r7
>
> You still need a sync between these two. Without it, the icbi can
> complete before the dcbst for the same address does, which leaves
> room for an instruction fetch from that address to get old data.
>
Ok.
>> + cmpwi r8, 0 /* relasz = 0 ? */
>> + ble done
>> + add r9, r9, r6 /* move to next entry in the .rela table */
>> + subf r8, r6, r8 /* relasz -= relaent */
>> + b applyrela
>> +
>> +done:
>> + msync /* Wait for the flush to finish */
>
> The instruction is called "sync". msync is a BookE thing.
>
>> next if (/R_PPC64_RELATIVE/ or /R_PPC64_NONE/ or
>> /R_PPC64_ADDR64\s+mach_/);
>> + next if (/R_PPC_ADDR16_LO/ or /R_PPC_ADDR16_HI/ or
>> + /R_PPC_ADDR16_HA/ or /R_PPC_RELATIVE/);
>
> Nothing new, but these should probably have \b or \s or just
> a space on each side.
Will fix this too. Also will include the R_PPC_NONE to the list
of valid relocations.

Thanks
Suzuki


>
>
> Segher
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>

  reply	other threads:[~2011-12-13  2:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09 11:43 [PATCH v4 0/7] Kudmp support for PPC440x Suzuki K. Poulose
2011-12-09 11:43 ` [PATCH v4 1/7] [booke] Rename mapping based RELOCATABLE to DYNAMIC_MEMSTART for BookE Suzuki K. Poulose
2011-12-09 11:47 ` [PATCH v4 2/7] [44x] Enable DYNAMIC_MEMSTART for 440x Suzuki K. Poulose
2011-12-09 11:47 ` [PATCH v4 3/7] [ppc] Process dynamic relocations for kernel Suzuki K. Poulose
2011-12-09 13:40   ` Josh Boyer
2011-12-10  2:35     ` Suzuki Poulose
2011-12-10  2:37   ` [UPDATED] " Suzuki K. Poulose
2011-12-10 20:02     ` Segher Boessenkool
2011-12-13  2:24       ` Suzuki Poulose [this message]
2011-12-09 11:47 ` [PATCH v4 4/7] [ppc] Define virtual-physical translations for RELOCATABLE Suzuki K. Poulose
2011-12-09 11:48 ` [PATCH v4 5/7] [44x] Enable CONFIG_RELOCATABLE for PPC44x Suzuki K. Poulose
2011-12-09 11:48 ` [PATCH v4 6/7] [44x] Enable CRASH_DUMP for 440x Suzuki K. Poulose
2011-12-09 11:48 ` [PATCH v4 7/7] [boot] Change the load address for the wrapper to fit the kernel Suzuki K. Poulose
2011-12-10  5:01 ` [PATCH v4 0/7] Kudmp support for PPC440x Suzuki Poulose

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=4EE6B758.9070902@in.ibm.com \
    --to=suzuki@in.ibm.com \
    --cc=jpoimboe@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=scottwood@freescale.com \
    --cc=segher@kernel.crashing.org \
    /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.