Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
From: Andy Gross <andy.gross@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Cc: lorenzo.pieralisi@arm.com, linux-arm-msm@vger.kernel.org,
	will.deacon@arm.com, linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Olof Johansson <olof@lixom.net>,
	linux@armlinux.org.uk, Andy Gross <andy.gross@linaro.org>
Subject: [Patch v6 0/2] Support ARM SMCC SoC vendor quirks
Date: Wed,  1 Feb 2017 11:28:26 -0600
Message-ID: <1485970108-14177-1-git-send-email-andy.gross@linaro.org> (raw)

At least one SoC vendor (Qualcomm) requires additional processing done
during ARM SMCCC calls.  As such, an additional parameter to the
arm_smccc_smc is required to be able to handle SoC specific quirks.

The Qualcomm quirk is necessary due to the fact that the scm call can
be interrupted on Qualcomm ARM64 platforms.  When this occurs, the
call must be restarted using information that was passed back during
the original smc call.

The first patch in this series adds a quirk structure and also adds a
quirk parameter to arm_smccc_smc calls.  I added macros to allow users
to choose the API they need.  This keeps all of the current users who
do not need quirks from having to change anything.

The second patch adds the Qualcomm quirk and also implements the
Qualcomm firmware changes required to handle the restarting of the
interrupted SMC call.

The original patch set for the SMCCC session ID is located at:
https://lkml.org/lkml/2016/8/20/7

Changes from v5:
  - Make smc and hvc calls symmetric w.r.t. quirk arguments

Changes from v4:
  - Fix issue with hvc calls.

Changes from v3:
  - Fix documentation

Changes from v2:
  - Use variadic macros

Changes from v1:
  - Add macros to handle both use cases per review comments




Andy Gross (2):
  arm: kernel: Add SMC structure parameter
  firmware: qcom: scm: Fix interrupted SCM calls

 arch/arm/kernel/armksyms.c      |  4 ++--
 arch/arm/kernel/smccc-call.S    | 14 ++++++-----
 arch/arm64/kernel/arm64ksyms.c  |  4 ++--
 arch/arm64/kernel/asm-offsets.c |  7 ++++--
 arch/arm64/kernel/smccc-call.S  | 23 +++++++++++++------
 drivers/firmware/qcom_scm-64.c  | 13 ++++++++---
 include/linux/arm-smccc.h       | 51 ++++++++++++++++++++++++++++++++---------
 7 files changed, 83 insertions(+), 33 deletions(-)

-- 
1.9.1

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01 17:28 Andy Gross [this message]
2017-02-01 17:28 ` [Patch v6 1/2] arm: kernel: Add SMC structure parameter Andy Gross
2017-02-01 17:28 ` [Patch v6 2/2] firmware: qcom: scm: Fix interrupted SCM calls Andy Gross

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=1485970108-14177-1-git-send-email-andy.gross@linaro.org \
    --to=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=olof@lixom.net \
    --cc=will.deacon@arm.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

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org
	public-inbox-index linux-arm-msm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git