mbox series

[0/6] firmware: qcom_scm: Fix SMCCC detection on sc7180

Message ID 20210223214539.1336155-1-swboyd@chromium.org (mailing list archive)
Headers show
Series firmware: qcom_scm: Fix SMCCC detection on sc7180 | expand

Message

Stephen Boyd Feb. 23, 2021, 9:45 p.m. UTC
The firmware that ships on sc7180 devices doesn't implement the smc call
that tells the kernel what calling convention is available. Instead, the
firmware returns an error code indicating the call isn't implemented
(that makes my head spin). To smooth things out here let's implement a
small workaround that checks the scm compatible string so we can force
the arm64 calling convention. This series also includes some fixes for
the "is call available" API because it doesn't seem to be used properly,
a documentation fix noticed while reading through the code, and
suppression of sysfs bind attributes to save us from rouge driver
removal.

Finally, the last patch is sort of an RFC, but I'd like to merge that
too so we can kick out the legacy API entirely on arm64 kernels. As far
as I know it isn't used so we can save some bytes by not compiling it or
using it unless the architecture is ARM. Let me know what you think.

Cc: Elliot Berman <eberman@codeaurora.org>
Cc: Brian Masney <masneyb@onstation.org>
Cc: Stephan Gerhold <stephan@gerhold.net>
Cc: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Douglas Anderson <dianders@chromium.org>

Stephen Boyd (6):
  firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool
  firmware: qcom_scm: Reduce locking section for __get_convention()
  firmware: qcom_scm: Workaround lack of "is available" call on SC7180
  firmware: qcom_scm: Suppress sysfs bind attributes
  firmware: qcom_scm: Fix kernel-doc function names to match
  firmware: qcom_scm: Only compile legacy calls on ARM

 drivers/firmware/Makefile          |   4 +-
 drivers/firmware/qcom_scm-legacy.c | 137 ++++++++++++++++-
 drivers/firmware/qcom_scm-smc.c    |  12 +-
 drivers/firmware/qcom_scm.c        | 234 +++++++----------------------
 drivers/firmware/qcom_scm.h        |  40 ++++-
 include/linux/qcom_scm.h           |  21 ++-
 6 files changed, 247 insertions(+), 201 deletions(-)


base-commit: 3b9cdafb5358eb9f3790de2f728f765fef100731