From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Li Subject: RE: [PATCH 3/3] arm64: dts: mark lx2160a esdhc controllers dma coherent Date: Tue, 24 Sep 2019 03:41:05 +0000 Message-ID: References: <20190922102341.GO25745@shell.armlinux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Ulf Hansson , Russell King Cc: Mark Rutland , DTML , dann frazier , Will Deacon , Nicolin Chen , Rob Herring , "Y.b. Lu" , Shawn Guo , Robin Murphy , Christoph Hellwig , Linux ARM List-Id: devicetree@vger.kernel.org > -----Original Message----- > From: Ulf Hansson > Sent: Monday, September 23, 2019 4:27 PM > To: Russell King > Cc: Robin Murphy ; dann frazier > ; Will Deacon ; > Nicolin Chen ; Y.b. Lu ; > Christoph Hellwig ; Mark Rutland ; > DTML ; Leo Li ; Rob > Herring ; Shawn Guo ; Linux > ARM > Subject: Re: [PATCH 3/3] arm64: dts: mark lx2160a esdhc controllers dma > coherent > > On Sun, 22 Sep 2019 at 12:29, Russell King > wrote: > > > > The LX2160A esdhc controllers are setup by the driver to be DMA > > coherent, but without marking them as such in DT, Linux thinks they > > are not. This can lead to random sporadic DMA errors, even to the > > extent of preventing boot, such as: > > > > mmc0: ADMA error > > mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== > > mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00002202 > > mmc0: sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001 > > mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 > > mmc0: sdhci: Present: 0x01f50008 | Host ctl: 0x00000038 > > mmc0: sdhci: Power: 0x00000003 | Blk gap: 0x00000000 > > mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x000040d8 > > mmc0: sdhci: Timeout: 0x00000003 | Int stat: 0x00000001 > > mmc0: sdhci: Int enab: 0x037f108f | Sig enab: 0x037f108b > > mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00002202 > > mmc0: sdhci: Caps: 0x35fa0000 | Caps_1: 0x0000af00 > > mmc0: sdhci: Cmd: 0x0000333a | Max curr: 0x00000000 > > mmc0: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x001d8a33 > > mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x3f400e00 > > mmc0: sdhci: Host ctl2: 0x00000000 > > mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0x000000236d43820c > > mmc0: sdhci: ============================================ > > mmc0: error -5 whilst initialising SD card > > > > These are caused by the device's descriptor fetch hitting > > speculatively loaded CPU cache lines that the CPU does not see through > > the normal, non-cacheable DMA coherent mapping that it uses for > > non-coherent devices. > > > > DT and the device must agree wrt whether the device is DMA coherent or > > not. > > > > Signed-off-by: Russell King > > As I am picking up patch1 and patch2 from this series, I can also help out and > pick up this one, if that is okay by people? There is some concern recently from linux-next maintainer about this causing potential conflicts. https://lkml.org/lkml/2019/9/15/225 Regards, Leo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2684FC432C2 for ; Tue, 24 Sep 2019 03:41:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF7F8205F4 for ; Tue, 24 Sep 2019 03:41:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FoY5arMT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="n0JFWJWY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF7F8205F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aKG2rL8GjsrCUeg+Q9dDFOcQLCEAbW9i5iBjmL/glxo=; b=FoY5arMTBb0pPS wgcTkG4k1OAcPeukQdXi+d/1bOO/81olu5Ruj5plHa/666tLwq8TL7hfNkXO9nQf9o9P629871Qpu LiAey11rnEGjPInQz2S6ReDzP5CQYVfnLgN81en0IMA77kA4QPpWKvoFxU78H6++ERHWEgj25m8Xl X2Hj+b6YWqf3mRHs6qqZPKrNJuMKIsGs0WS6UD6pOVcfL9x6lsWi4nLpElFB4YgUTj8i78lfZD2MH hTZ7OnBZzsrhm169Sv49FhokpO0tNSPVnwMzZA6+dI8Zj/nKjXASrxq+XEe9bq5CW485aUdFZOT7I PwUtvrsz2BPcfJY+Z/PQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCbhS-0007QH-FW; Tue, 24 Sep 2019 03:41:14 +0000 Received: from mail-vi1eur04on0614.outbound.protection.outlook.com ([2a01:111:f400:fe0e::614] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCbhO-0007Pv-Q5 for linux-arm-kernel@lists.infradead.org; Tue, 24 Sep 2019 03:41:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IqqwcTIJKt5/VXBlnfOAUX5DIh0huPbDEJ2iSBSQnLG09flD02IHL16vXOD3gibE6Ht80VeKyu9gxZWEyT2AI7NVpNTI/tpbnoSs/CqX5dV5tNpbNe11rIpChGm2e0tcd5THYO0vBeJWcaFFvIwdMr85KzlEurjP4L8d5QFY+lrRaG/+aE/NjAIXvwOI3TNSR80BLsju22ZTP24YLW58jq5wuU+QYG9K7D6zJ7qpGBuwOFd2NYLqDpLYNfWs0H6FD09qxqcjXIVPvRWlwWbtYRa+0lpY77Yeh2fjerqCIAYcyccNKjGkL67//1AR37dGD469V6eY34UX1WH/QDW8fA== 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-SenderADCheck; bh=252/gCK12tsBE8sBB7TGgtYFBce4YbAxAeF2MyfYb3Y=; b=eyvZ4Z0OqSz6jSkolYKEMl82v/9prrezas1o2Lao8BNFrk2IBJC38P91SBmz5ZOHekHXDR0o6shOw0iaXEn83+uk3DYefZZL2IAOKo9vyxW6x3k0VjsmUGT5efW7+5reNiX03QN8UHiMC81aRbUJY8smDT1b8XNdR3F1JX9G8+yDk+oJHATycBDLiOq6G6glJ1Dr9qAo8qHlevN+H1qS4csqErb/96HJg1fV+l6FwUH0TkVhq3aS5erqfoQE5YWuwwxfOmTiL3Sr4KMzxgNdC9luGmGw+v/Wc/LQ8WREnYXpg7UVn4tCZzjGRet1SuT95m4c+mZlJMsX8gQdc7CvSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=252/gCK12tsBE8sBB7TGgtYFBce4YbAxAeF2MyfYb3Y=; b=n0JFWJWYYgtuDxQ+bzJmc7KmOrFpH01bYN+Py4YYgWgVKeFZnKnVwO9xlLJh2tn5jFaON61amWdTrTXwDzA4qgElpguev5qGOfeGMwA4vBw42ObJSg/OoqwAyEnjp+iisrMdMoi5yCE8SjKyW8vq8glTrxqnX8LjaH1cco/Ocwk= Received: from AM0PR04MB6676.eurprd04.prod.outlook.com (20.179.255.161) by AM0PR04MB5473.eurprd04.prod.outlook.com (20.178.112.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.18; Tue, 24 Sep 2019 03:41:05 +0000 Received: from AM0PR04MB6676.eurprd04.prod.outlook.com ([fe80::5c26:3c5f:17e0:8038]) by AM0PR04MB6676.eurprd04.prod.outlook.com ([fe80::5c26:3c5f:17e0:8038%7]) with mapi id 15.20.2284.023; Tue, 24 Sep 2019 03:41:05 +0000 From: Leo Li To: Ulf Hansson , Russell King Subject: RE: [PATCH 3/3] arm64: dts: mark lx2160a esdhc controllers dma coherent Thread-Topic: [PATCH 3/3] arm64: dts: mark lx2160a esdhc controllers dma coherent Thread-Index: AQHVcTBTLQw+Flwg30aARc+RzydJIKc5yMSAgABn0oA= Date: Tue, 24 Sep 2019 03:41:05 +0000 Message-ID: References: <20190922102341.GO25745@shell.armlinux.org.uk> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leoyang.li@nxp.com; x-originating-ip: [136.49.234.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bcb60290-8d47-4aa3-d4e0-08d740a10763 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600167)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB5473; x-ms-traffictypediagnostic: AM0PR04MB5473:|AM0PR04MB5473: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0170DAF08C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(396003)(136003)(346002)(366004)(199004)(13464003)(189003)(6246003)(476003)(5660300002)(6116002)(7736002)(9686003)(6306002)(55016002)(71200400001)(305945005)(7416002)(6506007)(2906002)(3846002)(256004)(6436002)(86362001)(53546011)(102836004)(74316002)(7696005)(33656002)(66556008)(446003)(11346002)(71190400001)(966005)(66946007)(81166006)(186003)(8676002)(4326008)(54906003)(81156014)(229853002)(52536014)(76116006)(316002)(66476007)(486006)(478600001)(66446008)(8936002)(64756008)(66066001)(110136005)(76176011)(14454004)(25786009)(26005)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB5473; H:AM0PR04MB6676.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: faoTRWCj5fvWyVTQzQnPbhs2Hom14dvMtRt7NoNNd3S8bgg4VVvVJsHgZBUyODf1mMpOd7eMGoB6fUWi7M1QBUHihhis6xpB9EwxPKHpGWxCcCKTyoxODxK7AGKUDc0yR4dyg7GNkatFJ/+IlAwE14gv/4ygddRarIVnOhE4n8mgf/1YXjV+l3GsTlTK6lNeH9Ibzl4DDYkOg1VL80BtuEo3U+plPy4GMW3ihS8f9uM7jaMyC6XlxX9n7IxGsqNeQ/O8XgVS/GR0QEDKlDHy5i3HTBIitMBzqMWo5eFAOn8tg68h+w7Q280uoPL6u9wbNrkZhEq+MKd8jX1SBMQr3gffpWTjvLPlAie/5HOtIIVWsUe82EpuQVUPG5UMLE4IfMGcfmwY6S4ERwSKbuz+rdKwBJTyj/DSUJbRyktKY9U= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcb60290-8d47-4aa3-d4e0-08d740a10763 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2019 03:41:05.3290 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: C+s8eVNbI9wvu+cMqbIUrxv9QlZkvrVaWHzMSZ1UUqqvtHfspKPcBlq8edk0gJCDvBRaK8CJuJwkYmU2Cbx5Rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5473 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190923_204110_948244_8AD70BC8 X-CRM114-Status: GOOD ( 18.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , DTML , dann frazier , Will Deacon , Nicolin Chen , Rob Herring , "Y.b. Lu" , Shawn Guo , Robin Murphy , Christoph Hellwig , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org > -----Original Message----- > From: Ulf Hansson > Sent: Monday, September 23, 2019 4:27 PM > To: Russell King > Cc: Robin Murphy ; dann frazier > ; Will Deacon ; > Nicolin Chen ; Y.b. Lu ; > Christoph Hellwig ; Mark Rutland ; > DTML ; Leo Li ; Rob > Herring ; Shawn Guo ; Linux > ARM > Subject: Re: [PATCH 3/3] arm64: dts: mark lx2160a esdhc controllers dma > coherent > > On Sun, 22 Sep 2019 at 12:29, Russell King > wrote: > > > > The LX2160A esdhc controllers are setup by the driver to be DMA > > coherent, but without marking them as such in DT, Linux thinks they > > are not. This can lead to random sporadic DMA errors, even to the > > extent of preventing boot, such as: > > > > mmc0: ADMA error > > mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== > > mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00002202 > > mmc0: sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001 > > mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 > > mmc0: sdhci: Present: 0x01f50008 | Host ctl: 0x00000038 > > mmc0: sdhci: Power: 0x00000003 | Blk gap: 0x00000000 > > mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x000040d8 > > mmc0: sdhci: Timeout: 0x00000003 | Int stat: 0x00000001 > > mmc0: sdhci: Int enab: 0x037f108f | Sig enab: 0x037f108b > > mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00002202 > > mmc0: sdhci: Caps: 0x35fa0000 | Caps_1: 0x0000af00 > > mmc0: sdhci: Cmd: 0x0000333a | Max curr: 0x00000000 > > mmc0: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x001d8a33 > > mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x3f400e00 > > mmc0: sdhci: Host ctl2: 0x00000000 > > mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0x000000236d43820c > > mmc0: sdhci: ============================================ > > mmc0: error -5 whilst initialising SD card > > > > These are caused by the device's descriptor fetch hitting > > speculatively loaded CPU cache lines that the CPU does not see through > > the normal, non-cacheable DMA coherent mapping that it uses for > > non-coherent devices. > > > > DT and the device must agree wrt whether the device is DMA coherent or > > not. > > > > Signed-off-by: Russell King > > As I am picking up patch1 and patch2 from this series, I can also help out and > pick up this one, if that is okay by people? There is some concern recently from linux-next maintainer about this causing potential conflicts. https://lkml.org/lkml/2019/9/15/225 Regards, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel