From patchwork Fri Oct 16 17:06:16 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: 55138 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 304BD22EAC for ; Fri, 16 Oct 2015 17:08:17 +0000 (UTC) Received: by lbbor1 with SMTP id or1sf7973939lbb.2 for ; Fri, 16 Oct 2015 10:08:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:content-type :content-transfer-encoding:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=gwhP6PBN0DW45zlg5IgvAOlB6YfuZcmLLrJT9SF5npo=; b=Bp9+V8896A8y1UES3EdBYBkBHffOuXO7mweEN1bxy7SuxJECA+kmjBGw9YsvTUuHoO V0lhEWKKPXy0nx6IIwMD1vtmCmPcRVAwuAmNzGiqs0ICGYt9GzZsobQtOY6kbb2/gy15 SJH2iN3QIsU/8zhwI2CXmJ92BW0lzScLaGbVhmT66t3+PkMnZLV4aIcg28DbBkI1Ektb 7JZEzNoZmWUxrYrvE7d1zCx+fzGTEIt7gYoe2qraQfh88UEB9/1Sh/w24kR2HCo7Oc2P PiX63tOI+MlNG8Di+C/RJfPQzpaDPmWKGTNqwdC2yc3bCEwJDmBzPc8MC3JjGyiQFfjG LkDQ== X-Gm-Message-State: ALoCoQmm0t2a22ABnzyNQrw+aEVLBCKV8CSVZv/dZH4EvEq//wPxdhMjNzl41IG39xb7Qk6lZsgd X-Received: by 10.112.136.99 with SMTP id pz3mr3911156lbb.11.1445015296138; Fri, 16 Oct 2015 10:08:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.79.6 with SMTP id d6ls43612lfb.47.gmail; Fri, 16 Oct 2015 10:08:16 -0700 (PDT) X-Received: by 10.25.15.42 with SMTP id e42mr4368718lfi.49.1445015295994; Fri, 16 Oct 2015 10:08:15 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id r7si13518921lfe.1.2015.10.16.10.08.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Oct 2015 10:08:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbwb3 with SMTP id wb3so43505108lbb.1 for ; Fri, 16 Oct 2015 10:08:15 -0700 (PDT) X-Received: by 10.112.64.72 with SMTP id m8mr8630587lbs.41.1445015295866; Fri, 16 Oct 2015 10:08:15 -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 w3csp41735lbq; Fri, 16 Oct 2015 10:08:14 -0700 (PDT) X-Received: by 10.107.38.210 with SMTP id m201mr16706692iom.98.1445015294834; Fri, 16 Oct 2015 10:08:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si4720293igl.60.2015.10.16.10.08.14; Fri, 16 Oct 2015 10:08:14 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932895AbbJPRIE (ORCPT + 30 others); Fri, 16 Oct 2015 13:08:04 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:65084 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932569AbbJPRGb (ORCPT ); Fri, 16 Oct 2015 13:06:31 -0400 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-36-TSe_JyYKSsmRiDru1X4AFA-7; Fri, 16 Oct 2015 18:06: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); Fri, 16 Oct 2015 18:06:25 +0100 From: "Suzuki K. Poulose" To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, mark.rutland@arm.com, marc.zyngier@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, chirstoff.dall@linaro.org, steve.capper@linaro.org, jeremy.linton@arm.com, " Suzuki K. Poulose" Subject: [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation Date: Fri, 16 Oct 2015 18:06:16 +0100 Message-Id: <1445015181-29711-8-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1445015181-29711-1-git-send-email-suzuki.poulose@arm.com> References: <1445015181-29711-1-git-send-email-suzuki.poulose@arm.com> X-OriginalArrivalTime: 16 Oct 2015 17:06:25.0750 (UTC) FILETIME=[FDA92F60:01D10834] X-MC-Unique: TSe_JyYKSsmRiDru1X4AFA-7 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.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.182 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Rutland Since NR_FIX_BTMAPS based on the fixed size of 256K, lets use a formula to derive it for a given page size, rather than defining 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)