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.8 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 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 5BE66C2BB40 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 2D77323AC4 for ; Tue, 8 Dec 2020 14:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729660AbgLHOEY (ORCPT ); Tue, 8 Dec 2020 09:04:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729497AbgLHOEX (ORCPT ); Tue, 8 Dec 2020 09:04:23 -0500 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4281C0613D6 for ; Tue, 8 Dec 2020 06:03:43 -0800 (PST) Received: by mail-qt1-x844.google.com with SMTP id z9so11955120qtn.4 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=RhQsfqSytk185hrwY+1Vp5/V823KyIJcCfTG8wIo6w9oIwf8IKGOB8PkPWeFZPZsF+ gD2s4hV290EVsAWxFPjSOXdtQYkdDfU7UwX9LJvawsKyzvWIKO3IgbfnWzD1mF1JGKUT NgWn/pq9lHnXnNm2Hp6LmB9e1gkV7lySpwHRBQrTUWbkSpI5I1HJ7tct/sTmeVpauYtK R0w3a9dClMzcgEjfEPShuiLXWqqE4ZuUm2p95Rn1K2IPBc6YqA67/t3g0nIXfnRF430W u9SHR/4h/iQJrtfBJIBzY9ZOjU/wHiHBnOCo/JH7be3hElqEB/W3bJKQQcYWl4X9gmQy 8gyA== X-Gm-Message-State: AOAM532NExZXvHqDo1MkVndfhuqz/4Lk7CSfUM+UyhNRaVmeL39BsRWK j5avcSqUZQ+1M94X+FwZh7wm/3AXgxSCh87krW1vpQ== 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-remoteproc@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 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 C05E4C4361B for ; Tue, 8 Dec 2020 14:04:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 71EAB23AFA for ; Tue, 8 Dec 2020 14:04:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71EAB23AFA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tZ7Bg4ryQsbuGwxkvwD/ou40HEhpizWyVKmMoT/70qU=; b=Xb/qCKJBwXJ3V/yyvNpo/wwEl SQgdj3PAXZcpVp61LPjB2fFUBjQylWJMLmvfWDfM2//84FesAkQZHUexdnv0jtbN2/NNLrThj+i25 2pnHEpWpTtLzSDmII4ivRhS8cZaveqmZdCPcYdbEn7kvljYKTJnA72gupaTYodAYXMk94DaQ5asfz UKIVOB+fIR9hAy3VRPWdqWFbaqValv24FS8qLjSCjyryIUgQjWpt21UQmmZFzavvJbFVctc3JBN2H tBT75jnv9XBSVe+xjikmZw57pY9wb39ipnVkknVQ1h8iAbM2Xma3+WKd7o4usqbEs4wcTF56Xrop5 lYzfpWkBg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmdam-0002Is-7P; Tue, 08 Dec 2020 14:03:48 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmdak-0002IL-4Y for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 14:03:47 +0000 Received: by mail-qt1-x844.google.com with SMTP id z3so11932902qtw.9 for ; Tue, 08 Dec 2020 06:03:44 -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=ZvwtD5qlc4pQ4X6dkO9SV8TysnGyPho/XoZD0lPhHuyv7j7/YPPVa21IIzNeDWo61C wdxYLisU6TrM2obntcKsFp8vbXAFNVvjTTusvJepbSXtTBjGSIUlcclyWJbeMx08rVTR ahLaEIFhSCrETF1JX9NZtOYhWJw7HmjvAu/F9QyV61peBWL/M1d+RqtDzrgQQRJGcIq8 a8bAaibAvUNoWRCHz5vBKjKVtFaQbELzLZ2vTa9qdKfyTtgKL/5tjGZijFRzyMVXJ3lP TCvZ3h3KTQpsnlDgRXrf4SSn6U5rbe7IivJxMZNq4OINNetHLQSpqstwCGmg6DTmSrMz EdIw== X-Gm-Message-State: AOAM531TnK3/qKhjJfvVKBt8nT51WLFTzL9Svnk7ypJ0t5NPiCHRMj4y 8vJK6otXQ4LN4rimBgDzOrKS6MSOOp6ezD+6MFOqFQ== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_090346_287869_8BCFAC17 X-CRM114-Status: GOOD ( 13.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ohad Ben Cohen , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, "Bajjuri, Praneeth" , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Rob Herring , Lee Jones , linux-arm-kernel@lists.infradead.org, Roger Quadros 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel