Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp653699pxa; Wed, 19 Aug 2020 11:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP9DRqD0y/ZXjvlQQLnVCpCzQ4aayj7XfEj1d50gKl53jI+aet8lXOeTn4uda8Qwj31nm7 X-Received: by 2002:a17:907:447d:: with SMTP id oo21mr27081126ejb.462.1597860341332; Wed, 19 Aug 2020 11:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597860341; cv=none; d=google.com; s=arc-20160816; b=nq0kKWH1AeJWR6cuhQNbFDeAn+WQKqHN2AbUXIW18KlXy8GdMKs6i+B0bc1n0ihy6N zFtW9aLOoaec+8drmwB2SUxy3LFe9x8vlWJbdDmbYEMQenNAGTb3w9gOSU7jprCA914U 0bxyBJIQWIP22cojRpAkS4Y+0wlzcn8hOOBV4F7oaaeuU8Bbs0V2f1834TIUji+syfqM Ry8vImiSrzGhM272YXneEdSilUwkTad/LA3q1pkEos7Xwx8jitOG0+mzgBo9wpLWP7VP N/E5qbFmfiGV31zoryiO2oNoI+8CL11K49UwnIokA70dMfaSBuvuQ/SbOZWJpHGPFxRg X7nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=4uFvlxkD/ZRDxTMNsnxWJlA+7N+RwhZ4TxQPiEuF1gE=; b=RD7xamFT62cQr2dgmU42gzB0MfkMwIUMP3dWBJHp7AqdT6khhBo2/DXL+XIRMRZspL Xii+dOhIydJXAD7hyKL0dg46Uw8/l6kenzpj1v+zhxU9vDtOpflCgYH3Q3qx3q6HvsNE toI/No+D3uO8dKP8eyHVrz3/dJbwRhanl5wts0OasZMgbbIK+1jyntencoPd7OQZ8XSx 162rvusaErLIpcI1UfjDEsVXyoe5stO16A43ZaZRDtX5R68bbBsrvdlb/GfgqAArKEbe NMGa8vx32UuCzFQkNs20MkSB1U9O/FtETVY41WjcXS5PX5yTRvD0ZRsQyWVTlVdEDIT3 VdRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MJxFnALF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si17498975eju.389.2020.08.19.11.05.17; Wed, 19 Aug 2020 11:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@chromium.org header.s=google header.b=MJxFnALF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgHSSEc (ORCPT + 99 others); Wed, 19 Aug 2020 14:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726435AbgHSSE1 (ORCPT ); Wed, 19 Aug 2020 14:04:27 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C442C061383 for ; Wed, 19 Aug 2020 11:04:26 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id v15so11776043pgh.6 for ; Wed, 19 Aug 2020 11:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=4uFvlxkD/ZRDxTMNsnxWJlA+7N+RwhZ4TxQPiEuF1gE=; b=MJxFnALFZR4uRg7wXdt8xjqU55QzxzS/dwWaI4+wSvJgFASckb4GEN0FdCv4GOYUkK w9GAp+Bpw8D+0vhT7p7q2WlvSqtI1M7lWfe4Rcjy0f6wVrjftXJqZ5DRPHsu5/SVof5u snMKDG22yHOJaHMPVjifI2G4gNkoHNDQOuZGQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=4uFvlxkD/ZRDxTMNsnxWJlA+7N+RwhZ4TxQPiEuF1gE=; b=lwaVjL9wDrOWMmsS35ZIcU0dzhXvC5ty2Q2vZ0Sy9KFeMCdQbRxv4i8gQimxBphbtn weLNYpEcMprecs+Rn27ehWt5vD6HyUBzv060c7WWFdIYgnyEBxuhsUniSC6d99bwUW85 tXUl+eAOzGtu7pDZlLV2SFnZblTGfa8mlpsx9IU+YDeffk5sOSlhj+c0gwMLWLaktdJ/ TWD3Sla7Y0KAVPEns05i4livJ7vHh0hMI5k/g+hmoVetDmmbx3ZWwKXXVF2OodxmI/jA de/AmG7iWonroffcUrcuIWCwBYil4gYttjmV82coSWToEAu/s5fdzzcf5S3CiNYzd2uK u04A== X-Gm-Message-State: AOAM530EUTeiIpQQ1PEu5n2LM6T+SCNKTNiri0J0MDKWMMHoynoSRfPH x7Zz4VLqjU+HrBJLWYHKmSXoH2qGWhjlVw== X-Received: by 2002:a05:6a00:3:: with SMTP id h3mr19857856pfk.163.1597860265462; Wed, 19 Aug 2020 11:04:25 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id e8sm28888008pfd.34.2020.08.19.11.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 11:04:24 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1597831670-17401-2-git-send-email-mkshah@codeaurora.org> References: <1597831670-17401-1-git-send-email-mkshah@codeaurora.org> <1597831670-17401-2-git-send-email-mkshah@codeaurora.org> Subject: Re: [PATCH 1/2] Revert "drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh" From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, ulf.hansson@linaro.org, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, Maulik Shah , Sai Prakash Ranjan , John Stultz , Stephen Rothwell To: Maulik Shah , agross@kernel.org, bjorn.andersson@linaro.org Date: Wed, 19 Aug 2020 11:04:23 -0700 Message-ID: <159786026353.334488.6206471069270174090@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Maulik Shah (2020-08-19 03:07:49) > This change was done based on an test results of unmerged series of > adding RSC power domain and using .power_off callback of genpd to > invoke rpmh_flush(). Perhaps: Commit efde2659b0fe ("drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh") was written to fix a bug seen in an unmerged series that implemented a struct generic_pm_domain::power_off() callback calling rpmh_flush(). See stack trace below. >=20 > Call trace: > dump_backtrace+0x0/0x174 > show_stack+0x20/0x2c > dump_stack+0xc8/0x124 > lockdep_rcu_suspicious+0xe4/0x104 > __tcs_buffer_write+0x230/0x2d0 > rpmh_rsc_write_ctrl_data+0x210/0x270 > rpmh_flush+0x84/0x24c > rpmh_domain_power_off+0x78/0x98 > _genpd_power_off+0x40/0xc0 > genpd_power_off+0x168/0x208 >=20 > Later the final merged solution is to use CPU PM notification to invoke > rpmh_flush() and .power_off callback of genpd is not implemented in the > driver. I'd also add: CPU PM notifiers are run with RCU enabled/watching (see cpu_pm_notify() and how it calls rcu_irq_enter_irqson() before calling the notifiers). >=20 > Remove this change since RCU will not be idle during CPU PM notifications > hence not required to use _rcuidle tracepoint. Using _rcuidle tracepoint > prevented rpmh driver to be loadable module as these are not exported > symbols. >=20 > This reverts commit efde2659b0fe835732047357b2902cca14f054d9. >=20 > Cc: Sai Prakash Ranjan > Cc: John Stultz > Cc: Stephen Rothwell > Signed-off-by: Maulik Shah > --- Otherwise Reviewed-by: Stephen Boyd