Message ID | 1490383355-23176-18-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 DDA7E601E9 for <patchwork-linux-remoteproc@patchwork.kernel.org>; Fri, 24 Mar 2017 19:31:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB8AC27D16 for <patchwork-linux-remoteproc@patchwork.kernel.org>; Fri, 24 Mar 2017 19:31:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFF2F27E5A; Fri, 24 Mar 2017 19:31:13 +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 376B227D16 for <patchwork-linux-remoteproc@patchwork.kernel.org>; Fri, 24 Mar 2017 19:31:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967121AbdCXTbL (ORCPT <rfc822;patchwork-linux-remoteproc@patchwork.kernel.org>); Fri, 24 Mar 2017 15:31:11 -0400 Received: from mail-sn1nam01on0086.outbound.protection.outlook.com ([104.47.32.86]:11840 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967086AbdCXTaQ (ORCPT <rfc822; linux-remoteproc@vger.kernel.org>); Fri, 24 Mar 2017 15:30:16 -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=D2JlPtxcCxgX/uQy+OrEkINctiy5/VqNSUbfVSjdFqw=; b=aPDD/3Sk0KAThV/oBPvhv5aynZrrLVBQcXdZEtSnl+EkET1BBkbf99sI446CaqEz7jSIweph9ThbI/mECJjZWXZvlXCN5h0SbFexKA9pt5AzN/OHkHdMucQ9Y0LEke2igM3UnaGzu9hRHETNXcBvndNWQMiEwv0MfPnNThwqNUU= Received: from BN6PR02CA0070.namprd02.prod.outlook.com (10.175.94.160) by CY1PR0201MB0763.namprd02.prod.outlook.com (10.160.141.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Fri, 24 Mar 2017 19:29:59 +0000 Received: from BL2NAM02FT007.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by BN6PR02CA0070.outlook.office365.com (2603:10b6:404:f9::32) 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:59 +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 BL2NAM02FT007.mail.protection.outlook.com (10.152.77.46) 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:59 +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 1crUuM-0006JQ-8F; Fri, 24 Mar 2017 12:29:58 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from <wendy.liang@xilinx.com>) id 1crUuM-0002mW-4Z; Fri, 24 Mar 2017 12:29:58 -0700 Received: from xsj-pvapsmtp01 (smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v2OJTpUt022976; Fri, 24 Mar 2017 12:29:51 -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 1crUuF-0002jg-Hp; Fri, 24 Mar 2017 12:29:51 -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 17/19] remoteproc: virtio: kick in reset virtio Date: Fri, 24 Mar 2017 12:22:33 -0700 Message-ID: <1490383355-23176-18-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)(39410400002)(39840400002)(39450400003)(39850400002)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(305945005)(2950100002)(6916009)(76176999)(189998001)(356003)(6666003)(77096006)(33646002)(2351001)(8676002)(2906002)(47776003)(50986999)(81166006)(50466002)(48376002)(106466001)(54906002)(8936002)(50226002)(107886003)(38730400002)(110136004)(36386004)(9786002)(4326008)(5660300001)(36756003)(5003940100001)(107986001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB0763; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT007; 1:5rqc9JBD301CE2DTq+tho/tNoOzPAov3DeVIYKvsT8EkuIrBW6R2XHGtSgj49eVwwWa+SWAuqHVjWRjxfU2+yVlVqrHJ4XkIWzGr2ofyNnUK0jWhLUalgRse8YeB27uOpbFGM7pvbkdFYynAVCiX7zIVutsGjECOOlDQvrfR4WXVQpu3SejgmFD/X7BbYh9kZOIwpnqVYguWsNTj79n41VVMrZhi6DWcBdDRlK8yqePlSw5ZdUHMdjKsnPYMlqdLEynW5r3sFJmkwe+wcIBqj90qxYVfbl9aVN0hWqUyW1gvKNKOf5rJjCGR/r75QPJv32ieO/epJ+iaTdXwqGzTY6HenoKRFTvTLv+GK35LPHebhzdsnHdaqdfHQ6bqx6Mq0pUeS1nGZYoQto3ce2ExJ6I2aNFOq7lW8rJ3S08VWNQilKaSiuknYuYSSixYDNw1gOxGfvnpOf6jVXK7boZTY8AWIPGjRUx0KlJTaV0FdJU5Cv+ALihY3ewYWfirWqsiAvZyQKz6285xbDQAnhMcJLXJlHLBdht/TCmPt/QQheChExFKHG7sQbvKs01JJN4CvR8f0/oykgQ2ZKBRxgTLVQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 746e0696-9a22-4bc9-cc51-08d472ec2917 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075); SRVR:CY1PR0201MB0763; X-Microsoft-Exchange-Diagnostics: 1;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f82tLi0StrYTIhaqlS6Rzy5RTuFPDouZwcBX/b/bGd9nsmFOiYNk5E/39AWcXTyLCRk2Rix+56GQqBvB+ytlxCW4noqa7OavPVbk5CktHC1S6UscJxJTNaqTXLMHXkvkQlOkndzNePQeXggyTitxX/ag/dnYVBu4/mYzQv2+C1/raaPmac6PA==; 20:uFkN11aTO3+w9c5ALP9nxKUSsM0Wv3HKB8oNq1VxWx9mqtgLGLvLQsqS1B2wv9vRL5G3Gzjs3LW4X0nEawMz3++5Nkc3FtKYCSjPyKeGtvFcG0r1H0Q38NJT78mTj0eejiqXwhy6b43bf4LNrtnJom44toYB6LcPi0SkOx61fZvKpkAjt8ENtEqV9b5fFUpErK9EYQxL31ROM8ozK1aRYnIOGMsJXFgh3flEjzZo/duJSWlnWi744XpMfmyTaVt9xY12UeMGu1bxTettnYMq0Fr5yd5v1HiqI4T/OxGFVJKv047da67EMJhqHv3OiIxL55hk/xqvepb4Sc2I3pTNFpy/08yGtM5gMsiQFnkI4uTSRyG9/KuWO/+vN4gAaUibIXDOr46KE4ssjDQR46rHuYtjJfccuCqnu7z2CN64SOqJ5iV0JQD2y4Z0z/yljBvosX+wp/kWu/IDROuF0SuWfgJAqvy4KTrwBbbjB5itJLc+bitYIlCU79G0R2dNwNJ9 X-Microsoft-Antispam-PRVS: <CY1PR0201MB0763BA2CAF6CCE9120044277B03E0@CY1PR0201MB0763.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)(8121501046)(13023025)(13024025)(5005006)(13018025)(13017025)(13015025)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:CY1PR0201MB0763; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0763; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0763; 4:ReVSsc4kQIm+f0PSZU4m0zag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A8mQAaPFOB4ZlnbJBEFvySs?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0763; 6:i9bdUf5JLlDTtZtzoskHZXlsOzMNZJfcPhFkDh2MIrscnWaMFiwmBsDSPhoRwjoxfR08vlezN3tL5AiPCKdnDyHTxQgLtVzsE15+3XsnT9WC8hPS9AkbciJrXqMiNKWJzwGfTBeENTjC10qHV17MEzZbGLf7g33jjlcPTMP0rvvhbLFru2xLMFZIbl24fZG5k96KDBJpkqQ2RqFEA7PLptWcfNk0I2kyEEe8eX8xA+T4HF5fuaZMifAqKaRWnZZYO8p/TNKKWKMoiGhIk0NuqMqwEyiU9ylIMt0oMiQ3kVn73SRqQ7pYbHLtVXrWBefehqGw5VPXRjD7sIQTwqGSkngd9X1C42fr5JDQERLFFESS5aQQTgnIOUeIOH9vRQJFnyJlMka4ztnp2LUAg+ObfQ7sDM3hw/e4OUD3L68rgFw=; 5:bSufQBQ0cO0DVNqfjFcuwYagpmWE0GuC4WD1roD93q1/7hK3UiI2nilxMiwOEJlhCSyBa+5JUfFrzpzBgiFrD3f1MSEdE72Hq0ppLqITB7BbXNg3/Y66S7Stj6XXj5ljLFSYxW7wkBco47SSlWo4Pg==; 24:0k+o9WpG4q6SMjwFRsBeViLEQ3O2urjNDiuToVD3a15+sJ4P6pKeMUro2XJQUPFC3EoOysxd59qqJlxetqBHIrENZ0DHnwU7HCURK29jlz8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0763; 7:lqBkcBFykwlJMt4g8jFwX5X6yRvGPrdMp/U7tM6FQPhDEGkH3ou/NvLlDowzP+mOxoQEZgdeFTOa9egK5kcWCnEJFhRoZ2W6gTx0QoRgkSs0YGC3M2c9Lei4DyRaSLASMGAiskRjmKFDNL3pkGpl6HRAsCulG2+AqHNiwZFvNy9VniGloGScWf5hKCYipu5gVI9p7ySt6r4bia3tpNH7orxn8EO/8QO/ENJhfem0anWLqrQ00xNzIE0txNOaZlGwrrds3muaiaR0Ld92XFXFPvo+cvng6t/Zde6oVoWCRCDjuR1S5Xo4X4Kk66a/PDhB4v40hwrBEqrnQeNQdzHjLA== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:59.1481 (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: CY1PR0201MB0763 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_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index d43e15b..bf3be6f1 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -231,8 +231,19 @@ static void rproc_virtio_reset(struct virtio_device *vdev) rsc = (void *)rvdev->rproc->table_ptr + rvdev->rsc_offset; - rsc->status = 0; dev_dbg(&vdev->dev, "reset !\n"); + if (rvdev->rproc->state == RPROC_RUNNING_INDEPENDENT) { + rsc->status = VIRTIO_CONFIG_S_NEEDS_RESET; + virtio_mb(false); + rproc_virtio_notify(rvdev); + while (rsc->status) { + if (!wait_for_completion_timeout( + &rvdev->config_wait_complete, HZ)) + break; + } + } else { + rsc->status = 0; + } } /* provide the vdev features as retrieved from the firmware */