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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 0E57CC19437 for ; Tue, 8 Dec 2020 14:04:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E41CE23AC4 for ; Tue, 8 Dec 2020 14:04:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729658AbgLHOEY (ORCPT ); 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-Google-Smtp-Source: ABdhPJzwJcU+8YDkuOryWUOx1yXx3QATsUaPN1cy3ssbkdgjWnq5iNuGCnPDsunfOudRYLgqbw2w1AxdVdNmcKRt4uU= 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