linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>
Subject: Re: [PATCH 4/6] qcom-scm: add ocmem support
Date: Thu, 1 Oct 2015 14:52:36 -0700	[thread overview]
Message-ID: <20151001215236.GL19319@codeaurora.org> (raw)
In-Reply-To: <CAF6AEGuub0LtBc1-M1=wZ8by_G=N2fW-anzMnMKy7fw+L_ANPA@mail.gmail.com>

On 10/01, Rob Clark wrote:
> On Tue, Sep 29, 2015 at 6:33 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 09/29, Rob Clark wrote:
> >> On Tue, Sep 29, 2015 at 5:38 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> >
> > Yeah I think that's the only use to indicate which context bank
> > it is. Maybe we can have a single id configure API and a special
> > iommu context bank API that both funnel into the same private two
> > number API. Otherwise we have a bunch of callers passing 0 for
> > the second argument because they don't care.
> 
> so fwiw, I went thru all the downstream scm_call() callers..  there
> are a lot of callers to SCM_SVC_MP service (through a couple different
> #defines), but most of them are different cmd-id's.  The ones using
> SECURE_CFG (0x2) are:
> 
>   * dwc3_msm_restore_sec_config()
>   * ocmem_restore_sec_program()
>   * msm_iommu_sec_program_iommu()
> 
> so we have two points passing in zero for ctx-bank, one that does not.
> I don't think it is worth having two API's to save hard-coding zero in
> two places ;-)
> 

What sources are you looking at? It seems like whatever you have
is over a year old. About a year ago, we consolidated all calls
to this specific SCM call into a single API called
scm_restore_sec_cfg (see commit 9933a272db9a5612bcc2ee0ef9149f70c8166eb3
"qcom: scm: Provide an API that restores security configuration" on
msm-3.10).

Looking at our latest msm-3.10 branch I see

drivers/crypto/msm/ice.c:    ret = scm_restore_sec_cfg(cbuf.device_id, cbuf.spare, &scm_ret);

cbuf.spare is 0 here.

drivers/iommu/msm_iommu_sec.c:       ret = scm_restore_sec_cfg(drvdata->sec_id, ctx_drvdata->num, &scm_ret);

This is the only real user of spare

drivers/pci/host/pci-msm.c:  ret = scm_restore_sec_cfg(dev->scm_dev_id, 0, &scm_ret);
drivers/scsi/ufs/ufs-qcom.c: ret = scm_restore_sec_cfg(cbuf.device_id, cbuf.spare, &scm_ret);

cbuf.spare is 0 here.

drivers/soc/qcom/ocmem_core.c:       rc = scm_restore_sec_cfg(sec_id, 0, &scm_ret);
drivers/video/msm/mdss/mdss_mdp.c:   ret = scm_restore_sec_cfg(SEC_DEVICE_MDSS, 0, &scm_ret);

So that's 6 callers and 1 uses the second argument.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-10-01 21:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 19:48 [PATCH 0/6] Add OCMEM support (v2) Rob Clark
2015-09-29 19:48 ` [PATCH 1/6] qcom-scm: fix endianess issue in __qcom_scm_is_call_available Rob Clark
2015-09-29 21:00   ` Stephen Boyd
2015-09-29 19:48 ` [PATCH 2/6] qcom-scm: fix header compile errors Rob Clark
2015-09-29 21:02   ` Stephen Boyd
2015-09-29 19:48 ` [PATCH 3/6] qcom-scm: add missing prototype for qcom_scm_is_available() Rob Clark
2015-09-29 19:48 ` [PATCH 4/6] qcom-scm: add ocmem support Rob Clark
2015-09-29 21:38   ` Stephen Boyd
2015-09-29 21:53     ` Rob Clark
2015-09-29 22:33       ` Stephen Boyd
2015-10-01 20:13         ` Rob Clark
2015-10-01 21:52           ` Stephen Boyd [this message]
2015-09-29 19:48 ` [PATCH 5/6] drm/msm: update generated headers Rob Clark
2015-09-29 19:48 ` [PATCH 6/6] drm/msm: add OCMEM driver Rob Clark
2015-09-30  7:51   ` Stanimir Varbanov
2015-09-30 11:31     ` Rob Clark
2015-09-30 11:45       ` Rob Clark
2015-10-01  8:23         ` Stanimir Varbanov
2015-10-01 18:00           ` Stephen Boyd
2015-10-01 19:25             ` Rob Clark
2015-10-02  0:26               ` Rob Clark
2015-10-02  0:59                 ` Stephen Boyd
2015-10-02  1:37                   ` Rob Clark

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=20151001215236.GL19319@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.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;
as well as URLs for NNTP newsgroup(s).