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 AB508C54E4A for ; Fri, 8 Mar 2024 09:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KQHrNGDzGq3WCDjeileEOm+Zy9MvYuULsr8eYgvp+e0=; b=E1dCNYYNJ1ipD4 DN8ttDnHfiZBjvGl7RjK2kFzOblhVZbD+iyHisahTfyWjodEkjtv50piza7UyS31x2BdRP7iIgtf0 APOVYvbupYS3it4Y3ree+6n/EWdkd6cjtJqirfA+D4DkGOJ0fH49HvWLrNrBvmTq+Q3/V7Ymxcfbs /WGSAXRTYLGi5pZNoUaxXhTR68ksBgUwa5xb+qtJFumjwGi1w82FB1uQWb5eNFZFna9zUyFfvg8+H ZLs2o3f7oNpSmojmEDydVfrKtXySJ/lWOSBlD28SbwpmYR8+yPVeumKbA/0fDgAG+KEKv28t+PxBA ju9NF2dz8IVHJLfbVMCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riWum-00000008dv0-2a42; Fri, 08 Mar 2024 09:53:20 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riWuj-00000008duC-11kd for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 09:53:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CDA69C15; Fri, 8 Mar 2024 01:53:51 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 38A9B3F73F; Fri, 8 Mar 2024 01:53:14 -0800 (PST) Date: Fri, 8 Mar 2024 09:53:11 +0000 From: Sudeep Holla To: Shivnandan Kumar , xinglong.yang@cixtech.com Cc: Cristian Marussi , Sudeep Holla , linux-arm-kernel@lists.infradead.org Subject: Re: [BUG REPORT] firmware: arm_scmi: Shared Memory Overwritten in SCMI Mailbox Communication Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_015317_360969_840B0119 X-CRM114-Status: GOOD ( 23.31 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 08, 2024 at 08:33:17AM +0000, Cristian Marussi wrote: > On Fri, Mar 08, 2024 at 11:46:07AM +0530, Shivnandan Kumar wrote: > > On 12/13/2023 11:32 AM, Xinglong Yang wrote: > > > The shared memory is overwritten happened in some condition and the detail are > > > as follows: > > > Based on mailbox transportation. The thread A is waiting for response and The > > > thread B is waiting the mark_txdone() to submit the next message. When the thread > > > A is timed out because that the callee do not reply promptly and then caller begins > > > to tx_tick() for the next message(for thread B). At the same time, the shared memory > > > is written by the callee(response for thread A) and set channel free. After the callee > > > has written the shared memory. The caller written the shared memory again for > > > thread B. In such case the shared memory written by callee is overwritten by caller. > > > Later, the caller received the completion IRQ for Thread A(BUT has been overwritten > > > by Thread B's tx->buffer). The caller checks the shared memory discover that the buffer > > > is error. Which case triggers a chain of errors. > > > > > > The part of error logs are as follows: > > > [ 19.135368] arm-scmi firmware:scmi: timed out in resp(caller: xxx) > > > [ 19.508536] arm-scmi firmware:scmi: Invalid message type:0 for 301 - HDR:0x%X state:1 > > > > > > Because the same token ID are received twice by caller, the second IRQ with the same token > > > will be treated as invalid message and abandoned. > > > > > > Regards, > > > Xinglong > > > > > > _______________________________________________ > > > linux-arm-kernel mailing list > > > linux-arm-kernel@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > > > > > hi Xinglong, > > > > Hi Shivnandan, > > > I encountered the same issue recently. > > Is any fix identified/merged for this in a separate thread? I assume you are running neither latest upstream nor the latest stable trees(v5.15+) > > This fix has beem merged back to 5.15 stable. > > https://lore.kernel.org/linux-arm-kernel/20231220172112.763539-1-cristian.marussi@arm.com/ -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel