Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbdLNUM0 convert rfc822-to-8bit (ORCPT ); Thu, 14 Dec 2017 15:12:26 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:58693 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752090AbdLNUMX (ORCPT ); Thu, 14 Dec 2017 15:12:23 -0500 From: Loic PALLARDY To: Bjorn Andersson CC: Ohad Ben-Cohen , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 6/8] remoteproc: Move resource table load logic to find Thread-Topic: [PATCH 6/8] remoteproc: Move resource table load logic to find Thread-Index: AQHTdGObfFo+ft+zlUuMb6aI6llU+aNCvKuggAByn4CAABYxYA== Date: Thu, 14 Dec 2017 20:12:19 +0000 Message-ID: <708d06ce6cb540e785c34bd0a1d2d083@SFHDAG7NODE2.st.com> References: <20171213224111.17864-1-bjorn.andersson@linaro.org> <20171213224111.17864-7-bjorn.andersson@linaro.org> <04d54471292f446898fd162afd15388f@SFHDAG7NODE2.st.com> <20171214194747.GV17344@builder> In-Reply-To: <20171214194747.GV17344@builder> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.45] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-14_12:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2280 Lines: 63 > -----Original Message----- > From: linux-remoteproc-owner@vger.kernel.org [mailto:linux-remoteproc- > owner@vger.kernel.org] On Behalf Of Bjorn Andersson > Sent: Thursday, December 14, 2017 8:48 PM > To: Loic PALLARDY > Cc: Ohad Ben-Cohen ; linux- > remoteproc@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 6/8] remoteproc: Move resource table load logic to find > > On Thu 14 Dec 04:00 PST 2017, Loic PALLARDY wrote: > > > -----Original Message----- > > > From: linux-remoteproc-owner@vger.kernel.org [mailto:linux- > remoteproc- > > > owner@vger.kernel.org] On Behalf Of Bjorn Andersson > [..] > > > +int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware > *fw) > > > { > > > struct elf32_hdr *ehdr; > > > struct elf32_shdr *shdr; > > > struct device *dev = &rproc->dev; > > > struct resource_table *table = NULL; > > > const u8 *elf_data = fw->data; > > > + size_t tablesz; > > > > > > ehdr = (struct elf32_hdr *)elf_data; > > > > > > shdr = find_table(dev, ehdr, fw->size); > > > if (!shdr) > > > - return NULL; > > > + return -EINVAL; > > Reading patch 7, I don't catch how firmware without resource table are > > supported as if no table found, an error is returned here. > > In rproc_fw_boot, you have: > > ret = rproc_load_rsc_table(rproc, fw); > > if (ret) > > goto disable_iommu; > > So boot process is interrupted... > > > > When a driver registers a remoteproc with load_rsc_table specified that > implies that the resource table is not optional as such it's an error to > not find one. > > A driver that expects to load firmware without a resource table, such as > st_slim_rproc with it's dummy resource table would set load_rsc_table to > NULL. Yes I saw that if no load_rsc_table, 0 is returned. Thanks for the explanations, I'll apply the series and review final code. Regards, Loic > > > So the purpose is to maintain the current requirements, with the > addition of removing the dummy implementations of find_rsc_table. > > Regards, > Bjorn > -- > To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html