From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation
Date: Fri, 16 Oct 2015 19:50:48 +0100 [thread overview]
Message-ID: <20151016185047.GG4039@leverpostej> (raw)
In-Reply-To: <1445015181-29711-8-git-send-email-suzuki.poulose@arm.com>
On Fri, Oct 16, 2015 at 06:06:16PM +0100, Suzuki K. Poulose wrote:
> From: Mark Rutland <mark.rutland@arm.com>
>
> 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.
No need to respin, but I'd prefer the wording:
----
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.
----
Thanks for spinning this into a patch!
Mark.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
> ---
> 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 <linux/kernel.h>
> +#include <linux/sizes.h>
> #include <asm/boot.h>
> #include <asm/page.h>
>
> @@ -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
>
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: "Suzuki K. Poulose" <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@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
Subject: Re: [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation
Date: Fri, 16 Oct 2015 19:50:48 +0100 [thread overview]
Message-ID: <20151016185047.GG4039@leverpostej> (raw)
In-Reply-To: <1445015181-29711-8-git-send-email-suzuki.poulose@arm.com>
On Fri, Oct 16, 2015 at 06:06:16PM +0100, Suzuki K. Poulose wrote:
> From: Mark Rutland <mark.rutland@arm.com>
>
> 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.
No need to respin, but I'd prefer the wording:
----
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.
----
Thanks for spinning this into a patch!
Mark.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
> ---
> 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 <linux/kernel.h>
> +#include <linux/sizes.h>
> #include <asm/boot.h>
> #include <asm/page.h>
>
> @@ -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
>
next prev parent reply other threads:[~2015-10-16 18:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 17:06 [PATCHv4 00/12] arm64: 16K translation granule support Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 01/12] arm64: Move swapper pagetable definitions Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 02/12] arm64: Handle section maps for swapper/idmap Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 03/12] arm64: Introduce helpers for page table levels Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 04/12] arm64: Calculate size for idmap_pg_dir at compile time Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 05/12] arm64: Handle 4 level page table for swapper Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 06/12] arm64: Clean config usages for page size Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 18:50 ` Mark Rutland [this message]
2015-10-16 18:50 ` Mark Rutland
2015-10-16 17:06 ` [PATCHv4 08/12] arm64: Kconfig: Fix help text about AArch32 support with 64K pages Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 09/12] arm64: Check for selected granule support Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 10/12] arm64: Add page size to the kernel image header Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 11/12] arm64: Add 16K page size support Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:06 ` [PATCHv4 12/12] arm64: 36 bit VA Suzuki K. Poulose
2015-10-16 17:06 ` Suzuki K. Poulose
2015-10-16 17:25 ` [PATCHv4 00/12] arm64: 16K translation granule support Suzuki K. Poulose
2015-10-16 17:25 ` Suzuki K. Poulose
-- strict thread matches above, loose matches on Subject: below --
2015-10-19 13:19 [UPDATED] " Suzuki K. Poulose
2015-10-19 13:19 ` [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation Suzuki K. Poulose
2015-10-19 13:19 ` Suzuki K. Poulose
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151016185047.GG4039@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.