Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3196130pxu; Tue, 8 Dec 2020 06:07:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpquPkZaL+CjC9/yZNvz/uk5/bKdqbn/gK36rjZJwDv1cJeekqRfJps4bnEUQNSaq25ZxT X-Received: by 2002:adf:eb88:: with SMTP id t8mr26135171wrn.105.1607436431360; Tue, 08 Dec 2020 06:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607436431; cv=none; d=google.com; s=arc-20160816; b=I3c1mzhLxJ7IdOlxCWsQT+bLpflwWYW0OsmKB8IlSXrSd/iI8NHpeR0+pGUVGQ1Al1 C7KGNL0rb3azAUW2Lu3CVJAzRghBwh37720J3R7mITEMChwciTsn9ihS7ve6yxcrhtdB mcoRdQIE5ISDFedhUASBb6Rf/VJJ8QDaDgj8QBh9lwjW84y8RGDC/L25PH43CuxHus2y 1JcZSOIHS9Z/J4yd72nhdttnvpdTTX0QdZ44mxYs64hGwCnsZ+VP9R4AcyDlRQKmwzXG DUcTcbK6FBmXIrms5jjgj9uF1gLFFJ/NAu8rwghiukBU/08OVxtXrTKfqOiYPGdzfU7s KZow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qGakVdCw5QYE//gz30LSIclGvqsDhnmw0oMI5x6lLuQ=; b=hbo283sjp8GZowAdDRh4xSbQ/isFCr5gVN0C8lZrA2h5a4jZk921kXfRALlEcxXj+V L6fswPUiBJf0jqNfaf360341aTbZZCsUEGtTXS1iMtgn5ZK6W42CqBq5Wge45XGR4gzg Z3YuX8WjPLx8C28KGaVRgp1w9dtfsm5n5ryOGQEqM6ISDZlrbzSXoXO76gG65+eRo6nZ YGTOuL8yYifyiRw46vAHJ+AROBrsPc1DuyouASM7/KGpKCQpCN3qW2EFbRsXYJqOHRMx +JqHzEqRlcvi4x7GvSL3JHETq8b1IxR8dl+2TG1b3AItWnNJWtJ9Jmd+KCfcOfaeHDuh JrLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="E/xtGCV6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si10297920edn.233.2020.12.08.06.06.20; Tue, 08 Dec 2020 06:07:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="E/xtGCV6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729648AbgLHOEY (ORCPT + 99 others); Tue, 8 Dec 2020 09:04:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729528AbgLHOEY (ORCPT ); Tue, 8 Dec 2020 09:04:24 -0500 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABB9CC061793 for ; Tue, 8 Dec 2020 06:03:43 -0800 (PST) Received: by mail-qt1-x842.google.com with SMTP id z20so3995474qtq.3 for ; Tue, 08 Dec 2020 06:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qGakVdCw5QYE//gz30LSIclGvqsDhnmw0oMI5x6lLuQ=; b=E/xtGCV68XO2lDrxqtkeFJy3TqmsWvpSWNHFR6+Il8UYsQXY8BSJb3UOYhwtGSXH+s Vthej7B9BmrAIS484t2wLTDWnIbScnD6bq3QXy1jB0VrCq/TQfL2ef8c+mOklWD3Fd1f L2OEuZNAavpYc3JQx/1Tt1qeNSr9j36j0M0RvTlHrAj/mcUQXdhZsR3zNlpO8fLLT+Ku N9k8af29CduZ94sAwbOn+Kq+UTCX6gIBYyFliCWfmkxKyH+isnz7HHp0r4V9B5sLWe9C QbQ5Y2QqGb2+Ojgcn3EQMJOcPUoo/QGBibQw4SnX+jisq4XXFOIWOf+OLj3FMJNsvqi5 O2gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qGakVdCw5QYE//gz30LSIclGvqsDhnmw0oMI5x6lLuQ=; b=b42eObeZ/X0u1sj4rfx19WmtTHdVmMajldAqv/2LcX7BrjX94xbOLcWVBXZZ5NJo+f y6oJp0R80HGR163BK7Y8XBs80KedCYC4xtI90vByCE71kWeJGDfgSRUujPMsVCW4qgqI vkLHuCORYbNrFzwZzc69w9RfsU13jt559Wh/LmhTHKxtVANClg5YgszsX7wHgNt/7VPz VlmlQ/Mxdb0yv7q5T8ZGBeabd6h6z2/cwF2vtxvlqd1eUPRJI6zhX39NrkFea1yFPhVI C3OFGq0suRKAMpAlCBXcRQP1AjeyeOzJLadEAnUin6JCaYXYn89vxQFGo1RUT/g3dOK5 ILEQ== X-Gm-Message-State: AOAM533g1pOOk2HeVrUygRt7f9P2uPkj14e2eNydmgySV91FCMdiSbJ2 VFqHk6nhPZjSrcEwXry27mP388mRXaeouAeFAsl8cg== X-Received: by 2002:ac8:6b9a:: with SMTP id z26mr30901677qts.200.1607436222731; Tue, 08 Dec 2020 06:03:42 -0800 (PST) MIME-Version: 1.0 References: <20201204201807.14716-1-grzegorz.jaszczyk@linaro.org> <20201204201807.14716-4-grzegorz.jaszczyk@linaro.org> <20201207173731.GA1509079@xps15> In-Reply-To: <20201207173731.GA1509079@xps15> From: Grzegorz Jaszczyk Date: Tue, 8 Dec 2020 15:03:32 +0100 Message-ID: Subject: Re: [PATCH v3 3/6] remoteproc: pru: Add support for PRU specific interrupt configuration To: Mathieu Poirier Cc: Ohad Ben Cohen , Bjorn Andersson , "Anna, Suman" , linux-remoteproc@vger.kernel.org, Rob Herring , Lee Jones , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Bajjuri, Praneeth" , Roger Quadros Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu On Mon, 7 Dec 2020 at 18:37, Mathieu Poirier wrote: [...] > > +static int pru_handle_intrmap(struct rproc *rproc) > > +{ > > + struct device *dev = rproc->dev.parent; > > + struct pru_rproc *pru = rproc->priv; > > + struct pru_irq_rsc *rsc = pru->pru_interrupt_map; > > + struct irq_fwspec fwspec; > > + struct device_node *irq_parent; > > + int i, ret = 0; > > + > > + /* not having pru_interrupt_map is not an error */ > > + if (!rsc) > > + return 0; > > + > > + /* currently supporting only type 0 */ > > + if (rsc->type != 0) { > > + dev_err(dev, "unsupported rsc type: %d\n", rsc->type); > > + return -EINVAL; > > + } > > + > > + if (rsc->num_evts > MAX_PRU_SYS_EVENTS) > > + return -EINVAL; > > + > > + if (sizeof(*rsc) + rsc->num_evts * sizeof(struct pruss_int_map) != > > + pru->pru_interrupt_map_sz) > > + return -EINVAL; > > + > > + pru->evt_count = rsc->num_evts; > > + pru->mapped_irq = kcalloc(pru->evt_count, sizeof(int), GFP_KERNEL); > > sizeof(unsigned int) Sure, I will post v4 addressing this comment and sorry for missing that. Thank you, Grzegorz