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]
Message-ID: <20221115053336.GA29781@quicinc.com>
Date:   Mon, 14 Nov 2022 21:33:36 -0800
From:   Guru Das Srinagesh <quic_gurus@...cinc.com>
To:     Sibi Sankar <quic_sibis@...cinc.com>
CC:     <andersson@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>,
        <robh+dt@...nel.org>, <agross@...nel.org>,
        <linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <konrad.dybcio@...ainline.org>,
        <robimarko@...il.com>, <quic_rjendra@...cinc.com>
Subject: Re: [PATCH V4 2/2] firmware: qcom: scm: Add wait-queue handling logic

On Nov 14 2022 13:56, Sibi Sankar wrote:

(snip)

> +static irqreturn_t qcom_scm_irq_handler(int irq, void *data)
> +{
> +	int ret;
> +	struct qcom_scm *scm = data;
> +	struct completion *wq_to_wake;
> +	u32 wq_ctx, flags, more_pending = 0;
> +
> +	do {
> +		ret = scm_get_wq_ctx(&wq_ctx, &flags, &more_pending);
> +		if (ret) {
> +			dev_err(scm->dev, "GET_WQ_CTX SMC call failed: %d\n", ret);
> +			goto out;
> +		}
> +
> +		wq_to_wake = qcom_scm_lookup_wq(scm, wq_ctx);
> +		if (IS_ERR_OR_NULL(wq_to_wake)) {
> +			dev_err(scm->dev, "No waitqueue found for wq_ctx %d: %ld\n",
> +				wq_ctx, PTR_ERR(wq_to_wake));
> +			goto out;
> +		}
> +
> +		if (flags != QCOM_SMC_WAITQ_FLAG_WAKE_ONE &&
> +		    flags != QCOM_SMC_WAITQ_FLAG_WAKE_ALL) {
> +			dev_err(scm->dev, "Invalid Flags found for wq_ctx: %u\n", flags);
> +			goto out;
> +		}
> +
> +		complete(wq_to_wake);

Need to call complete() or complete_all() based on the flags.

> +	} while (more_pending);
> +
> +out:
> +	return IRQ_HANDLED;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ