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 B4C2BC5475B for ; Fri, 8 Mar 2024 08:33:44 +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=pFnh8cSNCUMzBu1fvozpvhVTgD0OXJiuoWTO3YoJ6Ys=; b=Hd91IGr7infJpO 4SBuTYX0HbU4bUuGiXjixUB5xiOhK73MI1Bwyz1Du0MPl6/oh32IkyNLbNqRAjl1fVpaYBKJD6EhT 9gn3PosBxSFcHPUSZq8mEDAQd0/6QE4iE9IpTci4MDGPabDVyWNYBc2aZtd6Q+49z/bs2DuRA8ZQa 41DiIf2N7na8qEbeaZ42MYgtBcMaH0qe+WZoKBEMm6SGwIfcE212SHSRMHcG9YdQUK9STIl6nYuf3 2cGLMalcf0T+2Sk42bUhnUoujTQdyOUifTMX3cSYfIlPpiAl/u4InaNyR7bm2luVkghaIoRCOCuLl fgDytA69pdjTx5fIbvSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riVfS-00000008KdR-31NC; Fri, 08 Mar 2024 08:33:26 +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 1riVfP-00000008Kbh-144f for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 08:33:25 +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 1B234C15; Fri, 8 Mar 2024 00:33:57 -0800 (PST) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A22D33F762; Fri, 8 Mar 2024 00:33:19 -0800 (PST) Date: Fri, 8 Mar 2024 08:33:17 +0000 From: Cristian Marussi To: Shivnandan Kumar Cc: xinglong.yang@cixtech.com, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com 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_003323_357156_CC6F7FAD X-CRM114-Status: GOOD ( 19.81 ) 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 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? This fix has beem merged back to 5.15 stable. https://lore.kernel.org/linux-arm-kernel/20231220172112.763539-1-cristian.marussi@arm.com/ Thanks, Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel