From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sfQnt6cyKzDslW for ; Thu, 22 Sep 2016 02:59:14 +1000 (AEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8LGw5fi082441 for ; Wed, 21 Sep 2016 12:59:12 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 25kkqbdn6a-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Sep 2016 12:59:12 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Sep 2016 10:58:55 -0600 From: "Aneesh Kumar K.V" To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v3 3/3] powerpc/8xx: Implement support of hugepages In-Reply-To: References: Date: Wed, 21 Sep 2016 22:28:42 +0530 MIME-Version: 1.0 Content-Type: text/plain Message-Id: <8760ppw5od.fsf@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christophe Leroy writes: > 8xx uses a two level page table with two different linux page size > support (4k and 16k). 8xx also support two different hugepage sizes > 512k and 8M. In order to support them on linux we define two different > page table layout. > > The size of pages is in the PGD entry, using PS field (bits 28-29): > 00 : Small pages (4k or 16k) > 01 : 512k pages > 10 : reserved > 11 : 8M pages > > For 512K hugepage size a pgd entry have the below format > [0101] . The hugepte table allocated will contain 8 > entries pointing to 512K huge pte in 4k pages mode and 64 entries in > 16k pages mode. > > For 8M in 16k mode, a pgd entry have the below format > [1101] . The hugepte table allocated will contain 8 > entries pointing to 8M huge pte. > > For 8M in 4k mode, multiple pgd entries point to the same hugepte > address and pgd entry will have the below format > [1101]. The hugepte table allocated will only have one > entry. > > For the time being, we do not support CPU15 ERRATA when HUGETLB is > selected > For the generic bits Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Christophe Leroy > --- > v2: This v1 was split in two parts. This part focuses on adding the > support on 8xx. It also fixes an error in TLBmiss handlers in the > case of 8M hugepages in 16k pages mode. > -aneesh