From: sashiko-bot@kernel.org
To: "Georgi Djakov" <georgi.djakov@oss.qualcomm.com>
Cc: robh@kernel.org, linux-trace-kernel@vger.kernel.org,
devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 5/6] soc: qcom: qpace: Add LLCC slice support
Date: Wed, 30 Sep 2026 15:08:03 +0000 [thread overview]
Message-ID: <20260930150804.7BAB31F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260930145215.3380977-6-georgi.djakov@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] qcom/qpace: unconditional probe failure if LLCC is disabled or absent
- [Medium] qcom/qpace: double deactivation of LLCC slices on failed resume
- [Low] qcom/qpace: missing Kconfig dependency causes linker error when LLCC=m
--
commit 91b78e77e6f189e8963165dc5c4bd1f6ed1995ec
Author: Georgi Djakov <georgi.djakov@oss.qualcomm.com>
soc: qcom: qpace: Add LLCC slice support
This commit adds support for QPaCE to use dedicated LLCC slices for compression
and decompression. It updates the driver to request and activate the LLCC slices
during probe and resume, and deactivate them during suspend and remove.
> diff --git a/drivers/soc/qcom/qpace.c b/drivers/soc/qcom/qpace.c
> index f5b21ffbcbff5..86a935ae2ca93 100644
> --- a/drivers/soc/qcom/qpace.c
> +++ b/drivers/soc/qcom/qpace.c
[ ... ]
> @@ -660,9 +663,35 @@ static int qpace_probe(struct platform_device *pdev)
> if (ret)
> return dev_err_probe(dev, ret, "failed to map QPaCE registers\n");
>
> + priv->llc_comp = llcc_slice_getd(LLCC_QPACE_COMPRESSION);
> + if (IS_ERR(priv->llc_comp))
> + return dev_err_probe(dev, PTR_ERR(priv->llc_comp),
> + "failed to get compression LLCC slice\n");
[Severity: High]
Does this unconditionally fail the probe if LLCC is disabled or missing from
the device tree? If CONFIG_QCOM_LLCC=n, llcc_slice_getd() returns NULL (which
passes the IS_ERR check). Then the subsequent llcc_slice_activate(NULL)
invokes a macro stub returning -EINVAL, unconditionally failing the probe.
Additionally, if the QPaCE slice is absent from the device tree, it returns
an error pointer, which also aborts probe. Should this be treated as an
optional optimization rather than a hard requirement?
[Severity: Low]
Can this cause a linker error if CONFIG_QCOM_PAGE_COMPRESSION_ENGINE=y but
CONFIG_QCOM_LLCC=m? In this configuration, the built-in QPaCE driver cannot
link against the exported symbols of the LLCC module, but
IS_ENABLED(CONFIG_QCOM_LLCC) evaluates to true, so it attempts to use the
header declarations rather than inline stubs. Is there a missing Kconfig
dependency?
> +
> + priv->llc_decomp = llcc_slice_getd(LLCC_QPACE_DECOMPRESSION);
> + if (IS_ERR(priv->llc_decomp)) {
> + ret = dev_err_probe(dev, PTR_ERR(priv->llc_decomp),
> + "failed to get decompression LLCC slice\n");
> + priv->llc_decomp = NULL;
> + goto llc_put_comp;
> + }
> +
> + ret = llcc_slice_activate(priv->llc_comp);
> + if (ret) {
> + dev_err_probe(dev, ret, "failed to activate compression LLCC slice\n");
> + goto llc_put_decomp;
> + }
[ ... ]
> @@ -708,6 +745,10 @@ static void qpace_remove(struct platform_device *pdev)
> /* No callers remain; tear down the hardware. */
> cancel_work_sync(&qpace_priv->disable_work);
> qpace_power_off(&pdev->dev);
> + llcc_slice_deactivate(qpace_priv->llc_decomp);
> + llcc_slice_deactivate(qpace_priv->llc_comp);
[Severity: Medium]
Can this cause a double-deactivation if a previous qpace_resume() failed? If
an error occurs during qpace_resume() (e.g., if icc_set_bw() fails), the
driver leaves the slices deactivated and returns early.
If the device is subsequently unbound, qpace_remove() unconditionally calls
llcc_slice_deactivate() on both slices. Since their refcounts would already
be 0, wouldn't this underflow the refcount, triggering a
WARN_ON_ONCE(!refcount_dec_if_one(...)) in the LLCC core and sending an
erroneous deactivate command to the hardware?
> + llcc_slice_putd(qpace_priv->llc_decomp);
> + llcc_slice_putd(qpace_priv->llc_comp);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260930145215.3380977-1-georgi.djakov@oss.qualcomm.com?part=5
next prev parent reply other threads:[~2026-09-30 15:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:52 [PATCH 0/6] soc: qcom: Add Qualcomm Page Compression Engine (QPaCE) driver Georgi Djakov
2026-09-30 14:52 ` [PATCH 1/6] dt-bindings: soc: qcom: Add QPaCE binding Georgi Djakov
2026-10-02 6:10 ` Krzysztof Kozlowski
2026-09-30 14:52 ` [PATCH 2/6] soc: qcom: qpace: Add Qualcomm Page Compression Engine driver Georgi Djakov
2026-09-30 15:04 ` sashiko-bot
2026-10-03 0:06 ` Oreoluwa Babatunde
2026-10-01 8:50 ` Krzysztof Kozlowski
2026-10-06 23:51 ` Oreoluwa Babatunde
2026-10-07 7:51 ` Krzysztof Kozlowski
2026-10-08 0:08 ` Oreoluwa Babatunde
2026-09-30 14:52 ` [PATCH 3/6] trace: qpace: Add tracepoints for QPaCE operations Georgi Djakov
2026-09-30 15:00 ` sashiko-bot
2026-09-30 14:52 ` [PATCH 4/6] zram: Add QPaCE zcomp backend Georgi Djakov
2026-09-30 15:08 ` sashiko-bot
2026-10-01 5:43 ` Sergey Senozhatsky
2026-10-06 23:53 ` Oreoluwa Babatunde
2026-10-08 3:52 ` Sergey Senozhatsky
2026-10-01 8:51 ` Krzysztof Kozlowski
2026-10-01 10:27 ` Sergey Senozhatsky
2026-10-07 0:04 ` Oreoluwa Babatunde
2026-10-07 0:03 ` Oreoluwa Babatunde
2026-09-30 14:52 ` [PATCH 5/6] soc: qcom: qpace: Add LLCC slice support Georgi Djakov
2026-09-30 15:08 ` sashiko-bot [this message]
2026-09-30 14:52 ` [PATCH 6/6] arm64: dts: qcom: hawi: Add QPaCE DT node Georgi Djakov
2026-09-30 14:59 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930150804.7BAB31F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=georgi.djakov@oss.qualcomm.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.