From patchwork Fri Mar 24 19:22:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 9643919 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 3188960328 for ; Fri, 24 Mar 2017 19:31:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EC1A27D16 for ; Fri, 24 Mar 2017 19:31:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13AB127E5A; Fri, 24 Mar 2017 19:31:34 +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 9C3FF27D45 for ; Fri, 24 Mar 2017 19:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965222AbdCXTbb (ORCPT ); Fri, 24 Mar 2017 15:31:31 -0400 Received: from mail-cys01nam02on0047.outbound.protection.outlook.com ([104.47.37.47]:31699 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967063AbdCXTaG (ORCPT ); Fri, 24 Mar 2017 15:30:06 -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=eJmMff2758cSqfwElZCF8fTqGdrS2Goirb2GBCOJAq8=; b=N3FO6v//k52657B6daVvh+XbLu4HnZ/CeaGsS9X9KSCjI4ieLtrBs86NoWNovF+iAf+IPuzkeWsRRlnlGisVdfhT5X0ue+XpxzWu31dLtS4W6cBktwUGyo0BgQTk5JmlHN5EmGkBbI4UvSAe4TS2gJdlmsBl53lR33bU211tW5U= Received: from DM5PR02CA0060.namprd02.prod.outlook.com (10.168.192.22) by CY1PR0201MB0761.namprd02.prod.outlook.com (10.160.141.151) 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 SN1NAM02FT060.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::209) by DM5PR02CA0060.outlook.office365.com (2603:10b6:3:39::22) 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 SN1NAM02FT060.mail.protection.outlook.com (10.152.72.192) 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:58 +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 ) id 1crUuM-0006JO-77; 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-34; Fri, 24 Mar 2017 12:29:58 -0700 Received: from xsj-pvapsmtp01 (mailhub.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v2OJTkkD022945; Fri, 24 Mar 2017 12:29:46 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1crUuA-0002jg-6G; Fri, 24 Mar 2017 12:29:46 -0700 From: Wendy Liang To: CC: , , "Wendy Liang" , Wendy Liang , Michal Simek Subject: [RFC LINUX PATCH 10/19] remoteproc: Add rproc resource with id struct Date: Fri, 24 Mar 2017 12:22:26 -0700 Message-ID: <1490383355-23176-11-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)(39840400002)(39410400002)(39850400002)(39450400003)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(50986999)(77096006)(36386004)(107886003)(48376002)(50466002)(8936002)(38730400002)(6666003)(8676002)(54906002)(36756003)(110136004)(2950100002)(6916009)(5003940100001)(81166006)(47776003)(9786002)(50226002)(2351001)(4326008)(76176999)(356003)(189998001)(5660300001)(106466001)(33646002)(305945005)(2906002)(107986001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB0761; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT060; 1:TZzMFJO8eBmA6GCm0cBadL9koSXWjyJRqW1PMpGZl/tncmtr0rmM/MD13N94BopkQw48zIV2zQ4aLVdocZhLC/814RaBoLhjJak5ib4BdVDbobb1vG1/Ty2auNaPqhOCXjLe0xQ41b1z3xCdGeQtDHw6RWjEWVKZaMdWIEaT4ZV9ITOwlnn2BE2Lnv9Ayc2NL3ZZRDXJ9RGu3ASDM86H9cj4dDGQYkoMRjVUF2mX5KeVcPvJWKKB1icA+Uz2TqLQS2RvL+CEp6szaCQb9VaDTNxHllzLhwNNj3xYg6wcteSLYftFDJaCRCjHEod42zXqIi8FZ8HpNo9wLiOj9iVm6uPbu5qjGSeRv/8RWB+raOJi26bcg7IbDbWV1V53CJzpxdtyrYNGsUeGXG35KsJgNc8qCyKelvIZsNDYMEAM5uFPjtzbtGW5shYfjn5HR/VIwrcNEsWYXN7udGViWYm66AbqwWQHv5q68Al6f1nM0iH32iGFHyhj1N4I6RNHaUrpHSIznhs3m57ErHjSMvbJcoyK7mTVYxZpMVV9uQvMFwew2+YCfqjAOkmmQHKVlk5ArIrymc/Qin0WbIeDruhsGw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 74e6d47e-99a6-48be-b76c-08d472ec28c4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075); SRVR:CY1PR0201MB0761; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0761; 3:YyojSJJG4Xj5cJKD3/XNljHJWU/mQHnnq2r0X0qUuJuXHztQUO5Po2MevehsQ8D4UynH6g3920Zq+9EOyX4YDyDTstHyiXkHqAL8JQgkMOZrD8KggQtATUDt4H3xrMunpt/ATAn9kQQ11YLzwXzpAmh9ZklB0bbEkDmehnqBSHSCQzCIdu8gj3b3RvQYYAf1RJ+803u/YMyMlDcmL1Muyol0lhpM9ZGuIyvyLei3tO/MFKgS8vd1abOMnCMCnuTjwCrrFNkNoN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MEOmiEYCnwq32XeHah11nbGjfNl5iGWY9i726e9+P7cXtxzzfPmc0aeo+TUlOAW2NRueIdMc7iIkrWKptn0Zd7OkCC+N/jW1z0T2A9fD3gk4VYFV9EfYns2Vl4NJg/fpuf6L2Ut3e2I046CXmA9FTz/bSEzD5R8sc8CSMmVWWRUO+k2cCiF4gNtuxGiia09oJseBct6hbMDH4NsGXI2jalWOrK8akhkyw7VyAvtiPd8Q6KC8SgWZrVwKFDoC9Rfx7yLoSlecBUC/vtHtkT+XhDa0FfWp/85yrOM+HDEHMFYOZFE+jMPGKsahCfIZLZ/AtPzpbSQAiizm4ySphFfTDNXEqMm4b0uiAwfyoF3sHVDPwWA2JRNPiGVJ4ZIk4zR75fBeMnrVmDT971dES 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)(13023025)(13015025)(13018025)(13024025)(8121501046)(13017025)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558025)(6072148); SRVR:CY1PR0201MB0761; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0761; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0761; 4:c55X7pAi9ePiF/IA6dBCVPkTiptzAg42HVmYn4rgMWp9vC9WGZYfhnBKszQgmFCRLobc0d3IdZ1n5J6rkF14694QcZGiSNlt3OkWd9rNf0x4i34rpz4ut3KicuhxgG2BXNGjTlnaml4i9x/naAp1rKBvZC4AghQPlQZ3ZZrROTzBkl5CxMYbNNMjO40c0H0NvpmDmUsOF8mF0qi58WegH/i/lr7LNzORe+yNGt0CQ72FgILDBD+pdqBzTemOy5C7Qv1LhCjCNE7nGlvTdlb7RJHCfbdnUXiisJhLvK7fG2tORMN6hLl19LEKRn0QV12JvX3F9Dh28FVNe5f4YJW9LpNSGi5mL2vmX8n2/vOseAyo5J1jnUpCt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0XrqP2wlMYP+xd2MsRXnVmQMZs5+3BqImHEXGxJPhhNf5f8JAX4Bu20?= =?us-ascii?Q?65OaaLq/QhXX4HbhsHywdpQmakq3Sz+Bb8PhqvgYuz/d6czFcLKaPkXdxLu2?= =?us-ascii?Q?cF9AoaqQ9U6M9oSOJhQujutxP2MWBZfS3dCKfjYgHSKRsM210oPKfAtR10Wc?= =?us-ascii?Q?HMtHedz7qph1Vv8qWhaPRQOnTeLYWn4CHizOxhFXSADR/vug0I9g4td1xUdI?= =?us-ascii?Q?0fsSuOSjaSt3Iqvfs39isf2wK/hbqYSHIW2cCf7Two63K1Eclj3ALCuZpZdL?= =?us-ascii?Q?YL/Esm1MXeWtLv6CITzXFJcmIP6N0RmcfHcN5S9QcXULFayOmQXzD/ld/z57?= =?us-ascii?Q?dq7+//0In3a7CHmbpK3pXqdCGw8JyHvd5swnl7TWWsFCegq0cDsihAd206eE?= =?us-ascii?Q?K2U79BkNKx2BxGs+FzCaw1GvzANT1kmVInFDVG205lOqmQm15CBCCinnDpty?= =?us-ascii?Q?veodtSXIinWLcikusUSphRMHYMznUgfuj4hrPT+3ghT89szIjyb3fxSlvFXx?= =?us-ascii?Q?9MJFLVPYzICVFEyAkO37XgBAgRm+SoL+UlGmakfE3Kj7i1g4NwqXzx56Hlbp?= =?us-ascii?Q?8MwEBn9D17F2qI1bDqYTW5YSAndZi?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0761; 6:uA1jQdoEqLSCv9uyxBS+/4LlzWsXZBObtEzBNudnTEUYQ7P/OFIH9jBnhjEb6EpXu2dCmOdkpups6ABi+VZ6pGDJNZ0nPqk7I0+4bikdfsT0DCnPhoF7IBR18m5WYX3k0gXE8atQpUpaPvsstBouZSEX5SQF7JAxBjyKBd6LGy/nK5/jigVCaE4yHtugjUQrmarasDe8cQRcZdbJIJ8bW1IoMxG2I/HNrfDKyC8DrbOAmYZYG+iZxSsyR45SI1TcUExIyuWbIAOIN0sOKW68asyk4Vt27vmTQjDM0dpNJR6SNwbzrU2gMDigr6Zhyo93DrmIhuES1nlR97GMmPzOjEUmpPPj7YV2dwM2ZMvC2uTLHb41wMCVrzUOtKSJeMYuSVvvhNwsaOcxueY1vW7iVj82V2AGt2G+/0FMZxWbeD8=; 5:phrR3hgaySxwmiChXIuDlyV7sp/ccuKeaIKClW0bYWlptrK0nXAtNW2YToIiqDtW5bKGVOHiSiY+Q0AidX4KMxq1ky22KckI/f/0g2B5omYn1GLWdKSVYrBjdLGyhsEkGJDUV7KPEQcUiungI1pKHA==; 24:tVhWn8UmcqzmT06MxMyXza7WIscMP4lY/RNkt14ZT6FWH4LnYsP+ex6KQrsRvAc5t5ClhNgJ2CcWPG1BOMBPAen2WzOpnsKaKJelhYDSBm8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0761; 7:HaFlPNoHgOIvpxCWJfchsIKfUcKFIpkkvb4ND2ssmv1nAp1ediUGqaxHlMs1TtYBCT6ag/kNs2q6ZmEPK1sJYk940o1+/04AuGefKUV2B7hNKOPnTiusiaqOPFoCgjWHNHLsogGeO/d84EKStnDWyr3t/xk38SBuNyRLEC5RvBDCLD55HfU8DOC1RIJa/4/AyHimynJ3NQOLv/sclbuNQ144ZkBwiQpwM7bS5Jlx1k320bUtsPuZAwgwmWdQWAyo67+ifk/AP+ls8DsgUy5BqP5Jh1UQ7gIEhpENAoDCX/hmJ3NXywc1k9AlF3/BMVPEJpnSOwL/mP9DAtlW3gONWw== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:58.6192 (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: CY1PR0201MB0761 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 Add a struct to keep the rproc resources which have been assinged with ids. Signed-off-by: Wendy Liang Signed-off-by: Michal Simek --- drivers/remoteproc/remoteproc_internal.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index f03e07a..7e25621 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -23,6 +23,28 @@ #include #include + +/** + * enum rproc_id_rsc_type - types of data which needs idr + * + * @RPROC_IDR_VDEV: rproc vdev data type + * @RPROC_IDR_VRING: rpring vring data type + */ +enum rproc_id_rsc_type { + RPROC_IDR_VDEV = 0, + RPROC_IDR_VRING = 1, +}; + +/** + * struct rproc_id_rsc - rproc resource with assigned id + * @rsc_type: type of resource + * @rsc_ptr: pointer to the resource data; + */ +struct rproc_id_rsc { + unsigned int rsc_type; + void *rsc_ptr; +}; + struct rproc; /**