Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp116043ybg; Tue, 28 Jul 2020 01:10:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjzsm4RXljMtaqvlqESt2RYJwkxsyn7fnY0jWe8qeKBPlolIhPmqKjtebuDZ/2RLIU4NRk X-Received: by 2002:a17:906:3685:: with SMTP id a5mr23100322ejc.298.1595923849605; Tue, 28 Jul 2020 01:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595923849; cv=none; d=google.com; s=arc-20160816; b=LlawKsgDe2ElAw+UwaWITOLJLNLO7fk6iguvVjqeLuWKL961VJ38O1GzAtceo3tsGS efvSHwotr/9HNGcEF+4giR6IWt+yVX8SxgZyasHeMGoLcxNpcfTq+9BAyLgTwE4PNjMF dNT4cpaRcyk8bZyJnRzkGQQevQ5bfYqwC7fRd5e5xuzyumD/pElg/ODVLSfQgZqxXEnq fg66aFCsqXWvxYwcmek+uPspio2HVqvtA+BNz2+BmpvgmalFq0ZnVxpEwUSB8WsvEhl6 smYBAKfHKmt495i1cNvKmE40eFyoix6HToxcVFC75yAZv2y5zTYS/FLGevhIOCE2XLzF 6Vug== 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=mO4UW6jhce2IwLYWJIjyNoNVa+Gr5PBQ2rV1LkhhIeA=; b=gl0PHVwz1irw/fY6t/JmlENhpOgJR8wljKByNXL2H421deShle+tEG/kcf4QI571GN nemLaF/xLbinKaTH7qgqGL43DHOyq0ECEA2WBdAQfLLu5iP/PWoPv93FHVfxeTu2nkIf CftizqKY7GyDbwOGdnV2qPsaSR/HdG1t/NdnWs0QM4w2zYTOqMoxNc7jRziaXeT+3c5a sjl485uT86tgmf7VJbP/qfnbq4vLPCHCnXnTyeVBgXyVEVDnzf2Jq+yH24Rl4UbAyXOq Vsi5EsZiS1RiV5Bv8FboHdSHqOGBNQ3j0g0LCy4tiRX47NguBEVDRLQDUK5sndEOjMbi 0+/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="bNG6JL/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y97si7536373ede.234.2020.07.28.01.10.27; Tue, 28 Jul 2020 01:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="bNG6JL/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728005AbgG1IJ6 (ORCPT + 99 others); Tue, 28 Jul 2020 04:09:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbgG1IJ5 (ORCPT ); Tue, 28 Jul 2020 04:09:57 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5DBC061794; Tue, 28 Jul 2020 01:09:57 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id c6so4500536pje.1; Tue, 28 Jul 2020 01:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mO4UW6jhce2IwLYWJIjyNoNVa+Gr5PBQ2rV1LkhhIeA=; b=bNG6JL/O5TVQki3sHfHEOfTczEIMUXR0OLqZGWSVnVXN0YvSLXQj4R1CZin1hIrLmj rDRSSHKktD8YAK18dQ3Ix7Lo07yJ8erIxBxxxxqVLyUXKDeyjbkBvyU6KTuEXDNL+VQr 1QQzuFpqB0CYmf+5pX3A4eJDz9R/FeezQPycBuGnXY4EFLSYZVijwWE1t6E2M5B99qAH FniHRX5RxN1gZw65OKCdqnG/UzIrS3ICQ278hYR6IoGyzyd6ykow+PajTtCN7ldzFD83 Hcz6o03i9dPHjv0yz+B7ucVCSupfsp/DKM7XkQQq14g4beE60uqTFBLLU79wWmkWweg4 xE4g== 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=mO4UW6jhce2IwLYWJIjyNoNVa+Gr5PBQ2rV1LkhhIeA=; b=iKbMqv6YWFfTuQyp7LJGhYnHsT7VISK/ULa68hwOyFUZI/8BDvhjrTMntvHOyAhDX4 UynKhAIJxwNiSXzNkFYp9E/GcRGLfyKXv2A7lVy8936IjWzzNF44XcisMb6IcKP2rL1M ba3qj5ONlWNertiHBRm8KTIjMBjBocdNSSuOpsWKSGLPBHbo50DY3YUd6BX7+bKEqTrC Ht51HhDDxhNQDotRTCLm9rjvL3zBmGOuVlXUdmTCU65DPAcCGEGdbs88oLpFR64hEZgM DCJ1+I+bAMi8ySkhYONeVzPUaisUoBFYTXkHv5YycxyaqxfS56oAoZFmFYsqR0oFhMzy 7QiA== X-Gm-Message-State: AOAM533neudT2JA6Nl4ernTNisviKdbOXElKFmdL60zeWfA5qp27R35M hcLkeZiVaZitgDHBJ6PcWz6FUQVmul333YbMd9I= X-Received: by 2002:a17:90a:8918:: with SMTP id u24mr3082134pjn.7.1595923796912; Tue, 28 Jul 2020 01:09:56 -0700 (PDT) MIME-Version: 1.0 References: <20200728051153.1590-1-rppt@kernel.org> <20200728051153.1590-4-rppt@kernel.org> In-Reply-To: <20200728051153.1590-4-rppt@kernel.org> From: Max Filippov Date: Tue, 28 Jul 2020 01:09:45 -0700 Message-ID: Subject: Re: [PATCH 03/15] arm, xtensa: simplify initialization of high memory pages To: Mike Rapoport Cc: Andrew Morton , Andy Lutomirski , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Dave Hansen , Ingo Molnar , Marek Szyprowski , Michael Ellerman , Michal Simek , Mike Rapoport , Palmer Dabbelt , Paul Mackerras , Paul Walmsley , Peter Zijlstra , Russell King , Stafford Horne , Thomas Gleixner , Will Deacon , Yoshinori Sato , clang-built-linux@googlegroups.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, LKML , linux-mips@vger.kernel.org, Linux Memory Management List , linux-riscv@lists.infradead.org, linux-s390 , "open list:SUPERH" , "open list:TENSILICA XTENSA PORT (xtensa)" , linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, "open list:SPARC + UltraSPAR..." , "moderated list:H8/300 ARCHITECTURE" , "maintainer:X86 ARCHITECTURE..." 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 Mon, Jul 27, 2020 at 10:12 PM Mike Rapoport wrote: > > From: Mike Rapoport > > The function free_highpages() in both arm and xtensa essentially open-code > for_each_free_mem_range() loop to detect high memory pages that were not > reserved and that should be initialized and passed to the buddy allocator. > > Replace open-coded implementation of for_each_free_mem_range() with usage > of memblock API to simplify the code. > > Signed-off-by: Mike Rapoport > --- > arch/arm/mm/init.c | 48 +++++++------------------------------ > arch/xtensa/mm/init.c | 55 ++++++++----------------------------------- > 2 files changed, 18 insertions(+), 85 deletions(-) For the xtensa part: Reviewed-by: Max Filippov Tested-by: Max Filippov -- Thanks. -- Max