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