Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread Russell King - ARM Linux
On Fri, May 12, 2017 at 03:36:01PM +0100, Mark Rutland wrote: > However, AFAICT, this patch forcibly resets is without any teardown > having happened. That will surely result in data being lost from the > caches, for example. You're wrong on that point. Having each bloody platform implement the

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread Russell King - ARM Linux
On Fri, May 12, 2017 at 03:36:01PM +0100, Mark Rutland wrote: > However, AFAICT, this patch forcibly resets is without any teardown > having happened. That will surely result in data being lost from the > caches, for example. You're wrong on that point. Having each bloody platform implement the

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread Russell King - ARM Linux
On Mon, May 15, 2017 at 05:13:36PM +0800, yanjiang@windriver.com wrote: > From: Yanjiang Jin > > socfpga_cpu_die() just puts CPU in WFI, not actually off. So that Kexec's > second kernel goes wrong since the kerenl text gets ovewritten. > Now reset CPU1 in

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread Russell King - ARM Linux
On Mon, May 15, 2017 at 05:13:36PM +0800, yanjiang@windriver.com wrote: > From: Yanjiang Jin > > socfpga_cpu_die() just puts CPU in WFI, not actually off. So that Kexec's > second kernel goes wrong since the kerenl text gets ovewritten. > Now reset CPU1 in cpu_kill() to avoid this error. >

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread yanjiang.jin
From: Yanjiang Jin socfpga_cpu_die() just puts CPU in WFI, not actually off. So that Kexec's second kernel goes wrong since the kerenl text gets ovewritten. Now reset CPU1 in cpu_kill() to avoid this error. Also add flush_cache_all() to prevent data from being lost in

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread yanjiang.jin
From: Yanjiang Jin socfpga_cpu_die() just puts CPU in WFI, not actually off. So that Kexec's second kernel goes wrong since the kerenl text gets ovewritten. Now reset CPU1 in cpu_kill() to avoid this error. Also add flush_cache_all() to prevent data from being lost in cpu_die(). Signed-off-by:

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread yjin
On 2017年05月12日 22:36, Mark Rutland wrote: On Wed, May 10, 2017 at 01:13:04AM -0400, yanjiang@windriver.com wrote: From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin ---

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-15 Thread yjin
On 2017年05月12日 22:36, Mark Rutland wrote: On Wed, May 10, 2017 at 01:13:04AM -0400, yanjiang@windriver.com wrote: From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin --- arch/arm/mach-socfpga/platsmp.c | 12 +++- 1 file

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-12 Thread Mark Rutland
On Wed, May 10, 2017 at 01:13:04AM -0400, yanjiang@windriver.com wrote: > From: Yanjiang Jin > > Kexec's second kernel would hang if CPU1 isn't reset. > > Signed-off-by: Yanjiang Jin > --- > arch/arm/mach-socfpga/platsmp.c | 12

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-12 Thread Mark Rutland
On Wed, May 10, 2017 at 01:13:04AM -0400, yanjiang@windriver.com wrote: > From: Yanjiang Jin > > Kexec's second kernel would hang if CPU1 isn't reset. > > Signed-off-by: Yanjiang Jin > --- > arch/arm/mach-socfpga/platsmp.c | 12 +++- > 1 file changed, 11 insertions(+), 1

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-12 Thread Dinh Nguyen
On 05/10/2017 12:13 AM, yanjiang@windriver.com wrote: > From: Yanjiang Jin > > Kexec's second kernel would hang if CPU1 isn't reset. > Can you please be a bit more descriptive on the commit log? Is it because when kexec starts, the SMP on the kexec's kernel

Re: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-12 Thread Dinh Nguyen
On 05/10/2017 12:13 AM, yanjiang@windriver.com wrote: > From: Yanjiang Jin > > Kexec's second kernel would hang if CPU1 isn't reset. > Can you please be a bit more descriptive on the commit log? Is it because when kexec starts, the SMP on the kexec's kernel try to run on CPU1? >

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-09 Thread yanjiang.jin
From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin --- arch/arm/mach-socfpga/platsmp.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill()

2017-05-09 Thread yanjiang.jin
From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin --- arch/arm/mach-socfpga/platsmp.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index