From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933047AbcL0ReX (ORCPT ); Tue, 27 Dec 2016 12:34:23 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:40834 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752415AbcL0ReP (ORCPT ); Tue, 27 Dec 2016 12:34:15 -0500 Date: Tue, 27 Dec 2016 12:34:09 -0500 (EST) Message-Id: <20161227.123409.1061591712732030012.davem@davemloft.net> To: nitin.m.gupta@oracle.com Cc: mike.kravetz@oracle.com, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, julian.calaby@gmail.com, hughd@google.com, adam.buchbinder@gmail.com, minchan@kernel.org, sfr@canb.auug.org.au, paul.gortmaker@windriver.com, thomas.tai@oracle.com, chris.hyser@oracle.com, atish.patra@oracle.com, mhocko@suse.com, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] sparc64: Multi-page size support From: David Miller In-Reply-To: <1481652247-12751-1-git-send-email-nitin.m.gupta@oracle.com> References: <1481652247-12751-1-git-send-email-nitin.m.gupta@oracle.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 27 Dec 2016 08:34:57 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nitin Gupta Date: Tue, 13 Dec 2016 10:03:18 -0800 > +static unsigned int sun4u_huge_tte_to_shift(pte_t entry) > +{ > + unsigned long tte_szbits = pte_val(entry) & _PAGE_SZALL_4V; > + unsigned int shift; > + > + switch (tte_szbits) { > + case _PAGE_SZ256MB_4U: > + shift = HPAGE_256MB_SHIFT; > + break; You added all the code necessary to do this on the sun4u chips that support 256MB TTEs, so you might as well enable it in the initialization code. I'm pretty sure this is an UltraSPARC-IV and later feature.