From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967260AbdADB0v (ORCPT ); Tue, 3 Jan 2017 20:26:51 -0500 Received: from aserp1050.oracle.com ([141.146.126.70]:29275 "EHLO aserp1050.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965614AbdADB0l (ORCPT ); Tue, 3 Jan 2017 20:26:41 -0500 Subject: Re: [PATCH v4] sparc64: Multi-page size support To: David Miller References: <1481652247-12751-1-git-send-email-nitin.m.gupta@oracle.com> <20161227.123409.1061591712732030012.davem@davemloft.net> 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 From: Nitin Gupta Message-ID: Date: Tue, 3 Jan 2017 17:22:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161227.123409.1061591712732030012.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserp1040.oracle.com [141.146.126.69] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/2016 09:34 AM, David Miller wrote: > 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. > I added sun4u related changes just for completeness sake. I don't have access to a sun4u machine so can't be sure if sun4u would work. That's why that _PAGE_SZALL_4V typo escaped my notice. I will enable setup_hugepagesz() for non-hypervisor case and send a v5. Thanks, Nitin