From patchwork Fri Mar 24 19:22:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 9643987 Return-Path: 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 1019C60328 for ; Fri, 24 Mar 2017 19:39:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF39323E64 for ; Fri, 24 Mar 2017 19:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E423327D16; Fri, 24 Mar 2017 19:39:26 +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 527E127C0B for ; Fri, 24 Mar 2017 19:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967165AbdCXTbq (ORCPT ); Fri, 24 Mar 2017 15:31:46 -0400 Received: from mail-bl2nam02on0044.outbound.protection.outlook.com ([104.47.38.44]:19744 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967060AbdCXTaC (ORCPT ); Fri, 24 Mar 2017 15:30:02 -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=CSFis8H3+G+clXmMy0HQ1hH/FdoIT4cdXq8oau9CsmE=; b=zFlawqrB4OEosLRqsN9/89vIHvq0aGL8xKu9rnM1emVt96jQ+tLqU87imvArCWLrgVF4cOxPzLi8ZC79cREp9JxoyZ/RUUmYdnNAMOsEdkGvOtJv94e4mPLjwacE3mhnwuCTlU2I5zkbfVnpL4zPTmLqMVPHFHzI8mjuzRRHuq4= Received: from DM5PR02CA0069.namprd02.prod.outlook.com (10.168.192.31) by CY1PR0201MB0716.namprd02.prod.outlook.com (10.160.141.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 24 Mar 2017 19:29:59 +0000 Received: from SN1NAM02FT064.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::201) 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:59 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT064.mail.protection.outlook.com (10.152.72.143) 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]:55471 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1crUuM-0002b7-Px; 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 ) id 1crUuM-0002mW-Ms; Fri, 24 Mar 2017 12:29:58 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v2OJTnKD022970; Fri, 24 Mar 2017 12:29:49 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1crUuD-0002jg-KA; Fri, 24 Mar 2017 12:29:49 -0700 From: Wendy Liang To: CC: , , "Wendy Liang" , Wendy Liang , Michal Simek Subject: [RFC LINUX PATCH 14/19] remoteproc virtio: handle rproc vdev notification Date: Fri, 24 Mar 2017 12:22:30 -0700 Message-ID: <1490383355-23176-15-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.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39860400002)(39840400002)(39450400003)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(77096006)(107886003)(189998001)(110136004)(33646002)(76176999)(2351001)(50986999)(356003)(305945005)(54906002)(15650500001)(9786002)(5660300001)(50466002)(106466001)(4326008)(2906002)(38730400002)(36386004)(5003940100001)(81166006)(48376002)(47776003)(36756003)(6916009)(8936002)(6666003)(2950100002)(50226002)(8676002)(107986001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB0716; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT064; 1:A2/21cSSZHl6D1Ofsi7/LTjAM16mOK/ReeJ2tT3oI0GyFBRIWNyOq5USmiiWaXjRhTQDA8MZHjWbF3s1A25s1wSocR4gmttLect8MJl+DzxSlfplk3EVoBdh4IaD9X7HdyKrjec8+teEUXmWbVc7jH7tU1DrvR556TmA4Xi1hwWn0eMlbhQcsMQR/GjqIqP+Ejxtjj4Mw3gKpRXy9JBir9wRtJDuLyySWvhYOlRrNbU6rs34ey7U6ZsV1bmWnqrlV3E9YnXpBqdNsBmiPHGoGBgKK9mMS8oHRQ5lcBavQpD2GMnoRFyQANSGmm1wthmZMOoTarfhP4mE3lXlYuwr5Yj6vAqTjBjEIJ/dHMniOhA5nSsxsibFqKte2ItatxOC6kSUtS0befQLwExkdSVHGWo0AUcIVboUeOaw2bLcUMT+Hn0px8sKvpql5P4AIiiNkc9IFI7Lefp57spQeIERsigw2FNwHG5qPdQJ9iSPvNAFe0dVV+6yZmj7sm5xslK9/ALzGT/CmuuIZ4PwztV3fuOKXIa6Dy69VQEF5U4Y5NrNrdGkq/MaV71WNfm+aTiyuz3DS8NJ67tbcmwR4MZsnw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 46f7fe9f-8db2-4d26-bdbc-08d472ec2918 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075); SRVR:CY1PR0201MB0716; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0716; 3:jRo3msWOw8JhyNOUonXmwx4K9uXvpEsqpSStGpfhxVjmZc+JqrQjFdndzKADH5vJbS8YBaplG/FAzRGVuT6vHc447l5OG6NeKt8ScEJ1ig5oBT2/2EeQu/zB5ZrYSbWjNkVnQSmC45kaGXvPPgxrKC4DmO2yA1qbNJFog6doXOldV1eshKoxqtHkwPsYre8gUCyCufFhGe9IW8oM0vis82VeoSA72U/2CuBEks6T6p1qC1Xeau7E0kjobDC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O6slw0U8lFtPQxldwKRWLvBtumG7AZMnTBfiiPeaOsWyV9/RWmGMU8szMRM58tVdpOhkzn7uD90Aw0+AxT8B/cuO8bc5HjxTxnbzMz4xXsX3RRUVxqUX9XmtqJ3vSzkx5CC5kIAi9N+Hb4MK5b9/liFpTfgdRWBfFQKOAQLEIZxYrCrgm3zL+HZ3XTXJZaW3veAZeXy0qNpFJK+v7jH+3LYphgKtucJvKEwuTJmR9pkGdz6m6nuH+QfWnFGzZX1L0rio6HT9/2C8to+MM2VcBtcIaWnaTHtf/0UBn3Bd/w4N6A2BwHbHcpE5582uzM47RBquQVW5pNwPBo7RHQlYFfpBg+DJj14WLqTYFMYPukTa8jfdMfOueNq8R0Knk+mR3QK+6vCqIPYVuy0Hd0fAiAYKj++iA1tX4YEb5uQvMZgng8pvLZACJ241pLz1K X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13024025)(8121501046)(13017025)(13015025)(5005006)(13018025)(13023025)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR0201MB0716; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0716; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0716; 4:VwblHg+twcOhZGxR40prs8CA7gh8PaudckZItOaC8Qdfe+NVL65n1lV4BSkX+l2kT8zqBXDcWVctKB6zbBVRcivTHExkmhnorWmtUaMNyryG7BQwxk+oNHYql7u2xCRFSabIWRLNloFcHpOfEAQ654+CXu72l5woYcineyn7YKNGFKF3qXbGIGuDyta0uH3tZ9JdiJScMXbYPlzLwsybhKcdle3NGngMtYoyTmPh9qKwyeowJ9CyTL9wIgzcLXpMYrs+9hQkgZkfA2T8mBrGp+LaqWHwYUTa+CiUMyrnMkxabAY8tFgkihqF5sIp/QOd5p2Fna1JcwJU4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LW2+8yG9zOUJgc4Ix+UHCfeX7t4UAwOle1ti/h+qpCGOf5sZZl6u3daw2uDNd9jhet48e8AKmoqo6NrOjDFSycHybcXSTnWPRT7B61mgbQa6pY146RMm/JWtEjAivp7bk0a+pELVXV2B4MdfTy/8KA/oHBzLcsdSClOZP2dBRdHeanfwXilzNU+d7W0b7CF5t+MW4nqLTo=; 5:iRrU1MScdklpIPEwhdQwoRANEXdHxI3hxS5SoSoi+e2PLdGZLlFbiASazAJZRQfnLJL/FAlAUkYN5qGX/rKwe81usU9SDxdnPgkVohOXduZe+JrwXoYK32KvgrP/nW7O/FkjeB5xt6MUiFgGynv1xQ==; 24:ldee77cKLQbBpLibF5ZEcr5vhwgtJg5jOi8I8n+qccx7MfDVdhL3W3KdVaq8rxU7e32WjoyNwgWTfMYdEc6mXloqHEcGogIEPkdRaLqUxRI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0716; 7:fB2Bpz0bptt9VxBwLnTXY+xmfnn5nEw7uAdvF1nOqKgxzE5XJWOAczXx7JuGeJfCxqYOG5O4QIRNRopG6GpX8X71Nsgt55WW/KoHFsztgg/6T7nM8VPi3x5TRXPnUAPd9bp6G+g0B8Sx/W/t6vjjF57wBWesF/1dIeWS62Q7jczyiIGmFo18lUSAXmXcRL4vH2cuIDizBSSr+PwO4lkRaU6PM1zTPBxboLdCO7j6l8G8wKZGTg2kquS2n/dFP4RosppUG04ugbKEvcV/aXzw2+XbLlBIGjcTy5sTGz9M7YsyHiDa1zG+skXB4DJBWSd9NBV5DQzDPLXmk4ZAo7vUSw== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:59.1699 (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.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB0716 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wendy Liang If there is a vdev notification from the remote, rproc virtio will mark the config_wait_complete to wake up any client who is waiting for the remote to respond. Signed-off-by: Wendy Liang Signed-off-by: Michal Simek --- drivers/remoteproc/remoteproc_virtio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index c6f7ca4..577344e 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -58,6 +58,7 @@ irqreturn_t rproc_virtio_interrupt(struct rproc *rproc, int notifyid) { struct rproc_id_rsc *rsc; struct rproc_vring *rvring; + struct rproc_vdev *rvdev; dev_dbg(&rproc->dev, "virtio index %d is interrupted\n", notifyid); @@ -71,8 +72,9 @@ irqreturn_t rproc_virtio_interrupt(struct rproc *rproc, int notifyid) return IRQ_NONE; return vring_interrupt(0, rvring->vq); } else if (rsc->rsc_type == RPROC_IDR_VDEV) { - dev_info(&rproc->dev, "vdev intr is not supported yet.\n"); - return IRQ_NONE; + rvdev = rsc->rsc_ptr; + complete_all(&rvdev->config_wait_complete); + return IRQ_HANDLED; } dev_err(&rproc->dev, "Unknown rsc type: 0x%x\n", rsc->rsc_type);