From patchwork Wed Sep 24 14:29:08 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1289 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 70DD2DE171 for ; Thu, 25 Sep 2008 00:30:15 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from sipsolutions.net (xc.sipsolutions.net [83.246.72.84]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0B218DDF96 for ; Thu, 25 Sep 2008 00:29:59 +1000 (EST) Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KiVNJ-0006hs-Bk; Wed, 24 Sep 2008 16:29:53 +0200 Subject: [PATCH v2] powerpc: enforce sane MAX_ORDER From: Johannes Berg To: Kumar Gala In-Reply-To: <61059ECE-2B42-46B3-B5B3-E5CFA3A5EFC9@kernel.crashing.org> References: <1222262654.4257.4.camel@johannes.berg> <1222265583.4257.21.camel@johannes.berg> <61059ECE-2B42-46B3-B5B3-E5CFA3A5EFC9@kernel.crashing.org> Date: Wed, 24 Sep 2008 16:29:08 +0200 Message-Id: <1222266548.4257.26.camel@johannes.berg> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Cc: linuxppc-dev list , Paul Mackerras X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org powerpc uses CONFIG_FORCE_MAX_ZONEORDER, and some things depend on it being at least 10 when 64k pages are not configured (notably the dart iommu code with CONFIG_PM). The defaults are fine, but when going from a 64K pages config to one without 64K pages, MAX_ORDER stays at 9 which is too low for 4K pages. This patch makes the Kconfig enforce at least the defaults. Signed-off-by: Johannes Berg Acked-by: Timur Tabi --- > We'll I'm ok with that, but I dont think we should be values that > make > no sense. 64 would seem the max even in a 64-bit system. Indeed, it makes little sense to allow you to set more than the address space, so here's a version with max 64. --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -415,8 +415,11 @@ config PPC_64K_PAGES config FORCE_MAX_ZONEORDER int "Maximum zone order" + range 9 64 if PPC_64K_PAGES default "9" if PPC_64K_PAGES + range 13 64 if PPC64 && !PPC_64K_PAGES default "13" if PPC64 && !PPC_64K_PAGES + range 11 64 default "11" help The kernel memory allocator divides physically contiguous memory