[TCWG CI] Regression caused by linux: mmc: rtsx: Let MMC core handle runtime PM: commit 7570fb41e450ba37bf9335fe3751fa9f502c30fa Author: Kai-Heng Feng kai.heng.feng@canonical.com
mmc: rtsx: Let MMC core handle runtime PM
Results regressed to # reset_artifacts: -10 # build_abe binutils: -9 # build_abe stage1: -5 # build_abe qemu: -2 # linux_n_obj: 22187 # First few build errors in logs: # 00:21:11 drivers/mmc/host/rtsx_pci_sdmmc.c:809:24: error: unused variable ‘dev’ [-Werror=unused-variable] # 00:21:11 drivers/mmc/host/rtsx_pci_sdmmc.c:1084:24: error: unused variable ‘dev’ [-Werror=unused-variable] # 00:21:11 drivers/mmc/host/rtsx_pci_sdmmc.c:1133:24: error: unused variable ‘dev’ [-Werror=unused-variable] # 00:21:11 drivers/mmc/host/rtsx_pci_sdmmc.c:1159:24: error: unused variable ‘dev’ [-Werror=unused-variable] # 00:21:11 drivers/mmc/host/rtsx_pci_sdmmc.c:1258:24: error: unused variable ‘dev’ [-Werror=unused-variable] # 00:21:11 drivers/mmc/host/rtsx_pci_sdmmc.c:1311:24: error: unused variable ‘dev’ [-Werror=unused-variable] # 00:21:11 make[3]: *** [drivers/mmc/host/rtsx_pci_sdmmc.o] Error 1 # 00:22:10 make[2]: *** [drivers/mmc/host] Error 2 # 00:22:10 make[1]: *** [drivers/mmc] Error 2 # 00:30:17 make: *** [drivers] Error 2
from # reset_artifacts: -10 # build_abe binutils: -9 # build_abe stage1: -5 # build_abe qemu: -2 # linux_n_obj: 30685 # linux build successful: all
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
This commit has regressed these CI configurations: - tcwg_kernel/gnu-release-arm-next-allmodconfig
First_bad build: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod... Last_good build: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod... Baseline build: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod... Even more details: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod...
Reproduce builds: <cut> mkdir investigate-linux-7570fb41e450ba37bf9335fe3751fa9f502c30fa cd investigate-linux-7570fb41e450ba37bf9335fe3751fa9f502c30fa
# Fetch scripts git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests and test.sh script mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-arm-next-allmod... --fail chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_kernel-build.sh @@ artifacts/manifests/build-baseline.sh
# Save baseline build state (which is then restored in artifacts/test.sh) mkdir -p ./bisect rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /linux/ ./ ./bisect/baseline/
cd linux
# Reproduce first_bad build git checkout --detach 7570fb41e450ba37bf9335fe3751fa9f502c30fa ../artifacts/test.sh
# Reproduce last_good build git checkout --detach 4c49300d8e676702cc097784007bf11735821d6d ../artifacts/test.sh
cd .. </cut>
Full commit (up to 1000 lines): <cut> commit 7570fb41e450ba37bf9335fe3751fa9f502c30fa Author: Kai-Heng Feng kai.heng.feng@canonical.com Date: Wed Feb 16 13:54:31 2022 +0800
mmc: rtsx: Let MMC core handle runtime PM
Since MMC core handles runtime PM reference counting, we can avoid doing redundant runtime PM work in the driver. That means the only thing commit 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM") misses is to always enable runtime PM, to let its parent driver enable ASPM in the runtime idle routine.
Fixes: 7499b529d97f ("mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM") Reviewed-by: Ulf Hansson ulf.hansson@linaro.org Signed-off-by: Kai-Heng Feng kai.heng.feng@canonical.com Link: https://lore.kernel.org/r/20220216055435.2335297-1-kai.heng.feng@canonical.c... Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/mmc/host/rtsx_pci_sdmmc.c | 18 ------------------ 1 file changed, 18 deletions(-)
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 2a3f14afe9f8..265b3889f9d7 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -823,7 +823,6 @@ static void sd_request(struct work_struct *work) }
mutex_lock(&pcr->pcr_mutex); - pm_runtime_get_sync(dev);
rtsx_pci_start_run(pcr);
@@ -860,8 +859,6 @@ static void sd_request(struct work_struct *work) data->bytes_xfered = data->blocks * data->blksz; }
- pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); mutex_unlock(&pcr->pcr_mutex);
finish: @@ -1093,7 +1090,6 @@ static void sdmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) return;
mutex_lock(&pcr->pcr_mutex); - pm_runtime_get_sync(dev);
rtsx_pci_start_run(pcr);
@@ -1127,8 +1123,6 @@ static void sdmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) rtsx_pci_switch_clock(pcr, ios->clock, host->ssc_depth, host->initial_mode, host->double_clk, host->vpclk);
- pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); mutex_unlock(&pcr->pcr_mutex); }
@@ -1144,7 +1138,6 @@ static int sdmmc_get_ro(struct mmc_host *mmc) return -ENOMEDIUM;
mutex_lock(&pcr->pcr_mutex); - pm_runtime_get_sync(dev);
rtsx_pci_start_run(pcr);
@@ -1154,8 +1147,6 @@ static int sdmmc_get_ro(struct mmc_host *mmc) if (val & SD_WRITE_PROTECT) ro = 1;
- pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); mutex_unlock(&pcr->pcr_mutex);
return ro; @@ -1173,7 +1164,6 @@ static int sdmmc_get_cd(struct mmc_host *mmc) return cd;
mutex_lock(&pcr->pcr_mutex); - pm_runtime_get_sync(dev);
rtsx_pci_start_run(pcr);
@@ -1183,8 +1173,6 @@ static int sdmmc_get_cd(struct mmc_host *mmc) if (val & SD_EXIST) cd = 1;
- pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); mutex_unlock(&pcr->pcr_mutex);
return cd; @@ -1282,7 +1270,6 @@ static int sdmmc_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios) return err;
mutex_lock(&pcr->pcr_mutex); - pm_runtime_get_sync(dev);
rtsx_pci_start_run(pcr);
@@ -1312,8 +1299,6 @@ static int sdmmc_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios) err = rtsx_pci_write_register(pcr, SD_BUS_STAT, SD_CLK_TOGGLE_EN | SD_CLK_FORCE_STOP, 0);
- pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); mutex_unlock(&pcr->pcr_mutex);
return err; @@ -1334,7 +1319,6 @@ static int sdmmc_execute_tuning(struct mmc_host *mmc, u32 opcode) return err;
mutex_lock(&pcr->pcr_mutex); - pm_runtime_get_sync(dev);
rtsx_pci_start_run(pcr);
@@ -1367,8 +1351,6 @@ static int sdmmc_execute_tuning(struct mmc_host *mmc, u32 opcode) err = sd_change_phase(host, DDR50_RX_PHASE(pcr), true);
out: - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); mutex_unlock(&pcr->pcr_mutex);
return err; </cut>
linaro-kernel@lists.linaro.org