Message ID | 1490383355-23176-3-git-send-email-jliang@xilinx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-remoteproc-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C735160327 for <patchwork-linux-remoteproc@patchwork.kernel.org>; Fri, 24 Mar 2017 19:38:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4DC326E8A for <patchwork-linux-remoteproc@patchwork.kernel.org>; Fri, 24 Mar 2017 19:38:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A990827E5A; Fri, 24 Mar 2017 19:38:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 392E426E8A for <patchwork-linux-remoteproc@patchwork.kernel.org>; Fri, 24 Mar 2017 19:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967068AbdCXTcF (ORCPT <rfc822;patchwork-linux-remoteproc@patchwork.kernel.org>); Fri, 24 Mar 2017 15:32:05 -0400 Received: from mail-bn3nam01on0059.outbound.protection.outlook.com ([104.47.33.59]:35026 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967049AbdCXT35 (ORCPT <rfc822; linux-remoteproc@vger.kernel.org>); Fri, 24 Mar 2017 15:29:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=d1rnYYVb8SWEuAIEVP5j9NNv+IDs0WURhndOIuneP68=; b=PGQ7OVCEDuOlEGk4fD4Ta5ZYp8rxUJSUDR3WarxRsIVbdQrbGmY7AOvLoR0n3FJTWlNnWCkhsVbn2DsUox/Mlpngnu5CtzAP5hPsydju84nRJXJQl6kr6okN3U9p03iJmVBhC6/ABkPU3Ttr6W8HvToYzuerZjDsf4quF2sGBGg= Received: from DM5PR02CA0069.namprd02.prod.outlook.com (10.168.192.31) by BY2PR0201MB0760.namprd02.prod.outlook.com (10.160.125.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Fri, 24 Mar 2017 19:29:49 +0000 Received: from BL2NAM02FT006.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::205) by DM5PR02CA0069.outlook.office365.com (2603:10b6:3:39::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Fri, 24 Mar 2017 19:29:48 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT006.mail.protection.outlook.com (10.152.76.239) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 19:29:48 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from <wendy.liang@xilinx.com>) id 1crUuB-0006Iu-Iz; Fri, 24 Mar 2017 12:29:47 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from <wendy.liang@xilinx.com>) id 1crUuB-0002kt-FL; Fri, 24 Mar 2017 12:29:47 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v2OJTeFa022923; Fri, 24 Mar 2017 12:29:41 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from <wendy.liang@xilinx.com>) id 1crUu4-0002jg-Pn; Fri, 24 Mar 2017 12:29:40 -0700 From: Wendy Liang <wendy.liang@xilinx.com> To: <bjorn.andersson@linaro.org> CC: <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, "Wendy Liang" <wendy.liang@xilinx.com>, Wendy Liang <jliang@xilinx.com>, Michal Simek <michal.simek@xilinx.com> Subject: [RFC LINUX PATCH 02/19] remtoeproc: Add an operation to check if remote is running Date: Fri, 24 Mar 2017 12:22:18 -0700 Message-ID: <1490383355-23176-3-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1490383355-23176-1-git-send-email-jliang@xilinx.com> References: <1490383355-23176-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-22962.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39450400003)(39840400002)(39410400002)(39850400002)(39860400002)(2980300002)(438002)(199003)(189002)(9170700003)(5660300001)(38730400002)(110136004)(107886003)(5003940100001)(77096006)(54906002)(9786002)(47776003)(33646002)(50226002)(356003)(81166006)(76176999)(189998001)(8676002)(50466002)(8936002)(50986999)(2351001)(48376002)(106466001)(6666003)(2906002)(36756003)(2950100002)(6916009)(36386004)(4326008)(305945005)(107986001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB0760; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT006; 1:F5za3qIuvyhHHk//OQ6bcxf134EFAox9c5Xa+HxxE5wAyJBorGZdwg6Stf6YG77A7zkDUwY2NQmWUnUnm3+mNrji0shU81K6kB6RRQnu3xhVbqUIACfFUJ7xAv9anJksJiddwGGz7eYbrwX08rPW/p7hz5GMTyHqBjUvqlfDHwAmQgRda/LHxmG05hV/bDuSCvEnQXtbuvrLIOznsmt/j+o+aT9a5aOy95vAwgCrzyI3SYQfsyl0cNGbcV8opm1UhPPDgvtHPyk/Q9XiybSdLzCC4KABQznvTeSGO9HDryEu8Ry26jlTUxHmept1FrvRQmeZJ89GkUP8qXMK3Ha8EHoVETNMmCpVyagZDuU78/AXsaWWmvjSegQBOLVR1IjZ2J6O/q3AA3VzFVSQ7gVYsm6rklQfv7/CFgsvt6KRnsaYybDjh8izEPNWoLzxgBqYNqYmuO891GRSsMubsJDWJZlIOiPE/b0UQayuQTynSj3d7fsSir7fAzAiUf2ZHYCmXLML5xvxhKF/fEO5Ya8S9mEtcAG/hXYnzPR1tyEOjOx4WYj4u/HpQMxyI19M5ZhdQ4LYSD4H+xkdgOAYBb7ACw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 0967d639-2665-409e-3b1f-08d472ec2288 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075); SRVR:BY2PR0201MB0760; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0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ncHPGysaU8YzBUO3+mR51iRI+WrKzYg6Qq7P8MyxaC7UE3JMB70PNwkW8odl5wh7yjOBFiSvUwap5Q1UaQ+iWjS3uJ2hGZ5BnZjyTnh2OGueiEnpVT8UviqdVS8feFgMM/4uOT8myb5apLw==; 20:dRpr+agSJVFldFyiQsxWm1SM0XbBWPYZTlJcxVtrFyrlUyRc8j0HTq0+q0eUJ3Xe5dI+iwGhngk7pMsyF+4wnkQdT+fLJij6D4X6QI3qLaAF38KuJHk+NkyGSYMJ+mZP690nIR74yZJALPHuSb3HctjbdOxX0NSf1HSN/QUXfEiFVUS1WMwyAKpktXvskct9iFjiJI1cmRXre1RYmzsx06S+NUk2FyTUNDS4hT7yHglHvveKzl3ir9Y6DsFmHVC+CgxNhh68TPmgA+RRfdcR4OWIVpyYKUbuMLJ5mbhNv6Xlhr9bPFKhZ3uhuN5rQ137lUfgNQMfqZ07CxI3P14teCmSV445YGkx76scmH7//WhbbjgfTqBDzxixh4c9Yyl0r7kEbjSbFUnmZXpzmVC3Hjc/d8a4AwQO41kUFo/+CPucySCULVgrRG0606vMcnF1x0dJP+foQERKKyvRnJsf+H6az8a1r9jQoU40uRHxWLAux+U9EeMthQSk94E0nnqJ X-Microsoft-Antispam-PRVS: <BY2PR0201MB0760EB1733A8527507E90732B03E0@BY2PR0201MB0760.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(13017025)(8121501046)(13023025)(13024025)(5005006)(13015025)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123558025)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:BY2PR0201MB0760; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB0760; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0760; 4:yfNJSobK0gLSGMt1LJ2tL86udjsQKHlwmHgh6fp4bSl8+uLthYqFqVWnYy3iC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UUuHkTipqpBkza7NWb6m5jyA5pmdPIy7/hZv6f4QHhtjF5By9KvHZRm7bdlKb1w== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:48.1252 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB0760 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-remoteproc.vger.kernel.org> X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 9d32737..dfa2aad 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -888,6 +888,16 @@ static void rproc_resource_cleanup(struct rproc *rproc) } /* + * check if the remote is running + */ +static bool rproc_is_running(struct rproc *rproc) +{ + if (rproc->ops->is_running) + return rproc->ops->is_running(rproc); + return (rproc->state == RPROC_RUNNING) ? true : false; +} + +/* * take a firmware and boot a remote processor with it. */ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)