From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 096B8C433C1 for ; Thu, 25 Mar 2021 20:11:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9231B61A36 for ; Thu, 25 Mar 2021 20:11:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9231B61A36 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8FoZyZTQyoPwYC7pl57MIh/wU1KhQLUseSDFbm0xeVs=; b=pYedkUvocMx5vuSAC4bZU1LhO Yn84HySvkSm/+bz/ObFtJRZg9Vlh3IkcwJnOH6k/ytyQtOepfHR5QEPNqKsNEFeMr4Zv0jNHt779r c9GJEzYQQpzLkCfXQR9BLRKb/H1RID+Vs+G7+BvgIFceVO32CEN5pxr1avzbVICFQEGzKv4RUs/wa aGOc3F0u2AYO5rwif3M3Jfzg26S4ftLc8V6Mfp+SugoHb6/+gTH8P/nE3JyAeE9hjrwpev61Y4pBz g/ALCxExQLf7csLyELmYuTLfCeCpx+Zd8Y+GFtDmgEFisFk6T+sF6EhAnslhI0GXAlNgnhXKbWMHm s5VlvaWQA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPWIl-0028dI-PF; Thu, 25 Mar 2021 20:09:55 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPWIh-0028ck-0g for linux-arm-kernel@lists.infradead.org; Thu, 25 Mar 2021 20:09:53 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12PK9e9X093749; Thu, 25 Mar 2021 15:09:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1616702980; bh=D2vku1A4QvBUs3er+RFyi03Y9hQGsZzmhfOh4GWoyxg=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=RcFJXNF8iaDsCYT1UNDl3ibmGk5VNUk8KVlZ9Qcv6NrVvMmaNH5kbMcZnQI1sYYOd vkG7+x/LbuKOCTBDlNDrCZChOxPdESbJSocAQy4FEcgIguibpDVp6/y0VUc/AqxfDP ezhynDXb/du9Okgv+ztHYJC9cm0wni7UPFENFyr8= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12PK9eIe001197 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Mar 2021 15:09:40 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 25 Mar 2021 15:09:40 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Thu, 25 Mar 2021 15:09:40 -0500 Received: from [10.250.33.213] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12PK9edB130879; Thu, 25 Mar 2021 15:09:40 -0500 Subject: Re: [PATCH] remoteproc: pru: Fix firmware loading crashes on K3 SoCs To: Mathieu Poirier CC: Bjorn Andersson , Grzegorz Jaszczyk , Jan Kiszka , Lokesh Vutla , Vignesh Raghavendra , linux-remoteproc , , linux-arm-kernel , Linux Kernel Mailing List References: <20210315205859.19590-1-s-anna@ti.com> <20210323232014.GA1782475@xps15> <2f8bfc4f-e43d-5e38-fc6d-7045c69af364@ti.com> From: Suman Anna Message-ID: Date: Thu, 25 Mar 2021 15:09:40 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210325_200951_527069_1D89FB22 X-CRM114-Status: GOOD ( 24.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/25/21 12:36 PM, Mathieu Poirier wrote: > On Wed, 24 Mar 2021 at 11:09, Suman Anna wrote: >> >> On 3/23/21 6:20 PM, Mathieu Poirier wrote: >>> On Mon, Mar 15, 2021 at 03:58:59PM -0500, Suman Anna wrote: >>>> The K3 PRUs are 32-bit processors and in general have some limitations >>>> in using the standard ARMv8 memcpy function for loading firmware segments, >>>> so the driver already uses a custom memcpy implementation. This added >>>> logic however is limited to only IRAMs at the moment, but the loading >>>> into Data RAMs is not completely ok either and does generate a kernel >>>> crash for unaligned accesses. >>>> >>>> Fix these crashes by removing the existing IRAM logic limitation and >>>> extending the custom memcpy usage to Data RAMs as well for all K3 SoCs. >>>> >>>> Fixes: 1d39f4d19921 ("remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs") >>>> Signed-off-by: Suman Anna >>> >>> Probably a good idea to CC stable as well... >>> >>> Reviewed-by: Mathieu Poirier >> >> Thanks Mathieu. This patch is already staged on Bjorn's rproc-fixes branch >> though and part of linux-next since next-20210319. I have posted an additional >> 3-patch series for some more PRU fixes. Do you want me to post a v2 for those >> with stable Cc'd? > > I didn't notice Bjorn had already picked it up. Since the object is > now public there is no need to send a V2 for this one. I haven't > looked at your other 3-patch series but if you think it is stable > material then yes, please send a new revision that CC stable. Alright, will do. regards Suman > > Mathieu > >> >> regards >> Suman >> >>> >>>> --- >>>> drivers/remoteproc/pru_rproc.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c >>>> index 2667919d76b3..16979c1cd2f4 100644 >>>> --- a/drivers/remoteproc/pru_rproc.c >>>> +++ b/drivers/remoteproc/pru_rproc.c >>>> @@ -585,7 +585,7 @@ pru_rproc_load_elf_segments(struct rproc *rproc, const struct firmware *fw) >>>> break; >>>> } >>>> >>>> - if (pru->data->is_k3 && is_iram) { >>>> + if (pru->data->is_k3) { >>>> ret = pru_rproc_memcpy(ptr, elf_data + phdr->p_offset, >>>> filesz); >>>> if (ret) { >>>> -- >>>> 2.30.1 >>>> >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel