Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp787572imp; Thu, 21 Feb 2019 11:10:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IaUw7JImnuAdrQTCau5bLbvdEGJM+2An57MnJG1vOV1QHzJF2ZFh3wwqffoS73urdGobkc6 X-Received: by 2002:a63:ef05:: with SMTP id u5mr48789pgh.177.1550776230648; Thu, 21 Feb 2019 11:10:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550776230; cv=none; d=google.com; s=arc-20160816; b=yH0EoT7jdqVbXXRBSmb2R83jILzVzrKi8uh+EZV8bw87JHppJTgNLjbBiNKs5HlKQK 42Hn+GEPomXuX5KKPVOtpArHdAeCCUt6w3MxewewC1xLHqXPRAZ0dyCVlkXCQoAQVgR1 XkSAjuvza55c51lnUmxqAs707Vim1LtIufY2hrUYlc93NDiiaUIoIAVR6cvvOcm8Qn9e cLzxKg/vI9iBzIbmBnFyk/98B6ptdbm7DxFudg/Jn7t8wKerMpBt77TvzwQmMRhBzg4M 7NILxBnWq5AclIwhvK9mBjJUvmpVFZs0kyvqF8Gp6yN+rz+qMFMB6+7tQOs+HFRhAfaU vbUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=6+UN/pZUxlGcDtKNcykeJgXkzYMi9CIgcgeN2UqrbQg=; b=mlNq8k24nptPE3KLf2Kw9J+dVTy9tVEfFPEJ3w/IPVdDVN0FxwtmYdcRvGoNuLMIj4 kZdHzL+TCBwigNbN7qVRQotd6XWAL7nDJml6+urdLmFWPw718kBQ2rH2YnSlDjYRd5CX +nRrSV/zYmUNGbSeNHqf0zsj9+O5lKbW2/D6MbcZA4Eiv5kFOzmZtiwua/JV2AXVcAub N4+kywYNmLbp8y1AE7ErANP/AfAljcPozPf5JAQ2LE/FFcuY3MHm5ve+XgJoDDUmicfV FM4TGw4xBxIW0MOfub1GWMgKiCaG3vNCH4RSIQBtm3rp5lMOPzLfrfDzsIMqApY+spqE VQkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=qA6SPzKi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si15696713pls.174.2019.02.21.11.10.15; Thu, 21 Feb 2019 11:10:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=qA6SPzKi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbfBUTJX (ORCPT + 99 others); Thu, 21 Feb 2019 14:09:23 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:13127 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726601AbfBUTIs (ORCPT ); Thu, 21 Feb 2019 14:08:48 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4453sq0dK3z9v9DF; Thu, 21 Feb 2019 20:08:47 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=qA6SPzKi; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id G49XXnvW1VoT; Thu, 21 Feb 2019 20:08:47 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4453sp6hBvz9v6ky; Thu, 21 Feb 2019 20:08:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1550776126; bh=6+UN/pZUxlGcDtKNcykeJgXkzYMi9CIgcgeN2UqrbQg=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=qA6SPzKizKA24YWynU+FNtSqv0DmFTop/h6lznNsP9R8lynlb1gS9SdStEyg23VKO CD/p/E1424XW1tlekMyIoieR3q8T4WhXDznwUJ8Mm87VFkELt6r+ufLfrZzFnHTJmf /6BRxGH5RKvM3AiRjpj7/5cBzj1JtTn5ATypiWqQ= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E69DE8B86A; Thu, 21 Feb 2019 20:08:46 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id gz_eZjADO4Sk; Thu, 21 Feb 2019 20:08:46 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BC2FA8B852; Thu, 21 Feb 2019 20:08:46 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 919186EF61; Thu, 21 Feb 2019 19:08:46 +0000 (UTC) Message-Id: <48b5bf4da0842d93319202c3d4fb1041e6443f31.1550775950.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v5 10/16] powerpc/kconfig: define PAGE_SHIFT inside Kconfig To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , j.neuschaefer@gmx.net Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 21 Feb 2019 19:08:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch defined CONFIG_PPC_PAGE_SHIFT in order to be able to use PAGE_SHIFT value inside Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 7 +++++++ arch/powerpc/include/asm/page.h | 13 ++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 849b0d5ac3d1..417e52a27f63 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -708,6 +708,13 @@ config PPC_256K_PAGES endchoice +config PPC_PAGE_SHIFT + int + default 18 if PPC_256K_PAGES + default 16 if PPC_64K_PAGES + default 14 if PPC_16K_PAGES + default 12 + config THREAD_SHIFT int "Thread shift" if EXPERT range 13 15 diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index aa4497175bd3..ed870468ef6f 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h @@ -20,20 +20,11 @@ /* * On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages - * on PPC44x). For PPC64 we support either 4K or 64K software + * on PPC44x and 4K/16K on 8xx). For PPC64 we support either 4K or 64K software * page size. When using 64K pages however, whether we are really supporting * 64K pages in HW or not is irrelevant to those definitions. */ -#if defined(CONFIG_PPC_256K_PAGES) -#define PAGE_SHIFT 18 -#elif defined(CONFIG_PPC_64K_PAGES) -#define PAGE_SHIFT 16 -#elif defined(CONFIG_PPC_16K_PAGES) -#define PAGE_SHIFT 14 -#else -#define PAGE_SHIFT 12 -#endif - +#define PAGE_SHIFT CONFIG_PPC_PAGE_SHIFT #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) #ifndef __ASSEMBLY__ -- 2.13.3