Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp800958rwb; Wed, 28 Sep 2022 09:14:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6r7L8zhuY2fCBDIB7yB8yuLfE/bh1UF/h4lRSSJeK0gJmEAXi75Q+4OnuwerBA3ymc4nM1 X-Received: by 2002:a05:6402:5249:b0:451:67ff:f02 with SMTP id t9-20020a056402524900b0045167ff0f02mr34641722edd.227.1664381660027; Wed, 28 Sep 2022 09:14:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664381660; cv=pass; d=google.com; s=arc-20160816; b=GClU6b4XJwU310CyVTJ0fAIND/aYk34UWUFF7m16L/Vkh0IjXuKzJe/OgURbSETw0F 0rV6nNq7Cqeadw2gHIO1xQPbKnNoc8iCBviFtRf73Nhg4RyFGFcJJzGjoOUSXJoXgTZN iA1MlezT9ZWw7nu5nEsKMmSlxY7VzGBOYn6Fgd7Mv9qp/edh8tPDfmDfg4SSG0mPYRfJ quJdsbGDZxnW9QrAxnjWEcVQIaac3qzkXPpZyC4wANjeuDebFVSvDai6ERIgF4QAQop2 fIKzum/k4VtMKCF0YhkjXI3wfO0Uq5kOx8bAGOpfos5hAbdNhss8VMeb+APkcLp6MTv+ 1j2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=fmMhwmfNjtfjM5SpJGUMq9VEsS1rbLi9Da5Mi6O2vq8=; b=HKtfGJe8tegzO7aiH10BmnLOnF4bPPTx2OCMKiUyqm1WTw5FdzKIG6qMcevhurslc5 PemN9R8jM4/HhtJEvPKJsB68RdWL6dbbadg8G5N0Wv1EdVqFqU+YRL8jMl+qMi8BrrgO d9E3LxQiRYjqs4F19q/DFSaUBCMU8R1Ntp3T0uZsObjktQjrR2vjF7O8mtN3roYsRXoE 0xucDwclYze29/UoTFzXBZKAxfrZhCKiSHcyCKwnYYagAVrzcFG3kF362LSyEeZ6JeRk YEjaTmhCiZMnzRCjjR3FblGRV0XEVla1EioSTjWeOFQpCHbR8Z+fM7d+rPIdsuC02jCq SMNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=TsyUAnvZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020a05640242d300b00453d01c0d31si5714182edc.366.2022.09.28.09.13.53; Wed, 28 Sep 2022 09:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=TsyUAnvZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232750AbiI1Pm7 (ORCPT + 99 others); Wed, 28 Sep 2022 11:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232599AbiI1Pm5 (ORCPT ); Wed, 28 Sep 2022 11:42:57 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2048.outbound.protection.outlook.com [40.107.92.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C10FACF495; Wed, 28 Sep 2022 08:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J1680FgVTRAqjpOElc0HTI8c2zcpvo+hB+MGlJSTUMpuqdelxvJy3hpcSuwCLrvzR/15ETByPOJUcbpQnnoXrE4gq09IKo3PEI5KSM0ALeBx4IStj7AZaI97iBL4uLuO4N90tmTQ2ra4X+Q4pL1f9DrNly5Q4APBrKqa/s9H7ChYA+VdHxT/hzuUhUoG3BRNKZc/ArmL4rd62+b3QpH8YATWzSLE20JNp1D/KEmtwMBypKlO607nK2AWkvPy4Z42zRbf/NVxrQuvpIEt3KkYPJMOI9ZsijcfTbo1xfGSW7DIu4rrdLR6Xa6aBRG6BCO4XQiW/PgP4hGZTB4novCbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fmMhwmfNjtfjM5SpJGUMq9VEsS1rbLi9Da5Mi6O2vq8=; b=VS1GpbzSZSJ2xFjQxvGRTxf6VTc3y+sFH704RUFSnGiK2bv4wiW7pCD5i1cmo6xd7ywH2csXDaowvksENXr9np+bu05lHV06Pa/oHeRQxlDJQ6n6cENp4wddG2ACxxUmtrTHGo35w1g5dyOOygkiLAq3qJyc2uAxpWNdkHNiBwfgc+8G7HFuoDQzMJI0TXdIoNO8ThBzfcCyCk52ynAhZLzJVUK+hS1MsTJ6FRkhch97/h8jpOnl1Jr1IUDUBwWkWJC/A5ab8d70xllQA8IK9iTNapESkn2C7JXxMdxnWrO+frlb+by3VlYRoMtOf6PA3sGZNGs0pCY8MqvlcS+sxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fmMhwmfNjtfjM5SpJGUMq9VEsS1rbLi9Da5Mi6O2vq8=; b=TsyUAnvZ8WTms60Qn8n8J3esr+4p9Y+c9cjiBZr60po6O52OHsTv6vQT4lUDqQ2iQiu7FQZFHtxmGgtCmStA5HlfdC6mVkVM1sOP5CY+PltQN/pVJx0x6DFwCqIx8sIcNIe7rcOP1sk94HxuvIP6JpkeCOvqEtXBROX22kInT+M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BY5PR12MB3683.namprd12.prod.outlook.com (2603:10b6:a03:1a5::16) by SA1PR12MB6725.namprd12.prod.outlook.com (2603:10b6:806:254::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Wed, 28 Sep 2022 15:42:53 +0000 Received: from BY5PR12MB3683.namprd12.prod.outlook.com ([fe80::3441:5a68:b4b7:e988]) by BY5PR12MB3683.namprd12.prod.outlook.com ([fe80::3441:5a68:b4b7:e988%6]) with mapi id 15.20.5676.017; Wed, 28 Sep 2022 15:42:53 +0000 Message-ID: <08a9285e-4a4f-ff7f-0ec2-8958d0c11a08@amd.com> Date: Wed, 28 Sep 2022 08:42:50 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH V8 0/2] remoteproc: support self recovery Content-Language: en-US To: "Peng Fan (OSS)" , andersson@kernel.org, mathieu.poirier@linaro.org, arnaud.pouliquen@foss.st.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan References: <20220928064756.4059662-1-peng.fan@oss.nxp.com> From: Tanmay Shah In-Reply-To: <20220928064756.4059662-1-peng.fan@oss.nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR13CA0124.namprd13.prod.outlook.com (2603:10b6:a03:2c6::9) To BY5PR12MB3683.namprd12.prod.outlook.com (2603:10b6:a03:1a5::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB3683:EE_|SA1PR12MB6725:EE_ X-MS-Office365-Filtering-Correlation-Id: c566c916-4697-4d9f-d1d9-08daa1681b48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l1iPQQsNqWOBTmcOQIIuPz7WEeafxR0+T/2pA4QKO/niJB7WWrVxXdEmaOEthWmZnTkpgPlw1Hrn+9GTHNV5A2M2SFMQiHphNgm2rJ0YiS6PH4Gx30Ms1raGXXP3v4RLLrILaI6dd0NMDd+YFblS32xUSKjJoLky+HfSBrkgKZhEiQ9kFyWYEqzpadDPOVeyUhKyXu964WL7Fif0mzFnSUGYCtqGJtRDyBFpmOygJdvBTXcZox+XiO4fNOg7qq2KwadgmVbXuwzykPcMbAFngUYSqN1VOeRwd8oXNts1QiCB/ycs3cKvQRWQKlOUVMBvZQEd1D//6w03eQ9L7D+Ns/C3kCtwdAnSxBO94s4ZQUhd42sXZxQHcyGjX+TO+V7vQj44ubaFI/lJNnKLoRDa6Il0rpBhLgkvboFlK/80wEVqlv24SK5vikaTUZCvxhxxsLClMogw6slcYKl/oIwvuYvu8oBvmLN8t5XKydsVThLTkPJyF+SNa8RxNpxRNnxZcbo/hLuNd1XzlTa5PFUGpNxBJ743jQUXLtHFus9P7BoSTVZMuw1qgHDhiQ0fZNzJHZhLXBAw2fSgFMK9E4jOrwpwsrEk/PL4I/Y/A7sohbvouQQ/lF+nmrotxT3v+MyreIU3YmF6tcJkWKrEEZxG8lP6XfJ7Cp0XLsUyWPc8X3xraytz4Wn2Jv3PQ9b7IPNgoa5newaeVD76Ux0Ks5T7MWeU6Dgo0h4UfdVp+l6BPP86yz6RPmKJ9qef9Fa9byog7s9HPe37ey/WgPVPRiVUDJRLeeWYeRxPoTDplujXUHWNLrhE8YWHBMPs+oieR+QL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB3683.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(366004)(346002)(136003)(376002)(451199015)(966005)(41300700001)(478600001)(6486002)(8676002)(2906002)(5660300002)(316002)(4326008)(31696002)(36756003)(66476007)(66946007)(66556008)(8936002)(186003)(31686004)(38100700002)(2616005)(83380400001)(6506007)(6512007)(26005)(53546011)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WHR2VEppWWxQZmpJcDBVSEs0K3FiZzI1QzZ1Mzk0dmZabFFSTjhiYUNYUU5z?= =?utf-8?B?VHJEN3ZTVGllN1VDb1RWQ0xKd2NpUHVKQjc2YzNpdlF6T2wrZDFVV2xhRzFS?= =?utf-8?B?eVdQVVdzY2duK21UU1BBbmlLWWFJOGtQbnB6NWtydE5KVFVJbGsvSWg0TmI3?= =?utf-8?B?WWxyeE1jQk1sU05MYTJRamRPQ0N0ZTVla1dDR25QN0VsaXRGSW5ObHViTEcr?= =?utf-8?B?ckF5eWNoc3NRLzZqUC9qWjQyaVN5a3ZXMFduRXIvanJPTGxteWNqV0lNdFpQ?= =?utf-8?B?bHBRTCtwanFlZlBUdnRaRXlyb2tNb3JrVFIvNWd6cjNZckY2SG5EdE0vRGcv?= =?utf-8?B?dDhISVFMc3dyRXlsaUx3SVJpNGUwY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: c566c916-4697-4d9f-d1d9-08daa1681b48 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3683.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2022 15:42:53.4336 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GoDyQGI8OFbX2nqYw6MJQ34sYwO6ijgG6rlua+6DmAXye0i5Z7q8LV1DrH7kgmQZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6725 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/27/22 11:47 PM, Peng Fan (OSS) wrote: > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > From: Peng Fan > > V8: > Rebased on linux-next/master tag: next-20220927 Hi Peng, Thanks for your patch. Tags are useful, but more accurate method is to use --base option of git format-patch. This can inform others what base-commit was used. It is also useful when you have prerequisite patches. Hope this helps. Thanks, Tanmay > > V7: > Per comments from Arnaud Pouliquen: > Typo fixes > Added A-b tag > > V6: > Rename rproc_firmware_recovery to rproc_boot_recovery > Drop the unlock/lock when do reproc_attach_recovery > > V5: > Rename RPROC_FEAT_ATTACH_RECOVERY to RPROC_FEAT_ATTACH_ON_RECOVERY > Add kerneldoc for rproc features > Change rproc_set_feature to return int type and add a max feature check > Use __rproc_detach and __rproc_attach when do attach recovery > https://patchwork.kernel.org/project/linux-remoteproc/cover/20220615032048.465486-1-peng.fan@oss.nxp.com/ > > V4: > Based on Bjorn's comments on V2-2 > Move the rproc_has_feature/rproc_set_feature to remoteproc_internal.h and > Keep rproc_features still in remoteproc.h, because we use > RPROC_MAX_FEATURES to declare bitmap. > Update commit log for patch 2/2, and add comments > > https://patchwork.kernel.org/project/linux-remoteproc/cover/20220323034405.976643-1-peng.fan@oss.nxp.com/ > > V3: > Resend the wrong labeled patchset > https://patchwork.kernel.org/project/linux-remoteproc/list/?series=621311 > > Write a cover-letter > To i.MX8QM/QXP, they have a M4 core self-recovery capability without > Linux loading firmware. The self recovery is done by > SCU(System Control Unit). Current remoteproc framework only support Linux > help recovery remote processor(stop, loading firmware, start). This > patchset is support remote processor self recovery(attach recovery). > > In order to avoid introducing a new variable(bool support_self_recovery), > patch 1 introduce a new function, rproc_has_feature to make code easy to > extend, cleaner, such as we could move "bool has_iommu" to > rproc_has_feature(rproc, RPROC_FEAT_IOMMU). > > Patch 2 is introduce a new function rproc_attach_recovery for > self recovery, the original logic move to rproc_firmware_recovery meaning > needs linux to help recovery. > > V2-version 2: > https://patchwork.kernel.org/project/linux-remoteproc/list/?series=621311 > Introduce rproc_has_feature > > V2-version 1: > https://patchwork.kernel.org/project/linux-remoteproc/patch/20220126085120.3397450-1-peng.fan@oss.nxp.com/ > Nothing change in V2. > Only move this patch out from > https://patchwork.kernel.org/project/linux-remoteproc/list/?series=604364 > > Peng Fan (2): > remoteproc: introduce rproc features > remoteproc: support attach recovery after rproc crash > > drivers/remoteproc/remoteproc_core.c | 62 ++++++++++++++++-------- > drivers/remoteproc/remoteproc_internal.h | 15 ++++++ > include/linux/remoteproc.h | 16 ++++++ > 3 files changed, 74 insertions(+), 19 deletions(-) > > -- > 2.37.1 >