mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harshal Dev <harshal.dev@oss.qualcomm.com>
To: Sumit Garg <sumit.garg@oss.qualcomm.com>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Sumit Garg <sumit.garg@kernel.org>,
	linux-arm-msm@vger.kernel.org, andersson@kernel.org,
	konradybcio@kernel.org, linux-kernel@vger.kernel.org,
	bartosz.golaszewski@oss.qualcomm.com,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] firmware: qcom: scm: fold tzmem into the qcom-scm module
Date: Tue, 14 Jul 2026 11:55:24 +0530	[thread overview]
Message-ID: <c588861c-bbbe-4f30-a503-c9c04d9361ae@oss.qualcomm.com> (raw)
In-Reply-To: <CAGptzHOvBZP4sC5+Tp0rCzCuJFU5szBPeCETbxrsQKkY=pNwkA@mail.gmail.com>

Hi,

On 7/13/2026 5:05 PM, Sumit Garg wrote:
> On Mon, Jul 13, 2026 at 4:07 PM Konrad Dybcio
> <konrad.dybcio@oss.qualcomm.com> wrote:
>>
>> On 7/13/26 6:58 AM, Sumit Garg wrote:
>>> From: Sumit Garg <sumit.garg@oss.qualcomm.com>
>>>
>>> qcom_scm and qcom_tzmem have a mutual symbol dependency: qcom_tzmem
>>> calls qcom_scm_shm_bridge_{enable,create,delete}() while qcom_scm
>>> calls qcom_tzmem_{alloc,free,to_phys}() and qcom_scm_get_tzmem_pool().
>>> When both are built as modules this results in a circular module
>>> dependency and depmod fails:
>>>
>>>   depmod: ERROR: Cycle detected: qcom_scm -> qcom_tzmem -> qcom_scm
>>>
>>> QCOM_TZMEM is an invisible tristate that is only ever selected by
>>> QCOM_SCM, so the two are always enabled together. Build qcom_tzmem.o
>>> as part of the qcom-scm composite module instead of as a separate
>>> module. This breaks the cycle since the mutual symbol references
>>> become intra-module.
>>>
>>> With tzmem now internal to qcom-scm, the shm_bridge helpers are no
>>> longer used outside the module, so drop their EXPORT_SYMBOL_GPL() and
>>> move the declarations from the public header to the private one,
>>> alongside qcom_scm_shm_bridge_enable().
>>>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Closes: https://lore.kernel.org/oe-kbuild-all/202607122327.3zkZCUaB-lkp@intel.com/
>>> Assisted-by: Copilot:claude-opus-4.8
>>> Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
>>> ---
>>>  drivers/firmware/qcom/Makefile         | 2 +-
>>>  drivers/firmware/qcom/qcom_scm.c       | 3 ---
>>>  drivers/firmware/qcom/qcom_scm.h       | 4 ++++
>>>  include/linux/firmware/qcom/qcom_scm.h | 5 -----
>>>  4 files changed, 5 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/firmware/qcom/Makefile b/drivers/firmware/qcom/Makefile
>>> index 48801d18f37b..55751d282689 100644
>>> --- a/drivers/firmware/qcom/Makefile
>>> +++ b/drivers/firmware/qcom/Makefile
>>> @@ -5,7 +5,7 @@
>>>
>>>  obj-$(CONFIG_QCOM_SCM)               += qcom-scm.o
>>>  qcom-scm-objs += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o
>>> -obj-$(CONFIG_QCOM_TZMEM)     += qcom_tzmem.o
>>> +qcom-scm-$(CONFIG_QCOM_TZMEM)        += qcom_tzmem.o
>>
>> Does it make sense to squash the kconfig entries too now?
>>
> 
> Sounds reasonable to me, I can do that for v2.

What kind of squash are we thinking about here? Moving the TZMEM_MODE* choice to
QCOM_SCM and removing QCOM_TZMEM? I think we should keep the QCOM_TZMEM Kconfig
around for when we boot with OPTEE and want to disable TZMEM since SHMBridge is
QTEE specific.

Regards,
Harshal

> 
> -Sumit


  reply	other threads:[~2026-07-14  6:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13  4:58 Sumit Garg
2026-07-13 10:37 ` Konrad Dybcio
2026-07-13 11:35   ` Sumit Garg
2026-07-14  6:25     ` Harshal Dev [this message]
2026-07-14 15:38       ` Konrad Dybcio
2026-07-21  5:54         ` Harshal Dev
2026-07-21 10:05           ` Sumit Garg
2026-09-10  7:17 ` Sumit Garg

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=c588861c-bbbe-4f30-a503-c9c04d9361ae@oss.qualcomm.com \
    --to=harshal.dev@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=sumit.garg@kernel.org \
    --cc=sumit.garg@oss.qualcomm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®