All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-16 21:26 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-16 21:26 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Kukjin Kim, Krzysztof Kozlowski, Viresh Kumar, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-pm

s3c2410_plls_add is a device notifier that may be called at runtime and
is correctly not marked __init. However it calls s3c_plltab_register()
which is marked __init, and that triggers a build error when we are
checking for section mismatches:

WARNING: vmlinux.o(.text+0x195e0): Section mismatch in reference from the function s3c2410_plls_add() to the function .init.text:s3c_plltab_register()
The function s3c2410_plls_add() references
the function __init s3c_plltab_register().
This is often because s3c2410_plls_add lacks a __init
annotation or the annotation of s3c_plltab_register is wrong.

This removes the __init annotation from s3c2410_plls_add as well as the
__initdata section annotations from s3c2440_plls_12 and s3c2440_plls_169344,
which in turn are referenced from s3c2410_plls_add.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
----
It would be nice to get this merged through the cpufreq tree. Most likely
this has never caused problems because the device notifiers in practice
only get called at boot time, so I assume it's enough to have this fixed
in 4.4 or 4.5 but not backported.

diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index a19460e6e7b0..b355fca6cc2e 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -20,7 +20,7 @@
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
-static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
+static struct cpufreq_frequency_table s3c2440_plls_12[] = {
 	{ .frequency = 75000000,	.driver_data = PLLVAL(0x75, 3, 3),  }, 	/* FVco 600.000000 */
 	{ .frequency = 80000000,	.driver_data = PLLVAL(0x98, 4, 3),  }, 	/* FVco 640.000000 */
 	{ .frequency = 90000000,	.driver_data = PLLVAL(0x70, 2, 3),  }, 	/* FVco 720.000000 */
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index 1191b2905625..be9a248b5ce9 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -20,7 +20,7 @@
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
-static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
+static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
 	{ .frequency = 78019200,	.driver_data = PLLVAL(121, 5, 3), 	}, 	/* FVco 624.153600 */
 	{ .frequency = 84067200,	.driver_data = PLLVAL(131, 5, 3), 	}, 	/* FVco 672.537600 */
 	{ .frequency = 90115200,	.driver_data = PLLVAL(141, 5, 3), 	}, 	/* FVco 720.921600 */
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 733aa5153e74..68ef8fd9482f 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -648,7 +648,7 @@ late_initcall(s3c_cpufreq_initcall);
  *
  * Register the given set of PLLs with the system.
  */
-int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
+int s3c_plltab_register(struct cpufreq_frequency_table *plls,
 			       unsigned int plls_no)
 {
 	struct cpufreq_frequency_table *vals;


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-16 21:26 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-16 21:26 UTC (permalink / raw)
  To: linux-arm-kernel

s3c2410_plls_add is a device notifier that may be called at runtime and
is correctly not marked __init. However it calls s3c_plltab_register()
which is marked __init, and that triggers a build error when we are
checking for section mismatches:

WARNING: vmlinux.o(.text+0x195e0): Section mismatch in reference from the function s3c2410_plls_add() to the function .init.text:s3c_plltab_register()
The function s3c2410_plls_add() references
the function __init s3c_plltab_register().
This is often because s3c2410_plls_add lacks a __init
annotation or the annotation of s3c_plltab_register is wrong.

This removes the __init annotation from s3c2410_plls_add as well as the
__initdata section annotations from s3c2440_plls_12 and s3c2440_plls_169344,
which in turn are referenced from s3c2410_plls_add.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
----
It would be nice to get this merged through the cpufreq tree. Most likely
this has never caused problems because the device notifiers in practice
only get called at boot time, so I assume it's enough to have this fixed
in 4.4 or 4.5 but not backported.

diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index a19460e6e7b0..b355fca6cc2e 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -20,7 +20,7 @@
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
-static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
+static struct cpufreq_frequency_table s3c2440_plls_12[] = {
 	{ .frequency = 75000000,	.driver_data = PLLVAL(0x75, 3, 3),  }, 	/* FVco 600.000000 */
 	{ .frequency = 80000000,	.driver_data = PLLVAL(0x98, 4, 3),  }, 	/* FVco 640.000000 */
 	{ .frequency = 90000000,	.driver_data = PLLVAL(0x70, 2, 3),  }, 	/* FVco 720.000000 */
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index 1191b2905625..be9a248b5ce9 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -20,7 +20,7 @@
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
-static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
+static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
 	{ .frequency = 78019200,	.driver_data = PLLVAL(121, 5, 3), 	}, 	/* FVco 624.153600 */
 	{ .frequency = 84067200,	.driver_data = PLLVAL(131, 5, 3), 	}, 	/* FVco 672.537600 */
 	{ .frequency = 90115200,	.driver_data = PLLVAL(141, 5, 3), 	}, 	/* FVco 720.921600 */
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 733aa5153e74..68ef8fd9482f 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -648,7 +648,7 @@ late_initcall(s3c_cpufreq_initcall);
  *
  * Register the given set of PLLs with the system.
  */
-int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
+int s3c_plltab_register(struct cpufreq_frequency_table *plls,
 			       unsigned int plls_no)
 {
 	struct cpufreq_frequency_table *vals;

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
  2015-11-16 22:36   ` Rafael J. Wysocki
@ 2015-11-16 22:17     ` Arnd Bergmann
  -1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-16 22:17 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Kukjin Kim, Krzysztof Kozlowski, Viresh Kumar, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-pm

On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
> 
> This should go in through the Samsung tree, so I'll leave it for them to pick
> it up (at least for the time being).

Ok, fair enough. Kukjin or Krzysztof, can you pick this up?

	Arnd

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-16 22:17     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-16 22:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
> 
> This should go in through the Samsung tree, so I'll leave it for them to pick
> it up (at least for the time being).

Ok, fair enough. Kukjin or Krzysztof, can you pick this up?

	Arnd

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
  2015-11-16 21:26 ` Arnd Bergmann
@ 2015-11-16 22:36   ` Rafael J. Wysocki
  -1 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2015-11-16 22:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Viresh Kumar, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-pm

On Monday, November 16, 2015 10:26:43 PM Arnd Bergmann wrote:
> s3c2410_plls_add is a device notifier that may be called at runtime and
> is correctly not marked __init. However it calls s3c_plltab_register()
> which is marked __init, and that triggers a build error when we are
> checking for section mismatches:
> 
> WARNING: vmlinux.o(.text+0x195e0): Section mismatch in reference from the function s3c2410_plls_add() to the function .init.text:s3c_plltab_register()
> The function s3c2410_plls_add() references
> the function __init s3c_plltab_register().
> This is often because s3c2410_plls_add lacks a __init
> annotation or the annotation of s3c_plltab_register is wrong.
> 
> This removes the __init annotation from s3c2410_plls_add as well as the
> __initdata section annotations from s3c2440_plls_12 and s3c2440_plls_169344,
> which in turn are referenced from s3c2410_plls_add.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ----
> It would be nice to get this merged through the cpufreq tree. Most likely
> this has never caused problems because the device notifiers in practice
> only get called at boot time, so I assume it's enough to have this fixed
> in 4.4 or 4.5 but not backported.
> 
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> index a19460e6e7b0..b355fca6cc2e 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> @@ -20,7 +20,7 @@
>  #include <plat/cpu.h>
>  #include <plat/cpu-freq-core.h>
>  
> -static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
> +static struct cpufreq_frequency_table s3c2440_plls_12[] = {
>  	{ .frequency = 75000000,	.driver_data = PLLVAL(0x75, 3, 3),  }, 	/* FVco 600.000000 */
>  	{ .frequency = 80000000,	.driver_data = PLLVAL(0x98, 4, 3),  }, 	/* FVco 640.000000 */
>  	{ .frequency = 90000000,	.driver_data = PLLVAL(0x70, 2, 3),  }, 	/* FVco 720.000000 */
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> index 1191b2905625..be9a248b5ce9 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> @@ -20,7 +20,7 @@
>  #include <plat/cpu.h>
>  #include <plat/cpu-freq-core.h>
>  
> -static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
> +static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
>  	{ .frequency = 78019200,	.driver_data = PLLVAL(121, 5, 3), 	}, 	/* FVco 624.153600 */
>  	{ .frequency = 84067200,	.driver_data = PLLVAL(131, 5, 3), 	}, 	/* FVco 672.537600 */
>  	{ .frequency = 90115200,	.driver_data = PLLVAL(141, 5, 3), 	}, 	/* FVco 720.921600 */
> diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
> index 733aa5153e74..68ef8fd9482f 100644
> --- a/drivers/cpufreq/s3c24xx-cpufreq.c
> +++ b/drivers/cpufreq/s3c24xx-cpufreq.c
> @@ -648,7 +648,7 @@ late_initcall(s3c_cpufreq_initcall);
>   *
>   * Register the given set of PLLs with the system.
>   */
> -int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
> +int s3c_plltab_register(struct cpufreq_frequency_table *plls,
>  			       unsigned int plls_no)
>  {
>  	struct cpufreq_frequency_table *vals;
> 

This should go in through the Samsung tree, so I'll leave it for them to pick
it up (at least for the time being).

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-16 22:36   ` Rafael J. Wysocki
  0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2015-11-16 22:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, November 16, 2015 10:26:43 PM Arnd Bergmann wrote:
> s3c2410_plls_add is a device notifier that may be called at runtime and
> is correctly not marked __init. However it calls s3c_plltab_register()
> which is marked __init, and that triggers a build error when we are
> checking for section mismatches:
> 
> WARNING: vmlinux.o(.text+0x195e0): Section mismatch in reference from the function s3c2410_plls_add() to the function .init.text:s3c_plltab_register()
> The function s3c2410_plls_add() references
> the function __init s3c_plltab_register().
> This is often because s3c2410_plls_add lacks a __init
> annotation or the annotation of s3c_plltab_register is wrong.
> 
> This removes the __init annotation from s3c2410_plls_add as well as the
> __initdata section annotations from s3c2440_plls_12 and s3c2440_plls_169344,
> which in turn are referenced from s3c2410_plls_add.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ----
> It would be nice to get this merged through the cpufreq tree. Most likely
> this has never caused problems because the device notifiers in practice
> only get called at boot time, so I assume it's enough to have this fixed
> in 4.4 or 4.5 but not backported.
> 
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> index a19460e6e7b0..b355fca6cc2e 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> @@ -20,7 +20,7 @@
>  #include <plat/cpu.h>
>  #include <plat/cpu-freq-core.h>
>  
> -static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
> +static struct cpufreq_frequency_table s3c2440_plls_12[] = {
>  	{ .frequency = 75000000,	.driver_data = PLLVAL(0x75, 3, 3),  }, 	/* FVco 600.000000 */
>  	{ .frequency = 80000000,	.driver_data = PLLVAL(0x98, 4, 3),  }, 	/* FVco 640.000000 */
>  	{ .frequency = 90000000,	.driver_data = PLLVAL(0x70, 2, 3),  }, 	/* FVco 720.000000 */
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> index 1191b2905625..be9a248b5ce9 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> @@ -20,7 +20,7 @@
>  #include <plat/cpu.h>
>  #include <plat/cpu-freq-core.h>
>  
> -static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
> +static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
>  	{ .frequency = 78019200,	.driver_data = PLLVAL(121, 5, 3), 	}, 	/* FVco 624.153600 */
>  	{ .frequency = 84067200,	.driver_data = PLLVAL(131, 5, 3), 	}, 	/* FVco 672.537600 */
>  	{ .frequency = 90115200,	.driver_data = PLLVAL(141, 5, 3), 	}, 	/* FVco 720.921600 */
> diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
> index 733aa5153e74..68ef8fd9482f 100644
> --- a/drivers/cpufreq/s3c24xx-cpufreq.c
> +++ b/drivers/cpufreq/s3c24xx-cpufreq.c
> @@ -648,7 +648,7 @@ late_initcall(s3c_cpufreq_initcall);
>   *
>   * Register the given set of PLLs with the system.
>   */
> -int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
> +int s3c_plltab_register(struct cpufreq_frequency_table *plls,
>  			       unsigned int plls_no)
>  {
>  	struct cpufreq_frequency_table *vals;
> 

This should go in through the Samsung tree, so I'll leave it for them to pick
it up (at least for the time being).

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
  2015-11-16 22:17     ` Arnd Bergmann
@ 2015-11-17  1:57       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2015-11-17  1:57 UTC (permalink / raw)
  To: Arnd Bergmann, Rafael J. Wysocki
  Cc: Kukjin Kim, Viresh Kumar, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

On 17.11.2015 07:17, Arnd Bergmann wrote:
> On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
>>
>> This should go in through the Samsung tree, so I'll leave it for them to pick
>> it up (at least for the time being).
> 
> Ok, fair enough. Kukjin or Krzysztof, can you pick this up?

Sure.

As for the patch I think everything can be converted to init/initdata
(as in attachment).

Best regards,
Krzysztof




[-- Attachment #2: init_data.patch --]
[-- Type: text/x-patch, Size: 3760 bytes --]

diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c
index 5e37d368594b..d9fd5319379b 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c
@@ -65,12 +65,12 @@ static struct cpufreq_frequency_table pll_vals_12MHz[] = {
     { .frequency = 270000000, .driver_data = PLLVAL(127, 1, 1),  },
 };
 
-static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif)
+static int __init s3c2410_plls_add(struct device *dev, struct subsys_interface *sif)
 {
 	return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz));
 }
 
-static struct subsys_interface s3c2410_plls_interface = {
+static struct subsys_interface s3c2410_plls_interface __initdata = {
 	.name		= "s3c2410_plls",
 	.subsys		= &s3c2410_subsys,
 	.add_dev	= s3c2410_plls_add,
@@ -83,7 +83,7 @@ static int __init s3c2410_pll_init(void)
 }
 arch_initcall(s3c2410_pll_init);
 
-static struct subsys_interface s3c2410a_plls_interface = {
+static struct subsys_interface s3c2410a_plls_interface __initdata = {
 	.name		= "s3c2410a_plls",
 	.subsys		= &s3c2410a_subsys,
 	.add_dev	= s3c2410_plls_add,
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index a19460e6e7b0..01958230cf2f 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -50,7 +50,7 @@ static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
 	{ .frequency = 400000000,	.driver_data = PLLVAL(0x5c, 1, 1),  }, 	/* FVco 800.000000 */
 };
 
-static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif)
+static int __init s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif)
 {
 	struct clk *xtal_clk;
 	unsigned long xtal;
@@ -71,7 +71,7 @@ static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif)
 	return 0;
 }
 
-static struct subsys_interface s3c2440_plls12_interface = {
+static struct subsys_interface s3c2440_plls12_interface __initdata = {
 	.name		= "s3c2440_plls12",
 	.subsys		= &s3c2440_subsys,
 	.add_dev	= s3c2440_plls12_add,
@@ -84,7 +84,7 @@ static int __init s3c2440_pll_12mhz(void)
 }
 arch_initcall(s3c2440_pll_12mhz);
 
-static struct subsys_interface s3c2442_plls12_interface = {
+static struct subsys_interface s3c2442_plls12_interface __initdata = {
 	.name		= "s3c2442_plls12",
 	.subsys		= &s3c2442_subsys,
 	.add_dev	= s3c2440_plls12_add,
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index 1191b2905625..db9f476ab581 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -78,7 +78,7 @@ static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
 	{ .frequency = 402192000,	.driver_data = PLLVAL(87, 2, 1), 	}, 	/* FVco 804.384000 */
 };
 
-static int s3c2440_plls169344_add(struct device *dev,
+static int __init s3c2440_plls169344_add(struct device *dev,
 				  struct subsys_interface *sif)
 {
 	struct clk *xtal_clk;
@@ -100,7 +100,7 @@ static int s3c2440_plls169344_add(struct device *dev,
 	return 0;
 }
 
-static struct subsys_interface s3c2440_plls169344_interface = {
+static struct subsys_interface s3c2440_plls169344_interface __initdata  = {
 	.name		= "s3c2440_plls169344",
 	.subsys		= &s3c2440_subsys,
 	.add_dev	= s3c2440_plls169344_add,
@@ -112,7 +112,7 @@ static int __init s3c2440_pll_16934400(void)
 }
 arch_initcall(s3c2440_pll_16934400);
 
-static struct subsys_interface s3c2442_plls169344_interface = {
+static struct subsys_interface s3c2442_plls169344_interface __initdata = {
 	.name		= "s3c2442_plls169344",
 	.subsys		= &s3c2442_subsys,
 	.add_dev	= s3c2440_plls169344_add,

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-17  1:57       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2015-11-17  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 17.11.2015 07:17, Arnd Bergmann wrote:
> On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
>>
>> This should go in through the Samsung tree, so I'll leave it for them to pick
>> it up (at least for the time being).
> 
> Ok, fair enough. Kukjin or Krzysztof, can you pick this up?

Sure.

As for the patch I think everything can be converted to init/initdata
(as in attachment).

Best regards,
Krzysztof



-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_data.patch
Type: text/x-patch
Size: 3760 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151117/3cab94a0/attachment.bin>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
  2015-11-17  1:57       ` Krzysztof Kozlowski
@ 2015-11-17  9:01         ` Arnd Bergmann
  -1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-17  9:01 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Krzysztof Kozlowski, Rafael J. Wysocki, linux-samsung-soc,
	linux-pm, Viresh Kumar, linux-kernel, Kukjin Kim

On Tuesday 17 November 2015 10:57:48 Krzysztof Kozlowski wrote:
> On 17.11.2015 07:17, Arnd Bergmann wrote:
> > On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
> >>
> >> This should go in through the Samsung tree, so I'll leave it for them to pick
> >> it up (at least for the time being).
> > 
> > Ok, fair enough. Kukjin or Krzysztof, can you pick this up?
> 
> Sure.
> 
> As for the patch I think everything can be converted to init/initdata
> (as in attachment).
> 

I don't think so:

static struct subsys_interface s3c2442_plls169344_interface __initdata = {
        .name           = "s3c2442_plls169344",
        .subsys         = &s3c2442_subsys,
        .add_dev        = s3c2440_plls169344_add,
};

This gets passed into subsys_interface_register(), which is not __init
in turn. subsys_interface_register() then goes on to add
s3c2442_plls169344_interface into a linked list that is traversed
at runtime, but the __initdata section gets discarded so you now
have a broken list.

	Arnd


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-17  9:01         ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-11-17  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 17 November 2015 10:57:48 Krzysztof Kozlowski wrote:
> On 17.11.2015 07:17, Arnd Bergmann wrote:
> > On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
> >>
> >> This should go in through the Samsung tree, so I'll leave it for them to pick
> >> it up (at least for the time being).
> > 
> > Ok, fair enough. Kukjin or Krzysztof, can you pick this up?
> 
> Sure.
> 
> As for the patch I think everything can be converted to init/initdata
> (as in attachment).
> 

I don't think so:

static struct subsys_interface s3c2442_plls169344_interface __initdata = {
        .name           = "s3c2442_plls169344",
        .subsys         = &s3c2442_subsys,
        .add_dev        = s3c2440_plls169344_add,
};

This gets passed into subsys_interface_register(), which is not __init
in turn. subsys_interface_register() then goes on to add
s3c2442_plls169344_interface into a linked list that is traversed
at runtime, but the __initdata section gets discarded so you now
have a broken list.

	Arnd

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
  2015-11-17  9:01         ` Arnd Bergmann
@ 2015-11-18  0:44           ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2015-11-18  0:44 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arm-kernel
  Cc: Rafael J. Wysocki, linux-samsung-soc, linux-pm, Viresh Kumar,
	linux-kernel, Kukjin Kim

On 17.11.2015 18:01, Arnd Bergmann wrote:
> On Tuesday 17 November 2015 10:57:48 Krzysztof Kozlowski wrote:
>> On 17.11.2015 07:17, Arnd Bergmann wrote:
>>> On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
>>>>
>>>> This should go in through the Samsung tree, so I'll leave it for them to pick
>>>> it up (at least for the time being).
>>>
>>> Ok, fair enough. Kukjin or Krzysztof, can you pick this up?
>>
>> Sure.
>>
>> As for the patch I think everything can be converted to init/initdata
>> (as in attachment).
>>
> 
> I don't think so:
> 
> static struct subsys_interface s3c2442_plls169344_interface __initdata = {
>         .name           = "s3c2442_plls169344",
>         .subsys         = &s3c2442_subsys,
>         .add_dev        = s3c2440_plls169344_add,
> };
> 
> This gets passed into subsys_interface_register(), which is not __init
> in turn. subsys_interface_register() then goes on to add
> s3c2442_plls169344_interface into a linked list that is traversed
> at runtime, but the __initdata section gets discarded so you now
> have a broken list.

Ah, yes, so the patch is fine:

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] cpufreq: do not mark s3c2410_plls_add as __init
@ 2015-11-18  0:44           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2015-11-18  0:44 UTC (permalink / raw)
  To: linux-arm-kernel

On 17.11.2015 18:01, Arnd Bergmann wrote:
> On Tuesday 17 November 2015 10:57:48 Krzysztof Kozlowski wrote:
>> On 17.11.2015 07:17, Arnd Bergmann wrote:
>>> On Monday 16 November 2015 23:36:42 Rafael J. Wysocki wrote:
>>>>
>>>> This should go in through the Samsung tree, so I'll leave it for them to pick
>>>> it up (at least for the time being).
>>>
>>> Ok, fair enough. Kukjin or Krzysztof, can you pick this up?
>>
>> Sure.
>>
>> As for the patch I think everything can be converted to init/initdata
>> (as in attachment).
>>
> 
> I don't think so:
> 
> static struct subsys_interface s3c2442_plls169344_interface __initdata = {
>         .name           = "s3c2442_plls169344",
>         .subsys         = &s3c2442_subsys,
>         .add_dev        = s3c2440_plls169344_add,
> };
> 
> This gets passed into subsys_interface_register(), which is not __init
> in turn. subsys_interface_register() then goes on to add
> s3c2442_plls169344_interface into a linked list that is traversed
> at runtime, but the __initdata section gets discarded so you now
> have a broken list.

Ah, yes, so the patch is fine:

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-11-18  0:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 21:26 [PATCH] cpufreq: do not mark s3c2410_plls_add as __init Arnd Bergmann
2015-11-16 21:26 ` Arnd Bergmann
2015-11-16 22:36 ` Rafael J. Wysocki
2015-11-16 22:36   ` Rafael J. Wysocki
2015-11-16 22:17   ` Arnd Bergmann
2015-11-16 22:17     ` Arnd Bergmann
2015-11-17  1:57     ` Krzysztof Kozlowski
2015-11-17  1:57       ` Krzysztof Kozlowski
2015-11-17  9:01       ` Arnd Bergmann
2015-11-17  9:01         ` Arnd Bergmann
2015-11-18  0:44         ` Krzysztof Kozlowski
2015-11-18  0:44           ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.