linux/drivers
Santosh Shilimkar 4ac3dbec80 oprofile: Fix the hang while taking the cpu offline
The kernel build with CONFIG_OPROFILE and CPU_HOTPLUG enabled.
The oprofile is initialised using system timer in absence of hardware
counters supports. Oprofile isn't started from userland.

In this setup while doing a CPU offline the kernel hangs in infinite
for loop inside lock_hrtimer_base() function

This happens because as part of oprofile_cpu_notify(, it tries to
stop an hrtimer which was never started. These per-cpu hrtimers
are started when the oprfile is started.
	echo 1	> /dev/oprofile/enable

This problem also existwhen the cpu is booted with maxcpus parameter
set. When bringing the remaining cpus online the timers are started
even if oprofile is not yet enabled.

This patch fix this issue by adding a state variable so that
these hrtimer start/stop is only attempted when oprofile is
started

For stable kernels v2.6.35.y and v2.6.36.y.

Reported-by: Jan Sebastien <s-jan@ti.com>
Tested-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: stable@kernel.org
Signed-off-by: Robert Richter <robert.richter@amd.com>
2010-10-29 11:52:53 +02:00
..
accessibility
acpi Merge branch 'x86-idle-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 13:45:38 -07:00
amba
ata Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2010-10-21 19:03:38 -07:00
atm
auxdisplay
base Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 2010-10-21 14:53:17 -07:00
block Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2010-10-21 12:40:33 -07:00
bluetooth
cdrom
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-10-21 14:25:16 -07:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma ioat2: fix performance regression 2010-10-13 15:43:10 -07:00
edac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp 2010-10-21 14:04:58 -07:00
eisa
firewire firewire: ohci: fix TI TSB82AA2 regression since 2.6.35 2010-10-17 14:09:12 +02:00
firmware ibft: fix kconfig dependencies 2010-10-14 11:16:40 -04:00
gpio Merge branches 'at91', 'dcache', 'ftrace', 'hwbpt', 'misc', 'mmci', 's3c', 'st-ux' and 'unwind' into devel 2010-10-18 22:34:25 +01:00
gpu drm/radeon/kms: avivo cursor workaround applies to evergreen as well 2010-10-18 09:14:35 +10:00
hid HID: Add Cando touch screen 15.6-inch product id 2010-10-13 10:47:32 +02:00
hwmon
i2c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-10-21 21:19:54 -07:00
ide
idle Merge branch 'x86-idle-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 13:45:38 -07:00
ieee1394
ieee802154
infiniband
input Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-10-21 14:25:16 -07:00
leds
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-10-21 21:19:54 -07:00
mca
md
media v4l1: fix 32-bit compat microcode loading translation 2010-10-15 11:12:38 -07:00
memstick
message
mfd Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2010-10-21 14:37:00 -07:00
misc
mmc Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
mtd Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-10-21 14:25:16 -07:00
net Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
nubus
of
oprofile oprofile: Fix the hang while taking the cpu offline 2010-10-29 11:52:53 +02:00
parisc
parport Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-10-21 14:25:16 -07:00
pci Merge branch 'x86-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 14:23:48 -07:00
pcmcia pcmcia: don't call flush_scheduled_work() spuriously 2010-10-16 11:07:37 +02:00
platform
pnp
power
pps
ps3
rapidio
regulator
rtc
s390
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-10-21 14:25:16 -07:00
serial Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
sfi
sh
sn
spi Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2010-10-21 14:25:16 -07:00
tc
telephony
thermal
uio
usb Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
uwb
vhost
video Merge branch 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 18:52:11 -07:00
virtio
vlynq
w1
watchdog Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-10-21 21:19:54 -07:00
xen Merge branch 'linus' into irq/core 2010-10-20 04:38:59 +02:00
zorro
Kconfig
Makefile