linux/arch/avr32/kernel
Gabor Juhos 1b0135b5e2 avr32: fix clockevents kernel warning
Since commit 01426478df
(avr32: Use generic idle loop) the kernel throws the
following warning on avr32:

  WARNING: at 900322e4 [verbose debug info unavailable]
  Modules linked in:
  CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0-rc2 #117
  task: 901c3ecc ti: 901c0000 task.ti: 901c0000
  PC is at cpu_idle_poll_ctrl+0x1c/0x38
  LR is at comparator_mode+0x3e/0x40
  pc : [<900322e4>]    lr : [<90014882>]    Not tainted
  sp : 901c1f74  r12: 00000000  r11: 901c74a0
  r10: 901d2510  r9 : 00000001  r8 : 901db4de
  r7 : 901c74a0  r6 : 00000001  r5 : 00410020  r4 : 901db574
  r3 : 00410024  r2 : 90206fe0  r1 : 00000000  r0 : 007f0000
  Flags: qvnzc
  Mode bits: hjmde....G
  CPU Mode: Supervisor
  Call trace:
   [<90039ede>] clockevents_set_mode+0x16/0x2e
   [<90039f00>] clockevents_shutdown+0xa/0x1e
   [<9003a078>] clockevents_exchange_device+0x58/0x70
   [<9003a78c>] tick_check_new_device+0x38/0x54
   [<9003a1a2>] clockevents_register_device+0x32/0x90
   [<900035c4>] time_init+0xa8/0x108
   [<90000520>] start_kernel+0x128/0x23c

When the 'avr32_comparator' clockevent device is registered,
the clockevent core sets the mode of that clockevent device
to CLOCK_EVT_MODE_SHUTDOWN. Due to this, the 'comparator_mode'
function calls the 'cpu_idle_poll_ctrl' to disables idle poll.
This results in the aforementioned warning because the polling
is not enabled yet.

Change the code to only disable idle poll if it is enabled by
the same function to avoid the warning.

Cc: stable@vger.kernel.org
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
2013-09-30 08:42:01 +02:00
..
.gitignore avr32: add .gitignore files 2008-09-19 18:21:29 +02:00
asm-offsets.c avr32: Fix lockup after Java stack underflow in user mode 2008-09-01 13:04:04 +02:00
avr32_ksyms.c asm-generic: rename generic little-endian bitops functions 2011-03-23 19:46:11 -07:00
cpu.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
entry-avr32b.S avr32: switch to generic kernel_thread()/kernel_execve() 2012-10-15 11:14:38 -04:00
head.S
irq.c driver-core: remove sysdev.h usage. 2011-12-21 16:26:03 -08:00
kprobes.c [AVR32] Enable debugging only when needed 2008-01-25 08:31:39 +01:00
Makefile avr32: switch to generic kernel_thread()/kernel_execve() 2012-10-15 11:14:38 -04:00
module.c avr32: fix relocation check for signed 18-bit offset 2013-05-13 22:22:10 +02:00
nmi_debug.c [AVR32] NMI debugging 2008-01-25 08:31:43 +01:00
ocd.c libfs: allow error return from simple attributes 2008-02-08 09:22:34 -08:00
process.c sched: Rename sched.c as sched/core.c in comments and Documentation 2013-06-19 12:58:42 +02:00
ptrace.c ptrace: cleanup arch_ptrace() on avr32 2010-10-27 18:03:10 -07:00
setup.c avr32: normalize global variables exported by vmlinux.lds 2013-07-03 16:07:34 -07:00
signal.c avr32: switch to generic sigaltstack 2013-02-03 18:15:50 -05:00
stacktrace.c fix core/stacktrace changes on avr32, mips, sh 2008-07-18 14:42:35 +02:00
switch_to.S
syscall_table.S avr32: switch to generic sigaltstack 2013-02-03 18:15:50 -05:00
syscall-stubs.S avr32: switch to generic sigaltstack 2013-02-03 18:15:50 -05:00
time.c avr32: fix clockevents kernel warning 2013-09-30 08:42:01 +02:00
traps.c taint: add explicit flag to show whether lock dep is still OK. 2013-01-21 17:17:57 +10:30
vmlinux.lds.S avr32: normalize global variables exported by vmlinux.lds 2013-07-03 16:07:34 -07:00