ARM: DT: remove redundant DT related code
Subsystems (7)
cover ARM: DT: remove redundant DT related code
From: Sudeep KarkadaNagesha <[email protected]>
Hi,
As part of my changes to remove duplicate code for parsing cpu nodes in the device tree, I found few unnecessary code mostly around smp_init_cpus. Most of the ARM Cortex A9 based platforms use SCU to get the number of cpus while many others depend on the device tree.
Even on DT based platforms using SCU, they can be made to depend on DT to cpu count simplifying smp_init_cpus. In fact arm_dt_init_cpu_maps called before smp_init_cpus, already does the device tree parsing, validating nr_cpu_ids and setting the cpu_possible_mask appropriately.
However this series targets only the platforms using DT for cpu count (i.e. not using SCU)
Regards,
Sudeep
Sudeep KarkadaNagesha (5):
ARM: keystone: remove redundant smp_init_cpus definition
ARM: vexpress: remove redundant vexpress_dt_cpus_num to get cpu count
ARM: mach-mvebu: remove redundant DT parsing and validation
ARM: highbank: remove redundant smp_init_cpus definition
ARM: zynq: remove unnecessary setting of cpu_present_mask
arch/arm/mach-highbank/platsmp.c | 22 ---------------------- arch/arm/mach-keystone/platsmp.c | 1 - arch/arm/mach-mvebu/platsmp.c | 19 +------------------ arch/arm/mach-vexpress/platsmp.c | 32 +------------------------------- arch/arm/mach-zynq/platsmp.c | 9 --------- 5 files changed, 2 insertions(+), 81 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/5 ARM: keystone: remove redundant smp_init_cpus definition
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_maps is called before smp_init_cpus. It makes the platform/SoC definition of smp_init_cpus unnecessary.
--- arch/arm/mach-keystone/platsmp.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-keystone/platsmp.c +0 -1
@@ -38,6 +38,5 @@ static int keystone_smp_boot_secondary(unsigned int cpu, }struct smp_operations keystone_smp_ops__initdata = { - .smp_init_cpus = arm_dt_init_cpu_maps, .smp_boot_secondary = keystone_smp_boot_secondary, };
Signature · 1 line
1.8.1.2
PATCH 1/5 ARM: keystone: remove redundant smp_init_cpus definition
Quoted 8 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsis called beforesmp_init_cpus. It makes the platform/SoC definition ofsmp_init_cpusunnecessary.Cc Santosh Shilimkar <[email protected]>Signed-off-by Sudeep KarkadaNagesha <[email protected]>---
Looks good, thanks. I will pick this up.
Regards,
Santosh
PATCH 2/5 ARM: vexpress: remove redundant vexpress_dt_cpus_num to get cpu count
In reply to Sudeep KarkadaNageshaFrom: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_maps parses the device tree, validates and sets the cpu_possible_mask appropriately. It is unnecessary to do another DT parse to get the number of cpus, use num_possible_cpus instead.
This patch also removes setting cpu_present_mask as platforms should only re-initialize it in smp_prepare_cpus() if present != possible.
--- arch/arm/mach-vexpress/platsmp.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-)
arch/arm/mach-vexpress/platsmp.c +1 -31
@@ -77,39 +77,13 @@ void __init vexpress_dt_smp_map_io(void)WARN_ON (of_scan_flat_dt (vexpress_dt_find_scu,NULL )); } -static int __init vexpress_dt_cpus_num (unsigned long node,const char *uname, -int depth,void *data) -{ -static int prev_depth =-1 ; -static int nr_cpus =-1 ; - -if (prev_depth > depth && nr_cpus >0 ) -return nr_cpus; - -if (nr_cpus <0 &&strcmp (uname,"cpus" ) ==0 ) - nr_cpus =0 ; - -if (nr_cpus >=0 ) { -const char *device_type =of_get_flat_dt_prop (node, -"device_type" ,NULL ); - -if (device_type &&strcmp (device_type,"cpu" ) ==0 ) - nr_cpus++; - } - - prev_depth = depth; - -return 0 ; -} -static void __init vexpress_dt_smp_init_cpus (void ) {int ncores =0 , i;switch (vexpress_dt_scu) {case GENERIC_SCU : - ncores =of_scan_flat_dt (vexpress_dt_cpus_num,NULL ); -break ; +return ;case CORTEX_A9_SCU : ncores =scu_get_core_count (vexpress_dt_cortex_a9_scu_base);break ;
@@ -133,12 +107,8 @@ static void __init vexpress_dt_smp_init_cpus(void)static void __init vexpress_dt_smp_prepare_cpus (unsigned int max_cpus) { -int i; -switch (vexpress_dt_scu) {case GENERIC_SCU : -for (i =0 ; i < max_cpus; i++) -set_cpu_present (i, true);break ;case CORTEX_A9_SCU :scu_enable (vexpress_dt_cortex_a9_scu_base);
Signature · 1 line
1.8.1.2
PATCH 2/5 ARM: vexpress: remove redundant vexpress_dt_cpus_num to get cpu count
Hi Pawel,
Quoted 9 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsparses the device tree, validates and sets thecpu_possible_maskappropriately. It is unnecessary to do another DT parse to get the number of cpus, usenum_possible_cpusinstead.This patch also removes setting
cpu_present_maskas platforms should only re-initialize it insmp_prepare_cpus()if present != possible.
Can you pick this patch for v3.12 ?
Regards,
Sudeep
Quoted 65 lines
Acked-by Pawel Moll <[email protected]>Signed-off-by Sudeep KarkadaNagesha <[email protected]>--- arch/arm/mach-vexpress/platsmp.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-)arch/arm/mach-vexpress/platsmp.c +1
-31@@ -77,39 +77,13 @@ void __init vexpress_dt_smp_map_io(void)WARN_ON (of_scan_flat_dt (vexpress_dt_find_scu,NULL )); } -static int __init vexpress_dt_cpus_num (unsigned long node,const char *uname, -int depth,void *data) -{ -static int prev_depth =-1 ; -static int nr_cpus =-1 ; - -if (prev_depth > depth && nr_cpus >0 ) -return nr_cpus; - -if (nr_cpus <0 &&strcmp (uname,"cpus" ) ==0 ) - nr_cpus =0 ; - -if (nr_cpus >=0 ) { -const char *device_type =of_get_flat_dt_prop (node, -"device_type" ,NULL ); - -if (device_type &&strcmp (device_type,"cpu" ) ==0 ) - nr_cpus++; - } - - prev_depth = depth; - -return 0 ; -} -static void __init vexpress_dt_smp_init_cpus (void ) {int ncores =0 , i;switch (vexpress_dt_scu) {case GENERIC_SCU : - ncores =of_scan_flat_dt (vexpress_dt_cpus_num,NULL ); -break ; +return ;case CORTEX_A9_SCU : ncores =scu_get_core_count (vexpress_dt_cortex_a9_scu_base);break ;@@ -133,12 +107,8 @@ static void __init vexpress_dt_smp_init_cpus(void)static void __init vexpress_dt_smp_prepare_cpus (unsigned int max_cpus) { -int i; -switch (vexpress_dt_scu) {case GENERIC_SCU : -for (i =0 ; i < max_cpus; i++) -set_cpu_present (i, true);break ;case CORTEX_A9_SCU :scu_enable (vexpress_dt_cortex_a9_scu_base);
PATCH 3/5 ARM: mach-mvebu: remove redundant DT parsing and validation
In reply to Sudeep KarkadaNageshaFrom: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_maps parses the device tree, validates and sets the cpu_possible_mask appropriately. It is unnecessary to do another DT parse to get the number of cpus, use num_possible_cpus instead.
--- arch/arm/mach-mvebu/platsmp.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
arch/arm/mach-mvebu/platsmp.c +1 -18
@@ -87,28 +87,11 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)static void __init armada_xp_smp_init_cpus (void ) { -struct device_node *np; -unsigned int i, ncores; +unsigned int ncores =num_possible_cpus (); - np =of_find_node_by_name (NULL ,"cpus" ); -if (!np) -panic ("No 'cpus' node found\n" ); - - ncores =of_get_child_count (np);if (ncores ==0 || ncores >ARMADA_XP_MAX_CPUS )panic ("Invalid number of CPUs in DT\n" ); -/* Limit possible CPUs to defconfig */ -if (ncores > nr_cpu_ids) { -pr_warn ("SMP: %d CPUs physically present. Only %d configured." , - ncores, nr_cpu_ids); -pr_warn ("Clipping CPU count to %d\n" , nr_cpu_ids); - ncores = nr_cpu_ids; - } - -for (i =0 ; i < ncores; i++) -set_cpu_possible (i, true); -set_smp_cross_call (armada_mpic_send_doorbell); }
Signature · 1 line
1.8.1.2
PATCH 3/5 ARM: mach-mvebu: remove redundant DT parsing and validation
Quoted 6 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsparses the device tree, validates and sets thecpu_possible_maskappropriately. It is unnecessary to do another DT parse to get the number of cpus, usenum_possible_cpusinstead.
Hi Gregory,
Does this change look fine ?
If OK, not sure if you prefer to pick up this or want me to send to arm-soc guys.
Regards,
Sudeep
Quoted 43 lines
Cc Gregory Clement <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Signed-off-by Sudeep KarkadaNagesha <[email protected]>--- arch/arm/mach-mvebu/platsmp.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)arch/arm/mach-mvebu/platsmp.c +1
-18@@ -87,28 +87,11 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)static void __init armada_xp_smp_init_cpus (void ) { -struct device_node *np; -unsigned int i, ncores; +unsigned int ncores =num_possible_cpus (); - np =of_find_node_by_name (NULL ,"cpus" ); -if (!np) -panic ("No 'cpus' node found\n" ); - - ncores =of_get_child_count (np);if (ncores ==0 || ncores >ARMADA_XP_MAX_CPUS )panic ("Invalid number of CPUs in DT\n" ); -/* Limit possible CPUs to defconfig */ -if (ncores > nr_cpu_ids) { -pr_warn ("SMP: %d CPUs physically present. Only %d configured." , - ncores, nr_cpu_ids); -pr_warn ("Clipping CPU count to %d\n" , nr_cpu_ids); - ncores = nr_cpu_ids; - } - -for (i =0 ; i < ncores; i++) -set_cpu_possible (i, true); -set_smp_cross_call (armada_mpic_send_doorbell); }
PATCH 3/5 ARM: mach-mvebu: remove redundant DT parsing and validation
Quoted 10 lines · Sudeep KarkadaNagesha
Quoted 6 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsparses the device tree, validates and sets thecpu_possible_maskappropriately. It is unnecessary to do another DT parse to get the number of cpus, usenum_possible_cpusinstead.Hi Gregory,
Does this change look fine ?
Yes it is a nice cleanup.
and I have just test it on an Armada XP DB board.
So you can add
my Acked-by: Gregory Clement <[email protected]>
Quoted 2 lines
If OK, not sure if you prefer to pick up this or want me to send to arm-soc guys.
I think it is better if we pick up this patch as it only touch a file belonging to mvebu.
Jason,
do you agree to pick it up and then push it to in your next (and maybe last) pull request?
Thanks,
Quoted 49 lines
Regards,
SudeepQuoted 43 lines
Cc Gregory Clement <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Signed-off-by Sudeep KarkadaNagesha <[email protected]>--- arch/arm/mach-mvebu/platsmp.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)arch/arm/mach-mvebu/platsmp.c +1
-18@@ -87,28 +87,11 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)static void __init armada_xp_smp_init_cpus (void ) { -struct device_node *np; -unsigned int i, ncores; +unsigned int ncores =num_possible_cpus (); - np =of_find_node_by_name (NULL ,"cpus" ); -if (!np) -panic ("No 'cpus' node found\n" ); - - ncores =of_get_child_count (np);if (ncores ==0 || ncores >ARMADA_XP_MAX_CPUS )panic ("Invalid number of CPUs in DT\n" ); -/* Limit possible CPUs to defconfig */ -if (ncores > nr_cpu_ids) { -pr_warn ("SMP: %d CPUs physically present. Only %d configured." , - ncores, nr_cpu_ids); -pr_warn ("Clipping CPU count to %d\n" , nr_cpu_ids); - ncores = nr_cpu_ids; - } - -for (i =0 ; i < ncores; i++) -set_cpu_possible (i, true); -set_smp_cross_call (armada_mpic_send_doorbell); }
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 3/5 ARM: mach-mvebu: remove redundant DT parsing and validation
Quoted 23 lines · Gregory CLEMENT
Quoted 10 lines · Sudeep KarkadaNagesha
Quoted 6 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsparses the device tree, validates and sets thecpu_possible_maskappropriately. It is unnecessary to do another DT parse to get the number of cpus, usenum_possible_cpusinstead.Hi Gregory,
Does this change look fine ?
Yes it is a nice cleanup.
and I have just test it on an Armada XP DB board.
So you can add
my Acked-by: Gregory Clement <[email protected]>
Quoted 2 lines
If OK, not sure if you prefer to pick up this or want me to send to arm-soc guys.
Quoted 6 lines
I think it is better if we pick up this patch as it only touch a file belonging to mvebu.
Jason,
do you agree to pick it up and then push it to in your next (and maybe last) pull request?
Yep.
thx,
Jason.
Jason Cooper
AppliedPATCH 3/5 ARM: mach-mvebu: remove redundant DT parsing and validation
In reply to Sudeep KarkadaNageshaQuoted 6 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsparses the device tree, validates and sets thecpu_possible_maskappropriately. It is unnecessary to do another DT parse to get the number of cpus, usenum_possible_cpusinstead.
Quoted 7 lines
Cc Gregory Clement <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Signed-off-by Sudeep KarkadaNagesha <[email protected]>--- arch/arm/mach-mvebu/platsmp.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
Applied to mvebu/soc with Gregory's Ack
thx,
Jason.
PATCH 4/5 ARM: highbank: remove redundant smp_init_cpus definition
In reply to Sudeep KarkadaNageshaFrom: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_maps is called before smp_init_cpus, which sets the cpu_possible_mask appropriately. Since highbank_smp_init_cpus does nothing extra, it can be removed.
--- arch/arm/mach-highbank/platsmp.c | 22 ---------------------- 1 file changed, 22 deletions(-)
arch/arm/mach-highbank/platsmp.c +0 -22
@@ -31,27 +31,6 @@ static int highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)return 0 ; } -/* -* Initialise the CPU possible map early - this describes the CPUs -* which may be present or become present in the system. -*/ -static void __init highbank_smp_init_cpus (void ) -{ -unsigned int i, ncores =4 ; - -/* sanity check */ -if (ncores >NR_CPUS ) { -printk (KERN_WARNING -"highbank: no. of cores (%d) greater than configured " -"maximum of %d - clipping\n" , - ncores,NR_CPUS ); - ncores =NR_CPUS ; - } - -for (i =0 ; i < ncores; i++) -set_cpu_possible (i, true); -} -static void __init highbank_smp_prepare_cpus (unsigned int max_cpus) {if (scu_base_addr)
@@ -59,7 +38,6 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) }struct smp_operations highbank_smp_ops__initdata = { - .smp_init_cpus = highbank_smp_init_cpus, .smp_prepare_cpus = highbank_smp_prepare_cpus, .smp_boot_secondary = highbank_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU
Signature · 1 line
1.8.1.2
PATCH 4/5 ARM: highbank: remove redundant smp_init_cpus definition
Quoted 5 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsis called beforesmp_init_cpus, which sets thecpu_possible_maskappropriately. Sincehighbank_smp_init_cpusdoes nothing extra, it can be removed.
This is all going to get removed in my PSCI support series. Trying to get an updated version out soon.
Rob
Quoted 47 lines
Cc Rob Herring <[email protected]>Signed-off-by Sudeep KarkadaNagesha <[email protected]>--- arch/arm/mach-highbank/platsmp.c | 22 ---------------------- 1 file changed, 22 deletions(-)arch/arm/mach-highbank/platsmp.c +0
-22@@ -31,27 +31,6 @@ static int highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)return 0 ; } -/* -* Initialise the CPU possible map early - this describes the CPUs -* which may be present or become present in the system. -*/ -static void __init highbank_smp_init_cpus (void ) -{ -unsigned int i, ncores =4 ; - -/* sanity check */ -if (ncores >NR_CPUS ) { -printk (KERN_WARNING -"highbank: no. of cores (%d) greater than configured " -"maximum of %d - clipping\n" , - ncores,NR_CPUS ); - ncores =NR_CPUS ; - } - -for (i =0 ; i < ncores; i++) -set_cpu_possible (i, true); -} -static void __init highbank_smp_prepare_cpus (unsigned int max_cpus) {if (scu_base_addr)@@ -59,7 +38,6 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) }struct smp_operations highbank_smp_ops__initdata = { - .smp_init_cpus = highbank_smp_init_cpus, .smp_prepare_cpus = highbank_smp_prepare_cpus, .smp_boot_secondary = highbank_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU
PATCH 4/5 ARM: highbank: remove redundant smp_init_cpus definition
Quoted 10 lines · Rob Herring
Quoted 5 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
arm_dt_init_cpu_mapsis called beforesmp_init_cpus, which sets thecpu_possible_maskappropriately. Sincehighbank_smp_init_cpusdoes nothing extra, it can be removed.This is all going to get removed in my PSCI support series. Trying to get an updated version out soon.
Thanks for the update.
Regards,
Sudeep
PATCH 5/5 ARM: zynq: remove unnecessary setting of cpu_present_mask
In reply to Sudeep KarkadaNageshaFrom: Sudeep KarkadaNagesha <[email protected]>
This patch also removes setting cpu_present_mask as platforms should only re-initialize it in smp_prepare_cpus() if present != possible.
--- arch/arm/mach-zynq/platsmp.c | 9 --------- 1 file changed, 9 deletions(-)
arch/arm/mach-zynq/platsmp.c +0 -9
@@ -114,15 +114,6 @@ static void __init zynq_smp_init_cpus(void)static void __init zynq_smp_prepare_cpus (unsigned int max_cpus) { -int i; - -/* -* Initialise the present map, which describes the set of CPUs -* actually populated at the present time. -*/ -for (i =0 ; i < max_cpus; i++) -set_cpu_present (i, true); -scu_enable (zynq_scu_base); }
Signature · 1 line
1.8.1.2
cover ARM: DT: remove redundant DT related code
In reply to Sudeep KarkadaNageshaQuoted 9 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
Hi,
As part of my changes to remove duplicate code for parsing cpu nodes in the device tree, I found few unnecessary code mostly around
smp_init_cpus. Most of the ARM Cortex A9 based platforms use SCU to get the number of cpus while many others depend on the device tree.
Quoted 7 lines
Even on DT based platforms using SCU, they can be made to depend on DT to cpu count simplifying
smp_init_cpus. In factarm_dt_init_cpu_mapscalled beforesmp_init_cpus, already does the device tree parsing, validatingnr_cpu_idsand setting thecpu_possible_maskappropriately.However this series targets only the platforms using DT for cpu count (i.e. not using SCU)
Just a note. Zynq is using SCU to get cpu count not DT.
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130723/4d2280f8/attachment.sig>
cover ARM: DT: remove redundant DT related code
Quoted 15 lines · Michal Simek
Quoted 14 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
Hi,
As part of my changes to remove duplicate code for parsing cpu nodes in the device tree, I found few unnecessary code mostly around
smp_init_cpus. Most of the ARM Cortex A9 based platforms use SCU to get the number of cpus while many others depend on the device tree.Even on DT based platforms using SCU, they can be made to depend on DT to cpu count simplifying
smp_init_cpus. In factarm_dt_init_cpu_mapscalled beforesmp_init_cpus, already does the device tree parsing, validatingnr_cpu_idsand setting thecpu_possible_maskappropriately.
Quoted 5 lines
Quoted 2 lines
However this series targets only the platforms using DT for cpu count (i.e. not using SCU)
Just a note. Zynq is using SCU to get cpu count not DT.
Correct, when I saw that vexpress and zynq were only 2 platforms setting cpu_present_mask which is unnecessary, I added Zynq last minute to this series.
Regards,
Sudeep
cover ARM: DT: remove redundant DT related code
In reply to Sudeep KarkadaNageshaQuoted 14 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
Hi,
As part of my changes to remove duplicate code for parsing cpu nodes in the device tree, I found few unnecessary code mostly around
smp_init_cpus. Most of the ARM Cortex A9 based platforms use SCU to get the number of cpus while many others depend on the device tree.Even on DT based platforms using SCU, they can be made to depend on DT to cpu count simplifying
smp_init_cpus. In factarm_dt_init_cpu_mapscalled beforesmp_init_cpus, already does the device tree parsing, validatingnr_cpu_idsand setting thecpu_possible_maskappropriately.
Quoted 5 lines
However this series targets only the platforms using DT for cpu count (i.e. not using SCU)
Regards,
Sudeep
For the whole series:
Quoted 24 lines
Sudeep KarkadaNagesha (5):
ARM: keystone: remove redundantsmp_init_cpusdefinition
ARM: vexpress: remove redundantvexpress_dt_cpus_numto get cpu count
ARM: mach-mvebu: remove redundant DT parsing and validation
ARM: highbank: remove redundantsmp_init_cpusdefinition
ARM: zynq: remove unnecessary setting ofcpu_present_maskarch/arm/mach-highbank/platsmp.c | 22 ---------------------- arch/arm/mach-keystone/platsmp.c | 1 - arch/arm/mach-mvebu/platsmp.c | 19 +------------------ arch/arm/mach-vexpress/platsmp.c | 32 +------------------------------- arch/arm/mach-zynq/platsmp.c | 9 --------- 5 files changed, 2 insertions(+), 81 deletions(-)Signature · 8 lines
1.8.1.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
cover ARM: DT: remove redundant DT related code
Quoted 16 lines · Nicolas Pitre
Quoted 14 lines · Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha <[email protected]>
Hi,
As part of my changes to remove duplicate code for parsing cpu nodes in the device tree, I found few unnecessary code mostly around
smp_init_cpus. Most of the ARM Cortex A9 based platforms use SCU to get the number of cpus while many others depend on the device tree.Even on DT based platforms using SCU, they can be made to depend on DT to cpu count simplifying
smp_init_cpus. In factarm_dt_init_cpu_mapscalled beforesmp_init_cpus, already does the device tree parsing, validatingnr_cpu_idsand setting thecpu_possible_maskappropriately.
Quoted 9 lines
Quoted 5 lines
However this series targets only the platforms using DT for cpu count (i.e. not using SCU)
Regards,
SudeepFor the whole series:
Acked-by Nicolas Pitre <[email protected]>
Thanks for the review.
Regards,
Sudeep