Received: by 10.223.176.46 with SMTP id f43csp510922wra; Fri, 26 Jan 2018 02:29:30 -0800 (PST) X-Google-Smtp-Source: AH8x225ZDxjllbfHkgOGgroEl4oBExciLAevW2OWzizNx0A0WlPUDsTMFhi/hekb88VAvBZET53I X-Received: by 10.101.97.209 with SMTP id j17mr12857037pgv.266.1516962570159; Fri, 26 Jan 2018 02:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516962570; cv=none; d=google.com; s=arc-20160816; b=SSpsgQ0Ym+Q6NBQcA1RtyWYA/xNYU38QXCg0ilRORa1ZTaLVGZ8XrY6ZyYMSHuNJ26 y+v7Qps8H3Q8TQclZRQkZ52kMVzbKqgRG5OQLzyrCI31wt6rIurxiSDwafjRT8AZ+Pr5 MRXOZFSNPpIS3M1QOCEGwyvsLSEBK9wW9odCn2TIBnVEWZZ2AwanrYV8J/La/VshASlz T12SXOj5+h44d3KnhPLGn1RksMT6w5l9AGd4TWY4HTHcKD4xi7XUp/L6wMJ6EHHxqpy/ fiWWTqM9KgzXjoXliZ9GCztniIDigEP7iIAq5RcpBiy0xNcJHy1NB/vXTT+Tzl3giaWN vGkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=6ZVkcPpyf2llPN7U2QJQu64UzqrU4OdIH+K9+E8gZvA=; b=y6xoJH7HT8uquUU12VsZeeZ4Cb/h2CbvIDfosKdI7dPgu4M6KAs6chbOSm6AphavUz IMALatE7OQQJIn3+vAtTHkFzpSTcprK6VjHfLc1Vs3ZLQKx06g1EhJ1iu7KPt5aqANdc jylqPrTtWyq6QxwVPgsClMpc5ONVURczcfIplDPVzVBoF43hGcEWSUg0G0+sJH+4EOXK 6+kilQuwL8vBiX+8mpc9MrT5OBiPy0aidVbZgIs4aeoSmvK5sn9TWHsjhW51Ym05BQdf uTNQwT6TR1Mlhu5mKZ2o9Pey1aL7ZUGOZNse42XlFUyMypTAxuho/C+IPVH8Vkc7EyOj T7xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DQqL2vu8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si2841387pgb.334.2018.01.26.02.29.15; Fri, 26 Jan 2018 02:29:30 -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=@gmail.com header.s=20161025 header.b=DQqL2vu8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753096AbeAZK2x (ORCPT + 99 others); Fri, 26 Jan 2018 05:28:53 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36254 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbeAZK2v (ORCPT ); Fri, 26 Jan 2018 05:28:51 -0500 Received: by mail-pg0-f65.google.com with SMTP id k68so31277pga.3; Fri, 26 Jan 2018 02:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=6ZVkcPpyf2llPN7U2QJQu64UzqrU4OdIH+K9+E8gZvA=; b=DQqL2vu8Jkce5wnWoeqxsyvCnd80nIMzDWZobAAMZ7Pso6NGo8k7STMLkO6JLRb5oA 8DUHFeZYYWQQ561di+9i6RWL1CML83IJWgoKlyCY1f36rKkNFmdQ2qUayWjyuM3XsILk cnFfZ8v2NwHb365/mmc+/DP1ZIvCThlawW8Uo0LpruaxpHz0Q+h4urMMYzgFrEqyrvv9 ZXausz+298Uzm1fHU5wZVSYzl+IBzoBTsPAvkkQ3rMXTVmeRsEZvEQmk8JlEePUkRncu NmVIwBA+IlL0+uqHEw1A2VfqqaeD+cYzEKlk3IgW3WWP9tJP0cQceBz1hREkFKFk7Upw FXgQ== 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-transfer-encoding :content-language; bh=6ZVkcPpyf2llPN7U2QJQu64UzqrU4OdIH+K9+E8gZvA=; b=kCaAkdsNph69Nqx7BIIG5Enfutd/mqC7qnpVT0O4xCr6YW6lhBqlxy1ithrETnsNrb +nVz7NM/gcZK7dfVt/NoPaxf3hqB2xiUxnQ8Ts/yL4jyv8A0rYNGKyldlyyPVarobJa/ AIrGXmFF8ExheRtKd9tIcxmyTD3e9g3c6QCCii7ZyvbOfymPj0Q+/qihcz4azGz1aFaw 5v7XFeYhLUF2E0BpMISndPho+UuAxC1A5aZglbnUpBn7yktVyS25pfmjbVFyGKLxpe62 humrT306TrWTMUFdG2HZo1WXt/Y3jU27LsTUZHyfkt7AhBZc5wpK31DyZW+0fsjXxueF YGbg== X-Gm-Message-State: AKwxytcHDjXFhKfYKMOAy9cuw5xqB3H/iPr30VRfc3q28K3/syuJsM07 JbXUlAGzRRzU2KI4SDs5euIDf3Pz X-Received: by 10.98.214.129 with SMTP id a1mr18355848pfl.221.1516962530515; Fri, 26 Jan 2018 02:28:50 -0800 (PST) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.70.14? ([2402:f000:1:1501:200:5efe:a66f:460e]) by smtp.gmail.com with ESMTPSA id b3sm7540043pga.24.2018.01.26.02.28.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 02:28:50 -0800 (PST) Subject: Re: [PATCH] base: power: domain: Replace mdelay with msleep To: Pavel Machek Cc: rjw@rjwysocki.net, khilman@kernel.org, ulf.hansson@linaro.org, len.brown@intel.com, gregkh@linuxfoundation.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1516955899-31810-1-git-send-email-baijiaju1990@gmail.com> <20180126102604.GB13775@amd> From: Jia-Ju Bai Message-ID: Date: Fri, 26 Jan 2018 18:28:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180126102604.GB13775@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/1/26 18:26, Pavel Machek wrote: > On Fri 2018-01-26 16:38:19, Jia-Ju Bai wrote: >> After checking all possible call chains to genpd_dev_pm_detach() and >> genpd_dev_pm_attach() here, >> my tool finds that these functions are never called in atomic context, >> namely never in an interrupt handler or holding a spinlock. >> Thus mdelay can be replaced with msleep to avoid busy wait. >> >> This is found by a static analysis tool named DCNS written by > myself. > > Well, cond_resched() just after msleep certainly looks like that. > > Did the patch receive any testing? > Thanks for reply :) I only perform compilation testing but did not run it in real execution. Thanks, Jia-Ju Bai