Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp897915imu; Wed, 16 Jan 2019 09:16:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN62fl3sUjtHXeiY17t3qkFK0rSV+iDMJCP4NppBjTGHOnT4J3UhBHHCh1rl3sosGGEEfhnK X-Received: by 2002:a63:7219:: with SMTP id n25mr9817940pgc.324.1547659018365; Wed, 16 Jan 2019 09:16:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547659018; cv=none; d=google.com; s=arc-20160816; b=crNuqWmBJeY1g6DUJbZf7j3HXJs563/ScM4mrf72iWiaqnf0hWuUBnO28zuVeqG3h9 LmeLf0xaUHF8EU7MnHAff13HwQ9WDy/+J0aUhlMLXMGjI+M70rSaGRHCjUmwMViqfr4t /h66syrfx0rrcasgTXaGmdElw8vXK9+rJrKhZykXgpZ4/sijzvR9unxH8noLu+A8NPu7 VMwtw80RXOvQ/61CyfuMSPpxBsjJGqWuh8QRzD9ZaHktriUN51g9CttwWVdZ2mxOksVv 4Bpvq62bBDx1gijdewZEcglw+JHmyrHNdF10m0rW65+dpaJyQTPZNmTKb8sBDHzQwgH8 Sh3A== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=S70WeRzwcpCkL1BkiZSH8AP41tkRXlQcHtORHPUFioI=; b=sU2PrAzM/azNlDP8vKPM6WkS+najyaqGK3CdltJEzrshIOEMQ5FH3fqsb1caA9pda6 ljzbRXyeXu2L6CJwlZFoopGoEpVudWAD/XzNOKeeR/c1ubRzvizE47nJ7hpZsWuZlLWT i9G4iZZY9FuT1SDvpri+IzNuTbe2r6x7nNV65hZRX0gv3PxSfBOZ5syeuJZjlj7B2fJQ Cab5sU8/toV2vKyMZzXIloOrMyP5MCct6y96smSIgsIvjJmJ+/Hb9Yhc+LDl119x28Ou LAGcQbAnvv8FD2mZUZ/0pDrHjSSveTPnrzWqWQvUrkvD7P3u0qPA/Mzbaxo70R6Sl1kW mBPg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si2096894pgm.167.2019.01.16.09.16.38; Wed, 16 Jan 2019 09:16:58 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727022AbfAPAdv (ORCPT + 99 others); Tue, 15 Jan 2019 19:33:51 -0500 Received: from gate.crashing.org ([63.228.1.57]:60218 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbfAPAdv (ORCPT ); Tue, 15 Jan 2019 19:33:51 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x0G0X6xW011333; Tue, 15 Jan 2019 18:33:08 -0600 Message-ID: Subject: Re: [RFC PATCH] drm/ttm: force cached mappings for system RAM on ARM From: Benjamin Herrenschmidt To: Michael Ellerman , Will Deacon , "Koenig, Christian" Cc: Ard Biesheuvel , Michel =?ISO-8859-1?Q?D=E4nzer?= , Linux Kernel Mailing List , Carsten Haitzler , David Airlie , dri-devel , "Huang, Ray" , "Zhang, Jerry" , linux-arm-kernel , Bernhard =?ISO-8859-1?Q?Rosenkr=E4nzer?= Date: Wed, 16 Jan 2019 11:33:06 +1100 In-Reply-To: <87a7k2yx66.fsf@concordia.ellerman.id.au> References: <20190110072841.3283-1-ard.biesheuvel@linaro.org> <5d8135de-80fe-9c0e-2206-ecb809f64cdb@daenzer.net> <55facfb9-92af-86b8-40e9-d63b887b5592@amd.com> <9f956898-7973-98ee-6bf1-e1d445e9d365@amd.com> <20190114191350.GA29600@fuggles.cambridge.arm.com> <20190114193548.GB29600@fuggles.cambridge.arm.com> <87a7k2yx66.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.4 (3.30.4-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-01-15 at 22:31 +1100, Michael Ellerman wrote: > > > As far as I know Power doesn't really supports un-cached memory at all, > > > except for a very very old and odd configuration with AGP. > > > > Hopefully Michael/Ben can elaborate here, but I was under the (possibly > > mistaken) impression that mismatched attributes could cause a machine-check > > on Power. > > That's what I've always been told, but I can't actually find where it's > documented, I'll keep searching. > > But you're right that mixing cached / uncached is not really supported, > and probably results in a machine check or worse. .. or worse :) It could checkstop. It's also my understanding that on ARM v7 and above, it's technically forbidden to map the same physical page with both cached and non-cached mappings, since the cached one could prefetch (or speculatively load), thus creating collisions and inconsistencies. Am I wrong here ? The old hack of using non-cached mapping to avoid snoop cost in AGP and others is just that ... an ugly and horrible hacks that should have never eventuated, when the search for performance pushes HW people into utter insanity :) Cheers, Ben.