From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932098AbcBAMLk (ORCPT ); Mon, 1 Feb 2016 07:11:40 -0500 Received: from foss.arm.com ([217.140.101.70]:47771 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753716AbcBAMLj (ORCPT ); Mon, 1 Feb 2016 07:11:39 -0500 Date: Mon, 1 Feb 2016 12:11:12 +0000 From: Mark Rutland To: Ard Biesheuvel Cc: Laura Abbott , Catalin Marinas , Will Deacon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCHv2 1/3] arm64: Drop alloc function from create_mapping Message-ID: <20160201121111.GE674@leverpostej> References: <1454111218-3461-1-git-send-email-labbott@fedoraproject.org> <1454111218-3461-2-git-send-email-labbott@fedoraproject.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 30, 2016 at 11:34:50AM +0100, Ard Biesheuvel wrote: > On 30 January 2016 at 00:46, Laura Abbott wrote: > > > > create_mapping is only used in fixmap_remap_fdt. All the create_mapping > > calls need to happen on existing translation table pages without > > additional allocations. Rather than have an alloc function be called > > and fail, just set it to NULL and catch it's use. Also change > > s/it's/its/ > > > the name to create_mapping_noalloc to better capture what exactly is > > going on. > > > > Signed-off-by: Laura Abbott > > With one nit below: > Reviewed-by: Ard Biesheuvel [...] > > +/* > > + * This function is for mapping using existing sections only. > > Could you improve this comment? 'existing sections' does not quite > cover what we expect to deal with imo > > + */ > > +static void __init create_mapping_noalloc(phys_addr_t phys, unsigned long virt, > > phys_addr_t size, pgprot_t prot) Perhaps: /* * This function can only be used to modify existing table entries, * without allocating new levels of table. Note that this permits the * creation of new section or page entries. */ Either way: Reviewed-by: Mark Rutland Thanks for putting this together! Mark.