Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp4751683pxb; Mon, 28 Mar 2022 02:49:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweYoX2ChpleFVQ70PCph25FmQC9Dj2ELFbbLab9PED5cfG14BI4rb5Xk4ZUWFsFyVzRZQ/ X-Received: by 2002:a17:907:72c5:b0:6da:e99e:226c with SMTP id du5-20020a17090772c500b006dae99e226cmr26934853ejc.515.1648460961495; Mon, 28 Mar 2022 02:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648460961; cv=none; d=google.com; s=arc-20160816; b=Dijgzr7FCExGS+gpnVX7VFFTLhzATq4KCdMt6Gq0xvYuQxLQo4KdkHzkMW6W9TcD1g SC6df0/BucKTwDeNd7uKanls/25g/5Ny1Dfqr+wbwmE/YMyicC7UDlKgmOPwAcdE5egF 9rWcnEgwFnqz3Bp73SUUrMtSBNbuZWhmol8tw4g8Juj2Fbt72eL/hvTWydUfNM4fILsr QkiyvwidbOPPkByayKRKLaLt2cpnNlPHWwmN5wPP9nW5Xhst7Fz1nqxYUp0GUXiPgGf7 o1GJU6r/aXpPHjrCCNIbtOEyp/bWOyTdqiTSCxg4LLGdDvNayqr2ovoTiOaMveb2byPq +T0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=7bbeQU/BLtCtZPi3WFuwnNZEveQEFJJe/rXyjLmsBTc=; b=dNVCYbiSPWkUAvJ6WlwCO/AWdbXDuADE2z0+7NJCEOSxmDBbX+xONrO6HrgBr824up n+XvBLfwanQGWG2Yw4+Ass9S6YTQvDs4alxK6WuW9veRg007Vf30ljKX5+Tz3vIOEXbz vqSz9tStRuLxfeN8ofOUyw5NXOnHIUfa3eaNm5qcA7Ff5kHZOaaR7jsNeZ994Tgl8Abw dWLySPZ3uo5MmLeWZd4h2UWHkU9sXR/tMwFp4O9W17QE6sQU752g1SAvwXS2t4R7QbKK w7m+++C27y5B3RlDLiFfXtzhm7Zs1Xes9fsZToEyt53tJ/fSAjwpw/Z9RXFIZdg0ieIy Er9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a056402274800b00418c2b5bf0csi17215059edd.494.2022.03.28.02.48.55; Mon, 28 Mar 2022 02:49:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237354AbiC1CcI (ORCPT + 99 others); Sun, 27 Mar 2022 22:32:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233254AbiC1CcH (ORCPT ); Sun, 27 Mar 2022 22:32:07 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F9693EB82; Sun, 27 Mar 2022 19:30:28 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B350B200489; Mon, 28 Mar 2022 04:30:26 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7B79820043F; Mon, 28 Mar 2022 04:30:26 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 5E2A4183AC96; Mon, 28 Mar 2022 10:30:25 +0800 (+08) From: Shengjiu Wang To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com Subject: [PATCH v2 0/2] remoteproc: core: fix issue for multi-instance Date: Mon, 28 Mar 2022 10:20:10 +0800 Message-Id: <1648434012-16655-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the rproc->power reference count to handle the multi-instance case, move the state checking for 'stop' and 'detach' under mutex protection, and remove state checking for 'start'. Shengjiu Wang (2): remoteproc: core: Remove state checking before calling rproc_boot() remoteproc: core: Move state checking to remoteproc_core changes in v2: - drop 'remoteproc: core: check rproc->power value before decreasing it' - refine 'remoteproc: core: Remove state checking before changing state' split it to two new patches. drivers/remoteproc/remoteproc_cdev.c | 11 ----------- drivers/remoteproc/remoteproc_core.c | 11 +++++++++++ drivers/remoteproc/remoteproc_sysfs.c | 11 ----------- 3 files changed, 11 insertions(+), 22 deletions(-) -- 2.17.1