From patchwork Fri Feb 19 01:55:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 584990 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 D3A7F1402EC for ; Fri, 19 Feb 2016 12:57:20 +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=fw1xCL2s; 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 AFE911A06A4 for ; Fri, 19 Feb 2016 12:57:20 +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=fw1xCL2s; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (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 AB2431A0635 for ; Fri, 19 Feb 2016 12:55:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=fw1xCL2s; dkim-atps=neutral Received: by mail-pf0-x231.google.com with SMTP id e127so41828684pfe.3 for ; Thu, 18 Feb 2016 17:55:59 -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=m4fFFtjOucDeH6HBhVLLRqwkTa4yCy5jzJObJaAhn9k=; b=fw1xCL2sAaUWrDbn9BQTbw/YgWRPhGqFMLp7W/RavZnrHyx46gF+NMF5B1TVPo9rds YntPO9c6MfzhJoIrSiTJGtpZ+TxjqaJJ5Ffx5lf9+N8AmuQaRlo7n3eIImEDj5bwoxSm CTTQQ8T+7EFHnGxJafEE5CoJR7TfQ7juoPqfwWwXigFdc3ASx7BpuxjoKin3Kf7VSKRL WFTMJwErJJ63UGotnLLTuOlQADUb6quyeIV4A4c/+6lcXW61z2K7TpZfvu+J6Rn0p/gM Df6U+3wnuTzvsGoskMpNMHhg2+YIMKqyRE5PmfMMvc94XtWt6r/Z2h2ou14O7m6/X1IN Zo0w== 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=m4fFFtjOucDeH6HBhVLLRqwkTa4yCy5jzJObJaAhn9k=; b=h3Gx2u0ue9MPQJIse2f/GVja4Z5lZYyp/rYGkgmKD5D5IhqJO68UQVwiKL/v2bgIiC KMkyKZ4gFwEnZ2+zsiQJsJFl/q2rr+QqUviM+hAcwj+E10TfZdHKHzTl/AzugFMLK58g wL+3cvHuoFpZC20s/F5J3QF7MaL1fRcz9kPSHGy0UPsaeXyYdw0S6v60PB1wYpS9/c2D ig5DI14JmRba4CIlb4CoJke51vf+kNQ8vx1lVZ95AzBBZRcNkiLuW19M7IfrBkWWfPD2 82LbpHgIT9xv1HvcbZxrQ2S3WR750i/knX0tH8DFMuvLWx9sBz8+oTlhe1DZuCLLHr/w AT6A== X-Gm-Message-State: AG10YOSdBG4NVSYrK+3RZ5aPlJ61hB3bU6dByWhCplByzI48bxOZY0ru3DJg7wu2vaV9Uw== X-Received: by 10.98.40.5 with SMTP id o5mr14834570pfo.76.1455846957333; Thu, 18 Feb 2016 17:55:57 -0800 (PST) Received: from circle.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id d65sm13173700pfb.74.2016.02.18.17.55.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Feb 2016 17:55:56 -0800 (PST) From: Rashmica Gupta To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/Kconfig: Update config option based on page size. Date: Fri, 19 Feb 2016 12:55:43 +1100 Message-Id: <1455846943-32147-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. 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 9 for 64K pages is reasonable. So, update the range of FORCE_MAX_ZONEORDER from 9-64 to 9-9. Signed-off-by: Rashmica Gupta Reviewed-by: Balbir Singh --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e4824fd04bb7..3bd3465b93ba 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -585,7 +585,7 @@ endchoice config FORCE_MAX_ZONEORDER int "Maximum zone order" - range 9 64 if PPC64 && PPC_64K_PAGES + range 9 9 if PPC64 && PPC_64K_PAGES default "9" if PPC64 && PPC_64K_PAGES range 13 64 if PPC64 && !PPC_64K_PAGES default "13" if PPC64 && !PPC_64K_PAGES