Message ID | 20200314145004.29137-1-pragnesh.patel@sifive.com |
---|---|
State | New |
Headers | show |
Series | [RFC,v2] cmd: mp: change the command name from cpu to mp | expand |
On Sat, Mar 14, 2020 at 10:50 PM Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > When CONFIG_CMD_CPU and CONFIG_MP both are enabled, U-Boot compilation > gives an error of "multiple definition of `_u_boot_list_2_cmd_2_cpu'" > so cpu command(cmd/cpu.c) and mp command(cmd/mp.c) should have different > command name. > > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > --- > cmd/mp.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Hi Pragnesh, On Sat, 14 Mar 2020 at 08:50, Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > When CONFIG_CMD_CPU and CONFIG_MP both are enabled, U-Boot compilation > gives an error of "multiple definition of `_u_boot_list_2_cmd_2_cpu'" > so cpu command(cmd/cpu.c) and mp command(cmd/mp.c) should have different > command name. > > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > --- > cmd/mp.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) Please can you instead port this code over to use the CPU uclass? Regards, Simon
Hi Simon, >-----Original Message----- >From: Simon Glass <sjg at chromium.org> >Sent: 19 March 2020 21:48 >To: Pragnesh Patel <pragnesh.patel at sifive.com> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Bin >Meng <bmeng.cn at gmail.com>; Paul Walmsley <paul.walmsley at sifive.com>; >rick <rick at andestech.com> >Subject: Re: [RFC PATCH v2] cmd: mp: change the command name from cpu to >mp > >Hi Pragnesh, > >On Sat, 14 Mar 2020 at 08:50, Pragnesh Patel <pragnesh.patel at sifive.com> >wrote: >> >> When CONFIG_CMD_CPU and CONFIG_MP both are enabled, U-Boot >compilation >> gives an error of "multiple definition of `_u_boot_list_2_cmd_2_cpu'" >> so cpu command(cmd/cpu.c) and mp command(cmd/mp.c) should have >> different command name. >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> >> --- >> cmd/mp.c | 18 +++++++++--------- >> 1 file changed, 9 insertions(+), 9 deletions(-) > >Please can you instead port this code over to use the CPU uclass? Sure, will port it. > >Regards, >Simon
diff --git a/cmd/mp.c b/cmd/mp.c index 4c8f5fc3fa..acb56917a9 100644 --- a/cmd/mp.c +++ b/cmd/mp.c @@ -26,7 +26,7 @@ static int cpu_status_all(void) } static int -cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +mp_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long cpuid; @@ -67,12 +67,12 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } #ifdef CONFIG_SYS_LONGHELP -static char cpu_help_text[] = - "<num> reset - Reset cpu <num>\n" - "cpu status - Status of all cpus\n" - "cpu <num> status - Status of cpu <num>\n" - "cpu <num> disable - Disable cpu <num>\n" - "cpu <num> release <addr> [args] - Release cpu <num> at <addr> with [args]" +static char mp_help_text[] = + "mp <num> reset - Reset cpu <num>\n" + "mp status - Status of all cpus\n" + "mp <num> status - Status of cpu <num>\n" + "mp <num> disable - Disable cpu <num>\n" + "mp <num> release <addr> [args] - Release cpu <num> at <addr> with [args]" #ifdef CONFIG_PPC "\n" " [args] : <pir> <r3> <r6>\n" \ @@ -90,6 +90,6 @@ static char cpu_help_text[] = #endif U_BOOT_CMD( - cpu, CONFIG_SYS_MAXARGS, 1, cpu_cmd, - "Multiprocessor CPU boot manipulation and release", cpu_help_text + mp, CONFIG_SYS_MAXARGS, 1, mp_cmd, + "Multiprocessor CPU boot manipulation and release", mp_help_text );
When CONFIG_CMD_CPU and CONFIG_MP both are enabled, U-Boot compilation gives an error of "multiple definition of `_u_boot_list_2_cmd_2_cpu'" so cpu command(cmd/cpu.c) and mp command(cmd/mp.c) should have different command name. Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> --- cmd/mp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)