Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3991342ybl; Tue, 20 Aug 2019 05:31:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwm9QylQVq84255GAXbCU0WVMUJM5n0Z1ZitutneNcAlk+D0GY36HZGCPlG06fd4ZCPKdj0 X-Received: by 2002:a63:d34c:: with SMTP id u12mr24919706pgi.114.1566304291545; Tue, 20 Aug 2019 05:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566304291; cv=none; d=google.com; s=arc-20160816; b=xK0lRkR3s/wmooGyfT3wD3vr30nSwP2q3OANZ7TKUSP19LXZeSX93TlUizNORg9FWk brP13AMvHf2rQ3ViOUQlTthPhwHvtPQacTlau9IF8hUmSqFY5OzbTKhOy/5jNeYRtMU6 FRAHoV7C+ezu0lMYmNVNu7jKSRF5Ag70mHlqhvdDOUJGm03bw5yA0u1sbfaVUD9ePNmK 9rpxAsUJeMz9sOX3jKb4mB06Q99CKnzjgC9EFL/TCpa7H5Zpl5aSf4ksReY1CUR2v/Xc +EG1PoFTDFaAkKmW6uDimdIHQoxiidxE0VDh4Mxp7GB+WHwW87g/sgEX6XjlsG7BkErO YQeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dD0Co8FG/hJyJAYUqVEMglsK3T7bNz9NWAIKm1yXSok=; b=HY3BDJeQsE6mwp6ntq2DCnoMauOWM7tOpnVi6M5Ob2w4W3QuVKCmIAMQigwtcKFPxv Y6frmg0Yqmihxl1lyGM4Q1Vy81umLQszDw6oyfw/bvvKwgsdpANo7esOjozkzpvZBUEC k+xwF69MT6pUPmb8f7X8PHUf1kXEk2cdnl6PR8i7ZcCFOdamTZe8GmFhRrwjb8wVtQGb VllN7djbqg3NyMwQ0DVYVQI7cRHakieSDY0by8LPHqbtoHoB5+irY82kVpC1NUH3L/mL IBJG4SNtYVkTyFTgZ10RnXIAKbsm5oXegNFRARjDfbCSJXiDYGtUQnoVRtQnHSU2HxNh 7T3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IAB/CxVy"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j22si12037953pgb.352.2019.08.20.05.31.16; Tue, 20 Aug 2019 05:31:31 -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; dkim=pass header.i=@linaro.org header.s=google header.b="IAB/CxVy"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729820AbfHTM2j (ORCPT + 99 others); Tue, 20 Aug 2019 08:28:39 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:32864 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728771AbfHTM2j (ORCPT ); Tue, 20 Aug 2019 08:28:39 -0400 Received: by mail-wm1-f65.google.com with SMTP id p77so2298809wme.0 for ; Tue, 20 Aug 2019 05:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dD0Co8FG/hJyJAYUqVEMglsK3T7bNz9NWAIKm1yXSok=; b=IAB/CxVy5OTM+bm1P/vwQO5e1zYJhw5W+8ZMfEr0TwRT2EHai9xEb7z0JLGvQL+AEM noesBxet+SdZXcyD+TDMiDedkuNJmvs0pynLhCizA0UKehvY/U9nfrqf3O3c50RdYmHc EgXw+nNiCh+Jqg7tX3pehf5oIkz3QOguhxAmmqUBwDTwZURbQrU1MliR4D+sVI/Dws45 /wPIeJtLO2Bq1hSk5IZ6nNWF4wkRDFhE2tHy/FDvCFmeq3K+tWEMzX5g+jIp+xLZV1MA bPVJnH/qV91SbwdsFTlvnaGFPw3OEGc2X0UvXAcuGwYmdjhJpONCMhMRLJlRJAWxww/3 gCKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dD0Co8FG/hJyJAYUqVEMglsK3T7bNz9NWAIKm1yXSok=; b=eMUrOFNrdLQSdALcMxWRxrS5zjKKh4PoAJJegatt9Yxhl8/PWJGOUPTwbI82sRIOy7 q4X+bATIJeF0uZr2Xo6oQaOYEn7/GbMnGbxcGaNDa1T/3ZX1Uh7Jq6W4JcI7jwQzix48 yU7F3D4hkZqH/lciplBAbzMReXdN+d6TeJi54RSQ6vvhJCAPBkRcLltntnLgeST7ZiXU njrz/vIaMrwF0uuQCwwCGAlaoTiBJ7BNRQqAVQrRH/x15AE3gp8P71hIE91XYKyRNlpb 0tQycUXdOOZxsGX89AuPtdrCcgKJxNQhoQzbKjE/J+fPYW5sXvpcJ7pj9jya2SzJkuxW sROw== X-Gm-Message-State: APjAAAWx4vojpofDe2b5Sz+wt0NDpC2/iPschRAmqGCV0iZ3c0w37qMb fs3XU+TEGLpqxWScN4pKAglrcvrF7KQCzy7Myw1wjg== X-Received: by 2002:a05:600c:2255:: with SMTP id a21mr25055919wmm.119.1566304116782; Tue, 20 Aug 2019 05:28:36 -0700 (PDT) MIME-Version: 1.0 References: <20190802053744.5519-1-clin@suse.com> <20190820115645.GP13294@shell.armlinux.org.uk> In-Reply-To: <20190820115645.GP13294@shell.armlinux.org.uk> From: Ard Biesheuvel Date: Tue, 20 Aug 2019 15:28:25 +0300 Message-ID: Subject: Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base To: Russell King - ARM Linux admin Cc: Chester Lin , "akpm@linux-foundation.org" , "rppt@linux.ibm.com" , "ren_guo@c-sky.com" , Juergen Gross , "geert@linux-m68k.org" , "mingo@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , "guillaume.gardet@arm.com" , Joey Lee , Gary Lin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Aug 2019 at 14:56, Russell King - ARM Linux admin wrote: > > On Fri, Aug 02, 2019 at 05:38:54AM +0000, Chester Lin wrote: > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > > index f3ce34113f89..909b11ba48d8 100644 > > --- a/arch/arm/mm/mmu.c > > +++ b/arch/arm/mm/mmu.c > > @@ -1184,6 +1184,9 @@ void __init adjust_lowmem_bounds(void) > > phys_addr_t block_start = reg->base; > > phys_addr_t block_end = reg->base + reg->size; > > > > + if (memblock_is_nomap(reg)) > > + continue; > > + > > if (reg->base < vmalloc_limit) { > > if (block_end > lowmem_limit) > > /* > > I think this hunk is sane - if the memory is marked nomap, then it isn't > available for the kernel's use, so as far as calculating where the > lowmem/highmem boundary is, it effectively doesn't exist and should be > skipped. > I agree. Chester, could you explain what you need beyond this change (and my EFI stub change involving TEXT_OFFSET) to make things work on the RPi2?