lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180622170251.GD10336@builder>
Date:   Fri, 22 Jun 2018 10:02:51 -0700
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Douglas Anderson <dianders@...omium.org>
Cc:     andy.gross@...aro.org, tdas@...eaurora.org,
        collinsd@...eaurora.org, sboyd@...nel.org, ilina@...eaurora.org,
        broonie@...nel.org, rplsssn@...eaurora.org,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        David Brown <david.brown@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: qcom: rpmh-rsc: Check cmd_db_ready() to help
 children

On Mon 18 Jun 10:22 PDT 2018, Douglas Anderson wrote:

> Children of RPMh will need access to cmd_db.  Rather than having each
> child have code to check if cmd_db is ready let's add the check to
> RPMh.
> 
> Suggested-by: Stephen Boyd <sboyd@...nel.org>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>

Regards,
Bjorn

> ---
> This code is based upon v11 of Lina and Raju's RPMh series.
> 
> With this we'll be able to remove this boilerplate code from
> clk-rpmh.c and qcom-rpmh-regulator.c.  Neither of these files has
> landed upstream yet but patches are pretty far along.
> 
>  drivers/soc/qcom/rpmh-rsc.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
> index 144a058407c0..ad85523bdd3b 100644
> --- a/drivers/soc/qcom/rpmh-rsc.c
> +++ b/drivers/soc/qcom/rpmh-rsc.c
> @@ -18,6 +18,7 @@
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
>  
> +#include <soc/qcom/cmd-db.h>
>  #include <soc/qcom/tcs.h>
>  #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>  
> @@ -621,6 +622,18 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
>  	struct rsc_drv *drv;
>  	int ret, irq;
>  
> +	/*
> +	 * Even though RPMh doesn't directly use cmd-db, all of its children
> +	 * do.  To avoid adding this check to our children we'll do it now.
> +	 */
> +	ret = cmd_db_ready();
> +	if (ret) {
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(&pdev->dev, "Command DB not available (%d)\n",
> +									ret);
> +		return ret;
> +	}
> +
>  	drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
>  	if (!drv)
>  		return -ENOMEM;
> -- 
> 2.18.0.rc1.244.gcf134e6275-goog
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ