From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A9841DE88F; Tue, 8 Oct 2024 13:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728392867; cv=none; b=VOfvp/FcxAhWKHkY7yiZjdGIFQUFE+yUkImmr5UmmQDAxdrK6K6wWXBtSwOBZILq1T5+46kRYJJrmfHhvTXMmJA9IHiIwNeeqKZzDe/Tm5DDP9MdpA+bHU506ZUy7vP/4q0owa350AAngf2giqYGMH6m9Ztt6zBQSaVoUbiml/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728392867; c=relaxed/simple; bh=XL9vfowvSqD07ciabQ4+zjy48i1MNf1Wn7my5RV+S8k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LfnF2m83VLAZtf+SaNEpDdksk2e9MR6SZyy4yDuJGrY4LaaXMpP+lRMD++uMCbHlNudXt/s784V8IDFyA76Yu0aUtbY4FH+zdHZGgxVrXD+6FFpVRT1s6W2QfxgPEs4HwfCKVt5atP+CcONCtkDwDTxKEjl3wVFUdJQmvbJFWqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MHx9/AZA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MHx9/AZA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EFA4C4CEC7; Tue, 8 Oct 2024 13:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728392866; bh=XL9vfowvSqD07ciabQ4+zjy48i1MNf1Wn7my5RV+S8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MHx9/AZAbPVDzarHP72xzSgQ6OQcz+2RkgnTHoMjLNHR7138mGk6KvLN2/OvKfii0 nt2ES3i/cvSCMBfwl5kQ34w6+SHrruVSeU2IH4iWc0PSIwKrtetbcXtpopZmqxQIPq 5Ui0XADINWWW8q2r9t2P7FLIV8//pZ+DKy1P/FDU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Udit Kumar , Beleswar Padhi , Mathieu Poirier , Sasha Levin Subject: [PATCH 6.11 541/558] remoteproc: k3-r5: Delay notification of wakeup event Date: Tue, 8 Oct 2024 14:09:31 +0200 Message-ID: <20241008115723.524933855@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008115702.214071228@linuxfoundation.org> References: <20241008115702.214071228@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Udit Kumar [ Upstream commit 8fa052c29e509f3e47d56d7fc2ca28094d78c60a ] Few times, core1 was scheduled to boot first before core0, which leads to error: 'k3_r5_rproc_start: can not start core 1 before core 0'. This was happening due to some scheduling between prepare and start callback. The probe function waits for event, which is getting triggered by prepare callback. To avoid above condition move event trigger to start instead of prepare callback. Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before powering up core1") Signed-off-by: Udit Kumar [ Applied wakeup event trigger only for Split-Mode booted rprocs ] Signed-off-by: Beleswar Padhi Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240820105004.2788327-1-b-padhi@ti.com Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin --- drivers/remoteproc/ti_k3_r5_remoteproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 6424b347aa4f2..2992fd4eca648 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -469,8 +469,6 @@ static int k3_r5_rproc_prepare(struct rproc *rproc) ret); return ret; } - core->released_from_reset = true; - wake_up_interruptible(&cluster->core_transition); /* * Newer IP revisions like on J7200 SoCs support h/w auto-initialization @@ -587,6 +585,9 @@ static int k3_r5_rproc_start(struct rproc *rproc) ret = k3_r5_core_run(core); if (ret) return ret; + + core->released_from_reset = true; + wake_up_interruptible(&cluster->core_transition); } return 0; -- 2.43.0