Re: [PATCHv3] ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/28/2017 12:09 PM, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@xxxxxxxxxxxxxxx> [170328 04:39]:
>> On Mon, Mar 27, 2017 at 09:43:09AM -0700, Tony Lindgren wrote:
>>> Yes problems still remains. I think the immediate fix there is to
>>> disable kexec during runtime based on some criteria for your use
>>> case rather than BUG() though. Somehow kexec needs to know if CPU1
>>> reset is acceptable, then reset CPU1 before kexec.
>>
>> The only acceptable way to do that is to make the decision when loading
>> the image(s), and refuse to load the image(s) if kexec is not possible.
>> (As is already done when dealing with whether we can CPU hot-unplug the
>> secondary CPUs.)
> 
> OK so how about the following to disable kexec for Andrew's
> test case?
> 
> That is assuming that omap_type() test works for HS dra7
> like it does for the other omap2 variants.
> 
> Regards,
> 
> Tony
> 
> 8< ---------------------
> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
> --- a/arch/arm/mach-omap2/common.h
> +++ b/arch/arm/mach-omap2/common.h
> @@ -260,6 +260,7 @@ extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
>  extern void omap_auxcoreboot_addr(u32 cpu_addr);
>  extern u32 omap_read_auxcoreboot0(void);
>  
> +extern bool omap4_cpu_can_disable(unsigned int cpu);
>  extern void omap4_cpu_die(unsigned int cpu);
>  extern int omap4_cpu_kill(unsigned int cpu);
>  
> diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
> --- a/arch/arm/mach-omap2/omap-hotplug.c
> +++ b/arch/arm/mach-omap2/omap-hotplug.c
> @@ -22,6 +22,15 @@
>  #include "omap-wakeupgen.h"
>  #include "common.h"
>  #include "powerdomain.h"
> +#include "soc.h"
> +
> +bool omap4_cpu_can_disable(unsigned int cpu)
> +{
> +	if (soc_is_dra7xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
> +		return false;
> +

NAK!

HS variants can have aux cores disabled, we are already doing it right
now, this is another hack to avoid having to fix kexec.

You are failing to park cores correctly, so instead of fixing that you
hack around it on non-HS devices by hard-resetting those cores, now
because you can't do that hack on HS devices you suggest we disable
hotplug on HS devices altogether!?

Kexec *does* work on HS devices. It only fails if we fail to park a core
correctly, something that should never happen, the check here must be
for that, unconditionally disabling Kexec for all HS devices is not a
valid option.

> +	return true;
> +}
>  
>  /*
>   * platform-specific code to shutdown a CPU
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -390,6 +390,7 @@ const struct smp_operations omap4_smp_ops __initconst = {
>  	.smp_secondary_init	= omap4_secondary_init,
>  	.smp_boot_secondary	= omap4_boot_secondary,
>  #ifdef CONFIG_HOTPLUG_CPU
> +	.cpu_can_disable	= omap4_cpu_can_disable,
>  	.cpu_die		= omap4_cpu_die,
>  	.cpu_kill		= omap4_cpu_kill,
>  #endif
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux