From patchwork Fri Feb 19 05:38:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 585028 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B93F6140307 for ; Fri, 19 Feb 2016 16:40:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=J9TDNyAG; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 939851A0810 for ; Fri, 19 Feb 2016 16:40:24 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=J9TDNyAG; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x236.google.com (mail-pf0-x236.google.com [IPv6:2607:f8b0:400e:c00::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id CFB511A05C0 for ; Fri, 19 Feb 2016 16:39:05 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=J9TDNyAG; dkim-atps=neutral Received: by mail-pf0-x236.google.com with SMTP id q63so44977084pfb.0 for ; Thu, 18 Feb 2016 21:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=H6g8B1P6xHtjFLv1Z1+BM1+s3O2FtOJa//nJm3iK5gA=; b=J9TDNyAGYKvogFj1RZCNHb5Gv54BOxLQzM3pAevxSwNTVDb1gWQxJemI2VOEZm3g5d qm3+NpbvXRaUaa4bsterZV9YTgS/YicQ++0EBxRrGTYd0igxExnuxCGny33YYbNkWkNm 5aFEZie0zSfH11PLRghXGNi6WEnCeOySQQ8TBjPJqrWZlwqaYxVftQAOJY9+egxCM2Ua AuIeumViV7x4sfB+YSW8FjIrIhS4aLn0PihWJWlyxSlW17ACHd4c/YEkfjT5A/lTibw/ Qmo4ERfb/NxvuPEYcAJ6Vq8X69dEZUW9WCX+kPt0vPePUI7bXeUNwup2VpU3tgX+lSty eE5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=H6g8B1P6xHtjFLv1Z1+BM1+s3O2FtOJa//nJm3iK5gA=; b=AdjhRS13JA/Ami4AKP2wRLtk4z6LiaZQnC/fvijC0AdJT8ECBWqmwpYbNLhTxBJn0B pPgkBa/kxEXHzIM9pX8UjtYAAEt9XjVAWhFsiOwASLgd8SY4E9Hv4eHPKNe10YHk/Zj7 VKFamPcKJ2UZ/+Np92l1bFme9qgJyCq57I60jYH9azezsuHLgkRV9G1lkHNrprArOAqi b9LaFjMcMSh0IhMudLyM9JAMgH8KLPpZqcE0aE4wFmw3fTjM//84gJUYNWr23nwETUc8 7bYk077VgosRuGIMK74sRnLnDvbsCYhNUfYVspMyHjz31j9ot7BC2qH57TxmiUgU4SVO if8w== X-Gm-Message-State: AG10YOSdlq1zjI6aSOM1AZ5KENe2LyxBFvOPadH/kbK7Nrpi/V70v/Ku0PW8/dHJ5qzL7Q== X-Received: by 10.98.8.219 with SMTP id 88mr15638580pfi.51.1455860342581; Thu, 18 Feb 2016 21:39:02 -0800 (PST) Received: from circle.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id yx4sm14412337pac.5.2016.02.18.21.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Feb 2016 21:39:02 -0800 (PST) From: Rashmica Gupta To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH V2] powerpc/Kconfig: Update config option based on page size. Date: Fri, 19 Feb 2016 16:38:47 +1100 Message-Id: <1455860327-22913-1-git-send-email-rashmicy@gmail.com> X-Mailer: git-send-email 2.5.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Currently on PPC64 changing kernel pagesize from 4K to 64K leaves FORCE_MAX_ZONEORDER set to 13 - which produces a compile error. The error occurs because of the following constraint (from include/linux/mmzone.h) being violated: MAX_ORDER -1 + PAGESHIFT <= SECTION_SIZE_BITS. Expanding this out, we get: FORCE_MAX_ZONEBITS <= 25 - PAGESHIFT, which requires, for a 64K page, FORCE_MAX_ZONEBITS <= 9. Thus set max value of FORCE_MAX_ZONEORDER for 64K pages to 9, and 4K pages to 13. Also, check the minimum value: In include/linux/huge_mm.h, we have the constraint HPAGE_PMD_ORDER < MAX_ORDER which expands out to: PTE_INDEX_SIZE < FORCE_MAX_ZONEORDER. PTE_INDEX_SIZE is: 9 (4k hash or no hash 4K pgtable) or 8 (64K hash or no hash 64K pgtable). Thus a min value of 8 for 64K pages and 9 for 4K pages is reasonable. So, update the range of FORCE_MAX_ZONEORDER from 9-64 to 8-9 for 64K pages and from 13-64 to 9-13 for 4K pages. Signed-off-by: Rashmica Gupta Reviewed-by: Balbir Singh --- v2: Changed the range for 4K pages and minimum for 64K pages as suggested by Balbir Singh. arch/powerpc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e4824fd04bb7..b933530821fb 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -585,9 +585,9 @@ endchoice config FORCE_MAX_ZONEORDER int "Maximum zone order" - range 9 64 if PPC64 && PPC_64K_PAGES + range 8 9 if PPC64 && PPC_64K_PAGES default "9" if PPC64 && PPC_64K_PAGES - range 13 64 if PPC64 && !PPC_64K_PAGES + range 9 13 if PPC64 && !PPC_64K_PAGES default "13" if PPC64 && !PPC_64K_PAGES range 9 64 if PPC32 && PPC_16K_PAGES default "9" if PPC32 && PPC_16K_PAGES