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:   Tue, 27 Apr 2021 09:58:14 +0200
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     Sibi Sankar <sibis@...eaurora.org>, robh+dt@...nel.org,
        bjorn.andersson@...aro.org, sboyd@...nel.org
Cc:     agross@...nel.org, mani@...nel.org, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/5] reset: qcom: Add PDC Global reset signals for
 WPSS

Hi Sibi,

On Tue, 2021-04-27 at 13:03 +0530, Sibi Sankar wrote:
> Add PDC Global reset signals for Wireless Processor Subsystem (WPSS)
> on SC7280 SoCs.
> 
> Signed-off-by: Sibi Sankar <sibis@...eaurora.org>
> ---
> 
> v2:
>  * place resets and num_resets adjacent to each other [Stephen]
[...] 
> +struct qcom_pdc_reset_desc {
> +	const struct qcom_pdc_reset_map *resets;
> +	size_t num_resets;
> +	unsigned int offset;
> +};
[...]

For consistency, please do the same here:

> +static const struct qcom_pdc_reset_desc sdm845_pdc_reset_desc = {
> +	.resets = sdm845_pdc_resets,
> +	.offset = RPMH_SDM845_PDC_SYNC_RESET,
> +	.num_resets = ARRAY_SIZE(sdm845_pdc_resets),
> +};
[...]

and here:

> +static const struct qcom_pdc_reset_desc sc7280_pdc_reset_desc = {
> +	.resets = sc7280_pdc_resets,
> +	.offset = RPMH_SC7280_PDC_SYNC_RESET,
> +	.num_resets = ARRAY_SIZE(sc7280_pdc_resets),
> +};

[...]
> @@ -54,19 +89,18 @@ static int qcom_pdc_control_assert(struct reset_controller_dev *rcdev,
>  					unsigned long idx)
>  {
>  	struct qcom_pdc_reset_data *data = to_qcom_pdc_reset_data(rcdev);
> +	const struct qcom_pdc_reset_map *map = &data->desc->resets[idx];
>  
> -	return regmap_update_bits(data->regmap, RPMH_PDC_SYNC_RESET,
> -				  BIT(sdm845_pdc_resets[idx].bit),
> -				  BIT(sdm845_pdc_resets[idx].bit));
> +	return regmap_update_bits(data->regmap, data->desc->offset, BIT(map->bit), BIT(map->bit));
>  }

Why not go one step further:

	u32 mask = BIT(data->desc->resets[idx].bit);

	return regmap_update_bits(data->regmap, data->desc->offset, mask, mask);

That seems to be a common pattern in other qcom drivers.
Either way, with the above reset/num_reset changes:

Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>

Also,

Acked-by: Philipp Zabel <p.zabel@...gutronix.de>

for the whole series to go through the qcom tree, or let me know if you
want me to pick up patches 2-4 next round.

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ