From: Mike Frysinger <vapier.adi@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Jie Zhang <jie.zhang@analog.com>,
Bernd Schmidt <bernds_cb1@t-online.de>
Subject: Re: [PATCH] FDPIC: add hook for arches to customize program header parsing
Date: Tue, 23 Jun 2009 07:04:02 -0400 [thread overview]
Message-ID: <8bd0f97a0906230404n2cd3b6f6t96b4a60099677434@mail.gmail.com> (raw)
In-Reply-To: <20090622223201.34b79adb.akpm@linux-foundation.org>
On Tue, Jun 23, 2009 at 01:32, Andrew Morton wrote:
> On Tue, 16 Jun 2009 04:24:48 -0400 Mike Frysinger wrote:
>> From: Jie Zhang <jie.zhang@analog.com>
>> The Blackfin port has custom program header flags/addresses for
>> automatically loading regions into the dedicated on-chip SRAM. So add a
>> hook for ports to leverage.
>>
>> Signed-off-by: Jie Zhang <jie.zhang@analog.com>
>> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>> CC: Bernd Schmidt <bernds_cb1@t-online.de>
>> Acked-by: David Howells <dhowells@redhat.com>
>> Acked-by: Paul Mundt <lethal@linux-sh.org>
>> Acked-by: Greg Ungerer <gerg@uclinux.org>
>> ---
>> Andrew: could you pick this up ? same patch as before, just with the
>> additional tags added.
>
> I suppose we want to squeeze this into 2.6.31.
would be nice, but not terribly critical
>> --- a/fs/binfmt_elf_fdpic.c
>> +++ b/fs/binfmt_elf_fdpic.c
>> @@ -1105,6 +1105,13 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
>> ELF_FDPIC_FLAG_CONTIGUOUS)
>> load_addr += PAGE_ALIGN(phdr->p_memsz + disp);
>>
>> +#ifndef ELF_FDPIC_PLAT_PROCESS_PHDR
>> +# define ELF_FDPIC_PLAT_PROCESS_PHDR(mm, params, phdr, maddr, disp) 0
>> +#endif
>> + ret = ELF_FDPIC_PLAT_PROCESS_PHDR(mm, params, phdr, &maddr, &disp);
>> + if (ret)
>> + return ret;
>> +
>
> Wouldn't it be simpler to do
>
> #ifdef ELF_FDPIC_PLAT_PROCESS_PHDR
> ret = ELF_FDPIC_PLAT_PROCESS_PHDR(mm, params, phdr, &maddr,
> &disp);
> if (ret)
> return ret;
> #endif
>
> ?
>
> If there's any prospect that we'll use ELF_FDPIC_PLAT_PROCESS_PHDR() a
> second time from within this file then yes, adding a definition as
> you did is appropriate. But it should be near the top of the file, not
> stuck stupidly in the middle of a C function.
the purpose was to stick to current conventions used in the file and
to maximize the amount of code compiled. i dont particularly care wrt
the method used here.
-mike
next prev parent reply other threads:[~2009-06-23 11:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 1:01 [PATCH/RFC] " Mike Frysinger
2009-06-13 12:23 ` [uClinux-dev] " David Howells
2009-06-13 16:13 ` Jamie Lokier
2009-06-13 16:40 ` Mike Frysinger
2009-06-13 18:25 ` Jamie Lokier
2009-06-13 18:26 ` Jamie Lokier
2009-06-14 0:32 ` Mike Frysinger
2009-06-14 0:42 ` Jie Zhang
2009-06-14 9:43 ` Paul Mundt
2009-06-15 1:43 ` Greg Ungerer
2009-06-16 8:24 ` [PATCH] " Mike Frysinger
2009-06-23 5:32 ` Andrew Morton
2009-06-23 11:04 ` Mike Frysinger [this message]
2009-12-04 17:44 ` [uClinux-dev] [PATCH/RFC] " David Howells
2009-12-05 0:28 ` Jie Zhang
2009-12-07 3:27 ` [Uclinux-dist-devel] " Zhang, Sonic
2009-12-07 10:10 ` Mike Frysinger
2009-12-07 10:17 ` Jie Zhang
2009-12-05 15:14 ` David Howells
2009-12-07 10:09 ` Mike Frysinger
2009-12-07 10:10 ` Mike Frysinger
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=8bd0f97a0906230404n2cd3b6f6t96b4a60099677434@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bernds_cb1@t-online.de \
--cc=jie.zhang@analog.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®