Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1288343rdb; Sat, 18 Nov 2023 09:57:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEY/qG3/V2sXpgTDCk+Ux5vhc7s9PYCFhn1kMuLVWWkQfm/k8+dzXaBYwM06N9ZmSebBTVa X-Received: by 2002:a05:6871:521e:b0:1eb:192b:e75b with SMTP id ht30-20020a056871521e00b001eb192be75bmr3439174oac.40.1700330254208; Sat, 18 Nov 2023 09:57:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700330254; cv=none; d=google.com; s=arc-20160816; b=qMUJREwCT6lCApIsDqpe35v/R1ArZ5bmT98gGHfUq0uzyUd7Qm4N5Dus26ceZpMDyM w+MfR18y5Ij6lBNgdQqEplTInH6v9lBAK7RKVNK2nFYBAbXhlzhkKfEp0G0PkQ1rOjvs e01H0JIsD4xCxwBNi2LfKf40wtOhya8Oldc14cfkbK2wlY92//TtDomEpddw5/1/NRWS gkvsp8Uu9uQxAQCwAsKAX5PnU/l2iEagZXL/lQnKdk+k2jMa6tGhV1t7lUnL5zQ5LH8r Tp+Np1pWtAQvCTEVTcDxtsxvOrEcwpOJiCi9A2z1OWCmec5TRE+AEpAv0cWIUuC5ZtNl s0DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eduw7ZGLL5eENX3+AcWvHdPEGppFMGVV13Yx0vFVox0=; fh=DCYL/lBNfOx9gWFlsRVpef0een5XrMqbix1iImfKJCw=; b=ar+HUTyvPV8i8WXkW6OwUDp9C3OnCwwveQQAveaPWQDRjNyjKSAWN/c5k4p2Zh9LGf /d1nSF+CyxfNipXbvv5xGtKF7vxuylwSVt686mUesq9DFCcbO7bWL9n9qV4pSBsydttk 6PYDPZ9STfdtwvKkQmVvBJ94KvGe5viFWeP9JzKRLbFN+DPXwyF9JompsaDU6gzoHkP2 k8OBwE4i3oIhQAUzPtSPcQQlWBFKCJfwX3jMOkTHow1wcabNroRnKeKckZaJmexponf7 Uzmqseq/31k8b6K6KzHhrd11J1mz164VkZI8ASOtXustzrY17i0qjI3gIKoViBivMo38 1fxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RHTYULPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fd16-20020a056a002e9000b006bc3f09ea09si4832305pfb.26.2023.11.18.09.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 09:57:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RHTYULPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id A343580B5A37; Sat, 18 Nov 2023 09:57:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230018AbjKRR5Y (ORCPT + 99 others); Sat, 18 Nov 2023 12:57:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjKRR5X (ORCPT ); Sat, 18 Nov 2023 12:57:23 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 218EAAA for ; Sat, 18 Nov 2023 09:57:20 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9f26ee4a6e5so422528766b.2 for ; Sat, 18 Nov 2023 09:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1700330238; x=1700935038; darn=vger.kernel.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=eduw7ZGLL5eENX3+AcWvHdPEGppFMGVV13Yx0vFVox0=; b=RHTYULPADunx/kNpYRdFn2trk89MqvzIEwy3gxnkQh6r9sollWjeI7XJ7Ca4YySUhI U9pilWNFof+0V8YfwM4WQLhQSrg/6uRqywl+jdR7TcFoCrHsB1XPxokyC/sMPuVxDx81 I3hE92342075xFLHifE/lR4cLN/XEpft7lQCk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700330238; x=1700935038; h=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=eduw7ZGLL5eENX3+AcWvHdPEGppFMGVV13Yx0vFVox0=; b=pP9qAqcBA2SFTCkAckytOwese5J1yX6kD1mKLUJx5wzUwN79pDPCPoQjP/eah85NIr rKWH111sxybcI/+fIW8sEizFS87Cea5WaZGyVyLPA5Apfo8TfGbh65H5pDsiQoxmmFby jM9mmF9d21xdkBpKwO0VaVyOwdTo7addiEtFQPVTDYWPi/uyk0AeSoCwgjFwq7iXw7O9 /MNKPRNQveAUVKB4vat2RMMKiIm2GR437CxisWNsN4pMS6M+t0jAVbpEdeCWVE17R9B5 1lD7pgYul8HKlG9JwFCGe3GZaM5gwKRgqBIorpO7F1oHZl2kE5QJwMVI4DlRt5idiId1 iLaA== X-Gm-Message-State: AOJu0YzLn8zSw9MZegiNRLLyuPmSOzgCP3Fz+QBDM9cCp/wRq/ucHvbJ LiyfiAxCNdeWimqICWk756fXyuJCcQEiQzrN1PB1wJAk X-Received: by 2002:a17:906:f54:b0:9d0:2da2:ee64 with SMTP id h20-20020a1709060f5400b009d02da2ee64mr1971745ejj.70.1700330238469; Sat, 18 Nov 2023 09:57:18 -0800 (PST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com. [209.85.208.47]) by smtp.gmail.com with ESMTPSA id j12-20020a170906410c00b009f293faf75asm2092776ejk.97.2023.11.18.09.57.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Nov 2023 09:57:17 -0800 (PST) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-545ed16b137so4191858a12.1 for ; Sat, 18 Nov 2023 09:57:16 -0800 (PST) X-Received: by 2002:a05:6402:26d4:b0:548:7a3a:ef39 with SMTP id x20-20020a05640226d400b005487a3aef39mr1440410edd.35.1700330236507; Sat, 18 Nov 2023 09:57:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sat, 18 Nov 2023 09:56:59 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PULL REQUEST] i2c-for-6.7-rc2 To: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Rosin , Bartosz Golaszewski , Andi Shyti , Catalin Marinas , Will Deacon Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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]); Sat, 18 Nov 2023 09:57:32 -0800 (PST) On Fri, 17 Nov 2023 at 16:05, Wolfram Sang wrote: > > Jan Bottorff (1): > i2c: designware: Fix corrupted memory seen in the ISR I have pulled this, but honestly, looking at the patch, I really get the feeling that there's some deeper problem going on. Either the designware driver doesn't do the right locking, or the relaxed IO accesses improperly are escaping the locks that do exist. Either way, just changing "writel_relaxed()" to "writel()" seems to be wrong. Of course, it is entirely possible that those accesses should never have been relaxed in the first place, and that the actual access ordering between two accesses in the same thread matters. For example, the code did *val = readw_relaxed(dev->base + reg) | (readw_relaxed(dev->base + reg + 2) << 16); and if the order of those two readw's mattered, then the "relaxed" was always entirely wrong. But the commit message seems to very much imply a multi-thread issue, and for *that* issue, doing "writel_relaxed" -> "writel" is very much wrong. The only thing fixing threading issues is proper locks (or _working_ locks). Removing the "relaxed" may *hide* the issue, but doesn't really fix it. For the arm64 people I brought in: this is now commit f726eaa787e9 ("i2c: designware: Fix corrupted memory seen in the ISR") upstream. I've done the pull, because even if this is purely a "hide the problem" fix, it's better than what the code did. I'm just asking that people look at this a bit more. Linus