Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp412529lqb; Tue, 16 Apr 2024 22:56:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOGIGklMfPay6lFHxkayOoSKsvF7wL5jDw4CymbTZlTpoxXTm8tFNVLMwo4pjjDC16C426xjV4lh3h79eIN0pTB4dk8JSQ//6dYVqiYA== X-Google-Smtp-Source: AGHT+IEJXgs8zvxnxLw4h19hCVnwgX3LSFN13ke8rUmR/n9hbc3lxVmIjCcmLWr8FUNPVJTDW41p X-Received: by 2002:a05:6808:638d:b0:3c5:dd01:507c with SMTP id ec13-20020a056808638d00b003c5dd01507cmr16507214oib.18.1713333364148; Tue, 16 Apr 2024 22:56:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713333364; cv=pass; d=google.com; s=arc-20160816; b=W1R+t7dDx1jg9hvOzf95u3RusIaC3pNEgpTlDIVtFss28rZckAv1w/UJH2eQAjNI6y HgA4TSTtF8BgvHOskAYCKOIzJA9QI9VN0GsSNjxiAf6zPQIhHviCPngO4pidhKZqq5bG 2/99u7fgfcYEH/RJVRMxqFoPBUY6NGvl7HpbnlG1FRfd1WxxuJX+bEu2Ub3zFrxXoiOl BSf/Nt9zH5vTwfGM8AwMApQIaW28IOedMibgl1pQE6ewz/Tk1pEYIF12qhXCKvJGrOLA MJl2MDBYAf4UycDl6FD0ZQdYw5sMMZ4UHK+QA6ZLE5FRHXvPo5v5Su6giKTzpOB/yqrD gOXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=P7EZuFPBwc/TVSBVQ+KC4hiBUgyr0u3XfMl0r7Cshbw=; fh=X0KJSfAM9gJ4kvO0IAX8Uh61vbW7jssjUkgVwQoge7Y=; b=CbGvv0zXDdmnEZA1rPaTfNIDFiuBJpPv5Pz3Q4KraQqnJAKIpsPpbB+mz7658JJ4eZ 4BN76eB+LZFayS6TtT+QLgIR6ehlmoHVe3TR3jQ9cMoWEOVAw7CvYXiqGHOJ5NhyrJts RKqAAE+B71jhP4RcqBvLRxmwU3n3G6pvIfmwin5BI4caXhRQbX28p8b1iPrvhsL8CryL HgP974Xa9pyEtrMGE8P8j36ucMrpowbIeWCE+5EXxL7SsR6v13jXhpguSL8cpwSHGoXA xTz8rfxJkbDhFH3txi2DKCjm+b2ujZJnaoRgE40z7pM3tbQnru4RHjyNQUE1eL9BbvS8 4NgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bPH4Drlv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-147970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u12-20020a65670c000000b005e47afd5c60si10817396pgf.646.2024.04.16.22.56.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 22:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bPH4Drlv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-147970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CA613B218F7 for ; Wed, 17 Apr 2024 05:56:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3BA25339B; Wed, 17 Apr 2024 05:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bPH4Drlv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFCB952F6A; Wed, 17 Apr 2024 05:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713333354; cv=none; b=FoDRzudjilDA2xKGWFfYfa/APTo7LYwzTiO79P+SJn9h4aQYIhiiik+LhR7LZse5Libc+7PLXoss2hu/ufyBG7gBGuFC8dHF4cvo9GzecAwImloOWhTrw9rymdgfgul00pryoUL6TcPsI2UstR3+r62z/9P96tyYZIiGit3o3fk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713333354; c=relaxed/simple; bh=O9FmMFUzDkQ7nDs/vZHy+9Q1QnSIFEtJv05CC2EKQho=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NkNXqZeiurwNDWIVY6KPqkqi5gTG6fH0zY0HgJJpP468uPx5QZC5Od/6j7t7uA+41PUtyG1/UNtu4k/EmG+pOBkRlFqTXIBCUJcQMh2RzMhkjHLlimp/Z6ceLQHKcPP7YdNT8t043nM4G69hnlBOqyyy8oKm+VfVW2ZV9Kh/bz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bPH4Drlv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AED07C072AA; Wed, 17 Apr 2024 05:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713333353; bh=O9FmMFUzDkQ7nDs/vZHy+9Q1QnSIFEtJv05CC2EKQho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bPH4DrlvslPNp+oELqW1c6KOj4BdlN908yjOXXy3O2woVIYezrjAdETI+jSlN7zbI 9AhsYYBEWWEZsNp8/YDr6UbjkDpPuDgOkq0pcXlgTtxcZmToWLt9fObgazLXt86arS B93gTUirCfd5lHLYVMcziUzaIcr6KX5yz+YBVB0wRk0obVw2VOd6ZaMh5e8z12i2Jr RaaqN1vS0VOm4rHMD+oVvZtOUWCsRB4OqExrgg01aOjUXHYHTkj3d/5s8gbpmwzTfK 1iO3uDagRMgIXRvu3ba2grpPM5Z58rCFjFVYRH3j+VwgT+WwzJGkVy6m22N1wGjtzf 4N2vdLu1l+ySg== Date: Wed, 17 Apr 2024 08:54:43 +0300 From: Mike Rapoport To: Wei Yang Cc: skseofh@gmail.com, robh@kernel.org, saravanak@google.com, akpm@linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Daero Lee Subject: Re: [PATCH] memblock: add no-map alloc functions Message-ID: References: <20240415142448.333271-1-skseofh@gmail.com> <20240417023147.ybefdy6fn5drvq5w@master> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240417023147.ybefdy6fn5drvq5w@master> On Wed, Apr 17, 2024 at 02:31:47AM +0000, Wei Yang wrote: > On Mon, Apr 15, 2024 at 06:26:55PM +0300, Mike Rapoport wrote: > [...] > >> + > > > >This changes behaviour of internal function, what effect will it have on > >the users? > > > >> if (!base) > >> return -ENOMEM; > >> > >> *res_base = base; > >> if (nomap) { > >> err = memblock_mark_nomap(base, size); > > Mike > > One question may not directly relevant to this thread. > > NOMAP doesn't apply to all arch? I took a look into the direct mapping > function on x86, memory_map_top_down(). It seems iterate all available pfn > instead of skipping NOMAP range. Right, x86 does not use NOMAP. NOMAP was introduced to ensure that device/firmware memory on arm64 does not have an alias mapping in the direct map because MMU does not allow alias mapping with different caching modes. > >> - if (err) > >> - memblock_phys_free(base, size); > >> } > >> > >> kmemleak_ignore_phys(base); > > > >-- > >Sincerely yours, > >Mike. > > -- > Wei Yang > Help you, Help me -- Sincerely yours, Mike.