From patchwork Mon Oct 19 13:19:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 55228 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f69.google.com (mail-lf0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 96A9922EA2 for ; Mon, 19 Oct 2015 13:23:10 +0000 (UTC) Received: by lfaz124 with SMTP id z124sf40922242lfa.0 for ; Mon, 19 Oct 2015 06:23:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=3IdWm6de+9LEtM9/Vp0xfBM7o6rHvxOv6jjzwBBz6R8=; b=jMPHXf6k19K325hcoWhXiKx+zEO1ByKF4VL9pAfAZF4+MeQ56Ux+k7w+fiN83G83rh jkLiVxU3WXv+75XauE8udfd05/oTTumDt7zstfe9HZF1wasm6hzmZHvFm5o12CwK5rJu ZyTavSletpJhdmzVhtGneb+WNPVy5OZX+gtcpyTrKuTaCSJSYA1ZMLKqM7KNMrZ0AW60 c4SsZ+zSMomx9zgaP1E6M6QeihnXA8fBdb2lnlq9slY8LfF0WNt78K2GDebe/QrqvCOi LiUubEpFbU3BpdPl1m3Hl7RhKqsUu66to2huntbM7WJZw9jiuW24WePb/513ouAmncLu 85fQ== X-Gm-Message-State: ALoCoQnsO0zSmZyt8N780CldmMrtMsdXeP6/Odb/YCL92A7718tNloaOkReoQPhujobdNZjZOxJV X-Received: by 10.180.89.41 with SMTP id bl9mr3944492wib.1.1445260989505; Mon, 19 Oct 2015 06:23:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.32.207 with SMTP id g198ls520286lfg.18.gmail; Mon, 19 Oct 2015 06:23:09 -0700 (PDT) X-Received: by 10.112.168.194 with SMTP id zy2mr15063211lbb.79.1445260989384; Mon, 19 Oct 2015 06:23:09 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id xp1si22836603lbb.134.2015.10.19.06.23.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 06:23:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbwb3 with SMTP id wb3so82531395lbb.1 for ; Mon, 19 Oct 2015 06:23:09 -0700 (PDT) X-Received: by 10.112.163.131 with SMTP id yi3mr14635457lbb.36.1445260989239; Mon, 19 Oct 2015 06:23:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1470362lbq; Mon, 19 Oct 2015 06:23:08 -0700 (PDT) X-Received: by 10.107.163.17 with SMTP id m17mr25476595ioe.79.1445260988173; Mon, 19 Oct 2015 06:23:08 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f8si4811019igh.59.2015.10.19.06.23.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 06:23:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoAO5-0000R2-Qi; Mon, 19 Oct 2015 13:22:05 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoAMv-0007ZO-OS for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2015 13:20:55 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-21-iINk-eGSRIWMroznnNjxnw-9; Mon, 19 Oct 2015 14:20:29 +0100 Received: from e106634-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 19 Oct 2015 14:20:22 +0100 From: "Suzuki K. Poulose" To: linux-arm-kernel@lists.infradead.org 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151019_062054_284323_9EB5BEB9 X-CRM114-Status: UNSURE ( 8.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [146.101.78.143 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [146.101.78.143 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: mark.rutland@arm.com, steve.capper@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, catalin.marinas@arm.com, " Suzuki K. Poulose" , will.deacon@arm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, christoffer.dall@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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)