FW: [PATCH 1/2] drivers: firmware: efi: change sys_table to sys_table_arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry I sent these patches again to mailing list.
I meant to send this series to internal members. Please ignore this patch series and don't respond on this thread.

> -----Original Message-----
> From: Pankaj Bansal
> Sent: Tuesday, March 27, 2018 4:52 PM
> To: linux-devel@xxxxxxxxxxxxxxxxxxx
> Cc: Leo Li <leoyang.li@xxxxxxx>; Varun Sethi <V.Sethi@xxxxxxx>; Udit Kumar
> <udit.kumar@xxxxxxx>; Wasim Khan <wasim.khan@xxxxxxx>; Meenakshi
> Aggarwal <meenakshi.aggarwal@xxxxxxx>; Pankaj Bansal
> <pankaj.bansal@xxxxxxx>; Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>; linux-
> efi@xxxxxxxxxxxxxxx
> Subject: [PATCH 1/2] drivers: firmware: efi: change sys_table to sys_table_arg
> 
> efi_call_early(f, ...) macro expands to
> sys_table_arg->boottime->f(__VA_ARGS__).
> Therefore, change sys_table to sys_table_arg so that efi_call_early macro can
> be used.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> Cc: linux-efi@xxxxxxxxxxxxxxx
> Signed-off-by: Pankaj Bansal <pankaj.bansal@xxxxxxx>
> ---
>  drivers/firmware/efi/libstub/fdt.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/firmware/efi/libstub/fdt.c
> b/drivers/firmware/efi/libstub/fdt.c
> index 8830fa6..177654e 100644
> --- a/drivers/firmware/efi/libstub/fdt.c
> +++ b/drivers/firmware/efi/libstub/fdt.c
> @@ -248,7 +248,7 @@ static efi_status_t exit_boot_func(efi_system_table_t
> *sys_table_arg,
>   * with the final memory map in it.
>   */
> 
> -efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
> +efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t
> +*sys_table_arg,
>  					    void *handle,
>  					    unsigned long *new_fdt_addr,
>  					    unsigned long max_addr,
> @@ -279,20 +279,20 @@ efi_status_t
> allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
>  	 * subsequent allocations adding entries, since they could not affect
>  	 * the number of EFI_MEMORY_RUNTIME regions.
>  	 */
> -	status = efi_get_memory_map(sys_table, &map);
> +	status = efi_get_memory_map(sys_table_arg, &map);
>  	if (status != EFI_SUCCESS) {
> -		pr_efi_err(sys_table, "Unable to retrieve UEFI memory
> map.\n");
> +		pr_efi_err(sys_table_arg, "Unable to retrieve UEFI memory
> map.\n");
>  		return status;
>  	}
> 
> -	pr_efi(sys_table,
> +	pr_efi(sys_table_arg,
>  	       "Exiting boot services and installing virtual address map...\n");
> 
>  	map.map = &memory_map;
> -	status = efi_high_alloc(sys_table, MAX_FDT_SIZE, EFI_FDT_ALIGN,
> +	status = efi_high_alloc(sys_table_arg, MAX_FDT_SIZE, EFI_FDT_ALIGN,
>  				new_fdt_addr, max_addr);
>  	if (status != EFI_SUCCESS) {
> -		pr_efi_err(sys_table,
> +		pr_efi_err(sys_table_arg,
>  			   "Unable to allocate memory for new device tree.\n");
>  		goto fail;
>  	}
> @@ -301,30 +301,30 @@ efi_status_t
> allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
>  	 * Now that we have done our final memory allocation (and free)
>  	 * we can get the memory map key needed for exit_boot_services().
>  	 */
> -	status = efi_get_memory_map(sys_table, &map);
> +	status = efi_get_memory_map(sys_table_arg, &map);
>  	if (status != EFI_SUCCESS)
>  		goto fail_free_new_fdt;
> 
> -	status = update_fdt(sys_table, (void *)fdt_addr, fdt_size,
> +	status = update_fdt(sys_table_arg, (void *)fdt_addr, fdt_size,
>  			    (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr,
>  			    initrd_addr, initrd_size);
> 
>  	if (status != EFI_SUCCESS) {
> -		pr_efi_err(sys_table, "Unable to construct new device tree.\n");
> +		pr_efi_err(sys_table_arg, "Unable to construct new device
> tree.\n");
>  		goto fail_free_new_fdt;
>  	}
> 
>  	priv.runtime_map = runtime_map;
>  	priv.runtime_entry_count = &runtime_entry_count;
>  	priv.new_fdt_addr = (void *)*new_fdt_addr;
> -	status = efi_exit_boot_services(sys_table, handle, &map, &priv,
> +	status = efi_exit_boot_services(sys_table_arg, handle, &map, &priv,
>  					exit_boot_func);
> 
>  	if (status == EFI_SUCCESS) {
>  		efi_set_virtual_address_map_t *svam;
> 
>  		/* Install the new virtual address map */
> -		svam = sys_table->runtime->set_virtual_address_map;
> +		svam = sys_table_arg->runtime->set_virtual_address_map;
>  		status = svam(runtime_entry_count * desc_size, desc_size,
>  			      desc_ver, runtime_map);
> 
> @@ -352,13 +352,13 @@ efi_status_t
> allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
>  		return EFI_SUCCESS;
>  	}
> 
> -	pr_efi_err(sys_table, "Exit boot services failed.\n");
> +	pr_efi_err(sys_table_arg, "Exit boot services failed.\n");
> 
>  fail_free_new_fdt:
> -	efi_free(sys_table, MAX_FDT_SIZE, *new_fdt_addr);
> +	efi_free(sys_table_arg, MAX_FDT_SIZE, *new_fdt_addr);
> 
>  fail:
> -	sys_table->boottime->free_pool(runtime_map);
> +	sys_table_arg->boottime->free_pool(runtime_map);
>  	return EFI_LOAD_ERROR;
>  }
> 
> --
> 2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux