From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060AbbJSNXY (ORCPT ); Mon, 19 Oct 2015 09:23:24 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:45798 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753621AbbJSNUc (ORCPT ); Mon, 19 Oct 2015 09:20:32 -0400 From: "Suzuki K. Poulose" To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mark.rutland@arm.com, marc.zyngier@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, christoffer.dall@linaro.org, steve.capper@linaro.org, ard.biesheuvel@linaro.org, jeremy.linton@arm.com, " Suzuki K. Poulose" Subject: [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation Date: Mon, 19 Oct 2015 14:19:33 +0100 Message-Id: <1445260779-22242-8-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1445260779-22242-1-git-send-email-suzuki.poulose@arm.com> References: <1445260779-22242-1-git-send-email-suzuki.poulose@arm.com> X-OriginalArrivalTime: 19 Oct 2015 13:20:22.0995 (UTC) FILETIME=[E8DE4230:01D10A70] X-MC-Unique: iINk-eGSRIWMroznnNjxnw-9 Content-Type: text/plain; charset=WINDOWS-1252 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id t9JDNTlT007871 From: Mark Rutland We choose NR_FIX_BTMAPS such that each slot (NR_FIX_BTMAPS * PAGE_SIZE) can address 256K. Use division to derive NR_FIX_BTMAPS rather than defining it for each page size. Signed-off-by: Mark Rutland Signed-off-by: Suzuki K. Poulose --- arch/arm64/include/asm/fixmap.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h index 8b9884c..3097045 100644 --- a/arch/arm64/include/asm/fixmap.h +++ b/arch/arm64/include/asm/fixmap.h @@ -17,6 +17,7 @@ #ifndef __ASSEMBLY__ #include +#include #include #include @@ -55,11 +56,7 @@ enum fixed_addresses { * Temporary boot-time mappings, used by early_ioremap(), * before ioremap() is functional. */ -#ifdef CONFIG_ARM64_64K_PAGES -#define NR_FIX_BTMAPS 4 -#else -#define NR_FIX_BTMAPS 64 -#endif +#define NR_FIX_BTMAPS (SZ_256K / PAGE_SIZE) #define FIX_BTMAPS_SLOTS 7 #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) -- 1.7.9.5