From bfc73946567782102f99af8beb106b748d61be15 Mon Sep 17 00:00:00 2001 From: Mahesh Sivasubramanian Date: Wed, 17 Oct 2012 18:04:33 -0600 Subject: [PATCH] msm: lpm_resources: Disable L2 PC at CPU_UP_PREPARE When the core is being brought of hotplug, disable L2 low power modes. The precondtion for L2 power collapse is that all cores be power collapsed and the L2 is programmed for power collapse only when the secondary cores are hotplugged. When the secondary core is being brought out of power collapse, before it is marked as online, the primary core could enter a idle low power mode programming the L2 for power collapse.If the secondary core were to execute a wfi instruction then when primary core is in a low power mode, L2 would being executing its power collapse sequence. As a part of the L2 power collapse sequence, the Kraits are reset which could result in the secondary core errorneously executing warmboot code. Change-Id: Ibd0fdbce8599a879f71f5355b3a96c84383d6c99 Signed-off-by: Mahesh Sivasubramanian --- arch/arm/mach-msm/lpm_resources.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-msm/lpm_resources.c b/arch/arm/mach-msm/lpm_resources.c index 2db92f37541..255cd460449 100644 --- a/arch/arm/mach-msm/lpm_resources.c +++ b/arch/arm/mach-msm/lpm_resources.c @@ -695,6 +695,10 @@ static int msm_lpm_cpu_callback(struct notifier_block *cpu_nb, { struct msm_lpm_resource *rs = &msm_lpm_l2; switch (action) { + case CPU_UP_PREPARE: + case CPU_UP_PREPARE_FROZEN: + rs->rs_data.value = MSM_LPM_L2_CACHE_ACTIVE; + break; case CPU_ONLINE_FROZEN: case CPU_ONLINE: if (num_online_cpus() > 1)