From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8653C5321D for ; Mon, 26 Aug 2024 15:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b5++6viK3zYZWJbNYQZb73hz3jjchrb/vDCmq+vJ2U4=; b=jQ5XX82yaLcPFpRdlXK/m+mfiQ hv8bWGdsBaf3xwCs9+Kg1QiDlvZAeVqT0QK6T5hVczWo6mlQPp9BObQTpSFGRBDWUwHr5pxpYamZ1 eGgao/iuGEkt3h/ccNuyoeWxx+3O1Rtgt7ceg7t2Jafwa5R+TcphVHgY6avQ/sWKRonA50qRNfgR/ 5jqu9yYtAkIeHkXZlxUkp5lWlcp7TjjEAE7yben5a8vPoR4wfVP2C5DMkMwa4BSYwU6eoD9s1M0Mf h5P0vmWYSBku4f0ixEW5saQ6tfo6VAP0CnQveL8ZB9KEdLssuCqsvw21C75iMdCW5rEk1LqB4BmIJ TSR9yITQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sibiR-00000007q3R-3juZ; Mon, 26 Aug 2024 15:33:11 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sibhF-00000007pWo-1R63 for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 15:31:59 +0000 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2d69e2a88e8so862676a91.2 for ; Mon, 26 Aug 2024 08:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724686315; x=1725291115; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=b5++6viK3zYZWJbNYQZb73hz3jjchrb/vDCmq+vJ2U4=; b=hmFcaDAIeLp+DRScZSsEF2v8m06XTAHZ4rIA53U3KYeFCrcFVwU9xCjnvysy9qm9nI iKcKp0RBxkAnVaL1m8dXj65IL73eY08jpK6x9/4aJRVBx000Rklz+kv4l31CSc0UHq30 WQme4eRpXVD2zoIKNkQWy5a68LVVOjPv4o25emeyaYh4inOmC8RXhGbyPV36MouGH5MG osl0oSuvVP/OW2DpPxm8atbKXYiYhbv5kflQW6g3VvmCgFEPVkxIeRDSMZHRD3iDDFSF 069Tk+ZoRLH9Q2VTeuOLX81l12tXtiVFe9zij5xZS+qCsNMdMylXkAaZMWL9xPF5eoki xNag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724686315; x=1725291115; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b5++6viK3zYZWJbNYQZb73hz3jjchrb/vDCmq+vJ2U4=; b=YOQ6upJT5KKZiZR+lQfSuebFgugDkzWIrnK8+Wo0tZp+KOQEMdIu7Rt3kmegFZOqol RXidKbfAQkF5pjZ2+07uBpNBGdJfquadwf4r1MTJSBEgDcJugB6SQZDLjnp0Z/DrFM8q tI2PuTgcHGHE1cuXyBA3g8p4iH3se3iCz5uX+8d+dau5D4gpNBLSpd+y3CvBToxAKOsn o9NC7/at3URz77+TMEA6W5cjG5nwA/KrhJJ+upQnz3hiQ1apBzKeg7ALuoYpPUaZedHA R0BOr08d0OQNKraTNQc+vWL81Sk5J24xxn/GmXdtNX9mSNTCGKA81xu50462qY2YGh0g B51g== X-Forwarded-Encrypted: i=1; AJvYcCWMh+QvYjFYOs00s6g6+8ulBt+jDxazN3GoMxRm6SkNdFHdidk29QL/o2H8iRLu5+iJyTBwqYQe3HMfYiU/Ymjz@lists.infradead.org X-Gm-Message-State: AOJu0YwTe+9STMaUdx9K4DZt12wPW0+69WzJ6Etsl6czadrHzQqGpkKv 3k/Sw1GlCHRP6optzgmbm5RM8f/bt+/A/sVN2a9lBm3STnTezO1l7dad3NjShdg= X-Google-Smtp-Source: AGHT+IFat5E7ycTJSdkRmb690GFUDdXL/SJqFXqM0lbjqbfMedPx08c7A4wYVc/U8aWkzS3LORhuZg== X-Received: by 2002:a17:90a:1f88:b0:2d6:1981:bbf7 with SMTP id 98e67ed59e1d1-2d646d2bbd3mr9746593a91.32.1724686315109; Mon, 26 Aug 2024 08:31:55 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:841:3fb0:c1d:cf23]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d61968ecc7sm9674318a91.54.2024.08.26.08.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 08:31:54 -0700 (PDT) Date: Mon, 26 Aug 2024 09:31:52 -0600 From: Mathieu Poirier To: "Peng Fan (OSS)" Cc: Bjorn Andersson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Daniel Baluta , Iuliana Prodan , Marek Vasut , linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH v3 0/2] remoteproc: imx_rproc: support non-blocking tx for i.MX7ULP Message-ID: References: <20240822-imx_rproc-v3-0-6d943723945d@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240822-imx_rproc-v3-0-6d943723945d@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_083157_500296_C18F5F5E X-CRM114-Status: GOOD ( 24.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 22, 2024 at 09:48:48PM +0800, Peng Fan (OSS) wrote: > The i.MX7ULP Cortex-A7 is under control of Cortex-M4. The i.MX7ULP Linux > poweroff and restart rely on rpmsg driver to send a message to Cortex-M4 > firmware. Then Cortex-A7 could poweroff or restart by Cortex-M4 to > configure the i.MX7ULP power controller properly. > > However the reboot and restart kernel common code use atomic notifier, > see kernel/reboot.c: do_kernel_power_off, do_kernel_restart. > Linux 'poweroff' cmd will trigger kernel 'do_kernel_power_off' > Linux 'reboot' cmd will trigger kernel 'do_kernel_restart'. > > Power off and restart are totally different operations and are not > complementary. So need to make sure the mailbox be changed to non-blocking > mode in SYS_OFF_MODE_POWER_OFF_PREPARE and SYS_OFF_MODE_RESTART_PREPARE > stage. Otherwise with blocking tx mailbox, there will be kernel dump, > because of blocking mailbox will use wait_for_completion_timeout. In the > poweroff or restart case, there is no need to wait, because after M4 got > the message, M4 will put A7 to reboot or poweroff. > > patch 1 is to support non-blocking tx mailbox channel > patch 2 is to switch to non-blocking tx for system poweroff or restart. > > Signed-off-by: Peng Fan > --- > Changes in v3: > - patch 2: Introduce an flags entry for dcfg and set IMX_RPROC_NEED_SYSTEM_OFF > for i.MX7ULP, drop used "struct sys_off_data data" and add comment(per Frank). > Drop R-b of patch 2 because of this change. > - Patch 1: commit log rewritten and R-b dropped. > (Thanks to Daniel). > - Update patch 2 commit log and cover-letter to clarify reboot and > poweroff are different operations and not complementary > (Thanks to Daniel). > - Link to v2: https://lore.kernel.org/r/20240719-imx_rproc-v2-0-cd8549aa3f1f@nxp.com > > Changes in v2: > - Separated patch 5,6 from v1 > - Update commit patch 1 with adding "No functional changes" > - Link to v1: https://lore.kernel.org/r/20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com > > --- > Peng Fan (2): > remoteproc: imx_rproc: Allow setting of the mailbox transmit mode > remoteproc: imx_rproc: Add support for poweroff and reboot > > drivers/remoteproc/imx_rproc.c | 54 +++++++++++++++++++++++++++++++++++++----- > drivers/remoteproc/imx_rproc.h | 4 ++++ > 2 files changed, 52 insertions(+), 6 deletions(-) I have applied this set. Thanks, Mathieu > --- > base-commit: 33a32de2d79c051f27ed57c4ac90cdb406f91928 > change-id: 20240712-imx_rproc-25f3ab753c58 > > Best regards, > -- > Peng Fan >