From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753665AbdF1CoN (ORCPT ); Tue, 27 Jun 2017 22:44:13 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:33840 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbdF1CoF (ORCPT ); Tue, 27 Jun 2017 22:44:05 -0400 Subject: Re: [PATCH] ARM: small correction to early_ioremap support To: Russell King Cc: Laura Abbott , Ard Biesheuvel , Nicolas Pitre , Jon Medhurst , Florian Fainelli , Kees Cook , Marc Zyngier , "moderated list:ARM PORT" , open list References: <20170627005731.7869-1-opendmb@gmail.com> From: Doug Berger Message-ID: Date: Tue, 27 Jun 2017 19:44:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170627005731.7869-1-opendmb@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/26/2017 05:57 PM, Doug Berger wrote: > The fixmap pages need to be on the same pmd page for the current > implementation of arm early_fixmap. A build time bug check is > used to ensure that. However, the worst case fixmap range is > better represented by __end_of_fixed_addresses than by the value > __end_of_early_ioremap_region. I see now that only the early_ioremap portion of the fixmap needs to be on the same pmd page and not the entire collection of fixmap pages. Therefore the check against __end_of_early_ioremap_region is the correct choice for this build time check. Please disregard this patch. Sorry for the confusion, Doug > > Fixes: 2937367b8a4b ("ARM: add support for generic early_ioremap/early_memremap") > Signed-off-by: Doug Berger > --- > arch/arm/mm/mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > index 31af3cb59a60..74c0ed5c3b08 100644 > --- a/arch/arm/mm/mmu.c > +++ b/arch/arm/mm/mmu.c > @@ -392,7 +392,7 @@ void __init early_fixmap_init(void) > * The early fixmap range spans multiple pmds, for which > * we are not prepared: > */ > - BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT) > + BUILD_BUG_ON((__fix_to_virt(__end_of_fixed_addresses) >> PMD_SHIFT) > != FIXADDR_TOP >> PMD_SHIFT); > > pmd = fixmap_pmd(FIXADDR_TOP); >