Received: by 2002:a05:7412:85a1:b0:e2:908c:2ebd with SMTP id n33csp143231rdh; Mon, 30 Oct 2023 17:12:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERKFR5SDNgEnHj8Mpiy0xJDpmIrdfxmkUb7cOMuDI1lSsa68fHMbyXuWUUK6q3CZeGI+eC X-Received: by 2002:a05:6a00:1390:b0:6bf:5131:884a with SMTP id t16-20020a056a00139000b006bf5131884amr13962056pfg.6.1698711150111; Mon, 30 Oct 2023 17:12:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698711150; cv=pass; d=google.com; s=arc-20160816; b=DvnxuKe25JuURaP5coFpmaO2uWwqUdg2AsZ0I4amdL3k5okURYxtVerdiV6BmTYhcl zzPuysPIr7H4oiFD416e8SW72HHCOFVq1vFrBMZ0AfgyJsazGf5bi6bpyT9SG+JkvKff vat+fNaC6XHAQ2bX9KnDGBuqBwjO81CjMfvNqOoSIt7Yu2Hbgc82oLN7IiC++jn1e9Hl z/Q1VcPoqs6/39rPhYf23/NpXYXsSyn4JIGntmDemdoQ9fYTZlGgJXd+Os/qoMNXXa+K TZH8hRiw8Ne6Bu4PbreT8QIK+junkZu1B+mMLw+5vPAG2WS7pyFDym418ZosvpmNCM1P sj3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:to:subject:user-agent :date:message-id:dkim-signature; bh=79XTSpNPh8yggWvN33t26vl+zUZMcPti2pvLzCMs1IY=; fh=tR4vjc5oopORA22s/saQaEh9/oeKxuEmDVpQp8o3VuI=; b=zZ3f+AgT6DsQKjTOmd50KvQyh4eRIvblmR0Zn8H07JEjitQY2iaD6jpRSl3E979Za3 ZSaywxSJOGETsQMt+xQXI01leNn/gJuUebxcUyLHJNHL4yaJmomEfLuElZxA0SLBAX2w 80bA6gU5lV2mUrajbgnFSJvVw7roR48/Psgmq3lU4tWiFFfO2AdP+3sXuA69ntfcFI5v 2tBmGKAu3xEcoHWFoaq1szgwnSv1zqBXNTGsf9cA45tzqMUG6PapCy3WryHPnkDMyDh9 tsGCqiTJ0ufgizNGPwChnxWFHV7AHdW7U6NLBDpV+l3djQHpaeafP8EVlBa60aWONgYR YRKg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=qLPIcYRA; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q8-20020a056a00084800b006b70c01a08dsi136430pfk.161.2023.10.30.17.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 17:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=qLPIcYRA; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 58D3980569B9; Mon, 30 Oct 2023 17:12:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235780AbjJaAMP (ORCPT + 99 others); Mon, 30 Oct 2023 20:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235772AbjJaAMN (ORCPT ); Mon, 30 Oct 2023 20:12:13 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2117.outbound.protection.outlook.com [40.107.244.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B6CBB3; Mon, 30 Oct 2023 17:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1RFuSawjZc2SWXjYkzSWi5ArCzoAyISeTgCd0XIipKxOkiTXVauMzI0GDQ5bqL44c7PE17rg0EmPJfHpMuI4woW4/LAxgxjTXjQfR55KiobS3y1SBmD0ddaG312WYKmqD9tPCas1rY/J2hOSayWLDQKamrnDQLFx4CBA6mK+7mP5h0be8TOJdDWGVvpVWqum7XQ2rD/EITYbWWHdyNCisosH3/HQof9r5pOV3Dh3/u/jWXgeDjqcdDqblR1IVlp4xYF7r5Xbd3yREu0DDTkjpCHjOvZuuefWefYX7igCYhN430I2tq6LyX+JxfH7yfzhosDnyo82iVcUTQkQQrACw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=79XTSpNPh8yggWvN33t26vl+zUZMcPti2pvLzCMs1IY=; b=PjiKDr7VUEV1CWaqB+k+33yl6Koz3tXcT1WSlovPWB+sylzj1emHHMKaRkj4E+lQ+Z0NJff1+O/+0qRTe9gLDwwzc0zeZGkcir8YKejBH5EHQVQokV9gyczXBmfRt2RtgSd291ezFoucwAIOLmlAAGvfeDVxv9AyR7+iFljwhqj51XvPk7kuys7ZFLU8lChvbV7ACxLjPdWA36xG+aIvkT2JeIHw3EBwKsLHjciUsL/2HXStDVQZfXiH7EMWXl2SZq9am5ngSb6B4ansq4bcwKbyf0GtLotJMqncCUi9p+mtiAZYXiTPJn5Q+2uQW2ks1KIpLNMabMVXwYAkFvmScw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=79XTSpNPh8yggWvN33t26vl+zUZMcPti2pvLzCMs1IY=; b=qLPIcYRA9kgtBnM8K4r3ze7W3jpZG8Rgs6ztbEuz1jU5YT/+017gPmXprah2q3H96/+vQyeD0mrVzzhgqR33TDHseIEgFiKqtT/WloFOLaHYEJywCKLGd0qUOo8ulAQwnIl4/+QJMVoT0xInAy+jhoKO8yGJ317la6UptkPSe8U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7475.prod.exchangelabs.com (2603:10b6:510:f2::9) by LV2PR01MB7744.prod.exchangelabs.com (2603:10b6:408:172::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 31 Oct 2023 00:12:06 +0000 Received: from PH0PR01MB7475.prod.exchangelabs.com ([fe80::b84:304e:acf:afcb]) by PH0PR01MB7475.prod.exchangelabs.com ([fe80::b84:304e:acf:afcb%6]) with mapi id 15.20.6907.032; Tue, 31 Oct 2023 00:12:05 +0000 Message-ID: Date: Mon, 30 Oct 2023 17:12:01 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] i2c: designware: Fix corrupted memory seen in the ISR To: Wolfram Sang , Jarkko Nikula , Serge Semin , Yann Sionneau , Catalin Marinas , Yann Sionneau , Will Deacon , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <9219ad29-b9a3-4f07-81b5-43b4b6d9d178@os.amperecomputing.com> <3a305e74-2235-47ab-8564-0c594f24dc0a@os.amperecomputing.com> <1d56ceef-6573-43b9-a050-124c341a0698@linux.intel.com> Content-Language: en-US From: Jan Bottorff In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR01CA0020.prod.exchangelabs.com (2603:10b6:a02:80::33) To PH0PR01MB7475.prod.exchangelabs.com (2603:10b6:510:f2::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7475:EE_|LV2PR01MB7744:EE_ X-MS-Office365-Filtering-Correlation-Id: 6577d21b-1bd0-492a-e5e7-08dbd9a603fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d8//oEo8AxgjmnKhwJIESXSr+pxCVHjQYip1wSeZpNZJjaygxxutWy1WsZM22Xprxmsu7AAe/xFLcGOpmnupkou9BDw7+uzh8WayL7Krgibfas7WtycARC2inrKnzFLwQdD+d2/Nwrm639jZM/LuhinL56keSWI5/enlR1Ljaz15HFjDBFs4/xjbqihKapvkzJ6CqbWDc8BZ4Li0/HjRbJZu+TMJG/9hSHkoSBylY75QbpQHuyNYKdWwsNp9r9J0Arl30mbclX2L9DzVlvZlP344iMWr8or4N6RcAfQCe8RkUzS3NxmzSooLFzpU1/hmQWbmIKi5CfMUICglfhz6h9p5tHVt2bnUZ17WrgUR0N7ENGuyuPAj5jbboiXjqxigDxVRqG5Bx4VCuJj+A5hkWzRPI6dI67o6zw/bvrWPSeDe3Yw1HugYV7pJMgU3ievmwj9+omH8Se8DnkT0vQAVisvO3MODfmp7RX37COuOY1SVFDFUYGnjWJcxJmNl+E+zlUSfg/wqSIl7UlsgR/8NRvwM6L0mo6HFrwIdY/gd/RXXatA6P8B6FvWFQOVuX+YaaeDdWK8eT5QfDZmBVS5cX8PRK5dF4OwOAvoQp9CwSKPSdXIl1JMvZj0S6QbMwJFdVUtr9OkJjsnHnvPziMEBhw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7475.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(396003)(366004)(39850400004)(136003)(346002)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(66946007)(66556008)(66476007)(110136005)(316002)(26005)(8936002)(8676002)(83380400001)(5660300002)(41300700001)(38100700002)(53546011)(6486002)(478600001)(6506007)(2906002)(6512007)(6666004)(31696002)(86362001)(921008)(31686004)(2616005)(7416002)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aGp1MDE1aUo5dCtwekNJNWRkUDlZMzhFcm5XS0I1ZU9QQXE2em1TdjNnbXRa?= =?utf-8?B?QkZZaGJnSUZET2ZYMCtmMVJwMUNjT2hZaUZ0V1V3VktVeUxNYURMVkZ0bWlr?= =?utf-8?B?UmRXajJaYzE4dExndVI0K252cXNpbHlKcFo2TjRiVFVkNFFrdzVpdVZsS1BD?= =?utf-8?B?M2tNZkN4amVPYVc2YVk5dm9yY3JQSzY5SnkwMkNjZU5kb2laVWJESXNDSzBJ?= =?utf-8?B?MUtSTWZkNHBuT1l2c3A3M0pIdGNkVEFudGVRTWZkaVdvVEY3RDZzS2RFUGhB?= =?utf-8?B?bGRGQnBUZ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KUUZrTmhsOEFuNi9rcnF5K3oxMUhy?= =?utf-8?B?Wlg4bU9VZ2pBOFZwZU4zTmZsQStjYk55eWJuOEZmV09QbkZxT0NycGlCVmtw?= =?utf-8?Q?g/KQnMTvkKs0xqf4fB+9zkw=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6577d21b-1bd0-492a-e5e7-08dbd9a603fa X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7475.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 00:12:05.8830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l4RIn5Ip/6ZGixUWRwFqVmnoVq4wbRaYqgefQnevAZipn379Wgh6omsj6sQ7Q2WEt9ukmiQsk2e9/17YbH6kudS0hZ6fX+82sN3gi+2gqLw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR01MB7744 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 30 Oct 2023 17:12:27 -0700 (PDT) On 10/26/2023 4:18 AM, Wolfram Sang wrote: > So, someone wants to come up with a patch to move to non-relaxed io > accessors? > Is the current thinking to just make writes to DW_IC_INTR_MASK use the non-relaxed variant or something more broad? From a safest functioning viewpoint, we talked about making all accessors default to non-relaxed variants. A couple of pretty good arguments from knowledgeable people favored this. I know there also was some concerns about potential performance impact this might have although the counter argument was this is a pretty low speed device so some extra cpu cycles on register accesses were not likely to degrade overall performance. I could make the patch if we have consensus (or maintainers decision) on which way to go: 1) only writes to DW_IC_INTR_MASK are non-relaxed, 2) make all read/write accessors use the non-relaxed version. I'm personally in camp #2, safety first, performance fine tuning later if needed. Latent missing barrier bugs are difficult and time consuming to find. - Jan