RE: [PATCH V2 1/3] efi: Introduce efi_memmap_free() and efi_memmap_unmap_and_free()

2018-12-05 Thread Prakhya, Sai Praneeth
> > +/** > > + * efi_memmap_free - Free memory pointed by new_memmap.map > > + * @new_memmap: Structure that describes EFI memory map. > > + * > > + * Memory is freed depending on the type of allocation performed. > > + */ > > +static void __init efi_memmap_free(struct efi_memory_map new_memmap) >

RE: [PATCH V2 1/3] efi: Introduce efi_memmap_free() and efi_memmap_unmap_and_free()

2018-12-05 Thread Prakhya, Sai Praneeth
> > +static void __init efi_memmap_free(struct efi_memory_map new_memmap) > > +{ > > + phys_addr_t start, end; > > + unsigned long size = new_memmap.nr_map * new_memmap.desc_size; > > + unsigned int order = get_order(size); > > + > > + start = new_memmap.phys_map; > > + end = start +

Re: [PATCH V2 1/3] efi: Introduce efi_memmap_free() and efi_memmap_unmap_and_free()

2018-12-05 Thread Bhupesh Sharma
Hi Sai, Thanks for the patch. Some review comments in-line: On 12/05/2018 06:03 AM, Sai Praneeth Prakhya wrote: Presently, in EFI subsystem of kernel, every time kernel allocates memory for a new EFI memory map, it forgets to free the memory occupied by old EFI memory map. Hence, introduce

Re: [PATCH V2 1/3] efi: Introduce efi_memmap_free() and efi_memmap_unmap_and_free()

2018-12-04 Thread Ingo Molnar
* Sai Praneeth Prakhya wrote: > +/** > + * efi_memmap_free - Free memory pointed by new_memmap.map > + * @new_memmap: Structure that describes EFI memory map. > + * > + * Memory is freed depending on the type of allocation performed. > + */ > +static void __init efi_memmap_free(struct

[PATCH V2 1/3] efi: Introduce efi_memmap_free() and efi_memmap_unmap_and_free()

2018-12-04 Thread Sai Praneeth Prakhya
Presently, in EFI subsystem of kernel, every time kernel allocates memory for a new EFI memory map, it forgets to free the memory occupied by old EFI memory map. Hence, introduce efi_memmap_free() that frees up the memory occupied by an EFI memory map. Introduce __efi_memmap_unmap(), so that it