Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2392317rdb; Mon, 20 Nov 2023 09:33:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IF88W5BXCXXasCizqdpaIXgi4NXCSQN4fPKiEDtVIle4oh0KcQbWbpTaOFGYREovEZbYybe X-Received: by 2002:aa7:9a86:0:b0:690:c887:8cd8 with SMTP id x6-20020aa79a86000000b00690c8878cd8mr6579874pfi.32.1700501587276; Mon, 20 Nov 2023 09:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700501587; cv=none; d=google.com; s=arc-20160816; b=LJJuJrTkRoYWG5gzcZBHzi3TlL639x9+SWhrsTLV6W4II3A65548/uSzyl3oEa5lPu ghO2DAlM7FPOk5I9siiJ3ynrQ3WDg70OCXIdaMu2FKnNhql1Zrj/S4td1eTyCR6BmyGg ZCumuC6fNRTzMi0kQmSugbF7KKTydy+F8X1zyn+xmrdM/TOJgME7hjmh404G0RnA5tz9 wfk7EXOdqBnxxgv0kFiTb26S618zQbElVuds4caikiIz2evRaJaRnXJBGrCDloZenNtZ 6oq2g1Jv3STUghg2aJgQcYSMxgrIPYXlJIqLrrnRnMZ8U654+5H5jIsAiJQVD5QHGWom pOdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ObGB9aqfCaCmROEd5HBVW5NBm+BS50G0iVX32TIItAM=; fh=x4L3d+cCyiJ4zWpGdpzynGfctmC+RfjJ4Jw9lgpVpxs=; b=CSJaabDPZBR6UVF942cmF80Us/65CboLENocbZbOKLBXDkmY+R13yPyAKaM9e7ZrCT VcMsL4gj9QyfN5NrLZowtX4u709kcjRsI7BX2Gkt15FwjTp7e0xi9nxNE9Tzx47rRWdP TXZJPl+e3m4gDZ8r8mWX4okrcc8fwoZ/eoxDBXWelcMirbCExMH6xVUU/t+pXXp8F3s+ YmGDScz3tSnJmJ7ZkHHtMP07gdYffSkgbukREyNDl5vFRiIktCiYIFMq9nR58JKNobZ7 7uqKxaeRbsGPu3i5u/UrV/uBkbbZsj6qP1nYQvew8GDPis8hfo3QKOh96FZnjO4tj2db bk0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KrxNkRWr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b11-20020aa78ecb000000b006cb68d85220si4423827pfr.286.2023.11.20.09.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:33:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KrxNkRWr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 401EE803FC04; Mon, 20 Nov 2023 09:33:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233804AbjKTRci (ORCPT + 99 others); Mon, 20 Nov 2023 12:32:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233789AbjKTRcg (ORCPT ); Mon, 20 Nov 2023 12:32:36 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A98112 for ; Mon, 20 Nov 2023 09:32:31 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a00d5b0ec44so54469766b.0 for ; Mon, 20 Nov 2023 09:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1700501549; x=1701106349; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ObGB9aqfCaCmROEd5HBVW5NBm+BS50G0iVX32TIItAM=; b=KrxNkRWrgjXD0iLA1/Gl/7DRujhTakCf2ufYDnJ+d+B9ftQ23o1dzeWJGrih2iDMC3 lsu9+NkIFCJSbun3E1WyM93byGTZvxknTQbVAo/He95+b/RZqLYIQKaR+1Wlme5lRILh WIMFPQrgVGXazeu/zlgQrTHSvA3U+s4lU3rDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700501549; x=1701106349; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ObGB9aqfCaCmROEd5HBVW5NBm+BS50G0iVX32TIItAM=; b=Z/aXvbe6rMWDaSAhPJuC0CUvrPVrcTsc1wrq420tCNnTsMQBVU6t9WP8s2MUjWapdU XpSoql5fTgmup4xc56ilyLeM1UTZmJO3KuHxNYp8I9kk0nr1cL1ybWf5snTCX8AyOA7e F3P0edAjmtRXV0R7d16mVyDUGrZYVx6dKnIVX/i1dww81oUaYMG6JXmf/IKMiTIvI47R hK4UbJwLKAJb7PezlqYw/EcHJZQwfkacLcLnCnOjrgu5h1QVDR/HClVaFzjis8Dt3KQv 3+F4mFPzNWo9nRiwCTyVoAtw0IM+FWQtP4AsXxRGP7gwA3EePWR0K+zJ2TRVOqEaWGUo 4wiQ== X-Gm-Message-State: AOJu0YwiYG7xVfAl3qV7nDAjzln+UsYqea5Juc20vfkhKqDb/vfSAXli 6bLMKvMaBLa20O2dR9mT/BOf6F1z4sx0+eGVRbFXnQ== X-Received: by 2002:a17:907:d40a:b0:9c0:99c4:79e8 with SMTP id vi10-20020a170907d40a00b009c099c479e8mr8492215ejc.6.1700501549373; Mon, 20 Nov 2023 09:32:29 -0800 (PST) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com. [209.85.208.51]) by smtp.gmail.com with ESMTPSA id g3-20020a17090669c300b009ae69c303aasm4095664ejs.137.2023.11.20.09.32.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 09:32:28 -0800 (PST) Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-548f0b7ab9eso301489a12.3 for ; Mon, 20 Nov 2023 09:32:28 -0800 (PST) X-Received: by 2002:aa7:cccf:0:b0:53f:6ed5:4dab with SMTP id y15-20020aa7cccf000000b0053f6ed54dabmr62888edt.24.1700501548302; Mon, 20 Nov 2023 09:32:28 -0800 (PST) MIME-Version: 1.0 References: <20231120150515.GA32570@willie-the-truck> In-Reply-To: <20231120150515.GA32570@willie-the-truck> From: Linus Torvalds Date: Mon, 20 Nov 2023 09:32:11 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PULL REQUEST] i2c-for-6.7-rc2 To: Will Deacon Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Rosin , Bartosz Golaszewski , Andi Shyti , Catalin Marinas Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:33:01 -0800 (PST) On Mon, 20 Nov 2023 at 07:05, Will Deacon wrote: > > and I think the high-level problem was something like: > > 1. CPU x writes some stuff to memory (I think one example was i2c_dw_xfer() > setting 'dev->msg_read_idx' to 0) > 2. CPU x writes to an I/O register on this I2C controller which generates > an IRQ (end of i2c_dw_xfer_init()) > 3. CPU y takes the IRQ > 4. CPU y reads 'dev->msg_read_idx' and doesn't see the write from (1) > > (i2c folks: please chime in if I got this wrong) > > the issue being that the writes in (1) are not ordered before the I/O > access in (2) if the relaxed accessor is used. Ok, then removing relaxed is indeed the right thing to do. Because yes, it's an actual ordering issue with the IO write, not some locking issue. Thanks for filling in the details, that patch looked iffy to me, but it does sound like everything is good. Linus