Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1636940ybt; Thu, 2 Jul 2020 10:02:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSFV4Do559/jLQvbHRBLzelNGZqGBQLgVdzg4Pc6UlKgmFyl+AH5hQ1Kb3XTwpmnwvFz+T X-Received: by 2002:a17:906:1447:: with SMTP id q7mr26857181ejc.363.1593709330213; Thu, 02 Jul 2020 10:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593709330; cv=none; d=google.com; s=arc-20160816; b=HFOebbLh9Jb6t0/Ctbue6lAh6tNwhVGfNzhxdJTXWCLwRx8Lq5VYodJ+dBLXfWPpGD hjySF8uD0bve6cgrXsJSTAkyCvwUA8rNw6bWlVOkcXk3A502KEA6Ipc4Wq7GW6mpDQdu /pp81zjdKQoYuMUPCyb7I/JfyRI0KwWqVpfgEyhwIC2dDDenQKlF7Wfc/VeMX4tCsIz7 xYKDcD7FEb2a3vgNU1qg//oRjw7C7Hfy+4yQc8ExxWWxhKx1U+DM41huGMesewzFS0A2 bSlv7Nf4mpgWkXAdHsR5Sfm02CH8GF0nz4a1QkpRUYRLgPivWfkkBKeG7SkKEePU7sLp H4Gw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=flBxVR+xgEi2+YA19ddsMUzuXtuBdGIE8ZZciur9odQ=; b=UHYYzCo8exNXnEC/APQ95a1kZ/K9M4cfXys7V49wli/gvPpAkzBsFWLJwW4HWoZPlg vI8/xQdqSZqzeW7/72DoghyJcM0TT97f6xfIExTl5FRmNL+CqaOF//5FZRzQ9Md8bdBW oiewkqKvtpQp9kyxahlSn9OWusn6BXc8ThP4WlY1M4b1RdH9ohvgFI+ffEnl7JJTNwTZ uM/SC3kP1QTUEhoNvPob+xRQemxioIF9Yq0fB99nTcFmaI5q/g1ON7u+R3RguEjz6NHU FCatTIBb57mxyYlDvDLmN/VexLCFC74rpm9tS/CR9Wz2SL+ZHZYNkGcvTPUo6BJTuJJK XxFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X8VtyAG6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt10si6308165edb.146.2020.07.02.10.01.33; Thu, 02 Jul 2020 10:02:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X8VtyAG6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgGBRBX (ORCPT + 99 others); Thu, 2 Jul 2020 13:01:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727014AbgGBRBS (ORCPT ); Thu, 2 Jul 2020 13:01:18 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C875C08C5E1 for ; Thu, 2 Jul 2020 10:01:17 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id w3so16578956wmi.4 for ; Thu, 02 Jul 2020 10:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=flBxVR+xgEi2+YA19ddsMUzuXtuBdGIE8ZZciur9odQ=; b=X8VtyAG69G9o+OhKKU5KR5Ou9DAi4LonHCqCtERfwULRkKasZ3pQe76Bz1YyzYHwQr ws99d31JYzUxaGm0OGqg6Pzu5jcR8B4piEAegN+fN4LdAJHmWRt/8hPsUPXyoOWSkCeI x7bc8xR9zQTlg4QLUesz//hFLffa0ET2EDmI7elOjt3yQstVDDlowt3e4VES6jufJYjc GYG0XIStN4GBKCWODb/oJZHPyotpkOg6Q7ZsRfRPPXC1pJuaL3eEOt8PbKIEx1H/5iyU 7NOp3nqP9yifePxAPsTJkWFJGtwdikenoRQwm9CAFkCEWIMz4AEHVWDYBeg0IO97ZMLt YmjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=flBxVR+xgEi2+YA19ddsMUzuXtuBdGIE8ZZciur9odQ=; b=egP0xBll6Pt6tDMia334nFDuO/rpWSk1pflKpf79/qw7nkUvo+H/XGTOVwtsnuDc7/ kP6Jx3CsJOGnujOwH4k4/J3ylvr6Z7vpzKT5LjCPcpHS1Fu5fWI+4RpU3Nl7N2vKdmZZ qPiuoFG2k8E52A+piDkgogPWsK7GXUxL02eKZJZK3fBlMYL5fA2K+S+2JMfO/9lTCB0T H0I2A2HFBqQ7PzSzrEQQ7RW2cdFGssArgL8QH7mxGZRwyoaiAoOeaNE2/ZvCI8sV8kXj oYDtVv3oLbD4JNUgG83OZsl6HiJkkq4tS6nWK74Ui4H+AcQHe1UWimIDaoK3fnl5W+z/ DruQ== X-Gm-Message-State: AOAM530rDy9AOqmWSnlMuuOgFK2QxfiuFfl5Sd1dwW/vePzK8EZ5D1rt xsedkpbgA82JkMDdxIbYnQBJQw== X-Received: by 2002:a1c:2543:: with SMTP id l64mr9723246wml.31.1593709275497; Thu, 02 Jul 2020 10:01:15 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:c88a:7b2b:a4a1:46d0? ([2a01:e34:ed2f:f020:c88a:7b2b:a4a1:46d0]) by smtp.googlemail.com with ESMTPSA id y16sm11329360wro.71.2020.07.02.10.01.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2020 10:01:14 -0700 (PDT) Subject: Re: [PATCH v7 00/11] Stop monitoring disabled devices To: Andrzej Pietrasiewicz , linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: "Rafael J . Wysocki" , Len Brown , Vishal Kulkarni , "David S . Miller" , Jiri Pirko , Ido Schimmel , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Kalle Valo , Peter Kaestle , Darren Hart , Andy Shevchenko , Sebastian Reichel , Miquel Raynal , Amit Kucheria , Support Opensource , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Heiko Stuebner , Orson Zhai , Baolin Wang , Chunyan Zhang , Zhang Rui , Allison Randal , Enrico Weigelt , Gayatri Kammela , Thomas Gleixner , Bartlomiej Zolnierkiewicz , kernel@collabora.com References: <20200629122925.21729-1-andrzej.p@collabora.com> <3d03d1a2-ac06-b69b-93cb-e0203be62c10@collabora.com> <47111821-d691-e71d-d740-e4325e290fa4@linaro.org> <4353a939-3f5e-8369-5bc0-ad8162b5ffc7@linaro.org> <73942aea-ae79-753c-fe90-d4a99423d548@collabora.com> <374dddd9-b600-3a30-d6c3-8cfcefc944d9@linaro.org> <5a28deb7-f307-8b03-faad-ab05cb8095d1@collabora.com> From: Daniel Lezcano Message-ID: <8aeb4f51-1813-63c1-165b-06640af5968f@linaro.org> Date: Thu, 2 Jul 2020 19:01:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <5a28deb7-f307-8b03-faad-ab05cb8095d1@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 02/07/2020 15:53, Andrzej Pietrasiewicz wrote: > Hi Daniel, > > > >>>>>> >>>>>> I did reproduce: >>>>>> >>>>>> v5.8-rc3 + series => imx6 hang at boot time >>>>>> v5.8-rc3 => imx6 boots correctly >> >> So finally I succeeded to reproduce it on my imx7 locally. The sensor >> was failing to initialize for another reason related to the legacy >> cooling device, this is why it is not appearing on the imx7. >> >> I can now git-bisect :) >> > > That would be very kind of you, thank you! With the lock correctness option enabled: [ 4.179223] imx_thermal tempmon: Extended Commercial CPU temperature grade - max:105C critical:100C passive:95C [ 4.189557] [ 4.191060] ============================================ [ 4.196378] WARNING: possible recursive locking detected [ 4.201699] 5.8.0-rc3-00011-gf5e50bf4d3ef #42 Not tainted [ 4.207102] -------------------------------------------- [ 4.212421] kworker/0:3/54 is trying to acquire lock: [ 4.217480] ca09a3e4 (&tz->lock){+.+.}-{3:3}, at: thermal_zone_device_is_enabled+0x18/0x34 [ 4.225777] [ 4.225777] but task is already holding lock: [ 4.231615] ca09a3e4 (&tz->lock){+.+.}-{3:3}, at: thermal_zone_get_temp+0x38/0x6c [ 4.239121] [ 4.239121] other info that might help us debug this: [ 4.245655] Possible unsafe locking scenario: [ 4.245655] [ 4.251579] CPU0 [ 4.254031] ---- [ 4.256481] lock(&tz->lock); [ 4.259544] lock(&tz->lock); [ 4.262608] [ 4.262608] *** DEADLOCK *** [ 4.262608] [ 4.268533] May be due to missing lock nesting notation [ 4.268533] [ 4.275329] 4 locks held by kworker/0:3/54: [ 4.279517] #0: cb0066a8 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x224/0x808 [ 4.288241] #1: ca075f10 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x224/0x808 [ 4.296787] #2: cb1a48d8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x30/0x140 [ 4.304468] #3: ca09a3e4 (&tz->lock){+.+.}-{3:3}, at: thermal_zone_get_temp+0x38/0x6c [ 4.312408] [ 4.312408] stack backtrace: [ 4.316778] CPU: 0 PID: 54 Comm: kworker/0:3 Not tainted 5.8.0-rc3-00011-gf5e50bf4d3ef #42 [ 4.325048] Hardware name: Freescale i.MX7 Dual (Device Tree) [ 4.330809] Workqueue: events deferred_probe_work_func [ 4.335973] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 4.343734] [] (show_stack) from [] (dump_stack+0xe8/0x114) [ 4.351062] [] (dump_stack) from [] (__lock_acquire+0xbfc/0x2cb4) [ 4.358909] [] (__lock_acquire) from [] (lock_acquire+0xf4/0x4e4) [ 4.366758] [] (lock_acquire) from [] (__mutex_lock+0xb0/0xaa8) [ 4.374431] [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [ 4.382452] [] (mutex_lock_nested) from [] (thermal_zone_device_is_enabled+0x18/0x34) [ 4.392036] [] (thermal_zone_device_is_enabled) from [] (imx_get_temp+0x30/0x208) [ 4.401271] [] (imx_get_temp) from [] (thermal_zone_get_temp+0x4c/0x6c) [ 4.409640] [] (thermal_zone_get_temp) from [] (thermal_zone_device_update+0x8c/0x258) [ 4.419310] [] (thermal_zone_device_update) from [] (thermal_zone_device_set_mode+0x60/0x88) [ 4.429500] [] (thermal_zone_device_set_mode) from [] (imx_thermal_probe+0x3e4/0x578) [ 4.439082] [] (imx_thermal_probe) from [] (platform_drv_probe+0x48/0x98) [ 4.447622] [] (platform_drv_probe) from [] (really_probe+0x218/0x348) [ 4.455903] [] (really_probe) from [] (driver_probe_device+0x5c/0xb4) [ 4.464098] [] (driver_probe_device) from [] (bus_for_each_drv+0x58/0xb8) [ 4.472638] [] (bus_for_each_drv) from [] (__device_attach+0xd4/0x140) [ 4.480919] [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [ 4.489112] [] (bus_probe_device) from [] (deferred_probe_work_func+0x68/0x98) [ 4.498088] [] (deferred_probe_work_func) from [] (process_one_work+0x2e0/0x808) [ 4.507237] [] (process_one_work) from [] (worker_thread+0x2a0/0x59c) [ 4.515432] [] (worker_thread) from [] (kthread+0x16c/0x178) [ 4.522843] [] (kthread) from [] (ret_from_fork+0x14/0x20) [ 4.530074] Exception stack(0xca075fb0 to 0xca075ff8) [ 4.535138] 5fa0: 00000000 00000000 00000000 00000000 [ 4.543328] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.551516] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog