[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/7] efi: refactor grub_efi_allocate_pages
From: |
Daniel Kiper |
Subject: |
Re: [PATCH 2/7] efi: refactor grub_efi_allocate_pages |
Date: |
Thu, 27 Jul 2017 16:46:14 +0200 |
User-agent: |
Mutt/1.3.28i |
On Mon, Jun 12, 2017 at 03:53:36PM +0100, Leif Lindholm wrote:
> Expose a new function, grub_efi_allocate_pages_real(), making it possible
> to specify allocation type and memory type as supported by the UEFI
> AllocatePages boot service.
>
> Make grub_efi_allocate_pages() a consumer of the new function,
> maintaining its old functionality.
>
> Also delete some left-around #if 1/#else blocks in the affected
> functions.
>
> Signed-off-by: Leif Lindholm <address@hidden>
> ---
> grub-core/kern/efi/mm.c | 46 ++++++++++++++++++++++++----------------------
> include/grub/efi/efi.h | 5 +++++
> 2 files changed, 29 insertions(+), 22 deletions(-)
>
> diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
> index 460a4b763..7b1763bc5 100644
> --- a/grub-core/kern/efi/mm.c
> +++ b/grub-core/kern/efi/mm.c
> @@ -51,36 +51,20 @@ int grub_efi_is_finished = 0;
>
> /* Allocate pages. Return the pointer to the first of allocated pages. */
> void *
> -grub_efi_allocate_pages (grub_efi_physical_address_t address,
> - grub_efi_uintn_t pages)
> +grub_efi_allocate_pages_real (grub_efi_physical_address_t address,
Could not you just add an extra argument to grub_efi_allocate_pages()?
It is not called in many places. Do you really need separate
grub_efi_allocate_pages_real()?
Daniel
- Re: [PATCH 2/7] efi: refactor grub_efi_allocate_pages,
Daniel Kiper <=