From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Mon, 29 Oct 2018 17:53:04 +0000 Subject: [PATCH v2 1/6] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define In-Reply-To: <20181015175702.9036-2-logang@deltatee.com> References: <20181015175702.9036-1-logang@deltatee.com> <20181015175702.9036-2-logang@deltatee.com> Message-ID: <20181029175303.GB16739@arm.com> To: linux-riscv@lists.infradead.org List-Id: linux-riscv.lists.infradead.org Hi Logan, On Mon, Oct 15, 2018 at 11:56:57AM -0600, Logan Gunthorpe wrote: > This define is used by arm64 to calculate the size of the vmemmap > region. It is defined as the log2 of the upper bound on the size > of a struct page. > > We move it into mm_types.h so it can be defined properly instead of > set and checked with a build bug. This also allows us to use the same > define for riscv. > > Signed-off-by: Logan Gunthorpe > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Arnd Bergmann > Cc: Andrew Morton > Cc: Christoph Hellwig > --- > arch/arm64/include/asm/memory.h | 9 --------- > arch/arm64/mm/init.c | 8 -------- > include/asm-generic/fixmap.h | 1 + > include/linux/mm_types.h | 5 +++++ > 4 files changed, 6 insertions(+), 17 deletions(-) This looks like a really good cleanup to me, thanks: Acked-by: Will Deacon Will 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 78F6CC0044C for ; Mon, 29 Oct 2018 17:53:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 35386204FD for ; Mon, 29 Oct 2018 17:53:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oiB1gK83" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35386204FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-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=bombadil.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=bz31a+oJSK/UHTZjVI1/UPeRi6HfeGRBkVURjkMY2P8=; b=oiB1gK83ODM2Jl 9fKUF+dxXacjisH31rXRthxt131/acQQyXug8H5gWx5fqv7LhkclyLcgwmiUjX/EsVPDnpT0/Bucz CvhXi7urCaHe6Y2oyfHGVwfKkfiCOl9O6mdiLiQz7FlNtGIj3Wj+fpWt7sgStY/170RmB4ydQFxYT v8JgWUdAQVL0Xx3DlTExZqt0HjKMrnsh7EfgRk61q6D/XZokUIbSykM6q1YurK8zeimAfrY6oBv2e KwhHqOrjwuy13uKac7hKgx7CksvuVWBnAwdjsX147GVZNMi/MuxQZerzvVkXbAIkbVh9yyfp180i2 JoeN+Fo+E+P9yroZb3ug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHBjU-0002dH-4r; Mon, 29 Oct 2018 17:53:44 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHBiu-0002NZ-87; Mon, 29 Oct 2018 17:53:09 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 967AC80D; Mon, 29 Oct 2018 10:52:57 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 66DE33F6A8; Mon, 29 Oct 2018 10:52:57 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 7859D1AE091C; Mon, 29 Oct 2018 17:53:04 +0000 (GMT) Date: Mon, 29 Oct 2018 17:53:04 +0000 From: Will Deacon To: Logan Gunthorpe Subject: Re: [PATCH v2 1/6] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define Message-ID: <20181029175303.GB16739@arm.com> References: <20181015175702.9036-1-logang@deltatee.com> <20181015175702.9036-2-logang@deltatee.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181015175702.9036-2-logang@deltatee.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_105308_294975_F8166AE7 X-CRM114-Status: GOOD ( 18.30 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Andrew Morton , Arnd Bergmann , linux-sh@vger.kernel.org, Catalin Marinas , Palmer Dabbelt , linux-kernel@vger.kernel.org, Stephen Bates , linux-mm@kvack.org, linux-riscv@lists.infradead.org, Christoph Hellwig , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org Message-ID: <20181029175304.AuctVLVfP7cIWL_8M2q8nJL1ay8bXfPX1nilR_v5RCU@z> Hi Logan, On Mon, Oct 15, 2018 at 11:56:57AM -0600, Logan Gunthorpe wrote: > This define is used by arm64 to calculate the size of the vmemmap > region. It is defined as the log2 of the upper bound on the size > of a struct page. > > We move it into mm_types.h so it can be defined properly instead of > set and checked with a build bug. This also allows us to use the same > define for riscv. > > Signed-off-by: Logan Gunthorpe > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Arnd Bergmann > Cc: Andrew Morton > Cc: Christoph Hellwig > --- > arch/arm64/include/asm/memory.h | 9 --------- > arch/arm64/mm/init.c | 8 -------- > include/asm-generic/fixmap.h | 1 + > include/linux/mm_types.h | 5 +++++ > 4 files changed, 6 insertions(+), 17 deletions(-) This looks like a really good cleanup to me, thanks: Acked-by: Will Deacon Will _______________________________________________ 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: Will Deacon Date: Mon, 29 Oct 2018 17:53:04 +0000 Subject: Re: [PATCH v2 1/6] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define Message-Id: <20181029175303.GB16739@arm.com> List-Id: References: <20181015175702.9036-1-logang@deltatee.com> <20181015175702.9036-2-logang@deltatee.com> In-Reply-To: <20181015175702.9036-2-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org Hi Logan, On Mon, Oct 15, 2018 at 11:56:57AM -0600, Logan Gunthorpe wrote: > This define is used by arm64 to calculate the size of the vmemmap > region. It is defined as the log2 of the upper bound on the size > of a struct page. > > We move it into mm_types.h so it can be defined properly instead of > set and checked with a build bug. This also allows us to use the same > define for riscv. > > Signed-off-by: Logan Gunthorpe > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Arnd Bergmann > Cc: Andrew Morton > Cc: Christoph Hellwig > --- > arch/arm64/include/asm/memory.h | 9 --------- > arch/arm64/mm/init.c | 8 -------- > include/asm-generic/fixmap.h | 1 + > include/linux/mm_types.h | 5 +++++ > 4 files changed, 6 insertions(+), 17 deletions(-) This looks like a really good cleanup to me, thanks: Acked-by: Will Deacon Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Mon, 29 Oct 2018 17:53:04 +0000 Subject: [PATCH v2 1/6] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define In-Reply-To: <20181015175702.9036-2-logang@deltatee.com> References: <20181015175702.9036-1-logang@deltatee.com> <20181015175702.9036-2-logang@deltatee.com> Message-ID: <20181029175303.GB16739@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Logan, On Mon, Oct 15, 2018 at 11:56:57AM -0600, Logan Gunthorpe wrote: > This define is used by arm64 to calculate the size of the vmemmap > region. It is defined as the log2 of the upper bound on the size > of a struct page. > > We move it into mm_types.h so it can be defined properly instead of > set and checked with a build bug. This also allows us to use the same > define for riscv. > > Signed-off-by: Logan Gunthorpe > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Arnd Bergmann > Cc: Andrew Morton > Cc: Christoph Hellwig > --- > arch/arm64/include/asm/memory.h | 9 --------- > arch/arm64/mm/init.c | 8 -------- > include/asm-generic/fixmap.h | 1 + > include/linux/mm_types.h | 5 +++++ > 4 files changed, 6 insertions(+), 17 deletions(-) This looks like a really good cleanup to me, thanks: Acked-by: Will Deacon Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by kanga.kvack.org (Postfix) with ESMTP id 3D9C96B039C for ; Mon, 29 Oct 2018 13:52:59 -0400 (EDT) Received: by mail-ot1-f71.google.com with SMTP id h1so1667428oti.6 for ; Mon, 29 Oct 2018 10:52:59 -0700 (PDT) Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id e84-v6si3657880oig.43.2018.10.29.10.52.58 for ; Mon, 29 Oct 2018 10:52:58 -0700 (PDT) Date: Mon, 29 Oct 2018 17:53:04 +0000 From: Will Deacon Subject: Re: [PATCH v2 1/6] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define Message-ID: <20181029175303.GB16739@arm.com> References: <20181015175702.9036-1-logang@deltatee.com> <20181015175702.9036-2-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181015175702.9036-2-logang@deltatee.com> Sender: owner-linux-mm@kvack.org List-ID: To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, Stephen Bates , Palmer Dabbelt , Albert Ou , Christoph Hellwig , Andrew Morton , Arnd Bergmann , Catalin Marinas Hi Logan, On Mon, Oct 15, 2018 at 11:56:57AM -0600, Logan Gunthorpe wrote: > This define is used by arm64 to calculate the size of the vmemmap > region. It is defined as the log2 of the upper bound on the size > of a struct page. > > We move it into mm_types.h so it can be defined properly instead of > set and checked with a build bug. This also allows us to use the same > define for riscv. > > Signed-off-by: Logan Gunthorpe > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Arnd Bergmann > Cc: Andrew Morton > Cc: Christoph Hellwig > --- > arch/arm64/include/asm/memory.h | 9 --------- > arch/arm64/mm/init.c | 8 -------- > include/asm-generic/fixmap.h | 1 + > include/linux/mm_types.h | 5 +++++ > 4 files changed, 6 insertions(+), 17 deletions(-) This looks like a really good cleanup to me, thanks: Acked-by: Will Deacon Will