From patchwork Fri May 20 21:20:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9130063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 73D6A60772 for ; Fri, 20 May 2016 21:17:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68E0F27BF4 for ; Fri, 20 May 2016 21:17:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DADC27E72; Fri, 20 May 2016 21:17:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=2.0 tests=BAYES_00,FSL_HELO_HOME, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6369E27BF4 for ; Fri, 20 May 2016 21:17:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbcETVR0 (ORCPT ); Fri, 20 May 2016 17:17:26 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:58839 "HELO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751560AbcETVRZ (ORCPT ); Fri, 20 May 2016 17:17:25 -0400 Received: from 217.96.255.233.ipv4.supernova.orange.pl (217.96.255.233) (HELO vostro.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer v0.80.2) id ea186e77ea9462fc; Fri, 20 May 2016 23:17:23 +0200 From: "Rafael J. Wysocki" To: Fabio Estevam Cc: "Rafael J. Wysocki" , Shawn Guo , "linux-arm-kernel@lists.infradead.org" , Sascha Hauer , "linux-pm@vger.kernel.org" , Ping Bai , Guenter Roeck , Russell King , Viresh Kumar Subject: Re: Crash after 'reboot' due to 9be4fd2c7723a Date: Fri, 20 May 2016 23:20:59 +0200 Message-ID: <4080948.V5DMHR9bsk@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Friday, May 20, 2016 03:32:43 PM Fabio Estevam wrote: > On Fri, May 20, 2016 at 3:05 PM, Fabio Estevam wrote: > > Rafael, > > > > Running the 'reboot' command works fine on a 4.5 kernel running on a > > mx6ul platform (ARM single core SoC), but it crashes on 4.6. > > > > Running bisect I got 9be4fd2c7723a3057b0b39676 ("cpufreq: governor: > > Replace timers with utilization update callbacks") as the first bad > > commit. > > > > Below is the output crash log. > > > > Not sure if this issue is related to the problem reported by Guenter here: > > http://lkml.iu.edu/hypermail/linux/kernel/1602.1/06075.html > > > > Any ideas? > > If I rebuilt a kernel with SMP=n then the reboot command works as expected. Does it work if you boot with maxcpus=1 or nosmp in the kernel command line? Also, please try if the appended patch makes any difference. --- drivers/base/core.c | 3 +++ drivers/cpufreq/cpufreq.c | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/cpufreq/cpufreq.c =================================================================== --- linux-pm.orig/drivers/cpufreq/cpufreq.c +++ linux-pm/drivers/cpufreq/cpufreq.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -2556,14 +2555,6 @@ int cpufreq_unregister_driver(struct cpu } EXPORT_SYMBOL_GPL(cpufreq_unregister_driver); -/* - * Stop cpufreq at shutdown to make sure it isn't holding any locks - * or mutexes when secondary CPUs are halted. - */ -static struct syscore_ops cpufreq_syscore_ops = { - .shutdown = cpufreq_suspend, -}; - struct kobject *cpufreq_global_kobject; EXPORT_SYMBOL(cpufreq_global_kobject); @@ -2575,8 +2566,6 @@ static int __init cpufreq_core_init(void cpufreq_global_kobject = kobject_create_and_add("cpufreq", &cpu_subsys.dev_root->kobj); BUG_ON(!cpufreq_global_kobject); - register_syscore_ops(&cpufreq_syscore_ops); - return 0; } core_initcall(cpufreq_core_init); Index: linux-pm/drivers/base/core.c =================================================================== --- linux-pm.orig/drivers/base/core.c +++ linux-pm/drivers/base/core.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -2042,6 +2043,8 @@ void device_shutdown(void) { struct device *dev, *parent; + cpufreq_suspend(); + spin_lock(&devices_kset->list_lock); /* * Walk the devices list backward, shutting down each in turn.