From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Roger Quadros <rogerq@ti.com>, Kevin Hilman <khilman@linaro.org>,
Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 3.11 29/93] ARM: OMAP4: Fix the boot regression with CPU_IDLE enabled
Date: Mon, 23 Jun 2014 14:02:08 +0100 [thread overview]
Message-ID: <1403528592-2163-30-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1403528592-2163-1-git-send-email-luis.henriques@canonical.com>
3.11.10.12 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
commit 4b353a706a86598ba47307c47301c3c428b79e09 upstream.
On OMAP4 panda board, there have been several bug reports about boot
hang and lock-ups with CPU_IDLE enabled. The root cause of the issue
is missing interrupts while in idle state. Commit cb7094e8 {cpuidle / omap4 :
use CPUIDLE_FLAG_TIMER_STOP flag} moved the broadcast notifiers to common
code for right reasons but on OMAP4 which suffers from a nasty ROM code
bug with GIC, commit ff999b8a {ARM: OMAP4460: Workaround for ROM bug ..},
we loose interrupts which leads to issues like lock-up, hangs etc.
Patch reverts commit cb7094 {cpuidle / omap4 : use CPUIDLE_FLAG_TIMER_STOP
flag} and 54769d6 {cpuidle: OMAP4: remove timer broadcast initialization} to
avoid the issue. With this change, OMAP4 panda boards, the mentioned
issues are getting fixed. We no longer loose interrupts which was the cause
of the regression.
Fixes: cb7094e8 (cpuidle / omap4 : use CPUIDLE_FLAG_TIMER_STOP flag)
Fixes: ff999b8a (cpuidle: OMAP4: remove timer broadcast initialization)
Cc: Roger Quadros <rogerq@ti.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Reported-tested-by: Roger Quadros <rogerq@ti.com>
Reported-tested-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/mach-omap2/cpuidle44xx.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index c443f2e97e10..f98410a257e3 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -14,6 +14,7 @@
#include <linux/cpuidle.h>
#include <linux/cpu_pm.h>
#include <linux/export.h>
+#include <linux/clockchips.h>
#include <asm/cpuidle.h>
#include <asm/proc-fns.h>
@@ -80,6 +81,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
int index)
{
struct idle_statedata *cx = state_ptr + index;
+ int cpu_id = smp_processor_id();
/*
* CPU0 has to wait and stay ON until CPU1 is OFF state.
@@ -104,6 +106,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
}
}
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
+
/*
* Call idle CPU PM enter notifier chain so that
* VFP and per CPU interrupt context is saved.
@@ -147,6 +151,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
(cx->mpu_logic_state == PWRDM_POWER_OFF))
cpu_cluster_pm_exit();
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
+
fail:
cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
cpu_done[dev->cpu] = false;
@@ -154,6 +160,16 @@ fail:
return index;
}
+/*
+ * For each cpu, setup the broadcast timer because local timers
+ * stops for the states above C1.
+ */
+static void omap_setup_broadcast_timer(void *arg)
+{
+ int cpu = smp_processor_id();
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
+}
+
static struct cpuidle_driver omap4_idle_driver = {
.name = "omap4_idle",
.owner = THIS_MODULE,
@@ -171,8 +187,7 @@ static struct cpuidle_driver omap4_idle_driver = {
/* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
.exit_latency = 328 + 440,
.target_residency = 960,
- .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED |
- CPUIDLE_FLAG_TIMER_STOP,
+ .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
.enter = omap_enter_idle_coupled,
.name = "C2",
.desc = "CPUx OFF, MPUSS CSWR",
@@ -181,8 +196,7 @@ static struct cpuidle_driver omap4_idle_driver = {
/* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
.exit_latency = 460 + 518,
.target_residency = 1100,
- .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED |
- CPUIDLE_FLAG_TIMER_STOP,
+ .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
.enter = omap_enter_idle_coupled,
.name = "C3",
.desc = "CPUx OFF, MPUSS OSWR",
@@ -213,5 +227,8 @@ int __init omap4_idle_init(void)
if (!cpu_clkdm[0] || !cpu_clkdm[1])
return -ENODEV;
+ /* Configure the broadcast timer on each cpu */
+ on_each_cpu(omap_setup_broadcast_timer, NULL, 1);
+
return cpuidle_register(&omap4_idle_driver, cpu_online_mask);
}
--
1.9.1
next prev parent reply other threads:[~2014-06-23 13:04 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 13:01 [3.11.y.z extended stable] Linux 3.11.10.12 stable review Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 01/93] cfg80211: free sme on connection failures Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 02/93] sched: Sanitize irq accounting madness Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 03/93] sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 04/93] net: cpsw: fix null dereference at probe Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 05/93] mac80211: fix suspend vs. association race Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 06/93] mac80211: fix on-channel remain-on-channel Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 07/93] af_iucv: wrong mapping of sent and confirmed skbs Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 08/93] net: filter: s390: fix JIT address randomization Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 09/93] perf: Limit perf_event_attr::sample_period to 63 bits Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 10/93] perf: Prevent false warning in perf_swevent_add Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 11/93] drm/gf119-/disp: fix nasty bug which can clobber SOR0's clock setup Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 12/93] drm/radeon: also try GART for CPU accessed buffers Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 13/93] drm/radeon: handle non-VGA class pci devices with ATRM Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 14/93] drm/radeon: fix register typo on si Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 15/93] drm/radeon: avoid segfault on device open when accel is not working Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 16/93] can: peak_pci: prevent use after free at netdev removal Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 17/93] nfsd4: remove lockowner when removing lock stateid Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 18/93] nfsd4: warn on finding lockowner without stateid's Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 19/93] hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage Luis Henriques
2014-06-23 13:01 ` [PATCH 3.11 20/93] mm/memory-failure.c: fix memory leak by race between poison and unpoison Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 21/93] netfilter: ipv4: defrag: set local_df flag on defragmented skb Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 22/93] ARM: OMAP3: clock: Back-propagate rate change from cam_mclk to dpll4_m5 on all OMAP3 platforms Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 23/93] dma: dw: allow shared interrupts Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 24/93] dmaengine: dw: went back to plain {request,free}_irq() calls Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 25/93] ARM: omap5: hwmod_data: Correct IDLEMODE for McPDM Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 26/93] Input: synaptics - add min/max quirk for the ThinkPad W540 Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 27/93] futex: Add another early deadlock detection check Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 28/93] futex: Prevent attaching to kernel threads Luis Henriques
2014-06-23 13:02 ` Luis Henriques [this message]
2014-06-23 13:02 ` [PATCH 3.11 30/93] cpufreq: remove race while accessing cur_policy Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 31/93] cpufreq: cpu0: drop wrong devm usage Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 32/93] ARM: imx: fix error handling in ipu device registration Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 33/93] ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsets Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 34/93] ARM: 8051/1: put_user: fix possible data corruption in put_user Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 35/93] ARM: 8064/1: fix v7-M signal return Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 36/93] Input: synaptics - T540p - unify with other LEN0034 models Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 37/93] drm/i915: Only copy back the modified fields to userspace from execbuffer Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 38/93] dm cache: always split discards on cache block boundaries Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 39/93] powerpc: Fix 64 bit builds with binutils 2.24 Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 40/93] powerpc, kexec: Fix "Processor X is stuck" issue during kexec from ST mode Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 41/93] rtmutex: Fix deadlock detector for real Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 42/93] drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 43/93] audit: restore order of tty and ses fields in log output Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 44/93] drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 45/93] leds: leds-pwm: properly clean up after probe failure Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 46/93] clk: vexpress: NULL dereference on error path Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 47/93] [SCSI] fix our current target reap infrastructure Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 48/93] [SCSI] dual scan thread bug fix Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 49/93] genirq: Provide irq_force_affinity fallback for non-SMP Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 50/93] i2c: designware: Mask all interrupts during i2c controller enable Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 51/93] crypto: s390 - fix aes,des ctr mode concurrency finding Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 52/93] Staging: speakup: Move pasting into a work item Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 53/93] USB: Avoid runtime suspend loops for HCDs that can't handle suspend/resume Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 54/93] can: only rename enabled led triggers when changing the netdev name Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 55/93] USB: io_ti: fix firmware download on big-endian machines (part 2) Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 56/93] USB: ftdi_sio: add NovaTech OrionLXm product ID Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 57/93] USB: serial: option: add support for Novatel E371 PCIe card Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 58/93] USB: cdc-wdm: properly include types.h Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 59/93] md: always set MD_RECOVERY_INTR when aborting a reshape or other "resync" Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 60/93] xhci: delete endpoints from bandwidth list before freeing whole device Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 61/93] md: always set MD_RECOVERY_INTR when interrupting a reshape thread Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 62/93] ALSA: hda/analog - Fix silent output on ASUS A8JN Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 63/93] ALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 64/93] ALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 65/93] iser-target: Add missing target_put_sess_cmd for ImmedateData failure Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 66/93] iscsi-target: Fix wrong buffer / buffer overrun in iscsi_change_param_value() Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 67/93] percpu-refcount: fix usage of this_cpu_ops Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 68/93] futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1) Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 69/93] futex: Validate atomic acquisition in futex_lock_pi_atomic() Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 70/93] futex: Always cleanup owner tid in unlock_pi Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 71/93] futex: Make lookup_pi_state more robust Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 72/93] target: Fix alua_access_state attribute OOPs for un-configured devices Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 73/93] mm: rmap: fix use-after-free in __put_anon_vma Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 74/93] usb: cdc-wdm: export cdc-wdm uapi header Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 75/93] staging: comedi: ni_daq_700: add mux settling delay Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 76/93] kvm: free resources after canceling async_pf Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 77/93] kvm: remove .done from struct kvm_async_pf Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 78/93] KVM: async_pf: mm->mm_users can not pin apf->mm Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 79/93] mm/page-writeback.c: fix divide by zero in pos_ratio_polynom Luis Henriques
2014-06-23 13:02 ` [PATCH 3.11 80/93] dma: mv_xor: Flush descriptors before activating a channel Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 81/93] skbuff: skb_segment: orphan frags before copying Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 82/93] Target/iscsi,iser: Avoid accepting transport connections during stop stage Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 83/93] iser-target: Fix multi network portal shutdown regression Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 84/93] target: Allow READ_CAPACITY opcode in ALUA Standby access state Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 85/93] mm: compaction: reset cached scanner pfn's before reading them Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 86/93] mm: compaction: detect when scanners meet in isolate_freepages Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 87/93] MIPS: asm: thread_info: Add _TIF_SECCOMP flag Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 88/93] perf: Fix race in removing an event Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 89/93] hwmon: (ntc_thermistor) Fix dependencies Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 90/93] hwmon: (ntc_thermistor) Fix OF device ID mapping Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 91/93] fs,userns: Change inode_capable to capable_wrt_inode_uidgid Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 92/93] auditsc: audit_krule mask accesses need bounds checking Luis Henriques
2014-06-23 13:03 ` [PATCH 3.11 93/93] [SCSI] megaraid: Use resource_size_t for PCI resources, not long Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403528592-2163-30-git-send-email-luis.henriques@canonical.com \
--to=luis.henriques@canonical.com \
--cc=daniel.lezcano@linaro.org \
--cc=kernel-team@lists.ubuntu.com \
--cc=khilman@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rogerq@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=stable@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®