From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Richter Subject: Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Date: Thu, 24 Nov 2016 15:11:49 +0100 Message-ID: <20161124141149.GE2213@rric.localdomain> References: <20161109195132.GZ22012@rric.localdomain> <20161117142528.GJ22855@arm.com> <20161117151805.GJ2151@rric.localdomain> <20161123211538.GH10776@rric.localdomain> <20161124134238.GI10776@rric.localdomain> <20161124135151.GJ10776@rric.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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: Ard Biesheuvel Cc: Mark Rutland , "linux-efi@vger.kernel.org" , Robert Richter , David Daney , Catalin Marinas , Will Deacon , "linux-kernel@vger.kernel.org" , Hanjun Guo , "linux-arm-kernel@lists.infradead.org" List-Id: linux-efi@vger.kernel.org On 24.11.16 13:58:30, Ard Biesheuvel wrote: > On 24 November 2016 at 13:51, Robert Richter wrote: > > On 24.11.16 13:44:31, Ard Biesheuvel wrote: > >> On 24 November 2016 at 13:42, Robert Richter wrote: > >> > On 23.11.16 21:25:06, Ard Biesheuvel wrote: > >> >> Why? MEMREMAP_WB is used often, among other things for mapping > >> >> firmware tables, which are marked as NOMAP, so in these cases, the > >> >> linear address is not mapped. > >> > > >> > If fw tables are mapped wb, that is wrong and needs a separate fix. > >> > > >> > >> Why is that wrong? > > > > The whole issue with mapping acpi tables is not marking them cachable, > > what wb does. > > What 'issue'? > > > Otherwise we could just use linear mapping for those mem > > ranges. > > > > Regions containing firmware tables are owned by the firmware, and it > is the firmware that tells us which memory attributes we are allowed > to use. If those attributes include WB, it is perfectly legal to use a > cacheable mapping. That does *not* mean they should be covered by the > linear mapping. The linear mapping is read-write-non-exec, for > instance, and we may prefer to use a read-only mapping and/or > executable mapping. Ok, I am going to fix try_ram_remap(). Are there other concerns with this patch? Thanks, -Robert