android_kernel_samsung_msm8976/drivers
Uwe Kleine-König 156229b352 rtc: mc13xxx: Don't call rtc_device_register while holding lock
Since commit f44f7f9 (RTC: Initialize kernel state from RTC)
rtc_device_register reads the programmed alarm. As reading the alarm
needs to take the mc13xxx lock, release it before calling
rtc_device_register.

This fixes a deadlock during boot:

	INFO: task swapper:1 blocked for more than 120 seconds.
	"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
	swapper         D c02b175c     0     1      0 0x00000000
	[<c02b175c>] (schedule+0x304/0x4f4) from [<c02b25a8>] (__mutex_lock_slowpath+0x7c/0x110)
	[<c02b25a8>] (__mutex_lock_slowpath+0x7c/0x110) from [<c020b4cc>] (mc13xxx_rtc_read_time+0x1c/0x118)
	[<c020b4cc>] (mc13xxx_rtc_read_time+0x1c/0x118) from [<c0208f04>] (__rtc_read_time+0x58/0x5c)
	[<c0208f04>] (__rtc_read_time+0x58/0x5c) from [<c0209508>] (rtc_read_time+0x30/0x48)
	[<c0209508>] (rtc_read_time+0x30/0x48) from [<c0209dd4>] (__rtc_read_alarm+0x1c/0x290)
	[<c0209dd4>] (__rtc_read_alarm+0x1c/0x290) from [<c0208d58>] (rtc_device_register+0x150/0x27c)
	[<c0208d58>] (rtc_device_register+0x150/0x27c) from [<c02b0b74>] (mc13xxx_rtc_probe+0x128/0x17c)
	[<c02b0b74>] (mc13xxx_rtc_probe+0x128/0x17c) from [<c01d5280>] (platform_drv_probe+0x1c/0x24)
	[<c01d5280>] (platform_drv_probe+0x1c/0x24) from [<c01d3e58>] (driver_probe_device+0x80/0x1a8)
	[<c01d3e58>] (driver_probe_device+0x80/0x1a8) from [<c01d400c>] (__driver_attach+0x8c/0x90)
	[<c01d400c>] (__driver_attach+0x8c/0x90) from [<c01d3654>] (bus_for_each_dev+0x60/0x8c)
	[<c01d3654>] (bus_for_each_dev+0x60/0x8c) from [<c01d2f6c>] (bus_add_driver+0x180/0x248)
	[<c01d2f6c>] (bus_add_driver+0x180/0x248) from [<c01d4664>] (driver_register+0x70/0x15c)
	[<c01d4664>] (driver_register+0x70/0x15c) from [<c01d5700>] (platform_driver_probe+0x18/0x98)
	[<c01d5700>] (platform_driver_probe+0x18/0x98) from [<c00273a8>] (do_one_initcall+0x2c/0x168)
	[<c00273a8>] (do_one_initcall+0x2c/0x168) from [<c00083ac>] (kernel_init+0xa0/0x150)
	[<c00083ac>] (kernel_init+0xa0/0x150) from [<c0033ff8>] (kernel_thread_exit+0x0/0x8)

Reported-by: Vagrant Cascadian <vagrant@debian.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: http://bugs.debian.org/625804
[Tweaked commit log -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-05-06 18:02:07 -07:00
..
accessibility
acpi ACPI / PM: Avoid infinite recurrence while registering power resources 2011-04-26 11:33:18 +02:00
amba PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS 2011-04-11 22:54:42 +02:00
ata libata: ahci_start_engine compliant to AHCI spec 2011-04-24 11:35:40 -04:00
atm Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
auxdisplay
base PM / Wakeup: Fix initialization of wakeup-related device sysfs files 2011-04-26 11:33:09 +02:00
block libceph: fix ceph_osdc_alloc_request error checks 2011-05-03 09:28:13 -07:00
bluetooth Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
cdrom
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2011-04-21 09:58:42 -07:00
clk CLKDEV: Fix clkdev return value for NULL clk case 2011-04-30 10:14:08 +01:00
clocksource
connector connector: fix skb double free in cn_rx_skb() 2011-04-12 14:38:57 -07:00
cpufreq
cpuidle
crypto
dca
dio
dma Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 2011-04-11 15:44:38 -07:00
edac amd64_edac: Erratum #637 workaround 2011-04-26 16:18:56 +02:00
eisa
firewire Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2011-05-04 14:21:39 -07:00
firmware
gpio Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 2011-04-11 15:44:38 -07:00
gpu drm/radeon/kms: fix gart setup on fusion parts (v2) 2011-05-04 10:16:40 +10:00
hid Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
hwmon hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails 2011-05-01 09:06:35 -07:00
hwspinlock
i2c i2c-parport: Fix adapter list handling 2011-05-01 18:18:49 +02:00
ide ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd 2011-04-21 19:43:59 +02:00
idle
ieee802154
infiniband Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-05-02 20:26:32 -07:00
isdn
leds leds/leds-regulator.c: fix handling of already enabled regulators 2011-04-14 16:06:54 -07:00
lguest
macintosh Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
mca
md raid5: fix build error, sector_t usage 2011-04-21 10:00:00 -07:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2011-05-04 14:22:04 -07:00
memstick
message
mfd omap:usb: add regulator support for EHCI 2011-05-02 15:29:26 +03:00
misc drivers/misc/sgi-gru/grufile.c: fix the wrong members of gru_chip 2011-04-14 16:06:55 -07:00
mmc mmc: sdhci: Check mrq != NULL in sdhci_tasklet_finish 2011-04-27 19:16:50 -04:00
mtd Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
net Revert: veth: remove unneeded ifname code from veth_newlink() 2011-05-02 15:54:31 -07:00
nfc
nubus
of
oprofile
parisc
parport parport_pc.c: correctly release the requested region for the IT887x 2011-04-19 16:36:24 -07:00
pci Merge git://git.infradead.org/iommu-2.6 2011-04-21 09:56:35 -07:00
pcmcia Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
platform Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 2011-04-13 09:15:55 -07:00
pnp
power
pps
ps3
rapidio RapidIO/mpc85xx: fix possible mport registration problems 2011-04-14 16:06:56 -07:00
regulator
rtc rtc: mc13xxx: Don't call rtc_device_register while holding lock 2011-05-06 18:02:07 -07:00
s390 [S390] irqstats: fix counting of pfault, dasd diag and virtio irqs 2011-04-29 10:42:25 +02:00
sbus
scsi [SCSI] pmcraid: reject negative request size 2011-04-24 12:15:07 -05:00
sfi
sh
sn
spi Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 2011-04-11 15:44:38 -07:00
ssb
staging Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-05-04 14:23:41 -07:00
target
tc
telephony
thermal
tty tty/n_gsm: fix bug in CRC calculation for gsm1 mode 2011-04-19 16:38:50 -07:00
uio
usb xHCI: Clear PLC in xhci_bus_resume() 2011-05-03 11:14:32 -07:00
uwb
vhost
video ARM: pxafb: Fix access to nonexistent member of pxafb_info 2011-04-12 23:07:42 +08:00
virtio virtio_pci: Prevent double-free of pci regions after device hot-unplug 2011-04-21 22:57:00 +09:30
vlynq
w1
watchdog watchdog: iTCO_wdt: TCO Watchdog patch for Intel Panther Point PCH 2011-04-26 12:50:44 +00:00
xen PM: Add missing syscore_suspend() and syscore_resume() calls 2011-04-20 00:36:11 +02:00
zorro
Kconfig
Makefile