Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4775473rdb; Fri, 15 Sep 2023 11:51:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzLCIrAey7mulfw701bOvinmamirBh5c0WCFWdFHoYjhCKcNuZj/iZh/Ft5eJVjRXTonit X-Received: by 2002:a17:902:ea83:b0:1bf:7dfd:5043 with SMTP id x3-20020a170902ea8300b001bf7dfd5043mr2440657plb.2.1694803864597; Fri, 15 Sep 2023 11:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694803864; cv=none; d=google.com; s=arc-20160816; b=tgRCKITIkHMbwnWcPaiVTXMgHomgg9S9ZOx5QLA+L4KKCOwiMcB7rJPOOYCGCd6/9P LZL1j9oiA4ku+URBrc2WTLYmBhut7E13oh+Yb4di5jlSZp7M4gXIHSTmO8sCvu8i35fq XBLfkZhUZkgZTp80lJr2jhp6B6T4BsxNe2k6q6O3P2NbrrOgoh8wghMvFN1ZYUw7VDxB Gfr25STlgp2LKSsln2ADIpTR2bZf7/I5uP7aEiNPj+bM6Pvy4fIiWINxPdilwSyNn7Yj AdwQQdAaa3DDAXAiyIhxJQ7mSTAn2BZr+qOyVBYrCvmf+SgbW5u1CyAgSeHFI3CzfmWP GHIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yUCO/AVyFbbH19H95G2D+BUekPjCWba0aXfJ4Kh8FCg=; fh=jFi2bLPtgPc7RSXEPtaBdM3JP+ViGkvoD0yVjrv8QjY=; b=WocNd1vWid0ahjhD743eu81wjlPBlLZsN5OrzegSoqNRYbEVm6/NqienuMzW2SkQn2 JKFNuOcT0zj4mZ6fvFHfekprQB0d+awW/NAfwYiuXuVtvizbkdgxi/dyypNIB5l1cWWv QbRlDPZuZyJs209R9RU7bZzOBQ5QUbK/KB+wQsUrOoImPVSgJzeXDkRSByqYo+Xv40Xo x9Dcn3HXG1Otis/b+ucuM65r8JzQW7fJ2Gm7pLDQzk2ORfzNYnx/ConFG1W1BeaIrge5 bxca1te0EnJ8RxiV0QQOYA+xAM5Jy6EZ1BRbUePWdENzLAFsyypt8k2Jj5dF9BOOORXH bmIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Quh+NLtK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id m16-20020a170902db1000b001bf1d1d99f7si415543plx.567.2023.09.15.11.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 11:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Quh+NLtK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 747B58199734; Fri, 15 Sep 2023 05:44:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234997AbjIOMoN (ORCPT + 99 others); Fri, 15 Sep 2023 08:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234986AbjIOMoM (ORCPT ); Fri, 15 Sep 2023 08:44:12 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 993A1DD; Fri, 15 Sep 2023 05:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694781846; x=1726317846; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=UdF/yb3hDzUX34AS52kDXjTGovRQt8ow6ztwyihEg7s=; b=Quh+NLtKbBFx8/gUg5mEi+LGrW09rkejE03p/Nr8wHqOIe1IMRnuXjma 0o8NxEW65bHIFzgiHHXckDisNAxjJ0odXO80eWiUIrAbWEVa9NmHgsSkb IP9FUwqme8Qa6iJ6hyN/DbFylmsm73QP8F5bFx39iEdtO0eu2LRA6Kpr3 dpKH9nQbnGeSH1So5rKfPmYCU8AiUHwXoDNnHIEChl9ijRidAjTmiYKOS la4C2Lr5gOk/KT5z/S7PWNKAn5zL8ga084Uss5KhCKWv6S9BUkTvF+5jy NVjtjQpjEOol5x2u5azezVDaf/TwNJ/ote27Zyg8+i1XdaKnXsEV9oLqI w==; X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="369555957" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="369555957" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 05:44:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="1075783226" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="1075783226" Received: from mylly.fi.intel.com (HELO [10.237.72.154]) ([10.237.72.154]) by fmsmga005.fm.intel.com with ESMTP; 15 Sep 2023 05:44:03 -0700 Message-ID: Date: Fri, 15 Sep 2023 15:44:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] i2c: designware: Fix corrupted memory seen in the ISR To: Jan Bottorff , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Yann Sionneau References: <20230913232938.420423-1-janb@os.amperecomputing.com> Content-Language: en-US From: Jarkko Nikula In-Reply-To: <20230913232938.420423-1-janb@os.amperecomputing.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 15 Sep 2023 05:44:18 -0700 (PDT) On 9/14/23 02:29, Jan Bottorff wrote: > Errors were happening in the ISR that looked like corrupted > memory. This was because memory writes from the core enabling > interrupts were not yet visible to the core running the ISR. The > kernel log would get the message "i2c_designware APMC0D0F:00: > controller timed out" during in-band IPMI SSIF stress tests. > > Add a write barrier before enabling interrupts to assure data written > by the current core is visible to all cores before the interrupt fires. > > The ARM Barrier Litmus Tests and Cookbook has an example under > Sending Interrupts and Barriers that matches the usage in this > driver. That document says a DSB barrier is required. > > Signed-off-by: Jan Bottorff > Reviewed-by: Yann Sionneau > Tested-by: Yann Sionneau > --- > drivers/i2c/busses/i2c-designware-master.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > Acked-by: Jarkko Nikula