Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp347662pxb; Thu, 21 Jan 2021 08:30:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBJ/MX71fkWT56azOgtnKCeND3oEkkg+fj9WUI9UsiMdWSRPZNqj4Iqduu2dGmYYZRX5N3 X-Received: by 2002:aa7:c9c9:: with SMTP id i9mr11773805edt.160.1611246620645; Thu, 21 Jan 2021 08:30:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611246620; cv=none; d=google.com; s=arc-20160816; b=PwpjdHIPoMNFWnAz2FLZ8468kOrG4bLPEN9hneJozhTLKaq6K2kUdCjoCKO+cv5SQV ysEmXbqJMtRknqmQtpCxgr7I+DbuiNIEpHbV9Ed0kpZFUpg9UDvA/M1kZCt/g33aMNJT 785bUvbk1U+ZfCckERpSqAGyGz3hCseaxPhv5rWazPdppmpimjYwPL6lGlNIigqYGnDv A1ubefdPU5Jnvr1GNwm1b7TPOsqxs066TfYvoqb3D9mQexoJi7Ca70D/si+X7Cefnge9 XLCZgkI35lSX/3EAFwNuPtLkfdiVO4DMKWqBhFD1CKweKNx+T3MYfK9XiIMFkGJJOum+ elwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version; bh=4hCOFv8rX/qnVAC3nYvZ4caTCaLTKRNyWcClRPLKq9U=; b=g/GGGEkPzskDUBvMnxbUiMkk5g18y5ldzNEjN6YfG5wdpH3iBZj5DY6UjRN8r+yxkT hkfcRVHK/IkahOM4aRtVaQi6mzBgL2eoJGeIl55HjRKFzx/aqa7z9iVvSJyL5OieIeQf yWB1GogFG+h+ozjZf/ClhtdN5KA+zm/OLNfdPTxq13JR7knPnIDn+gYO1NeqmW2HJmsc dh/tB9aFsnB82ImUgDeKc2oR2YGQ57p4/5MeXuveE4JfTDAPIKeT1D7PZpzJ/eEbuFYz JlIe5GjSWsmF0I6ObSPTM069oSQeG9u5VNzfNr4MISSRe9K8fPREGup7w6OKvOsQ0l1v c+KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id w18si2315605edc.255.2021.01.21.08.29.56; Thu, 21 Jan 2021 08:30:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728354AbhAUQ1f (ORCPT + 99 others); Thu, 21 Jan 2021 11:27:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:58996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726993AbhAUQ0j (ORCPT ); Thu, 21 Jan 2021 11:26:39 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C7CBF206D8; Thu, 21 Jan 2021 16:25:56 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l2cmQ-009ERR-Gs; Thu, 21 Jan 2021 16:25:54 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 21 Jan 2021 16:25:54 +0000 From: Marc Zyngier To: Mohamed Mediouni Cc: Will Deacon , Linux ARM , Catalin Marinas , Mark Rutland , Hector Martin , linux-kernel@vger.kernel.org, Stan Skowronek Subject: Re: [RFC PATCH 3/7] arm64: mm: use nGnRnE instead of nGnRE on Apple processors In-Reply-To: <39067FDD-F7D3-4F37-8B43-1A9FCF80EEE5@caramail.com> References: <20210120132717.395873-1-mohamed.mediouni@caramail.com> <20210120132717.395873-4-mohamed.mediouni@caramail.com> <20210121112725.GA21750@willie-the-truck> <20210121124742.GA22123@willie-the-truck> <39067FDD-F7D3-4F37-8B43-1A9FCF80EEE5@caramail.com> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <195e2bfe3a5e5503d9988b517159300e@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: mohamed.mediouni@caramail.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, mark.rutland@arm.com, marcan@marcan.st, linux-kernel@vger.kernel.org, stan@corellium.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-21 15:12, Mohamed Mediouni wrote: > Please ignore that patch. > > It turns out that the PCIe controller on Apple M1 expects posted > writes and so the memory range for it ought to be set nGnRE. > So, we need to use nGnRnE for on-chip MMIO and nGnRE for PCIe BARs. > > The MAIR approach isn’t adequate for such a thing, so we’ll have to > look elsewhere. Well, there isn't many alternative to having a memory type defined in MAIR if you want to access your PCIe devices with specific semantics. It probably means defining a memory type for PCI only, but: - we only have a single free MT entry, and I'm not sure we can afford to waste this on a specific platform (can we re-purpose GRE instead?), - we'd need to teach the PCI code to use this... Thanks, M. -- Jazz is not dead. It just smells funny...