Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5463180imu; Mon, 26 Nov 2018 00:22:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uwlk0sU8lMlCW0YUD+k19j2fCFZub2lU02aMBGDidXrsuCt54mcHJXvRByUJmxQPApBr4+ X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr26635600pla.256.1543220561259; Mon, 26 Nov 2018 00:22:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543220561; cv=none; d=google.com; s=arc-20160816; b=Vow3c4xGxh4KkztPnFHDDvhZyyjHwfMAEgfF7TFAOlCSP9fXfY1Cw2XQw3HDH5TkDd vTprT2tSXpO/ot9xdbugrPIaP28uBR9mSuyPWxofzTK271gviXA/92F385PCYj5D9Ixe Pu8I9F1f9WVKer1pFph+G8s+ZmKUbjOljG2XHOiyOYeK65vJsoT0KKVw6RdR7cnZTINt qz2Zm9kFMFs2xqozSbYTylmyxOAEyZVdmzTRTqGf+uFg8r9HzmG3YMW2lZPAVMHLhRQ3 7Ulp++2c3SO+5ZPEY+SEejFJrdCIroZ+GX+IuMzoe66CDSjzWKVXAT271wTyOpRuYAQ3 Metw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=di4PsUpdDbM5/ej/7pGZcof0hVhDgguMhpBso9HbpKw=; b=o5Tsk3wFhcI52NkG5TlDByhwYHASZBoOvq9QUVKmYrWPZpbsAqz+pYzuSASpLmkp7U 5QjEH2jL2Wa/GSLv3Q4oTsrg5rYxJTCv2bazIyh0bxZLtQH0HXZz3Fv7kRDb+J+h1VHk poFSX4KuSFa6EDxVnxFUX3aveHq5dMh6VaNAcdDZrYEN5V33/jSqTnnG8Zb45K20QpbS 3W3r3aLKn01E7AP2xm+8Go27aK9BcILqXO8QahGXk9ahJp9BtSYeKazygJqMAlAdveyq k/ArndBjW57JDCu34Hiy7BFSont9+kABIMC9XvxXDkdiMpzLq/6IH1j3IVinz69a42x0 kAHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Az1GQNRJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g184si29008636pfb.288.2018.11.26.00.22.25; Mon, 26 Nov 2018 00:22:41 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Az1GQNRJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726307AbeKZTPA (ORCPT + 99 others); Mon, 26 Nov 2018 14:15:00 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60294 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbeKZTPA (ORCPT ); Mon, 26 Nov 2018 14:15:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=di4PsUpdDbM5/ej/7pGZcof0hVhDgguMhpBso9HbpKw=; b=Az1GQNRJMI+bk817CrVCZBaC6 tyQxACbydtO8DCDYLO6Co1kelxN14HPEmgHLA+6ZSLA29owYf/0ptQUzCFfsVeehDkRxo8kvS+wnb eQrNsqrxXOpMLhYgqZ537EnxC/rXyxy/m55LzYv78+rDNvbqL+c6xr6X237+KBqKuXVBZbi24h77Q 0txuzkeZ/7ympi7IqOGAm7KiSUdZFpbCxkERrnLWgK1lZTJBsnqDqb9QyfZFvfKb/F/r4Zhha9act jihYY0z4IwITwqpVtNbQL2+n4DLvU+Vst1ZWRh2sbibY7gNlo7WN0wYJ4FZkT6uOasLiQH8bqriUs fUoeRJusQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRC98-00044W-8d; Mon, 26 Nov 2018 08:21:34 +0000 Date: Mon, 26 Nov 2018 00:21:34 -0800 From: Christoph Hellwig To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Andrew Morton , Arnd Bergmann , Benjamin Herrenschmidt , "David S. Miller" , Guan Xuetao , Greentime Hu , Jonas Bonn , Michael Ellerman , Michal Hocko , Michal Simek , Mark Salter , Paul Mackerras , Rich Felker , Russell King , Stefan Kristiansson , Stafford Horne , Vincent Chen , Yoshinori Sato , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-mm@kvack.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 5/5] arch: simplify several early memory allocations Message-ID: <20181126082134.GA10530@infradead.org> References: <1543182277-8819-1-git-send-email-rppt@linux.ibm.com> <1543182277-8819-6-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1543182277-8819-6-git-send-email-rppt@linux.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > static void __init *early_alloc_aligned(unsigned long sz, unsigned long align) > { > - void *ptr = __va(memblock_phys_alloc(sz, align)); > - memset(ptr, 0, sz); > - return ptr; > + return memblock_alloc(sz, align); > } What is the point of keeping this wrapper? > static void __init *early_alloc(unsigned long sz) > { > - void *ptr = __va(memblock_phys_alloc(sz, sz)); > - memset(ptr, 0, sz); > - return ptr; > + return memblock_alloc(sz, sz); > } Same here.