From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Date: Sun, 2 Aug 2020 20:01:10 +0200 Message-ID: <20200802180110.GA86614@gmail.com> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> Sender: sparclinux-owner@vger.kernel.org To: Mike Rapoport Cc: Andrew Morton , Andy Lutomirski , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Dave Hansen , Emil Renner Berthing , Ingo Molnar , Hari Bathini , Marek Szyprowski , Max Filippov , Michael Ellerman , Michal Simek , Mike Rapoport , Palmer Dabbelt , Paul Mackerras , Paul Walmsley , Peter Zijlstra List-Id: linux-arch.vger.kernel.org * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25475C433E1 for ; Sun, 2 Aug 2020 18:01:22 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E01C720759 for ; Sun, 2 Aug 2020 18:01:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uknpQ4DM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E01C720759 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 83345203EC; Sun, 2 Aug 2020 18:01:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fDYH0IfN-7V0; Sun, 2 Aug 2020 18:01:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 344F22026D; Sun, 2 Aug 2020 18:01:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F398BC0050; Sun, 2 Aug 2020 18:01:19 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2751DC004C for ; Sun, 2 Aug 2020 18:01:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 11C4320387 for ; Sun, 2 Aug 2020 18:01:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CoK8T1JX3YpX for ; Sun, 2 Aug 2020 18:01:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by silver.osuosl.org (Postfix) with ESMTPS id CB5E92026D for ; Sun, 2 Aug 2020 18:01:16 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id o18so36318065eje.7 for ; Sun, 02 Aug 2020 11:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=uknpQ4DMxgwRI+7RXzKKaxSHSsHT4JX+qN+G3Zw62I+z7K+v0oM82e+YsM5L2ibFwZ ZtPLnfzJt8IFqkH991n5kK4zcZ2/fsZTMmLNrFK7hPe3auCniFr0qepP8+PKlvq/+X4Y 6FOXivLK6+BH8tYzSACnWRFDv80Xb8yKxgJKQm36t4gslbAugHoQp37YMrGD2IIEXvEW lHLgWw9HHo88+yhhI1SsXvM9DHpmveOnmArUrLkNHDmUxgOR5yVJEiJKHqYfS7BI8LbU 2xANFxjuEWzWjHDwLiCM886yebnNr5jnEbr0RMGk15mMx04KzIUKhAfWZe7dw+zaroY/ roWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=Zr/zOV2FgaKvDYRGZ96IAgRinOskcAS2T+u50wqka/guxU8r24Rb+jJGVLMFY/9YlH l01sKO/OU4Vz4vnVEtIOhKLgTST7/3ZqtNKi0mRz31R2+wskIu3YCs3eGxEAhPLuIOwL a4AxHDpv8xitxJxodpHGVXgJzcfN1ZMk+p/DCohwOXr5IBMIsqbhwYLlDQLfctJEM7Kb 8MNib6tmY0cpnDCa73pKY5OIQhBc9ookI4yWLxJQL0ZDAWN141u4SJmaBWRXpJFu1RGc cWohJLuyguKCxuqTTkH/ZmsIHykwlTqLz6u/78I++qC7QdW5RNrarAbw3RgzRtS9Ro6q YC7g== X-Gm-Message-State: AOAM5339FsPCbqaEbFoWhvvKZ/BVaN6QRs8REfRUowD7ToYUtL2ys5BH +dIFNlbMOvinjKDbXwX5PPU= X-Google-Smtp-Source: ABdhPJzKJVSrfGoQ7+sK5UMaqi5wNpNE5CXoSPOw/FVAw4VikTzayUXH2AGSuVR6AmkbWWniCTFE/A== X-Received: by 2002:a17:906:c187:: with SMTP id g7mr13929214ejz.108.1596391275076; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id t19sm14191760edw.63.2020.08.02.11.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 11:01:13 -0700 (PDT) Date: Sun, 2 Aug 2020 20:01:10 +0200 From: Ingo Molnar To: Mike Rapoport Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Message-ID: <20200802180110.GA86614@gmail.com> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> Cc: Thomas Gleixner , Emil Renner Berthing , linux-sh@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , linux-mips@vger.kernel.org, Max Filippov , Paul Mackerras , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Will Deacon , Christoph Hellwig , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Michael Ellerman , x86@kernel.org, Russell King , Mike Rapoport , clang-built-linux@googlegroups.com, Ingo Molnar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, Borislav Petkov , Andy Lutomirski , Paul Walmsley , Stafford Horne , Hari Bathini , Michal Simek , Yoshinori Sato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Palmer Dabbelt , Andrew Morton , linuxppc-dev@lists.ozlabs.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6E90C433E0 for ; Sun, 2 Aug 2020 18:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A7B820759 for ; Sun, 2 Aug 2020 18:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596391281; bh=eNMVHfQX39Yty+zJexLcHSPVgVrkFYvaSKFTPruKvJY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=I2qqve+5PQ/avl1GTUur85ECo+h+ne0g5VFIG+ogs2wH8A/xVfhxa3VHAAkCYfG0w QlQV8TLPtW0LSn55Uly/EBrEseuurxXoH/Vc8onHx1H0p90ivbbjV3XJ/GgKQ0MsaO Ne95gCBLIiwKX26S9+baLbPCK06G9nqul4G8cwDY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726826AbgHBSBR (ORCPT ); Sun, 2 Aug 2020 14:01:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbgHBSBQ (ORCPT ); Sun, 2 Aug 2020 14:01:16 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 598E8C06174A; Sun, 2 Aug 2020 11:01:16 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id f24so15844056ejx.6; Sun, 02 Aug 2020 11:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=uknpQ4DMxgwRI+7RXzKKaxSHSsHT4JX+qN+G3Zw62I+z7K+v0oM82e+YsM5L2ibFwZ ZtPLnfzJt8IFqkH991n5kK4zcZ2/fsZTMmLNrFK7hPe3auCniFr0qepP8+PKlvq/+X4Y 6FOXivLK6+BH8tYzSACnWRFDv80Xb8yKxgJKQm36t4gslbAugHoQp37YMrGD2IIEXvEW lHLgWw9HHo88+yhhI1SsXvM9DHpmveOnmArUrLkNHDmUxgOR5yVJEiJKHqYfS7BI8LbU 2xANFxjuEWzWjHDwLiCM886yebnNr5jnEbr0RMGk15mMx04KzIUKhAfWZe7dw+zaroY/ roWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=qCdOCZpG7/sz7BFat4IaZBpFpBNC4rySzQREiTNaBC3onXjdu7Ayn4Ds8H5qBm0qLN Tjudbzz7DesieuzKE758Bu/pGXbrCi50WUxTtsLXgctGf+AKIRyWICrN8VURgKOzSwKm yejLw28lTL+gllHMiqr0enMKndpTm7/3nMf5Ps0/kPSte8A3Bjzl5vxIUyAVqBHAYcvi wAfiMcXiuu/59k9X99jDPl2f+dwH8AFhk7G840YX6Mcr9J3pLfyXQHaUKn5TcmutMDE1 kqeNkNtWgNEqC/pABcW+nEExVLlQKpwYL5W5O5VLn8VlvLY8uYTKp9IC235z1/Tis2AH qpDg== X-Gm-Message-State: AOAM532N1e5Iq13l2IZ3ehtocfYpaduM/+U1aKn3bVwDV49bSy4e+uWt 8PfQP50/xpnfy6geOglkZJU= X-Google-Smtp-Source: ABdhPJzKJVSrfGoQ7+sK5UMaqi5wNpNE5CXoSPOw/FVAw4VikTzayUXH2AGSuVR6AmkbWWniCTFE/A== X-Received: by 2002:a17:906:c187:: with SMTP id g7mr13929214ejz.108.1596391275076; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id t19sm14191760edw.63.2020.08.02.11.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 11:01:13 -0700 (PDT) Date: Sun, 2 Aug 2020 20:01:10 +0200 From: Ingo Molnar To: Mike Rapoport Cc: Andrew Morton , Andy Lutomirski , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Dave Hansen , Emil Renner Berthing , Ingo Molnar , Hari Bathini , Marek Szyprowski , Max Filippov , 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-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Message-ID: <20200802180110.GA86614@gmail.com> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24C7DC433DF for ; Sun, 2 Aug 2020 18:01:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6AF120738 for ; Sun, 2 Aug 2020 18:01:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VKLSHr0Z"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uknpQ4DM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6AF120738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ue2SYQupT1/SVeTtkWKo20Q0VsU0zNEXR0hY1BLb4fc=; b=VKLSHr0Z2cIqZCiy1iBoMdkVC RjzRwK7tPjxMUqQpo5p+cYE3xRhhMeC3O2xxiaogozXV7SD529cIJ0Lt2tDR7GfmYI2AH6FBbm4pv kTHI1F75Uf3/Do2XpHgevQ1oQdm2D2GDmyP4iJ+/7jMg46a3ZYaHrDYlz/+vsm3X0Pz9hLc/tPfWE e17NeH8qvGtIO0ld6qCAtcCl+v6pmFLoQ0mQF6cWxM1PcJv+M0nL1lLrxKIqFJdaEcGt1/nSZK9rT ERmNgTxoixJARWoPQfryg7BgQuoG+joeEXMzTtrKY1+bH/gyq0nyLvEY0LKa5g0dMMcd0nceVf/hs nradESnDA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2IIT-0008DJ-1r; Sun, 02 Aug 2020 18:01:21 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2IIP-0008BT-NV; Sun, 02 Aug 2020 18:01:18 +0000 Received: by mail-ej1-x643.google.com with SMTP id d6so22500036ejr.5; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=uknpQ4DMxgwRI+7RXzKKaxSHSsHT4JX+qN+G3Zw62I+z7K+v0oM82e+YsM5L2ibFwZ ZtPLnfzJt8IFqkH991n5kK4zcZ2/fsZTMmLNrFK7hPe3auCniFr0qepP8+PKlvq/+X4Y 6FOXivLK6+BH8tYzSACnWRFDv80Xb8yKxgJKQm36t4gslbAugHoQp37YMrGD2IIEXvEW lHLgWw9HHo88+yhhI1SsXvM9DHpmveOnmArUrLkNHDmUxgOR5yVJEiJKHqYfS7BI8LbU 2xANFxjuEWzWjHDwLiCM886yebnNr5jnEbr0RMGk15mMx04KzIUKhAfWZe7dw+zaroY/ roWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=k1Lnpkn3qic30B+fEjxsJlIgP7X+YXrjU12aJ6NSv9B+++OJsxS8927vj49c+o3Jez UFYddJbCzKVnP5XZD5apHy/P7dmR3crvEylQ0/nIIu3Wn9UebvhLC6W6DRiqNUQqwTbX dgskfW2Ligp0Ijw52N4L3kvgdK6Iv2S4uQHVCDvElyPODLTAguOxmRsnmucABlHGHMUM l0dm7X6Oo0xTZY7DBGP/ks1gcW7uCH4QH19Indz0JqClHTUfmOMuI6xzbYFRrg1Fdldp js0zziz2jKtMXSvNPdncAUxkY5p4LJWsPiIc7+feyrFqxaazDxq+LDjwSbaex9/u1fiJ 3EYg== X-Gm-Message-State: AOAM531ku18MEpGDVL8udgrMuHESXL+DIbr2s0VuW2lxN5r5T9iUdtGO OZgkhj1cJfB7SCcjxO/rJss= X-Google-Smtp-Source: ABdhPJzKJVSrfGoQ7+sK5UMaqi5wNpNE5CXoSPOw/FVAw4VikTzayUXH2AGSuVR6AmkbWWniCTFE/A== X-Received: by 2002:a17:906:c187:: with SMTP id g7mr13929214ejz.108.1596391275076; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id t19sm14191760edw.63.2020.08.02.11.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 11:01:13 -0700 (PDT) Date: Sun, 2 Aug 2020 20:01:10 +0200 From: Ingo Molnar To: Mike Rapoport Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Message-ID: <20200802180110.GA86614@gmail.com> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_140117_855130_8F643CC7 X-CRM114-Status: GOOD ( 15.26 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Emil Renner Berthing , linux-sh@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , linux-mips@vger.kernel.org, Max Filippov , Paul Mackerras , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Will Deacon , Christoph Hellwig , Marek Szyprowski , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Baoquan He , Michael Ellerman , x86@kernel.org, Russell King , Mike Rapoport , clang-built-linux@googlegroups.com, Ingo Molnar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, Borislav Petkov , Andy Lutomirski , Paul Walmsley , Stafford Horne , Hari Bathini , Michal Simek , Yoshinori Sato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Palmer Dabbelt , Andrew Morton , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Date: Sun, 02 Aug 2020 18:01:10 +0000 Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Message-Id: <20200802180110.GA86614@gmail.com> List-Id: References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mike Rapoport Cc: Andrew Morton , Andy Lutomirski , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Dave Hansen , Emil Renner Berthing , Ingo Molnar , Hari Bathini , Marek Szyprowski , Max Filippov , Michael Ellerman , Michal Simek , Mike Rapoport , Palmer Dabbelt , Paul Mackerras , Paul Walmsley , Peter Zijlstra * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Date: Sun, 2 Aug 2020 20:01:10 +0200 Subject: [OpenRISC] [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> Message-ID: <20200802180110.GA86614@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BA3FC433DF for ; Sun, 2 Aug 2020 18:03:39 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AFBD20738 for ; Sun, 2 Aug 2020 18:03:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uknpQ4DM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AFBD20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BKTQw11zWzDqMb for ; Mon, 3 Aug 2020 04:03:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::643; helo=mail-ej1-x643.google.com; envelope-from=mingo.kernel.org@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=uknpQ4DM; dkim-atps=neutral Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BKTNN4JwWzDqDr for ; Mon, 3 Aug 2020 04:01:24 +1000 (AEST) Received: by mail-ej1-x643.google.com with SMTP id l4so36261010ejd.13 for ; Sun, 02 Aug 2020 11:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=uknpQ4DMxgwRI+7RXzKKaxSHSsHT4JX+qN+G3Zw62I+z7K+v0oM82e+YsM5L2ibFwZ ZtPLnfzJt8IFqkH991n5kK4zcZ2/fsZTMmLNrFK7hPe3auCniFr0qepP8+PKlvq/+X4Y 6FOXivLK6+BH8tYzSACnWRFDv80Xb8yKxgJKQm36t4gslbAugHoQp37YMrGD2IIEXvEW lHLgWw9HHo88+yhhI1SsXvM9DHpmveOnmArUrLkNHDmUxgOR5yVJEiJKHqYfS7BI8LbU 2xANFxjuEWzWjHDwLiCM886yebnNr5jnEbr0RMGk15mMx04KzIUKhAfWZe7dw+zaroY/ roWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=Wdn6N8LbZBiHmicPjA82cy5H2jTVzyDhLD5UDL5s5r44R/WciRkg12qV+oNBK0P5R2 tUtSpVxMLSbcIkN8YQpDIAf5qASvcWHVmH0rWhqb1vqba1+TLYpajykpLwttJOyBEowT PlWQUqgcomcGFkpO1mIvhg4FkIK3e8sEvhBIIhguekI+eSsorZJ8LZ0FwbouUdtsUv5X /XWvPi8/0PcvbLjYPQf+he6CeVTZJuDFHLlr/s8Foj1AVr43+sW7oAcon5m/Bepkocus AlQDsmYJBLl49kaBdGSi5+LsX4OcLSEiiy0eBmZGIWzLUA4DNfID+bRC4v0J7xiKrb7A C/4Q== X-Gm-Message-State: AOAM533CozxeoXPRkOAXGmGeS4Opl21hQsq8LTUDtTjVEoJyihv0nGFL TywefxI1r6fRJqhQBFO0u20= X-Google-Smtp-Source: ABdhPJzKJVSrfGoQ7+sK5UMaqi5wNpNE5CXoSPOw/FVAw4VikTzayUXH2AGSuVR6AmkbWWniCTFE/A== X-Received: by 2002:a17:906:c187:: with SMTP id g7mr13929214ejz.108.1596391275076; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id t19sm14191760edw.63.2020.08.02.11.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 11:01:13 -0700 (PDT) Date: Sun, 2 Aug 2020 20:01:10 +0200 From: Ingo Molnar To: Mike Rapoport Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Message-ID: <20200802180110.GA86614@gmail.com> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Emil Renner Berthing , linux-sh@vger.kernel.org, Peter Zijlstra , Dave Hansen , linux-mips@vger.kernel.org, Max Filippov , Paul Mackerras , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Will Deacon , Christoph Hellwig , Marek Szyprowski , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Baoquan He , x86@kernel.org, Russell King , Mike Rapoport , clang-built-linux@googlegroups.com, Ingo Molnar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, Borislav Petkov , Andy Lutomirski , Paul Walmsley , Stafford Horne , Hari Bathini , Michal Simek , Yoshinori Sato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Palmer Dabbelt , Andrew Morton , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3312BC433DF for ; Sun, 2 Aug 2020 18:03:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 079EE20759 for ; Sun, 2 Aug 2020 18:03:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BBmeD2Fa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uknpQ4DM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 079EE20759 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DDsJF+zNdwNHB/ASQZK5ucwpNPdZ8LdAnk7cgY1/Ie4=; b=BBmeD2FaciMi+JaAZhSTeXmPx wk3hl/ZrS+idFCKFFhX1d5kWR+mpTJTTMERtRJl1ZMEem7J3dHczS9M7HXGOwEhlEH0sB8S5ikfat 7+qT5VRwtm+nw6T0XBSe5PC8stIPeLr0AenmtGOP/XEdlNOo+ELzRaNFNraltZ6fiB8e/yI4eWfS3 q8CgNp19wf9tSfPdMhxRsrk89VAsuNkljrLDWPPN34l8So0Wj0OVTtdkwyq0i11VUPsND51X8/kDF BXf8awbH/VW35hp3ppe0JJaUYEb3xYMGaF017/bCuqEwXT8bzZMIzkWq/wOmAxHM0M6AKkDHXGSef N5orliWbQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2IIR-0008CV-Kv; Sun, 02 Aug 2020 18:01:19 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2IIP-0008BT-NV; Sun, 02 Aug 2020 18:01:18 +0000 Received: by mail-ej1-x643.google.com with SMTP id d6so22500036ejr.5; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=uknpQ4DMxgwRI+7RXzKKaxSHSsHT4JX+qN+G3Zw62I+z7K+v0oM82e+YsM5L2ibFwZ ZtPLnfzJt8IFqkH991n5kK4zcZ2/fsZTMmLNrFK7hPe3auCniFr0qepP8+PKlvq/+X4Y 6FOXivLK6+BH8tYzSACnWRFDv80Xb8yKxgJKQm36t4gslbAugHoQp37YMrGD2IIEXvEW lHLgWw9HHo88+yhhI1SsXvM9DHpmveOnmArUrLkNHDmUxgOR5yVJEiJKHqYfS7BI8LbU 2xANFxjuEWzWjHDwLiCM886yebnNr5jnEbr0RMGk15mMx04KzIUKhAfWZe7dw+zaroY/ roWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=cWqP425OZ00Oz4x2XaCg5sL4Bi3BuFHBZ9fhbstEoPo=; b=k1Lnpkn3qic30B+fEjxsJlIgP7X+YXrjU12aJ6NSv9B+++OJsxS8927vj49c+o3Jez UFYddJbCzKVnP5XZD5apHy/P7dmR3crvEylQ0/nIIu3Wn9UebvhLC6W6DRiqNUQqwTbX dgskfW2Ligp0Ijw52N4L3kvgdK6Iv2S4uQHVCDvElyPODLTAguOxmRsnmucABlHGHMUM l0dm7X6Oo0xTZY7DBGP/ks1gcW7uCH4QH19Indz0JqClHTUfmOMuI6xzbYFRrg1Fdldp js0zziz2jKtMXSvNPdncAUxkY5p4LJWsPiIc7+feyrFqxaazDxq+LDjwSbaex9/u1fiJ 3EYg== X-Gm-Message-State: AOAM531ku18MEpGDVL8udgrMuHESXL+DIbr2s0VuW2lxN5r5T9iUdtGO OZgkhj1cJfB7SCcjxO/rJss= X-Google-Smtp-Source: ABdhPJzKJVSrfGoQ7+sK5UMaqi5wNpNE5CXoSPOw/FVAw4VikTzayUXH2AGSuVR6AmkbWWniCTFE/A== X-Received: by 2002:a17:906:c187:: with SMTP id g7mr13929214ejz.108.1596391275076; Sun, 02 Aug 2020 11:01:15 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id t19sm14191760edw.63.2020.08.02.11.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 11:01:13 -0700 (PDT) Date: Sun, 2 Aug 2020 20:01:10 +0200 From: Ingo Molnar To: Mike Rapoport Subject: Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation Message-ID: <20200802180110.GA86614@gmail.com> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-14-rppt@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200802163601.8189-14-rppt@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_140117_855130_8F643CC7 X-CRM114-Status: GOOD ( 15.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Emil Renner Berthing , linux-sh@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , linux-mips@vger.kernel.org, Max Filippov , Paul Mackerras , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Will Deacon , Christoph Hellwig , Marek Szyprowski , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Baoquan He , Michael Ellerman , x86@kernel.org, Russell King , Mike Rapoport , clang-built-linux@googlegroups.com, Ingo Molnar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, Borislav Petkov , Andy Lutomirski , Paul Walmsley , Stafford Horne , Hari Bathini , Michal Simek , Yoshinori Sato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Palmer Dabbelt , Andrew Morton , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Mike Rapoport wrote: > From: Mike Rapoport > > Currently, initrd image is reserved very early during setup and then it > might be relocated and re-reserved after the initial physical memory > mapping is created. The "late" reservation of memblock verifies that mapped > memory size exceeds the size of initrd, the checks whether the relocation > required and, if yes, relocates inirtd to a new memory allocated from > memblock and frees the old location. > > The check for memory size is excessive as memblock allocation will anyway > fail if there is not enough memory. Besides, there is no point to allocate > memory from memblock using memblock_find_in_range() + memblock_reserve() > when there exists memblock_phys_alloc_range() with required functionality. > > Remove the redundant check and simplify memblock allocation. > > Signed-off-by: Mike Rapoport Assuming there's no hidden dependency here breaking something: Acked-by: Ingo Molnar Thanks, Ingo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel