diff mbox

[Xen-devel] xen/arm: bootfdt.c is only used during initialization

Message ID 1484668404-26796-1-git-send-email-julien.grall@arm.com
State New
Headers show

Commit Message

Julien Grall Jan. 17, 2017, 3:53 p.m. UTC
This file contains data and code only used at initialization. Mark the
file as such in the build system and correct kind_guess.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/Makefile  | 2 +-
 xen/arch/arm/bootfdt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Stabellini Jan. 17, 2017, 11:49 p.m. UTC | #1
On Tue, 17 Jan 2017, Julien Grall wrote:
> This file contains data and code only used at initialization. Mark the
> file as such in the build system and correct kind_guess.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


>  xen/arch/arm/Makefile  | 2 +-
>  xen/arch/arm/bootfdt.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
> index 59b3b53..cf67bbe 100644
> --- a/xen/arch/arm/Makefile
> +++ b/xen/arch/arm/Makefile
> @@ -5,7 +5,7 @@ subdir-$(CONFIG_ARM_64) += efi
>  subdir-$(CONFIG_ACPI) += acpi
>  
>  obj-$(CONFIG_HAS_ALTERNATIVE) += alternative.o
> -obj-y += bootfdt.o
> +obj-y += bootfdt.init.o
>  obj-y += cpu.o
>  obj-y += cpuerrata.o
>  obj-y += cpufeature.o
> diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
> index d130633..cae6f83 100644
> --- a/xen/arch/arm/bootfdt.c
> +++ b/xen/arch/arm/bootfdt.c
> @@ -168,7 +168,7 @@ static void __init process_multiboot_node(const void *fdt, int node,
>                                            const char *name,
>                                            u32 address_cells, u32 size_cells)
>  {
> -    static int kind_guess = 0;
> +    static int __initdata kind_guess = 0;
>      const struct fdt_property *prop;
>      const __be32 *cell;
>      bootmodule_kind kind;
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 59b3b53..cf67bbe 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -5,7 +5,7 @@  subdir-$(CONFIG_ARM_64) += efi
 subdir-$(CONFIG_ACPI) += acpi
 
 obj-$(CONFIG_HAS_ALTERNATIVE) += alternative.o
-obj-y += bootfdt.o
+obj-y += bootfdt.init.o
 obj-y += cpu.o
 obj-y += cpuerrata.o
 obj-y += cpufeature.o
diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
index d130633..cae6f83 100644
--- a/xen/arch/arm/bootfdt.c
+++ b/xen/arch/arm/bootfdt.c
@@ -168,7 +168,7 @@  static void __init process_multiboot_node(const void *fdt, int node,
                                           const char *name,
                                           u32 address_cells, u32 size_cells)
 {
-    static int kind_guess = 0;
+    static int __initdata kind_guess = 0;
     const struct fdt_property *prop;
     const __be32 *cell;
     bootmodule_kind kind;