mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
221414db19
Runtime Power Management handling for the sdhci_add_host() failure
case in sdhci_s3c_probe() should match the code in sdhci_s3c_remove()
(which uses pm_runtime_disable() call which matches the earlier
pm_runtime_enable() one). Fix it.
This patch fixes "BUG: spinlock bad magic on CPU#0, swapper/0/1" and
"Unbalanced pm_runtime_enable!" warnings.
>From the kernel log:
...
[ 1.659631] s3c-sdhci 12530000.sdhci: sdhci_add_host() failed
[ 1.665096] BUG: spinlock bad magic on CPU#0, swapper/0/1
[ 1.670433] lock: 0xea01e484, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[ 1.677895] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.16.0-next-20140804-00008-ga59480f-dirty #707
[ 1.687037] [<c0013ae4>] (unwind_backtrace) from [<c0010d70>] (show_stack+0x10/0x14)
[ 1.694740] [<c0010d70>] (show_stack) from [<c04050c8>] (dump_stack+0x68/0xb8)
[ 1.701948] [<c04050c8>] (dump_stack) from [<c0052558>] (do_raw_spin_lock+0x15c/0x1a4)
[ 1.709848] [<c0052558>] (do_raw_spin_lock) from [<c040a630>] (_raw_spin_lock_irqsave+0x20/0x28)
[ 1.718619] [<c040a630>] (_raw_spin_lock_irqsave) from [<c030d7d0>] (sdhci_do_set_ios+0x1c/0x5cc)
[ 1.727464] [<c030d7d0>] (sdhci_do_set_ios) from [<c030ddfc>] (sdhci_runtime_resume_host+0x50/0x104)
[ 1.736574] [<c030ddfc>] (sdhci_runtime_resume_host) from [<c02462dc>] (pm_generic_runtime_resume+0x2c/0x40)
[ 1.746383] [<c02462dc>] (pm_generic_runtime_resume) from [<c0247898>] (__rpm_callback+0x34/0x70)
[ 1.755233] [<c0247898>] (__rpm_callback) from [<c02478fc>] (rpm_callback+0x28/0x88)
[ 1.762958] [<c02478fc>] (rpm_callback) from [<c02486f0>] (rpm_resume+0x384/0x4ec)
[ 1.770511] [<c02486f0>] (rpm_resume) from [<c02488b0>] (pm_runtime_forbid+0x58/0x64)
[ 1.778325] [<c02488b0>] (pm_runtime_forbid) from [<c030ea70>] (sdhci_s3c_probe+0x4a4/0x540)
[ 1.786749] [<c030ea70>] (sdhci_s3c_probe) from [<c02429cc>] (platform_drv_probe+0x2c/0x5c)
[ 1.795076] [<c02429cc>] (platform_drv_probe) from [<c02415f0>] (driver_probe_device+0x114/0x234)
[ 1.803929] [<c02415f0>] (driver_probe_device) from [<c024179c>] (__driver_attach+0x8c/0x90)
[ 1.812347] [<c024179c>] (__driver_attach) from [<c023ffb4>] (bus_for_each_dev+0x54/0x88)
[ 1.820506] [<c023ffb4>] (bus_for_each_dev) from [<c0240df8>] (bus_add_driver+0xd8/0x1cc)
[ 1.828665] [<c0240df8>] (bus_add_driver) from [<c0241db8>] (driver_register+0x78/0xf4)
[ 1.836652] [<c0241db8>] (driver_register) from [<c00088a4>] (do_one_initcall+0x80/0x1d0)
[ 1.844816] [<c00088a4>] (do_one_initcall) from [<c059ac94>] (kernel_init_freeable+0x108/0x1d4)
[ 1.853503] [<c059ac94>] (kernel_init_freeable) from [<c0401300>] (kernel_init+0x8/0xe4)
[ 1.861568] [<c0401300>] (kernel_init) from [<c000e538>] (ret_from_fork+0x14/0x3c)
[ 1.869582] platform 12530000.sdhci: Driver s3c-sdhci requests probe deferral
...
[ 1.997047] s3c-sdhci 12530000.sdhci: Unbalanced pm_runtime_enable!
...
[ 2.027235] s3c-sdhci 12530000.sdhci: sdhci_add_host() failed
[ 2.032884] platform 12530000.sdhci: Driver s3c-sdhci requests probe deferral
...
Tested on Hardkernel's Exynos4412 based ODROID-U3 board.
Fixes:
|
||
---|---|---|
.. | ||
android-goldfish.c | ||
atmel-mci-regs.h | ||
atmel-mci.c | ||
au1xmmc.c | ||
bfin_sdh.c | ||
cb710-mmc.c | ||
cb710-mmc.h | ||
davinci_mmc.c | ||
dw_mmc-exynos.c | ||
dw_mmc-k3.c | ||
dw_mmc-pci.c | ||
dw_mmc-pltfm.c | ||
dw_mmc-pltfm.h | ||
dw_mmc.c | ||
dw_mmc.h | ||
jz4740_mmc.c | ||
Kconfig | ||
Makefile | ||
mmc_spi.c | ||
mmci.c | ||
mmci.h | ||
moxart-mmc.c | ||
msm_sdcc.c | ||
msm_sdcc.h | ||
mvsdio.c | ||
mvsdio.h | ||
mxcmmc.c | ||
mxs-mmc.c | ||
of_mmc_spi.c | ||
omap_hsmmc.c | ||
omap.c | ||
pxamci.c | ||
pxamci.h | ||
rtsx_pci_sdmmc.c | ||
rtsx_usb_sdmmc.c | ||
s3cmci.c | ||
s3cmci.h | ||
sdhci-acpi.c | ||
sdhci-bcm2835.c | ||
sdhci-bcm-kona.c | ||
sdhci-cns3xxx.c | ||
sdhci-dove.c | ||
sdhci-esdhc-imx.c | ||
sdhci-esdhc.h | ||
sdhci-msm.c | ||
sdhci-of-arasan.c | ||
sdhci-of-esdhc.c | ||
sdhci-of-hlwd.c | ||
sdhci-pci-data.c | ||
sdhci-pci-o2micro.c | ||
sdhci-pci-o2micro.h | ||
sdhci-pci.c | ||
sdhci-pci.h | ||
sdhci-pltfm.c | ||
sdhci-pltfm.h | ||
sdhci-pxav2.c | ||
sdhci-pxav3.c | ||
sdhci-s3c-regs.h | ||
sdhci-s3c.c | ||
sdhci-sirf.c | ||
sdhci-spear.c | ||
sdhci-st.c | ||
sdhci-tegra.c | ||
sdhci.c | ||
sdhci.h | ||
sdricoh_cs.c | ||
sh_mmcif.c | ||
sh_mobile_sdhi.c | ||
sunxi-mmc.c | ||
tifm_sd.c | ||
tmio_mmc_dma.c | ||
tmio_mmc_pio.c | ||
tmio_mmc.c | ||
tmio_mmc.h | ||
usdhi6rol0.c | ||
ushc.c | ||
via-sdmmc.c | ||
vub300.c | ||
wbsd.c | ||
wbsd.h | ||
wmt-sdmmc.c |