Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967020AbdCXT3g (ORCPT ); Fri, 24 Mar 2017 15:29:36 -0400 Received: from mail-by2nam03on0063.outbound.protection.outlook.com ([104.47.42.63]:57984 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932237AbdCXT3a (ORCPT ); Fri, 24 Mar 2017 15:29:30 -0400 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; From: Wendy Liang To: CC: , , "Wendy Liang" , Wendy Liang , Michal Simek Subject: [RFC LINUX PATCH 1/3] remoteproc: add rproc mem resource entry Date: Fri, 24 Mar 2017 12:22:14 -0700 Message-ID: <1490383336-23117-2-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1490383336-23117-1-git-send-email-jliang@xilinx.com> References: <1490383336-23117-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)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(2980300002)(438002)(189002)(199003)(9170700003)(54906002)(47776003)(4326008)(77096006)(8676002)(81166006)(36756003)(8936002)(36386004)(5660300001)(5003940100001)(110136004)(107886003)(38730400002)(50226002)(305945005)(2906002)(50466002)(9786002)(189998001)(48376002)(2351001)(33646002)(6666003)(6916009)(2950100002)(50986999)(356003)(76176999)(106466001)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0201MB0767;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT033;1:0/+6kviz9xpQ/NwG3rpxmib9vK1i+/aGgd4HryJIBfEBssyY6tesTZ/cppBlJoT1NvDpqyOtlONReZF0j1lKDCODpT3g5C1DdyaqvMLyc1IwxueFRAHFJgtldisOeVMUfmRuVl15seyBHPwsjOK1pAV8NSaSV1PHB7+kl5vPMn84pWk5kECFPrfvfU6iO/3hP6Ilu7WN9aHejQYsS8x3bY2ATl6pSkI3qZK8I7pESkI7SHD40mTy7m+XH/JVxcpRBDgExTjJdf8jZSt38iC38JbbuofK3xs5brpingy9S2I+QUeaFjbOWI6GKbGBZqjahftaH4KBStMvrONSCVl4tmd1WwLsScm0DN40OVgs5X3ZFk3E/nB2pLqX/yq7CYy5YD6kYe8EfAr0dbtJgWQ8Vbl0WurFO0Z6wj/q7+ctIZHOZIlbjTIA1P0P9nwjOcHs07hrDF0e64Mtn5W0/gKwyeL3roFNVYjqy/8IROOsnp22DBmHLbYdGkpZkrU0IJIldTbsRJYff3RPnZK3DFwTppYusFeIZEuxhYI61npFRTpohjxkTGPv5Fflei89/qPzwhDO/zg7CGfa/fzO/le/4w== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 4c64e672-b4ed-422c-0f2c-08d472ec1600 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254075);SRVR:DM2PR0201MB0767; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0201MB0767;3:nGMrMpyj6H1JE1Gq4VqeblK3hChbbfRDjwi02U+mvHs7+m+1bvRRQMgpzB4WDEleYC1TMck8K3JHhi/xpCSlJK02oa8KYIOeEBdtX4xZ3tUgzoEsXs5r+ah7wnqpTfHV2arBmC0eyabkEfJayV0eVDK6s09AUQCU+mCDKERGJy+4T2992Y3Wz8Wwi7rk1L2LBGWunLeaFbG9sXhbJkSIY7NXnWG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0Fy7z7uhbqWxd9eKN4pCjw6l/nMwFcX5s0m7yq+jhXaoyJF27Nw7g6BYwXE47mx3wOPwTuFb/ORG2BgrKYyMB/t7/pWteg4ppZT1oAtBjm/vngSS1g6E4LAJ9uF+3jZrlydw964x1/GfzKQe/7TdBBfXTKFZ+5uTdZ7M9vpKH5+icIYeTy1hHsg/C5xkI87toBsPsUS3REv07mW59YG5hLQ2EleYAmKvx+0rEw2ScG2vBJZgTpkKBy1Xzrlmgp9ja56S9tUvhJsFLkX0O194ryFRYgWIvcdHTzv/YBZrY7lFHohyQZOdQYZnPqfIOvB1x2qW0EzABKf8CfDMwOUgn+C8fvlBteTLU7D903Tehwo/Ccqngf9Cd0YTGBANWf7WN+vwPeC1yj8b6Apgyw/jKBPSURILfCTKciC7OuVntM5ARVsFQVBSLr9LNyQy/Yjyp9M28ZPq8knbCxbULUb8Jwwui 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)(13018025)(13023025)(13024025)(8121501046)(13015025)(13017025)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123555025)(20161123558025)(20161123560025)(20161123562025)(6072148);SRVR:DM2PR0201MB0767;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0201MB0767; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0201MB0767;4:WGYkMhpTEEepMSSWrlcRYKPfcvznrsexte0M7nZL82F9vUMcz+oRt0mKd2in1d6mkeF/JwYgB27g0tkLfuvoJNAY0+UHMCIFyjcRCKT8D5GeK9711TopvziZoxwshTuW2DM8eKqG4xZezjyX+q21EabH5C+FjC4srbAXg266U4IvyzxGcn2uMi3LOtr7fRS3ypir0ug5g50xyac+1dxEnISHwInbEFqsuoHvpt6OIXKgqJkqgpY52IUH2FAz6pZKdL9kN9/7uGF1d+1OUh7/XPYc3PdFojCAEzLbCM9i2EH7aiXwXleMvR3RFru/AAleY2A3RazR4o/y/5ZSaDdGXups/EIap+F570vomuDTM3Fg7do9oBxYKxOU/OziJEOf0hP1dwEjlEDzGOU9Bao7/E6Vl+PxUhmeN7uEeON/g2C00h4xeTEapKzbhB41vHekbwXwuFtF568RYEHaPVEmTcSCque/LXpGsPb5h8MhVRdWNVBkgKKDcD6jGCVDz5ZkKLtJ86MlD5oXtXeZVUZ7bsNGDvSkte4wD/lhs6Hggj7cUfDPs1Yb3NnIqFC9i3C9IgpEqpFq/TKviQddfu02WRM2TbPdM0CUaCRXwAawrs4oOeY/5SQGcHqC5sYCcQEYxpbQkUO0GYaH3bdJmpgxuoetjvmrgxCQ1xdQH2sz6thBJsRM6J2rYyO8UofWvCBup7B+9Ta552bpNGoCKGsV3xLq5GAnoxcm02umpZTGUHa2ajZvIPqRikM0LJsAdOj3PegbhBVU/OwyMi05DZ8WMQ== X-Forefront-PRVS: 0256C18696 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0201MB0767;23:Dg5ocj2LeAB1jBwG/f+1rc4m3uL5MDIynDbsmzh?= =?us-ascii?Q?lO85rnpb6HETogpSes8Rcg69mb57V/Jijmovpt9fzMFVoC8n+HvNDvsgcwBZ?= =?us-ascii?Q?Qo6BCXjhjN0kqHwno62jnwG/kkSnk7CtuNsnaadUyXkTINb36fSAk4lRLUg8?= =?us-ascii?Q?GRnlkSCtYPi68n6fuwGLho7PQmpLcmJYhrRWvjte6FgtAeRWXn8w77pBof4h?= =?us-ascii?Q?TxskNGNxA9ifaVDqRKiZEBRoLb9eiGFH6GoHzWBBTEB44hfWK+Xb402D2Rbv?= =?us-ascii?Q?UGBv2twZZmVj+QHSc+KsfrQbRqMxyp1zuzmlCx9s03V22wrCC+ARlI1AtBI2?= =?us-ascii?Q?qnEchx0lRfLIbZeNPYo13VmxM8eVAaYK395gVcVZ09bbsodhaZDBD9aeDbk5?= =?us-ascii?Q?bDIfpG5bCMhDffGePK55BQfIdA+cPsZFQ1H33PPL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6gncNl3V8c0YaZaMdBzvfHo1er1iWnpHSZ8+Rp7MmSY40DlnSgBbgSIZ2GLT+E27NuMiScAQgQxnqTFppfrST125TGV1W57UaJBd0may2Ih8O++xU3/7aShZIglF8sbQWFyXWtMEPRROM+4CCiKThlLDfRj4dC80v355Fc1Z3tOLkElwRUtbYqQg=;5:MIPSs47LC149zVFvLCMDVbNH6O3YIPsr4vAXxiEg7SDrwkiChLwWRwmWoRXKeHnC8PpNHi0zI0FmmEW9jw9TM6sVt8QPWU43bJIwYVDdAhdV1aOSxUhOaie90A5xswzAz/9+5T0v6SExTMtYLSKF1Q==;24:hbqdlT7AbJephs+mR4D4CH6w1gnc0MtlGT+CGgv+MaNRnsLh53vejFw2T6RRWb5L95sBNsAmP2BcB8zexdu4Ov1Ky/vM27tE9qvwI70pDmk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0201MB0767;7:VIFkKH5IZiUlCDZ8Tsm8CQyKHDLyR5MgbMYqL5MSyy0tayOH9ufXG9tKFXTnGu4SvuyR9CyI1TZmnIc0YEupvK7XpbDQ43qv1pE6AsctL8MLgUsqxZG4LOH2fDnp51knAVYwyXulXIQDJk1IqexDQftjcLR/1Ud2odF7oweckw/orThcxK0kK2Q5pDssZ6J4cLL0v+9gca5Bc1EezswNHRd9nx5TvAER0LOtNbCcEis/NImXTV388wXpHy10cV6qa7/rlwBLlNtdS9hqvd2ksRb8PSOBU83Q8ev3XVuBr6QwovrY/IWBknz3eALlcVfqFxdCZnooNKlgZDHzSJ/KKA== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:27.1158 (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: DM2PR0201MB0767 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1399 Lines: 54 From: Wendy Liang Add a resource entry to the resource table to tells the host the remote processor's memory which can be used as shared memory. Signed-off-by: Wendy Liang Signed-off-by: Michal Simek --- include/linux/remoteproc.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 81da495..799f041 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -115,7 +115,8 @@ enum fw_resource_type { RSC_DEVMEM = 1, RSC_TRACE = 2, RSC_VDEV = 3, - RSC_LAST = 4, + RSC_RPROC_MEM = 4, + RSC_LAST = 5, }; #define FW_RSC_ADDR_ANY (-1) @@ -306,6 +307,26 @@ struct fw_rsc_vdev { } __packed; /** + * struct fw_rsc_rproc_mem - remote processor memory + * @da: device address + * @pa: physical address + * @len: length (in bytes) + * @reserved: reserved (must be zero) + * + * This resource entry tells the host to the remote processor + * memory that the host can be used as shared memory. + * + * These request entries should precede other shared resource entries + * such as vdevs, vrings. + */ +struct fw_rsc_rproc_mem { + u32 da; + u32 pa; + u32 len; + u32 reserved; +} __packed; + +/** * struct rproc_mem_entry - memory entry descriptor * @va: virtual address * @dma: dma address -- 1.9.1