diff mbox series

[03/12] parisc: Move store_cpu_topology() into __cpuinit section

Message ID 20220325143833.402631-3-deller@gmx.de (mailing list archive)
State Superseded
Headers show
Series [01/12] parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY | expand

Commit Message

Helge Deller March 25, 2022, 2:38 p.m. UTC
Signed-off-by: Helge Deller <deller@gmx.de>
---
 arch/parisc/kernel/topology.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--
2.35.1

Comments

Rolf Eike Beer March 25, 2022, 4:52 p.m. UTC | #1
Am Freitag, 25. März 2022, 15:38:24 CET schrieb Helge Deller:
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
>  arch/parisc/kernel/topology.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c
> index 72d9aeb54fbe..dc766fb55491 100644
> --- a/arch/parisc/kernel/topology.c
> +++ b/arch/parisc/kernel/topology.c
> @@ -16,17 +16,18 @@
>  #include <linux/cpu.h>
> 
>  #include <asm/topology.h>
> +#include <asm/sections.h>
> 
>  static DEFINE_PER_CPU(struct cpu, cpu_devices);
> 
> -static int dualcores_found __initdata;
> +static int dualcores_found;

I wonder if that should not be something like __cpuinit_data.
Helge Deller March 25, 2022, 5:12 p.m. UTC | #2
On 3/25/22 17:52, Rolf Eike Beer wrote:
> Am Freitag, 25. März 2022, 15:38:24 CET schrieb Helge Deller:
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> ---
>>  arch/parisc/kernel/topology.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c
>> index 72d9aeb54fbe..dc766fb55491 100644
>> --- a/arch/parisc/kernel/topology.c
>> +++ b/arch/parisc/kernel/topology.c
>> @@ -16,17 +16,18 @@
>>  #include <linux/cpu.h>
>>
>>  #include <asm/topology.h>
>> +#include <asm/sections.h>
>>
>>  static DEFINE_PER_CPU(struct cpu, cpu_devices);
>>
>> -static int dualcores_found __initdata;
>> +static int dualcores_found;
>
> I wonder if that should not be something like __cpuinit_data.

Heh ... all other platforms got rid of __cpuinit and __cpuinit_data.
I just wanted to keep it on parisc in order to have small code in case of UP.
That said, introducing a __cpuinit_data section for this single variable didn't made sense.

Helge
diff mbox series

Patch

diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c
index 72d9aeb54fbe..dc766fb55491 100644
--- a/arch/parisc/kernel/topology.c
+++ b/arch/parisc/kernel/topology.c
@@ -16,17 +16,18 @@ 
 #include <linux/cpu.h>

 #include <asm/topology.h>
+#include <asm/sections.h>

 static DEFINE_PER_CPU(struct cpu, cpu_devices);

-static int dualcores_found __initdata;
+static int dualcores_found;

 /*
  * store_cpu_topology is called at boot when only one cpu is running
  * and with the mutex cpu_hotplug.lock locked, when several cpus have booted,
  * which prevents simultaneous write access to cpu_topology array
  */
-void __init store_cpu_topology(unsigned int cpuid)
+void __cpuinit store_cpu_topology(unsigned int cpuid)
 {
 	struct cpu_topology *cpuid_topo = &cpu_topology[cpuid];
 	struct cpuinfo_parisc *p;