On 10/01, Rob Clark wrote: > On Tue, Sep 29, 2015 at 6:33 PM, Stephen Boyd <sboyd@xxxxxxxxxxxxxx> wrote: > > On 09/29, Rob Clark wrote: > >> On Tue, Sep 29, 2015 at 5:38 PM, Stephen Boyd <sboyd@xxxxxxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html