From patchwork Sat May 21 00:56:20 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: 9130251 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 2C58160467 for ; Sat, 21 May 2016 00:55:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1438C27C23 for ; Sat, 21 May 2016 00:55:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0896A27E3D; Sat, 21 May 2016 00:55:02 +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=-3.2 required=2.0 tests=BAYES_00,FSL_HELO_HOME, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 89D9A27C23 for ; Sat, 21 May 2016 00:55:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b3vAD-0004L1-RX; Sat, 21 May 2016 00:53:09 +0000 Received: from cloudserver094114.home.net.pl ([79.96.170.134]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b3vAA-0004IY-SR for linux-arm-kernel@lists.infradead.org; Sat, 21 May 2016 00:53:07 +0000 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 2dd43d4228abf194; Sat, 21 May 2016 02:52:44 +0200 From: "Rafael J. Wysocki" To: Fabio Estevam Subject: Re: Crash after 'reboot' due to 9be4fd2c7723a Date: Sat, 21 May 2016 02:56:20 +0200 Message-ID: <2148724.oQlEHos3jS@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160520_175307_114631_D3A7424E X-CRM114-Status: GOOD ( 20.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Ping Bai , "linux-pm@vger.kernel.org" , Peter Zijlstra , Viresh Kumar , "Rafael J. Wysocki" , Guenter Roeck , Sascha Hauer , "Rafael J. Wysocki" , Shawn Guo , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Friday, May 20, 2016 09:36:52 PM Fabio Estevam wrote: > On Fri, May 20, 2016 at 9:30 PM, Rafael J. Wysocki wrote: > > > What exactly do you mean by reverting here? It surely cannot be > > reverted by itself and there are many things that depend on it. > > Yes, it cannot be reverted cleanly on 4.6. > > If I do 'git checkout 9be4fd2c7723a30' and then 'git revert > 9be4fd2c7723a30' then the reboot command works. OK, so in fact you need to go all the way to the parent of 9be4fd2c7723a30. > >>> Is this an SMP board, actually? > >> > >> Yes, this is a single core CortexA7. > > > > Hmm. Single core means non-SMP rather? > > CONFIG_SMP can be set or not in the kernel config. With CONFIG_SMP=n > the issue does not happen. Yes, you can run an SMP kernel on a non-SMP board too, which is what leads to the problem you're seeing. If I'm not mistaken, the patch below should allow irq_work to make forward progress for you, so please check if it makes any difference. The root of the problem seems to be arch_irq_work_raise() and specifically the __smp_cross_call function that appears to have problems. I bet that is_smp() should return false on your platform, but it returns true for some reason. --- drivers/cpufreq/cpufreq_governor.c | 1 + 1 file changed, 1 insertion(+) Index: linux-pm/drivers/cpufreq/cpufreq_governor.c =================================================================== --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c +++ linux-pm/drivers/cpufreq/cpufreq_governor.c @@ -362,6 +362,7 @@ static struct policy_dbs_info *alloc_pol mutex_init(&policy_dbs->timer_mutex); atomic_set(&policy_dbs->work_count, 0); init_irq_work(&policy_dbs->irq_work, dbs_irq_work); + policy_dbs->irq_work.flags = IRQ_WORK_LAZY; INIT_WORK(&policy_dbs->work, dbs_work_handler); /* Set policy_dbs for all CPUs, online+offline */