|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 06/10] xen: arm: device_tree_bootargs to bootfdt.c, renaming to boot_fdt_cmdline
Missing "moving" in the subject line
On Mon, 16 Jun 2014, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> xen/arch/arm/bootfdt.c | 27 +++++++++++++++++++++++++++
> xen/arch/arm/setup.c | 2 +-
> xen/common/device_tree.c | 31 -------------------------------
> xen/include/asm-arm/setup.h | 1 +
> xen/include/xen/device_tree.h | 2 --
> 5 files changed, 29 insertions(+), 34 deletions(-)
>
> diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
> index 11182cd..e48a64b 100644
> --- a/xen/arch/arm/bootfdt.c
> +++ b/xen/arch/arm/bootfdt.c
> @@ -333,6 +333,33 @@ size_t __init boot_fdt_info(const void *fdt, paddr_t
> paddr)
> return fdt_totalsize(fdt);
> }
>
> +const char *boot_fdt_cmdline(const void *fdt)
> +{
> + int node;
> + const struct fdt_property *prop;
> +
> + node = fdt_path_offset(fdt, "/chosen");
> + if ( node < 0 )
> + return NULL;
> +
> + prop = fdt_get_property(fdt, node, "xen,xen-bootargs", NULL);
> + if ( prop == NULL )
> + {
> + struct bootmodule *dom0_mod = NULL;
> +
> + if ( bootinfo.modules.nr_mods >= MOD_KERNEL )
> + dom0_mod = &bootinfo.modules.module[MOD_KERNEL];
> +
> + if (fdt_get_property(fdt, node, "xen,dom0-bootargs", NULL) ||
> + ( dom0_mod && dom0_mod->cmdline[0] ) )
> + prop = fdt_get_property(fdt, node, "bootargs", NULL);
> + }
> + if ( prop == NULL )
> + return NULL;
> +
> + return prop->data;
> +}
> +
> /*
> * Local variables:
> * mode: C
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index 4a84a32..f1ae408 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -680,7 +680,7 @@ void __init start_xen(unsigned long boot_phys_offset,
> + (fdt_paddr & ((1 << SECOND_SHIFT) - 1));
> fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr);
>
> - cmdline = device_tree_bootargs(device_tree_flattened);
> + cmdline = boot_fdt_cmdline(device_tree_flattened);
> printk("Command line: %s\n", cmdline);
> cmdline_parse(cmdline);
>
> diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
> index 89de269..b9deb62 100644
> --- a/xen/common/device_tree.c
> +++ b/xen/common/device_tree.c
> @@ -115,37 +115,6 @@ void dt_set_range(__be32 **cellp, const struct
> dt_device_node *np,
> dt_set_cell(cellp, dt_n_size_cells(np), size);
> }
>
> -/**
> - * device_tree_bootargs - return the bootargs (the Xen command line)
> - * @fdt flat device tree.
> - */
> -const char *device_tree_bootargs(const void *fdt)
> -{
> - int node;
> - const struct fdt_property *prop;
> -
> - node = fdt_path_offset(fdt, "/chosen");
> - if ( node < 0 )
> - return NULL;
> -
> - prop = fdt_get_property(fdt, node, "xen,xen-bootargs", NULL);
> - if ( prop == NULL )
> - {
> - struct bootmodule *dom0_mod = NULL;
> -
> - if ( bootinfo.modules.nr_mods >= MOD_KERNEL )
> - dom0_mod = &bootinfo.modules.module[MOD_KERNEL];
> -
> - if (fdt_get_property(fdt, node, "xen,dom0-bootargs", NULL) ||
> - ( dom0_mod && dom0_mod->cmdline[0] ) )
> - prop = fdt_get_property(fdt, node, "bootargs", NULL);
> - }
> - if ( prop == NULL )
> - return NULL;
> -
> - return prop->data;
> -}
> -
> static void __init *unflatten_dt_alloc(unsigned long *mem, unsigned long
> size,
> unsigned long align)
> {
> diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
> index 21dbcd4..85aa866 100644
> --- a/xen/include/asm-arm/setup.h
> +++ b/xen/include/asm-arm/setup.h
> @@ -54,6 +54,7 @@ int construct_dom0(struct domain *d);
> void discard_initial_modules(void);
>
> size_t __init boot_fdt_info(const void *fdt, paddr_t paddr);
> +const char __init *boot_fdt_cmdline(const void *fdt);
>
> #endif
> /*
> diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
> index 0edec85..b486fc6 100644
> --- a/xen/include/xen/device_tree.h
> +++ b/xen/include/xen/device_tree.h
> @@ -157,8 +157,6 @@ typedef int (*device_tree_node_func)(const void *fdt,
>
> extern const void *device_tree_flattened;
>
> -const char __init *device_tree_bootargs(const void *fdt);
> -
> /**
> * dt_unflatten_host_device_tree - Unflatten the host device tree
> *
> --
> 1.7.10.4
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |