From: Matt Fleming <matt@console-pimps.org>
To: Roy Franz <roy.franz@linaro.org>
Cc: 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, msalter@redhat.com
Subject: Re: [PATCH 2/6] Add shared update_fdt() function for ARM/ARM64
Date: Thu, 3 Oct 2013 10:52:24 +0100 [thread overview]
Message-ID: <20131003095224.GX21381@console-pimps.org> (raw)
In-Reply-To: <1380385403-31904-3-git-send-email-roy.franz@linaro.org>
On Sat, 28 Sep, at 09:23:19AM, Roy Franz wrote:
> Both ARM and ARM64 stubs will update the device tree
> that they pass to the kernel. In both cases they
> primarily need to add the same UEFI related information,
> so the function can be shared.
>
> Signed-off-by: Roy Franz <roy.franz@linaro.org>
> ---
> drivers/firmware/efi/efi-stub-helper.c | 86 ++++++++++++++++++++++++++++++++
> 1 file changed, 86 insertions(+)
>
> diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c
> index cc0581d..d3448a9 100644
> --- a/drivers/firmware/efi/efi-stub-helper.c
> +++ b/drivers/firmware/efi/efi-stub-helper.c
> @@ -4,6 +4,7 @@
> * implementation files.
> *
> * Copyright 2011 Intel Corporation; author Matt Fleming
> + * Copyright 2013 Linaro Limited; author Roy Franz
> *
> * This file is part of the Linux kernel, and is made available
> * under the terms of the GNU General Public License version 2.
> @@ -636,3 +637,88 @@ static char *efi_convert_cmdline_to_ascii(efi_system_table_t *sys_table_arg,
> *cmd_line_len = options_size;
> return (char *)cmdline_addr;
> }
> +
> +#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.
While it currently does include this little snippet,
#ifdef CONFIG_ARM
/*
* For ARM, allocate at a high address to avoid reserved
* regions at low addresses that we don't know the specfics of
* at the time we are processing the command line.
*/
status = efi_high_alloc(sys_table_arg, options_size, 0,
&cmdline_addr, 0xfffff000);
#else
status = efi_low_alloc(sys_table_arg, options_size, 0,
&cmdline_addr);
#endif
I think that single #ifdef is justifiable. But including entire
functions that are only used by ARM/ARM64 or x86 isn't.
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-10-03 9:52 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 [this message]
2013-10-03 13:43 ` Mark Salter
2013-10-03 14:27 ` Matt Fleming
2013-10-03 14:57 ` Mark Salter
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=20131003095224.GX21381@console-pimps.org \
--to=matt@console-pimps.org \
--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=msalter@redhat.com \
--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®