Received: by 2002:a25:2588:0:0:0:0:0 with SMTP id l130csp2902501ybl; Fri, 9 Aug 2019 01:21:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKgRjhiPNjHqUGgh6COEFx1Qy418rQcRj2hnsZ7XD/nuDPxHcPlLuFzmXvDjPTc7WXyPMB X-Received: by 2002:a17:90a:5887:: with SMTP id j7mr8134264pji.136.1565338911505; Fri, 09 Aug 2019 01:21:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565338911; cv=none; d=google.com; s=arc-20160816; b=bwdME9IRPpoKqXkwIBM726B/aoSdmO2iY9HAn+YNU2kx8ZPD42Ke3TbRVO3wE47NwR PcbOuoIXH8Qte2f+0TymgwACtn7LwdYVIB7imHBuuN9eV+1vUmq8Ax1EdMCgN7s42C8C SifEhYDwhhH3HozEzgVZ5FW9O4ImyE79GBVFdPiXqMjCG/xIZHEuVTiQMZZBASZIMpcM FdqNzGOXX/p/CDCodgvgfYcr9hgX4uiml3pWE/FJL1ugqzc3Qo5/5XHySroLv0lA7R/w Eie76cAJttNc55xnna5l5BuNz9zeawBIdNldoAfaWuSeoAokCPWlHSSu6Wc72fjBVcI1 VRWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lrfRYVlfeRw1PzY3lMKnL0wrFtOcvklYX0PauZyTeR8=; b=O7ZaaBlLCXgDvhHL7iaLP9C2d6Xdb4gIQKnl1ZlPyLK1y+cNQNcqPZLYwp7+JGGQxl aaP1FE6TbBlSJhEN72di8o+/ornWnnGNzmCWAB2EbZ4Q7ohH+r56rlZnCM4w5YRtk753 58YMtXXmvhLeCLZ+2MQSWbJiTjC08MlAWg37nxbI8wd2EoviYS6WiWyAMxUj535AoLNw lOv78aIHDiuyOfUfNu2jZmGv3JJJZXN8zE1sAcpkGVAbO/0WW77mbVJThm/AwGBTMgts NHKfRLiaAk6B7ZKQpPQRivdAHkhaS7aS6uTzu+xEqnzf26wi5QQAox/RCPzhVyURzGNC 6c2A== 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 ck13si3800679pjb.47.2019.08.09.01.21.33; Fri, 09 Aug 2019 01:21:51 -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; 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 S2405765AbfHIITC (ORCPT + 99 others); Fri, 9 Aug 2019 04:19:02 -0400 Received: from verein.lst.de ([213.95.11.211]:53350 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbfHIITC (ORCPT ); Fri, 9 Aug 2019 04:19:02 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 2822D68AFE; Fri, 9 Aug 2019 10:18:58 +0200 (CEST) Date: Fri, 9 Aug 2019 10:18:57 +0200 From: Christoph Hellwig To: Rob Clark Cc: Christoph Hellwig , Mark Rutland , Rob Clark , dri-devel , Catalin Marinas , Will Deacon , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Allison Randal , Greg Kroah-Hartman , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, LKML Subject: Re: [PATCH 1/2] drm: add cache support for arm64 Message-ID: <20190809081857.GB21967@lst.de> References: <20190806084821.GA17129@lst.de> <20190806143457.GF475@lakrids.cambridge.arm.com> <20190807123807.GD54191@lakrids.cambridge.arm.com> <20190807164958.GA44765@lakrids.cambridge.arm.com> <20190808075947.GE30308@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 08, 2019 at 09:44:32AM -0700, Rob Clark wrote: > > GFP_HIGHUSER basically just means that this is an allocation that could > > dip into highmem, in which case it would not have a kernel mapping. > > This can happen on arm + LPAE, but not on arm64. > > Just a dumb question, but why is *all* memory in the linear map on > arm64? It would seem useful to have a source of pages that is not in > the linear map. > I guess it is mapped as huge pages (or something larger than 4k pages)? In general that is just how the Linux kernel always worked, on all architectures - we always had a linear mapping for all memory in the kernel to make accessing it simple. That started to break down a bit with the 32-bit x86 PAE mode that supported more physical addressing that virtual, which required the "high" memory to not be mapped into the kernel direct mapping. Similar schemes later showed up on various other 32-bit architectures. There is a patchset called XPFO that ensures memory is either in the kernel direct map, or in userspace but not both to work around speculation related vulnerabilities, but it has a pretty big performance impact. > Any recommended reading to understand how/why the kernel address space > is setup the way it is (so I can ask fewer dumb questions)? I don't really have a good pointer. But usually there is just dumb answers, not dumb questions.