From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936214AbcIUQ7C (ORCPT ); Wed, 21 Sep 2016 12:59:02 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49170 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933541AbcIUQ7B (ORCPT ); Wed, 21 Sep 2016 12:59:01 -0400 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 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092116-0012-0000-0000-000010B5F217 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005797; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00759917; UDB=6.00361360; IPR=6.00534337; BA=6.00004744; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012740; XFM=3.00000011; UTC=2016-09-21 16:58:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092116-0013-0000-0000-000045AB79BE Message-Id: <8760ppw5od.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-21_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609210307 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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