[Xen-devel,v2,7/7] xen/arm: setup: Move in init code only used at boot in setup.c

Message ID 20180702161910.2013-8-julien.grall@arm.com
State Accepted
Commit f1ad5ff73e7d07e6a18488430583168a857f2847
Headers show
Series
  • xen/arm: Shrink down Xen on Arm
Related show

Commit Message

Julien Grall July 2, 2018, 4:19 p.m.
Some of the functions implemented in setup.c are only used at boot but
not yet marked as such.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

---
    Changes in v2:
        - Add Stefano's reviewed-by
---
 xen/arch/arm/setup.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Stefano Stabellini July 11, 2018, 7:21 p.m. | #1
On Mon, 2 Jul 2018, Julien Grall wrote:
> Some of the functions implemented in setup.c are only used at boot but
> not yet marked as such.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> ---
>     Changes in v2:
>         - Add Stefano's reviewed-by
> ---
>  xen/arch/arm/setup.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index 1d6f6bf37e..fe7384fd30 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -175,7 +175,7 @@ static void __init processor_id(void)
>      check_local_cpu_errata();
>  }
>  
> -void dt_unreserved_regions(paddr_t s, paddr_t e,
> +void __init dt_unreserved_regions(paddr_t s, paddr_t e,
>                                    void (*cb)(paddr_t, paddr_t), int first)
>  {
>      int i, nr = fdt_num_mem_rsv(device_tree_flattened);
> @@ -201,9 +201,9 @@ void dt_unreserved_regions(paddr_t s, paddr_t e,
>      cb(s, e);
>  }
>  
> -struct bootmodule *add_boot_module(bootmodule_kind kind,
> -                                   paddr_t start, paddr_t size,
> -                                   const char *cmdline)
> +struct bootmodule __init *add_boot_module(bootmodule_kind kind,
> +                                          paddr_t start, paddr_t size,
> +                                         const char *cmdline)

I have just spotted this minor alignment issue. I fixed on commit.


>  {
>      struct bootmodules *mods = &bootinfo.modules;
>      struct bootmodule *mod;
> @@ -434,7 +434,7 @@ static paddr_t __init get_xen_paddr(void)
>      return paddr;
>  }
>  
> -static void init_pdx(void)
> +static void __init init_pdx(void)
>  {
>      paddr_t bank_start, bank_size, bank_end;
>  
> -- 
> 2.11.0
>

Patch

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 1d6f6bf37e..fe7384fd30 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -175,7 +175,7 @@  static void __init processor_id(void)
     check_local_cpu_errata();
 }
 
-void dt_unreserved_regions(paddr_t s, paddr_t e,
+void __init dt_unreserved_regions(paddr_t s, paddr_t e,
                                   void (*cb)(paddr_t, paddr_t), int first)
 {
     int i, nr = fdt_num_mem_rsv(device_tree_flattened);
@@ -201,9 +201,9 @@  void dt_unreserved_regions(paddr_t s, paddr_t e,
     cb(s, e);
 }
 
-struct bootmodule *add_boot_module(bootmodule_kind kind,
-                                   paddr_t start, paddr_t size,
-                                   const char *cmdline)
+struct bootmodule __init *add_boot_module(bootmodule_kind kind,
+                                          paddr_t start, paddr_t size,
+                                         const char *cmdline)
 {
     struct bootmodules *mods = &bootinfo.modules;
     struct bootmodule *mod;
@@ -434,7 +434,7 @@  static paddr_t __init get_xen_paddr(void)
     return paddr;
 }
 
-static void init_pdx(void)
+static void __init init_pdx(void)
 {
     paddr_t bank_start, bank_size, bank_end;