From patchwork Tue Mar 23 22:38:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 12159799 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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 6DE0AC433DB for ; Tue, 23 Mar 2021 22:40:54 +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 E03BE619D8 for ; Tue, 23 Mar 2021 22:40:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E03BE619D8 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:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Xy0fxZPXwp5/EN2vxt+8Amnhy8ZN1EUo7PSHIgVN6Jk=; b=VhInoqkXr8x2TZ5wuWxzFdZy5P jsufwtUIm1NVip59X1E7riWAfJJWoCmE84SdxkulxqCZElPrpQRREZ8vuIVo0L61i25GjDrPecdu9 dhzaWsb/xApeCHnPTmo32ogHQUYQEcRkSxMUtptv9zPjO2FH0TIUiEKEg0TNVtDQuUjoxMevnXSF6 Cycm1ozZEKwgYkSNdK9/f7LjBrl+NzVkfxlq+NeGshEhb+ccBTDCPS+pAyoQEInbmkyOCJ5gFbrG5 WuM+zSL7iuS1uv86FmA21nJhzREuwXVInWTvPGlDymjTDs5HeKfsn7HEIY0vm24QOSdsGHyOSQkpE ZLdmbhEQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOpgI-00FuX8-Cf; Tue, 23 Mar 2021 22:39:22 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOpfm-00FuPf-Jt for linux-arm-kernel@lists.infradead.org; Tue, 23 Mar 2021 22:38:52 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12NMce1b129789; Tue, 23 Mar 2021 17:38:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1616539120; bh=TvscpToZMQACxUA/dOzxJjIy1byQa47pq+p1H55TNi8=; h=From:To:CC:Subject:Date; b=Wc8eJbE1OLP2lGt/6l+ILJAaz44jaqQfI9kBhbGAgPBVIjbOJ/DWLu3ABUGxLZk4D EC7WIO7WfY1eC/j7DOx+xsw61lR15QrBSTN3zYxYVhqfB0T3wv3ufAlDTKp1PC4GAI 7DGHdeIVwZTTg2dSUG8w71UEYjOEk1On/0KD+qf8= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12NMceEU034124 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Mar 2021 17:38:40 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 23 Mar 2021 17:38:40 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) 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; Tue, 23 Mar 2021 17:38:40 -0500 Received: from lelv0597.itg.ti.com (lelv0597.itg.ti.com [10.181.64.32]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12NMcewV058842; Tue, 23 Mar 2021 17:38:40 -0500 Received: from localhost ([10.250.221.195]) by lelv0597.itg.ti.com (8.14.7/8.14.7) with ESMTP id 12NMcdSS102209; Tue, 23 Mar 2021 17:38:39 -0500 From: Suman Anna To: Bjorn Andersson , Mathieu Poirier CC: Grzegorz Jaszczyk , Jan Kiszka , Vignesh Raghavendra , Lokesh Vutla , , , , Subject: [PATCH 0/3] PRU firmware event/interrupt mapping fixes Date: Tue, 23 Mar 2021 17:38:36 -0500 Message-ID: <20210323223839.17464-1-s-anna@ti.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 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-20210323_223851_178441_3CCC4AFD X-CRM114-Status: GOOD ( 12.13 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, The following series includes fixes for various different issues associated with the PRU firmware event/interrupt mapping configuration logic added in the same commit c75c9fdac66e ("remoteproc: pru: Add support for PRU specific interrupt configuration"). The fixes are agnostic of SoC family. Following is the summary of issues and fixes: - Patch #1 fixes the interrupt node finding logic to always use the inherent sibling relationship between a PRU/RTU/Tx_PRU node and its corresponding PRUSS INTC node. This fixes the firmware event mappings for cases when the PRU nodes do not have an 'interrupt-parent' property (this is the norm, the property is neither required nor added in the DT nodes normally). - Patch #2 fixes a minor issue with returning a success value to the caller on a fw event mapping failure. - Patch #3 fixes a kernel crash due to switching of firmwares between consecutive runs, the first one with events and the second one without events. There are no issues when the same firmwares are run or if they are run in reverse order. Patches should apply cleanly on top of the current rproc-fixes branch commit 9afeefcf06fc ("remoteproc: pru: Fix firmware loading crashes on K3 SoCs") regards Suman Suman Anna (3): remoteproc: pru: Fixup interrupt-parent logic for fw events remoteproc: pru: Fix wrong success return value for fw events remoteproc: pru: Fix and cleanup firmware interrupt mapping logic drivers/remoteproc/pru_rproc.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-)