From: Mark Salter <msalter@redhat.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: Roy Franz <roy.franz@linaro.org>,
linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, matt.fleming@intel.com,
linux@arm.linux.org.uk, leif.lindholm@linaro.org,
grant.likely@linaro.org, dave.martin@arm.com
Subject: Re: [PATCH 2/6] Add shared update_fdt() function for ARM/ARM64
Date: Thu, 03 Oct 2013 10:57:35 -0400 [thread overview]
Message-ID: <1380812255.17503.19.camel@deneb.redhat.com> (raw)
In-Reply-To: <20131003142721.GB2781@console-pimps.org>
On Thu, 2013-10-03 at 15:27 +0100, Matt Fleming wrote:
> On Thu, 03 Oct, at 09:43:24AM, Mark Salter wrote:
> > On Thu, 2013-10-03 at 10:52 +0100, Matt Fleming wrote:
> > > > +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
> > > > +static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt,
> > > > + void *fdt, int new_fdt_size, char *cmdline_ptr,
> > > > + u64 initrd_addr, u64 initrd_size,
> > > > + efi_memory_desc_t *memory_map,
> > > > + unsigned long map_size, unsigned long desc_size,
> > > > + u32 desc_ver)
> > >
> > > Hmm... does this function really belong in efi-stub-helper.c? That file
> > > should be for architecture independent functionality only.
> > >
> >
> > It isn't really arm-specific although arm is the only user right now.
> > We're using the FDT to pass EFI boot info that is passed in the boot
> > params block on x86. So potentially other architectures could use the
> > same code.
>
> It's not EFI-specific either, apart from the fdt property names.
Not EFI-specific in the sense that it uses the EFI services, but it is
EFI-specific in its function.
>
> > How about making it someting like:
> >
> > #ifdef ARCH_NEEDS_EFI_FDT
> > static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt,
> > ...
> > #endif
> >
> > so the architecture can decide whether to include it or not.
>
> Is one implementation of this function going to fit all architectures?
> Can we be sure of that ahead of time?
>
> I'd prefer this to be kept in arch/ for now, and possibly moved into
> efi-stub-helper.c at a later date if indeed it turns out to be generally
> useful.
Fair enough. I don't have a strong opinion about it either way. Just a
natural instinct to share the code if possible, but it is easy enough
to change later if others want to use it.
--Mark
next prev parent reply other threads:[~2013-10-03 14:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-28 16:23 [PATCH V4 0/6] ADD ARM EFI stub Roy Franz
2013-09-28 16:23 ` [PATCH 1/6] efi-stub.txt updates for ARM Roy Franz
2013-10-03 9:40 ` Matt Fleming
2013-09-28 16:23 ` [PATCH 2/6] Add shared update_fdt() function for ARM/ARM64 Roy Franz
2013-10-03 9:52 ` Matt Fleming
2013-10-03 13:43 ` Mark Salter
2013-10-03 14:27 ` Matt Fleming
2013-10-03 14:57 ` Mark Salter [this message]
2013-10-03 19:28 ` Roy Franz
2013-10-03 21:07 ` Matt Fleming
2013-09-28 16:23 ` [PATCH 3/6] Add strstr to compressed string.c for ARM Roy Franz
2013-09-28 16:23 ` [PATCH 4/6] Add EFI stub " Roy Franz
2013-09-28 16:23 ` [PATCH 5/6] Disable stack protection for decompressor/stub Roy Franz
2013-09-28 16:23 ` [PATCH 6/6] Add config EFI_STUB for ARM to Kconfig Roy Franz
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=1380812255.17503.19.camel@deneb.redhat.com \
--to=msalter@redhat.com \
--cc=dave.martin@arm.com \
--cc=grant.likely@linaro.org \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=matt.fleming@intel.com \
--cc=matt@console-pimps.org \
--cc=roy.franz@linaro.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®