Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967100AbdCXTaj (ORCPT ); Fri, 24 Mar 2017 15:30:39 -0400 Received: from mail-bn3nam01on0056.outbound.protection.outlook.com ([104.47.33.56]:44281 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967040AbdCXT3y (ORCPT ); Fri, 24 Mar 2017 15:29:54 -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" Subject: [RFC LINUX PATCH 00/19] Allow master to restart without restarting slave Date: Fri, 24 Mar 2017 12:22:16 -0700 Message-ID: <1490383355-23176-1-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 1.9.1 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)(39410400002)(39860400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(2351001)(106466001)(189998001)(50226002)(36386004)(33646002)(305945005)(50986999)(9786002)(50466002)(81166006)(8676002)(36756003)(8936002)(54906002)(48376002)(356003)(2906002)(47776003)(5660300001)(6916009)(5003940100001)(6666003)(107886003)(110136004)(4326008)(77096006)(38730400002)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0201MB0711;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT059;1:89Glxu8kvDIK57wQ3uoTNn6qczwQUEYr3eCN7G3KW9qf5XweJsHwgx89ELyHEFmc8AD36D0ddQ1GdvNabRChsTM2H3JEpRmLC3xVDvy9Xo8QXfDr2ul22W+9xOD2iT+oldz5JySTp6shsTo2xeedsQO1hMthDgqsW8CB3rKIhwzqHz0GV5iYpqtJpK8a7xndPmWcepKiwz/a0oFfrzbkKnIU7jxxT1Ci/+LtA6OpJ0f4s9jZVk0Ew6pY/QZ0fkhivcC86vhRefU2FvLoDItS7JO6MhIWXa6TUotYA48ho8vUbH/tWm9rv4aUc84yaisU4s7mk2oxmdsI9OpL0QNaCVgELiBWE7ekV9D9t+VtGSpP+Ca8W2PSail0ry3BgTaWIhxS/qT+ipQzXVlWoc9ZMEyMX6pEUVv0InBMPpOy59R2ilX6LiPiOLHaJlkELXisauq4x44P/d+KTriYp3SSyS+uZorzxP68wMkyGC0zykWBLuAUpWprlpyqArkP529P8qwrAccQHoPJXUCl1ut8yozacMZzpxOe3kVJPuuTB2J6Mk9zclRLkPgt/1PiG8roiYACJprZIg6+KcZwcX+CWw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7de756a1-518b-45ac-2b36-08d472ec224e X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254075);SRVR:BY2PR0201MB0711; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0711;3:ZOPYs9Te+Q4WCNshSbl2IhOPcARG4PzTOeRrlBSX31Krk1zt8M71R0vKsBZ3jYDGXBCSmBVY735bFVNVh9yOb8M/r2ACGXizppNEQZHFkwLqm8Z+mnqDpkcYcVuMEG9vbtUNWE6a9WKW40U7wEOMp7jsD5Hhj7JMg8v5r+llzwAxdaORi0ZBJ1zmZ81X8uSZwCnexZaMDjZ4hI5ZXumpenGJyI7S9pfzj0xkXPgRO7xTUsCt2Sj9ljbep/Cb2wjQs882q3gbG8cx5Ap3G0W3IINEH/rK2mBuETO514b3/f5tBEES0NcIjIGLDpC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hRh61ojepqH/daZCk+o0nfF9Fk2/c/S2MMQZ1J7dn+qjivHTaxdbUl49cCccqy+nA2VhYOw+QVRURzVrhx/YuIDvvvETPIg6mubB5tzpmWFjaY8THltE1AbQD2pEnwn7MZe6/bZg+YAcfyohs0nEh/LPX36q9afxhsMsHcgmDmf6Da4e/C0M3TM2ImnXiu9ZlEfQkU5cw7KasI5cv8G1P4Z6yKaKOGJrCpMRg76KGFzY1sVsL9WiqMn26diBg5Hsg1bMG+doNzEY/onDGcEBKBzgmhTbvZSv+qmfmcMpPtVGkh6E0Ms34uLW6YoyRXFWntRhUHqA7FfbPRN8SbCMy3itx2fDhnXm9P0V0+jza1doJ7BpHApl1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(13017025)(13015025)(13023025)(5005006)(13024025)(8121501046)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(20161123558025)(20161123564025)(20161123560025)(6072148);SRVR:BY2PR0201MB0711;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB0711; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0711;4:qafZ9idrAAh+qMJPynSRCD+wN2e8EmG66XUW9+6UfYOwKY/KV8GzPUCi99WAY/P9KRqllJLiO+tJyy37eJFIxbSUfkOY3qwnV8n8zc0yyhHByh41c6QHoZsj3VNUMXFLYphI9I5VrtAcvgeZq9xHhuHJe5n8g25uvLKV+sAWTy+w9d1gLnEjDz+8f/I2Q5BjOjQh/T+vAU7FpoFDEoomqaNpLQ9bHwwWcnzvKO+mqLy6MIfQkSfZmcof4LvRtYcok/JLqXlSOqerBP5lDTbRfTLofqfSrppZmwD3cTbgag9dwKL9Od6lEsa/2lHb33VVEE2qY7AqVJAO18oepo10Y/SCRcP7SihmDJ2yXrr5Y34okO3bkpqrJ0ncQN9PBKnncoEUl5aTcjEkkl6pUckKBLW6ZetoNdJU+y4sOQ9LDAPmdzixhxhfj1VIVtgjzNZ0Pvuy8JtoXzPRm7rnWBDg5mjTLIXlvb4KSOsTrF4+fNUeXL32Wu7qig545syRq9ntRZQw21MFwIxz94kHp8AjU7RyGQEwwQDhJwaDupXmmr8WvzMLVfu7LRmxqLpWqc70iqeHR0CyQ2XPTLuL/pXLES3sLOBosrkymc/4vatOVg0gUsV7u8rbdmHuwhOA4QIOlBvYTc6+Fua+PQ9rS9uvObSJE28SwXDgXnm7waNv+mJKcCbYauVGJJYYyaGXimxKsVgxePntEBR+yhhj/RWVYA== X-Forefront-PRVS: 0256C18696 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR0201MB0711;23:Zw0G3LNl4H8VxOTy2GS64WZD7A2tApmabBoZ1Eo?= =?us-ascii?Q?ozuhBv69iCh3cJVcepyRfyVjVVXvWOeVvU1ObUo0NS5dyqUslX9yNHG2XYMB?= =?us-ascii?Q?46wt59T110aP9Y/w6VHizZx0yPzhRiJSprS54koIeo/Qd9Nd5s+24y6dzo83?= =?us-ascii?Q?eDf5GR6bylim4ewiFH3CoVoK8fF0ACAgjACrUUT4kTEAzsr11annPuTmrVjF?= =?us-ascii?Q?11mccsRMVbJJRiFVuwcCAPrbGvKQxmdrOhDLbTQwE4X6ga0dxIdrpX854hlt?= =?us-ascii?Q?qbX/Y9U6QNBznsCYsO4M8JOl11p5auw1kyjj0Raw6DzTye1gmC4fQx0J14y6?= =?us-ascii?Q?drWWUS3GnQEl7m7OFDLFhaK239lwm80/pL78slMx2G2867OMJG1bAFnopbtK?= =?us-ascii?Q?37aHROmMVPitRvrqHSBLrXDCnLXxUZHs0GQbn6DZj37NWD+TTzKvG9aScvLx?= =?us-ascii?Q?FVn+m5XOimvK1ROGcdBHVrvfEt7YAk+1Wv30LkrO/LU/sRtb9PxH0TaI6s9o?= =?us-ascii?Q?cBkKEWiHxGmsQCETVotrhQeOJILreZvDCAxkl0xf6SoYy0aVh65AGCw39tIL?= =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pBZErlUhYTD9QUwpR7LOpY/CjsYNCG5W9R+8sgYtjlvDeoDxOO0gifz/JTPxA5cEqAVDW/ZzpZeVvgXUbEikLJ2iVclIihC2WFgPLP45nqWUx/0Bc5JyJS6Q==;24:TbpkUfh/6Jpiezyd5+eQmwNLYfGV8V+MnQ4GMsjIQ4wFMelRFTQP4EsQqr1mF4IEdo/grCUrQoThZgV79SgLhl/sXcbBJMmh/+AWwnAqQT8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0711;7:iYvU8cRWubXlRd8Tdcs/IlY6V66AwpMJnL2pEbhEy30WuN6TF8/KbA02YAntw2G+UDM9Ey+FRJJ9Ce39udb2hl3s19obeseMBMIcfo9MUGI1fBFrllv1AdqJKEupNNPue1VAzIV0Au07s8hI683gzGnA/oUa9hBbnOvFYUjKZyH55wvM1sTKFxfCRx9UhQZXKqa2tqHtpQY0s/JzI7c4+x2bfbaE224B4y+W3fiGCQql/VIEaqwxHh8Hi5S4fNBlD1FPJnNdtBKKvTqo9kUEtT0RbO2C7RT+sbAphYDPZYdePjgFlr2XOXibEnjkWG2JzahxdmxHg06UGqxsKpvvsw== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:47.6979 (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: BY2PR0201MB0711 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2474 Lines: 52 This patch allows remoteproc master to restart without restarting the slave remoteproc master starts a remote, it will check the following: * if the remote is running, * if yes, it will check if therere is firmware checksum in the rsc table * if yes, it will calculate the firmware checksum with the loadable firmware sections, and compare the one in the rsc table * if the checksum matches, remtoeproc thinks it is already running the firmware, and it will not reboot the remote. However, it will set the virtio status to request virtio remotepro reset. The remote should reset virtio related when it sees the virtio status shows the master requested reset. * if the remote is running, but not running the expected firmware, it will stop the remote and then boot it. * if the remote is not running, it will load the firmware and start the remote. Wendy Liang (19): remoteproc: Add is_runinng to remoteproc ops remtoeproc: Add an operation to check if remote is running remoteproc: Add a running independent state remoteproc: sysfs: Add running independent state remoteproc: check if remote is running the fw before reload fw remoteproc: elf loader: Add get checksum firmware implementation remoteproc: Add firmware checksum resource entry remoteproc: add a function to set fw checksum rsc remoteproc: check firmware checksum in rproc_is_running_fw() remoteproc: Add rproc resource with id struct remoteproc: Add rproc_idr_alloc/remove wrapper remoteproc: use rproc_id_rsc for data got from idr_find() remoteproc: add config_wait_complete to rproc_vdev remoteproc virtio: handle rproc vdev notification remoteproc: virtio: rename rproc_virtio_notify to rproc_vq_notify remoteproc: virtio: use rproc_virtio_notify() to notify vdev changes remoteproc: virtio: kick in reset virtio remoteproc: shutdown: set state to OFFLINE after stopping remote remoteproc: virtio: idr_alloc for rvdev drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/remoteproc_core.c | 251 ++++++++++++++++++++++++----- drivers/remoteproc/remoteproc_elf_loader.c | 109 +++++++++++++ drivers/remoteproc/remoteproc_internal.h | 32 ++++ drivers/remoteproc/remoteproc_sysfs.c | 7 +- drivers/remoteproc/remoteproc_virtio.c | 105 ++++++++++-- include/linux/remoteproc.h | 24 ++- 7 files changed, 479 insertions(+), 50 deletions(-) -- 1.9.1