Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752764AbbF3XWa (ORCPT ); Tue, 30 Jun 2015 19:22:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49494 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914AbbF3XWW (ORCPT ); Tue, 30 Jun 2015 19:22:22 -0400 Date: Tue, 30 Jun 2015 18:22:19 -0500 From: Andy Gross To: Bjorn Andersson Cc: Kumar Gala , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org Subject: Re: [PATCH] firmware: qcom: scm: Peripheral Authentication Service Message-ID: <20150630232219.GA26140@qualcomm.com> References: <1435693579-16109-1-git-send-email-bjorn.andersson@sonymobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435693579-16109-1-git-send-email-bjorn.andersson@sonymobile.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1466 Lines: 48 On Tue, Jun 30, 2015 at 12:46:19PM -0700, Bjorn Andersson wrote: > While adding the 64 bit interface it might be of interest to extract the dma > allocation in __qcom_scm_pas_init_image() into the common code and pass the > physical pointer to instead, but I haven't looked at the differences to the 64 > bit interface. I am currently delving into this. I'll take this patch and see what needs to be done. > +int __qcom_scm_pas_init_image(u32 peripheral, const void *metadata, size_t size) > +{ > + dma_addr_t mdata_phys; > + void *mdata_buf; > + u32 scm_ret; > + int ret; > + struct pas_init_image_req { > + u32 proc; > + u32 image_addr; > + } request; > + > + /* > + * During the scm call memory protection will be enabled for the meta > + * data blob, so make sure it's physically contiguous, 4K aligned and > + * non-cachable to avoid XPU violations. > + */ > + mdata_buf = dma_alloc_coherent(NULL, size, &mdata_phys, GFP_KERNEL); Not sure this gives you a 4k aligned buffer every time. Otherwise everything looks fine to me. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/