Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp320393imj; Thu, 7 Feb 2019 05:00:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IY/Nt1bxzkqT6Qi5AsoIKRBIIsHxEVocN0s51C4oVbsHSliIqX2sJzNlbb8UPl92gFg1alc X-Received: by 2002:a62:6204:: with SMTP id w4mr16109377pfb.5.1549544410957; Thu, 07 Feb 2019 05:00:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544410; cv=none; d=google.com; s=arc-20160816; b=NdRblNSApYaRdbeeXn27stgcID3OU4VLMPTAVy9As1e0WQhmbWJEkvpyCTRM8mWZUp QywOZWIficILME/94V5M2ETJ+cLqv/glVm9uzdWKLqeKtrfop/ProzJ0Ev4HVNLMHmN6 FGo6CHtRWAyoSK0A8fwbj3DzuRDF7mDGc394m1jgZGnR86GOmURBPQtFfTbyfq1XgNna 95tSPVbm9wDNdr4zZazyLsZBCYCemEAWKsdRJAHYpiTKox7il9PBDC5p8V47VovKeBek l1r5Ji3N0DIy03N9qrMQVeACWjYoWaUjb48Y/skJeU5xFAMb5U8gWpv1+yhizNystn+c jP+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=LnlcHpqzXyb8rUW2bmJkzF9pBzhkae9k8y/TMGidJ64=; b=Z+wP5vyznauPKP4W9aKJVbyjvOA1B5K3sc2Yg5yE5I3G0XIxeNMz2oHau7GmYzgGhz FCnodQr57k49xM61XTNxEEugFVYY8moS20uJHF7pgFWi3jnpW1n6lOMKmrOfd2DlbXhF rqIvuPE/PnAWP8UcMMhiVxUvT5TJEYsaawyvptPu7bPMSgeiNdbJ7sPo0u11qBeF/Mvt oAyEpg7P7ulT3VU1pALhTcHtmfjm+8IH0hYRgW0iJ70k4p0vwiPnUc2NUNFBFi6PUCCo /vNqmyguhpC/wCCxUNa+uV/MBfqM2ZTozfsbCV4QzySG7C2+vuMd3dfa3crKtSSTsZ0h 0WHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=afbCQs+m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si8399878pls.338.2019.02.07.04.59.54; Thu, 07 Feb 2019 05:00:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=afbCQs+m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727658AbfBGM62 (ORCPT + 99 others); Thu, 7 Feb 2019 07:58:28 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:43798 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727191AbfBGM62 (ORCPT ); Thu, 7 Feb 2019 07:58:28 -0500 Received: by mail-vs1-f68.google.com with SMTP id x1so6578793vsc.10 for ; Thu, 07 Feb 2019 04:58:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=LnlcHpqzXyb8rUW2bmJkzF9pBzhkae9k8y/TMGidJ64=; b=afbCQs+mlvsPtSnwUS2Cp3opEwKHWFTWcXoDh2D+f4p5kU4W9ewR8bxaEi4E5LxwuP 63E29/3iJeibnsl1N40zdSEH2HloKVouoY5+l0uapjniwpXyd+fx5mFurbCLG2tKHtkM bO530SmEwUO6nP8S33Xv3YtqW6Lp3lCbm3ethbqBlGentUCmLQ0A21tftuJfUpE7+N0p yvTlCoW34qsZVJ2E8qrHP578oxo96IvF+/pBYVT7e2oJM5lv/+dMpmgG+FdhEemaHRQq qMmy1TwMf48UipOO1A8XlP7zaWSPrz1cRQlv5WEsGCIQE9ggXME1NnI8dV52LO0cQYIe 2iXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=LnlcHpqzXyb8rUW2bmJkzF9pBzhkae9k8y/TMGidJ64=; b=EZixHtd+hyvoTANTuNqbENuRku/BoPVGF5tbD4YZkmXTZpQvT6DkTmSY11U+SMkyjQ hlHB8zFocXzaiXm2LQjpS1V2Iq1RhmmakyQgtuoxOtKJZj3yK7gbsrrExQrDSG2r4Bta lqSH7jlUhSi9he4qf+EyPB7SaFPu3bFJzOkENgA2nXBsdya94xvjJCRpZP03ynYhpNkl iB6ly+sU0Zi8PRW+BTJocVdRI5jL5+Hbu8x33FAh0Q2AR5moeQdfQiS13aEOkRVc8Iut JgrPjp4cSdeMymLZgln0pcq6UR6js5gnfI6nt/V4KsCjn6idMWs4+1xTgp29A/yRv5q0 N59g== X-Gm-Message-State: AHQUAuaPO5VUtjYKmjGKJn773GutA2aQSqQF4RSf7mETnp2HUGPR6/fE GiJK5vH2uviRciBd/3gXhh/JYPKbyGcno3JjqVBNtQ== X-Received: by 2002:a67:f24d:: with SMTP id y13mr2050119vsm.164.1549544307228; Thu, 07 Feb 2019 04:58:27 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Gilad Ben-Yossef Date: Thu, 7 Feb 2019 14:58:16 +0200 Message-ID: Subject: Re: Regression due to "PM-runtime: Switch autosuspend over to using hrtimers" To: Vincent Guittot Cc: "Rafael J. Wysocki" , Pavel Machek , Len Brown , "open list:THERMAL" , Linux Crypto Mailing List , Linux kernel mailing list , Ofir Drang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 7, 2019 at 10:25 AM Gilad Ben-Yossef wrot= e: > > > > On Wed, 6 Feb 2019 at 17:40, Gilad Ben-Yossef wro= te: > > > > > > Hi all, > > > > > > A regression was spotted in the ccree driver running on Arm 32 bit > > > causing a kernel panic during the crypto API self test phase (panic > > > messages included with this message) happening in the PM resume > > > callback that was not happening before. > > > > > > I've bisected the change that caused this to commit 8234f6734c5d > > > ("PM-runtime: Switch autosuspend over to using hrtimers"). > > > > > > I'm still trying to figure out what is going on inside the callback, > > > but as it was not happening before, I thought I'd give you a shout ou= t > > > to make you aware of this. > > > > Are you using autosuspend mode for this device ? > Yes. > > > > Also this happen in a platform specific function cc_init_hash_sram(). > > I can't see anything related to pm runtime and autosuspend in it. > > True. However, the function is called from the driver PM resume > callback and before that commit it did not fail. > My guess is that there is something related to the timing the callback > is called, probably some race condition the change exposed. > OK, I've found it. It was indeed a race condition in the ccree driver. We were doing something in the resume callback that relied on initialization sequence that happens after autosuspend was enabled for the device. It was never a problem because with the lower res timers we always got around to that initialization before auto suspend kicked in and we had to resume but with your change we started losing that race.... :-) Sorry for the noise and thanks for your help! Gilad --=20 Gilad Ben-Yossef Chief Coffee Drinker values of =CE=B2 will give rise to dom!