Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp734410imm; Fri, 3 Aug 2018 10:34:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcrOjisip0wmsI0ovEXaK64KZHbcW1vhLV7Fa2uFBgPhzMlY0Yu9PdQOJxkOdxk3LXshxp7 X-Received: by 2002:a63:4b1f:: with SMTP id y31-v6mr4800556pga.14.1533317672599; Fri, 03 Aug 2018 10:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533317672; cv=none; d=google.com; s=arc-20160816; b=Mjq6xebnHLBMD+J84vbuI+7fEj/OK0yTYDPwlHj+z4BnSdjUpIdH2jAs/7IRqMt/sJ 5RaDd7IVreXb5px7ZESk3O4XJ3kdK4sqQPN70a9+iCT8v0wyYEB4n+eoEuBNtWatLFkK W+Sra/0u1oFS8dn7Fed2wOmU6UdOGUfItzh4RzHRzzksuT9+Mu37JgoUM0nolAb978xu 0XLybs/Z4ho3Ri+mYRorRtjreP9/6L86iHnHWPEGC07Yy+dStH3X4nQhGFAXEfRQLm7s NHD5VDOiQrcwFIyvCS4MLkJUf9r6yQX7fDyoNqWwrSdX4pHs52anrkbNNqCtgsBybn4N 3KTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=qORvBBSC1gHUx2o1vC2nGRD1P+xx2fGj7E+3L07NOZw=; b=c3DpLOvaF49w29iPP06lqzCkfypmyPsMxb80Zwfvip+XzbcboLqzy5rNiQC6S08RY0 soH46regb6cS2fG1jOHc72sniBS5MLCXQZh3ePFS/iwnNfOm9bpc96zOsFnuDwbFiweZ hofm1v9YmuGzO57dcZW+B8qhZ51l2/zwoFrYrBKMbCib4Lb3E733Sb+XzTDt1uQfqJv3 W9mfCeyGA0WgzIzPlszrHjC9gOzANHi6AS8lFM0jA0Umu+Jf26KbYO/GG7Gv7kJybvN+ lPH9RqAPMZnk+J2rriYQOV9fsqzqRQzH8ZkMoOtoi2DDK2pu7O4TqpJhBn/LALXvG1na QrAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t0cSkKir; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3-v6si3915765pld.457.2018.08.03.10.34.17; Fri, 03 Aug 2018 10:34:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t0cSkKir; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729733AbeHCT33 (ORCPT + 99 others); Fri, 3 Aug 2018 15:29:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728116AbeHCT33 (ORCPT ); Fri, 3 Aug 2018 15:29:29 -0400 Received: from [192.168.0.112] (cpe-174-109-247-98.nc.res.rr.com [174.109.247.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB18021779; Fri, 3 Aug 2018 17:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533317533; bh=ujwSJ393ced9oY/Tny1p3Cq/bVK556N+V1gLDypXL4E=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=t0cSkKirqGbnEizW5/X9rBgVKxZvo9BougT8u234YNNFpyFhbrm9kBPUjAbux+Lf6 G5nBgs8Sn9R0Xw810g1qB+lMcCMyQ0Um0OinLZgsg8thvg5xNQeaeB9cF6pxGLwF63 C76Q/tIQgEdjntUr0D7kAJAl4efbY2swJMr9lhe0= Subject: Re: framebuffer corruption due to overlapping stp instructions on arm64 To: Mikulas Patocka , Will Deacon , Jingoo Han , Joao Pinto Cc: Ard Biesheuvel , Matt Sealey , Thomas Petazzoni , libc-alpha@sourceware.org, Catalin Marinas , Russell King , Linux Kernel Mailing List , linux-arm-kernel , linux-pci@vger.kernel.org References: <20180803094129.GB17798@arm.com> From: Sinan Kaya Message-ID: Date: Fri, 3 Aug 2018 13:32:10 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/3/2018 1:09 PM, Mikulas Patocka wrote: >>> Most accelerated graphics drivers rely heavily on the ability to map >>> the VRAM normal-non-cacheable (ioremap_wc, basically), and treat it as >>> ordinary memory. >> Yeah, I'd expect framebuffers to be mapped as normal NC. That should be >> fine for prefetchable BARs, no? >> >> Will > So - why does it corrupt data then? I've created this program that > reproduces the data corruption quicky. If I run it on /dev/fb0, I get an > instant failure. Sometimes a few bytes are not written, sometimes a few > bytes are written with a value that should be 16 bytes apart. > > I tried to run it on system RAM mapped with the NC attribute and I didn't > get any corruption - that suggests the the bug may be in the PCIE > subsystem. Note that normal-NC gives you write combining whereas device nGnRE doesn't have any write-combining support. normal-NC is typically mapped to prefetchable BAR space where write-combining is welcome. It could be an issue on the SOC itself too. I suggest you contact your board vendor.