<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/firmware/qcom_scm.c, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-05-14T08:49:44Z</updated>
<entry>
<title>firmware: qcom_scm: Workaround lack of "is available" call on SC7180</title>
<updated>2021-05-14T08:49:44Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2021-02-23T21:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d4b2a5e19cfca1191d9090389489433c6465439'/>
<id>urn:sha1:6d4b2a5e19cfca1191d9090389489433c6465439</id>
<content type='text'>
[ Upstream commit 257f2935cbbf14b16912c635fcd8ff43345c953b ]

Some SC7180 firmwares don't implement the QCOM_SCM_INFO_IS_CALL_AVAIL
API, so we can't probe the calling convention. We detect the legacy
calling convention on these firmwares, because the availability call
always fails and legacy is the fallback. This leads to problems where
the rmtfs driver fails to probe, because it tries to assign memory with
a bad calling convention, which then leads to modem failing to load and
all networking, even wifi, to fail. Ouch!

Let's force the calling convention to be what it always is on this SoC,
i.e. arm64. Of course, the calling convention is not the same thing as
implementing the QCOM_SCM_INFO_IS_CALL_AVAIL API. The absence of the "is
this call available" API from the firmware means that any call to
__qcom_scm_is_call_available() fails. This is OK for now though because
none of the calls that are checked for existence are implemented on
firmware running on sc7180. If such a call needs to be checked for
existence in the future, we presume that firmware will implement this
API and then things will "just work".

Cc: Elliot Berman &lt;eberman@codeaurora.org&gt;
Cc: Brian Masney &lt;masneyb@onstation.org&gt;
Cc: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Cc: Jeffrey Hugo &lt;jhugo@codeaurora.org&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Fixes: 9a434cee773a ("firmware: qcom_scm: Dynamically support SMCCC and legacy conventions")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20210223214539.1336155-4-swboyd@chromium.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: Reduce locking section for __get_convention()</title>
<updated>2021-05-14T08:49:44Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2021-02-23T21:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be84100cbf20061d9cc184a6bcfeaeec622bf1ff'/>
<id>urn:sha1:be84100cbf20061d9cc184a6bcfeaeec622bf1ff</id>
<content type='text'>
[ Upstream commit f6ea568f0ddcdfad52807110ed8983e610f0e03b ]

We shouldn't need to hold this spinlock here around the entire SCM call
into the firmware and back. Instead, we should be able to query the
firmware, potentially in parallel with other CPUs making the same
convention detection firmware call, and then grab the lock to update the
calling convention detected. The convention doesn't change at runtime so
calling into firmware more than once is possibly wasteful but simpler.
Besides, this is the slow path, not the fast path where we've already
detected the convention used.

More importantly, this allows us to add more logic here to workaround
the case where the firmware call to check for availability isn't
implemented in the firmware at all. In that case we can check the
firmware node compatible string and force a calling convention.

Note that we remove the 'has_queried' logic that is repeated twice. That
could lead to the calling convention being printed multiple times to the
kernel logs if the bool is true but __query_convention() is running on
multiple CPUs. We also shorten the time where the lock is held, but we
keep the lock held around the printk because it doesn't seem hugely
important to drop it for that.

Cc: Elliot Berman &lt;eberman@codeaurora.org&gt;
Cc: Brian Masney &lt;masneyb@onstation.org&gt;
Cc: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Cc: Jeffrey Hugo &lt;jhugo@codeaurora.org&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Fixes: 9a434cee773a ("firmware: qcom_scm: Dynamically support SMCCC and legacy conventions")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20210223214539.1336155-3-swboyd@chromium.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool</title>
<updated>2021-05-14T08:49:44Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2021-02-23T21:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=702c4208721637eba0e0d379f68f50c9b29c8a38'/>
<id>urn:sha1:702c4208721637eba0e0d379f68f50c9b29c8a38</id>
<content type='text'>
[ Upstream commit 9d11af8b06a811c5c4878625f51ce109e2af4e80 ]

Make __qcom_scm_is_call_available() return bool instead of int. The
function has "is" in the name, so it should return a bool to indicate
the truth of the call being available. Unfortunately, it can return a
number &lt; 0 which also looks "true", but not all callers expect that and
thus they think a call is available when really the check to see if the
call is available failed to figure it out.

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Cc: Elliot Berman &lt;eberman@codeaurora.org&gt;
Cc: Brian Masney &lt;masneyb@onstation.org&gt;
Cc: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Cc: Jeffrey Hugo &lt;jhugo@codeaurora.org&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Fixes: 0f206514749b ("scsi: firmware: qcom_scm: Add support for programming inline crypto keys")
Fixes: 0434a4061471 ("firmware: qcom: scm: add support to restore secure config to qcm_scm-32")
Fixes: b0a1614fb1f5 ("firmware: qcom: scm: add OCMEM lock/unlock interface")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20210223214539.1336155-2-swboyd@chromium.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: firmware: qcom_scm: Add memory protect virtual address ranges</title>
<updated>2020-09-14T13:45:25Z</updated>
<author>
<name>Stanimir Varbanov</name>
</author>
<published>2020-08-17T08:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d885330fa3daede6bf24b7422da9d6d9a577eb8'/>
<id>urn:sha1:6d885330fa3daede6bf24b7422da9d6d9a577eb8</id>
<content type='text'>
This adds a new SCM memprotect command to set virtual address ranges.

Signed-off-by: Stanimir Varbanov &lt;stanimir.varbanov@linaro.org&gt;
Reviewed-by: Elliot Berman &lt;eberman@codeaurora.org&gt;
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2020-08-06T23:50:07Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2020-08-06T23:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfdf16ecfd6abafc22b7f02364d9bb879ca8a5ee'/>
<id>urn:sha1:dfdf16ecfd6abafc22b7f02364d9bb879ca8a5ee</id>
<content type='text'>
Pull SCSI updates from James Bottomley:
 "This consists of the usual driver updates (ufs, qla2xxx, tcmu, lpfc,
  hpsa, zfcp, scsi_debug) and minor bug fixes.

  We also have a huge docbook fix update like most other subsystems and
  no major update to the core (the few non trivial updates are either
  minor fixes or removing an unused feature [scsi_sdb_cache])"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (307 commits)
  scsi: scsi_transport_srp: Sanitize scsi_target_block/unblock sequences
  scsi: ufs-mediatek: Apply DELAY_AFTER_LPM quirk to Micron devices
  scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM"
  scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged
  scsi: scsi_debug: Implement tur_ms_to_ready parameter
  scsi: scsi_debug: Fix request sense
  scsi: lpfc: Fix typo in comment for ULP
  scsi: ufs-mediatek: Prevent LPM operation on undeclared VCC
  scsi: iscsi: Do not put host in iscsi_set_flashnode_param()
  scsi: hpsa: Correct ctrl queue depth
  scsi: target: tcmu: Make TMR notification optional
  scsi: target: tcmu: Implement tmr_notify callback
  scsi: target: tcmu: Fix and simplify timeout handling
  scsi: target: tcmu: Factor out new helper ring_insert_padding
  scsi: target: tcmu: Do not queue aborted commands
  scsi: target: tcmu: Use priv pointer in se_cmd
  scsi: target: Add tmr_notify backend function
  scsi: target: Modify core_tmr_abort_task()
  scsi: target: iscsi: Fix inconsistent debug message
  scsi: target: iscsi: Fix login error when receiving
  ...
</content>
</entry>
<entry>
<title>scsi: firmware: qcom_scm: Add support for programming inline crypto keys</title>
<updated>2020-07-25T02:09:54Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2020-07-10T07:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f206514749be9988a083ca364b889a7fcff7f78'/>
<id>urn:sha1:0f206514749be9988a083ca364b889a7fcff7f78</id>
<content type='text'>
Add support for the Inline Crypto Engine (ICE) key programming interface
that's needed for the ufs-qcom driver to use inline encryption on
Snapdragon SoCs.  This interface consists of two SCM calls: one to program
a key into a keyslot, and one to invalidate a keyslot.

Although the UFS specification defines a standard way to do this, on these
SoCs the Linux kernel isn't permitted to access the needed crypto
configuration registers directly; these SCM calls must be used instead.

Link: https://lore.kernel.org/r/20200710072013.177481-2-ebiggers@kernel.org
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: Add msm8994 compatible</title>
<updated>2020-07-13T19:26:04Z</updated>
<author>
<name>Konrad Dybcio</name>
</author>
<published>2020-06-24T15:00:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4bdc8c8d2815fe8ef5052c5a5ab51c04a4f0de7b'/>
<id>urn:sha1:4bdc8c8d2815fe8ef5052c5a5ab51c04a4f0de7b</id>
<content type='text'>
This change adds a compatible for msm8994,
which requires no additional clocks for
scm to probe correctly.

Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Konrad Dybcio &lt;konradybcio@gmail.com&gt;
Link: https://lore.kernel.org/r/20200624150107.76234-2-konradybcio@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: Fix legacy convention SCM accessors</title>
<updated>2020-07-13T18:41:43Z</updated>
<author>
<name>Jonathan McDowell</name>
</author>
<published>2020-07-04T17:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b88c28280c3f7097546db93824686db1e7dceee1'/>
<id>urn:sha1:b88c28280c3f7097546db93824686db1e7dceee1</id>
<content type='text'>
The move to a combined driver for the QCOM SCM hardware changed the
io_writel and io_readl helpers to use non-atomic calls, despite the
commit message saying that atomic was a better option. This breaks these
helpers on hardware that uses the old legacy convention (access fails
with a -95 return code). Switch back to using the atomic calls.

Observed as a failure routing GPIO interrupts to the Apps processor on
an IPQ8064; fix is confirmed as correctly allowing the interrupts to be
routed and observed.

Reviewed-by: Elliot Berman &lt;eberman@codeaurora.org&gt;
Fixes: 57d3b816718c ("firmware: qcom_scm: Remove thin wrappers")
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan McDowell &lt;noodles@earth.li&gt;
Link: https://lore.kernel.org/r/20200704172334.GA759@earth.li
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: fix bogous abuse of dma-direct internals</title>
<updated>2020-04-21T06:20:00Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2020-04-14T12:31:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=459b1f86f1cba7de813fbc335df476c111feec22'/>
<id>urn:sha1:459b1f86f1cba7de813fbc335df476c111feec22</id>
<content type='text'>
As far as the device is concerned the dma address is the physical
address.  There is no need to convert it to a physical address,
especially not using dma-direct internals that are not available
to drivers and which will interact badly with IOMMUs.  Last but not
least the commit introducing it claimed to just fix a type issue,
but actually changed behavior.

Fixes: 6e37ccf78a532 ("firmware: qcom_scm: Use proper types for dma mappings")
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20200414123136.441454-1-hch@lst.de
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: Remove unneeded conversion to bool</title>
<updated>2020-04-20T19:51:55Z</updated>
<author>
<name>Jason Yan</name>
</author>
<published>2020-04-20T12:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=820f63652bb45f2a2de4f4ddf82577991fdb3d11'/>
<id>urn:sha1:820f63652bb45f2a2de4f4ddf82577991fdb3d11</id>
<content type='text'>
The '&gt;' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:

drivers/firmware/qcom_scm.c:946:25-30: WARNING: conversion to bool not
needed here

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Link: https://lore.kernel.org/r/20200420123516.7888-1-yanaijie@huawei.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
