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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Mar 2023 11:14:57 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     Sumit Gupta <sumitg@...dia.com>
Cc:     treding@...dia.com, krzysztof.kozlowski@...aro.org,
        dmitry.osipenko@...labora.com, viresh.kumar@...aro.org,
        rafael@...nel.org, jonathanh@...dia.com, robh+dt@...nel.org,
        lpieralisi@...nel.org, linux-kernel@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-pci@...r.kernel.org,
        mmaddireddy@...dia.com, kw@...ux.com, bhelgaas@...gle.com,
        vidyas@...dia.com, sanjayc@...dia.com, ksitaraman@...dia.com,
        ishah@...dia.com, bbasu@...dia.com
Subject: Re: [Patch v3 02/11] memory: tegra: add interconnect support for
 DRAM scaling in Tegra234

On Mon, Mar 20, 2023 at 11:54:32PM +0530, Sumit Gupta wrote:
[...]
> diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c
[...]
> +static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst)
> +{
> +	struct tegra_mc *mc = icc_provider_to_tegra_mc(dst->provider);
> +	struct mrq_bwmgr_int_request bwmgr_req = { 0 };
> +	struct mrq_bwmgr_int_response bwmgr_resp = { 0 };
> +	const struct tegra_mc_client *pclient = src->data;
> +	struct tegra_bpmp_message msg;
> +	struct tegra_bpmp *bpmp;
> +	int ret;
> +
> +	/*
> +	 * Same Src and Dst node will happen during boot from icc_node_add().
> +	 * This can be used to pre-initialize and set bandwidth for all clients
> +	 * before their drivers are loaded. We are skipping this case as for us,
> +	 * the pre-initialization already happened in Bootloader(MB2) and BPMP-FW.
> +	 */
> +	if (src->id == dst->id)
> +		return 0;
> +
> +	bpmp = of_tegra_bpmp_get();
> +	if (IS_ERR(bpmp)) {
> +		ret = PTR_ERR(bpmp);
> +		return ret;
> +	}

Irrespective of Whether we end up doing the BPMP lookup via
tegra_bpmp_get() or of_tegra_bpmp_get(), I think we should resolve at
probe time and cache the result, since this function can get called
multiple times and the lookup is a rather heavy operation.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ