Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4903821rdb; Fri, 15 Sep 2023 16:34:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6e7LFLi/tPvCcVJ3O4O0kQf0zxStgKwFrVOXSmh/4Gc6nxTeDZUq1fNdGnJYS2DfJCgTu X-Received: by 2002:a05:6a00:98b:b0:68e:399e:70db with SMTP id u11-20020a056a00098b00b0068e399e70dbmr3177246pfg.6.1694820853992; Fri, 15 Sep 2023 16:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694820853; cv=none; d=google.com; s=arc-20160816; b=EXAZKqYUmmK/Lyg4YpcXn/3c3YEPD1fqG4ITwRtbGz+H3aAIqxcplB5pTdk7rLYN1n oBLFeAuXC5yte1lMfkv4hgfKatNHqMz6b1VAJhlxkpSm0boekr9U7zaBxV4rBD56JUqM t7BUJ6cZ3lfR0Xc1Ur6AKhLTQxSa827YkYeJQGKdVJypRhKVQ/Z5hFg9Hvso7QqsADpk 5riqZmwiprtM/qq8fWFQVD0AmUF9PUH/g37ddRu+2mv5ntWXdpSDtyDRcxNqgUEmpS1t lk0up17d8CVxxc1FLlL03NuPoMCBOVATURvY0BedClT1352YWqwKHj93sJejJWJ5Xgas 0mjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ilYfsyq+BJsFVTxktZHqw1HBIfGkbTD9/5FutPQoU3g=; fh=NcmzeAJmSG9ix4zLgQ65nuU4bRmmUrlJWEEWyVX0bWY=; b=Rnev2gQ91ulUrFrAjJSPGqkRr7LgUzDNuDb46WyRLISKtEXX6yZbaZfkxmViPadN2S mSIAFFjUR3aeflPKqjPjmzNV7o5I8e8E8KxH3SuNfQeg6e5maSESv1QthlpontrDzCBH jmgMCnRi0426GkkH7m5hOxpth6j2ki05v0BzbHNiDgYLphpNfuimMwWgQhYjtUzkeXpx UB1RVwEhULcEnd23gf8KlHFzfFMhmIEmBy55wqPblunqfbzCOBt2hsKZCwZUfi4sXyua SUjL9SxC4EXDnv63FedqL9MbDYeTW/ia0JvKybXR/fC5kFHf0mMcSNCoEN95lfuzb5Hb joXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Zhp9JyuZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bt8-20020a056a00438800b00687427c1ac1si4136444pfb.25.2023.09.15.16.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 16:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Zhp9JyuZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 938A0801CBF0; Thu, 14 Sep 2023 11:51:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239845AbjINSvh (ORCPT + 99 others); Thu, 14 Sep 2023 14:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242102AbjINSvS (ORCPT ); Thu, 14 Sep 2023 14:51:18 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 677C659CB; Thu, 14 Sep 2023 11:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694717200; x=1726253200; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZFTGHd2goKP49eo3E216ua07cqRAw0uQyfYqJT6GITM=; b=Zhp9JyuZM15REk5YYLvGhwpvakDxyAnOWJJQvRaOqqJBKuQ1de1SuBIz +VpgrVQNbgOjlBN6Z9BygPm2ypmcprRjLIcgDYtccKuON1l9ipE0hf0n+ twy2TzxLoqz9MHljJhL5dUUY8aZwur1XlRwMq4bRD2+XdLdTOjzk4b6mi LJG8a0zKWkJQTuGOnILFs8R/D2bOltCyrDQKZxoXehvFsLNzPDCbvCrRj J6vqeVbDHpS9/BdTlfyr7Kx4sQNGSEkp6Pz4FA2ngRMZNTNir+dZL4Lra ZmRduqSm24Xj0c1s+FPhc0ZwoBjyIu2MDn4fLMSdVA40wQ7aVSO9fRgVF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="369342510" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="369342510" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 11:46:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="773985624" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="773985624" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 11:46:37 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qgrMI-00000008KDm-0Wji; Thu, 14 Sep 2023 21:46:34 +0300 Date: Thu, 14 Sep 2023 21:46:33 +0300 From: Andy Shevchenko To: Jan Bottorff Cc: Jarkko Nikula , Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Yann Sionneau Subject: Re: [PATCH v2] i2c: designware: Fix corrupted memory seen in the ISR Message-ID: References: <20230913232938.420423-1-janb@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913232938.420423-1-janb@os.amperecomputing.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 11:51:37 -0700 (PDT) On Wed, Sep 13, 2023 at 04:29:38PM -0700, 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 > --- Changelog? -- With Best Regards, Andy Shevchenko