Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp816876imp; Wed, 20 Feb 2019 09:30:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IbE/8em2KySNvEUlVoh6aVKa8u8exGvOaCrRKcHmC+4zdXHnSEZlPqS50d8SJNL8tCmoTm9 X-Received: by 2002:a17:902:241:: with SMTP id 59mr37203399plc.72.1550683805196; Wed, 20 Feb 2019 09:30:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550683805; cv=none; d=google.com; s=arc-20160816; b=t+Z8/RrUTfz3AcaaQLVv/744u/v+/6YG2ap4yQTT/CybOdojpm1W7Pttm15L9Xy/R1 Jkvvh7I8rkOS6l2qL5nsV5dDkEJkoxvyVY8MIkbrQ111xU0gRwr/Rhuql5t+bAT14fet gEsU+/a8eEdm45H65Z8wDJFY9e3Cyzf9coTp2Y+1ARzrdCH/2d/wBg/+SOf1DJ1Tg3xI 6y3lGUI1yBISdznBa0i8aXmTAjjgXxquBI+L+1wDto3YXPTLvzU+L/ZYu0AF/Ujw686c f/oUWN90WEAt0rWNNvLivO6mv3MjrMzNyxMt70/K/r2ZJ8d+8MATMo6m9YStfNWznVbD XdJQ== 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=0bKVxi4cK/6RaJIwS9mGnc6B6eL++b3DsdBt4azdKsXRC5U5Ec2aq2w5q/qZ77fRRO pE7fYGxIUEbR8B13SShpaZXy4TwjVbRE0EfgCK9jJYacB4x3mqdm/MtpYwCVCgb9SdYc heNYicRGzEG8cqp7rH8BrG3+4p5GFXSWtoAkquSO6WsnKvxx3SJY+MlcfZJLPpWZYl2X oBL+7FwNiixTs3BqRrTO3ZZokmNckCse2yu5osBrk+uJfAJ8re1ZhsosjPfaEicYGZ7j +MGqT1Vn8QFMIGJxSlr3ZT29+eFELvScEUELVfHLBzhEKq3EE4cCB1wZUWmtT8WVS4v3 mY2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=MKAFwXc1; 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 h4si18464870pgl.409.2019.02.20.09.29.49; Wed, 20 Feb 2019 09:30:05 -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=MKAFwXc1; 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 S1726816AbfBTR3W (ORCPT + 99 others); Wed, 20 Feb 2019 12:29:22 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:20927 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbfBTR3T (ORCPT ); Wed, 20 Feb 2019 12:29:19 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 444PjR62Tlz9v0gH; Wed, 20 Feb 2019 18:29:15 +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=MKAFwXc1; 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 8eW-tfHpw8Vt; Wed, 20 Feb 2019 18:29:15 +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 444PjR509Cz9v0g0; Wed, 20 Feb 2019 18:29:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1550683755; bh=6+UN/pZUxlGcDtKNcykeJgXkzYMi9CIgcgeN2UqrbQg=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=MKAFwXc1/Z/EDUIAItzSwnU79zAGcVfKLt2jc5l2YGqF1KYFhHEGenf+g+25/6TVy MprPh3K4j4OKAy3FDEuwL8O6s+aT4VwyMlZHpXECIJRMi3PYbEZdYdafxqew2pahHb MvbgQ4E49qDZilbXv4/HjFLqL0tTRdec/geCOyUo= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5B92B8B84F; Wed, 20 Feb 2019 18:29:17 +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 cO4eFyGk4znt; Wed, 20 Feb 2019 18:29:17 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3AF278B84A; Wed, 20 Feb 2019 18:29:17 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 3082A6E85E; Wed, 20 Feb 2019 17:29:17 +0000 (UTC) Message-Id: <279ade651dd1976b4c56dee80a399c857bd9b81c.1550648295.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v3 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: Wed, 20 Feb 2019 17:29:17 +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