public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Joe Sylve <joe.sylve@gmail.com>
Cc: Will Deacon <Will.Deacon@arm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] AArch64: TCR_TG1_64K incorrectly sets TCR_EL1 bits [31:30]
Date: Wed, 2 Apr 2014 13:38:44 +0100	[thread overview]
Message-ID: <20140402123844.GE31892@arm.com> (raw)
In-Reply-To: <CAHWCVW+cH6MwhQj-JGWN63AqseFYuDPoftv+zGJU8UDfAgueEQ@mail.gmail.com>

On Wed, Apr 02, 2014 at 05:00:38AM +0100, Joe Sylve wrote:
> Section D7.2.83 TCR_EL1, Translation Control Register (EL1) of the
> latest ARM Architecture Reference Manual, ARMv8, for ARMv8-A states
> that TCR_EL1 TG1 (bits [31:30]) should be set to 11 for a 64KB
> TTBR1_EL1 granule size. The mainline 3.14 kernel incorrectly sets
> those bits to 01 (which is a 16KB granule size).
> 
> Signed-off-by: Joe Sylve <joe.sylve@gmail.com>
> ---
> 
> --- a/arch/arm64/include/asm/pgtable-hwdef.h 2014-04-01 22:13:22.619868978 -0500
> +++ b/arch/arm64/include/asm/pgtable-hwdef.h 2014-04-01 22:13:58.071869886 -0500
> @@ -121,7 +121,7 @@
>  #define TCR_ORGN_MASK ((UL(3) << 10) | (UL(3) << 26))
>  #define TCR_SHARED ((UL(3) << 12) | (UL(3) << 28))
>  #define TCR_TG0_64K (UL(1) << 14)
> -#define TCR_TG1_64K (UL(1) << 30)
> +#define TCR_TG1_64K (UL(3) << 30)
>  #define TCR_IPS_40BIT (UL(2) << 32)
>  #define TCR_ASID16 (UL(1) << 36)
>  #define TCR_TBI0 (UL(1) << 37)

According to the spec, 4K pages is also wrong. The strange thing is that
it works fine on the model. I'll ask internally for clarification
whether it's a typo in the manual or Linux needs fixing.

Thanks.

-- 
Catalin

  reply	other threads:[~2014-04-02 12:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02  4:00 [PATCH 1/1] AArch64: TCR_TG1_64K incorrectly sets TCR_EL1 bits [31:30] Joe Sylve
2014-04-02 12:38 ` Catalin Marinas [this message]
2014-04-02 17:07   ` Catalin Marinas
2014-04-02 17:21     ` Joe Sylve
2014-04-03  8:58       ` Catalin Marinas
2014-04-02 21:44     ` Joe Perches
2014-04-02 22:10       ` Joe Sylve
2014-04-02 22:16         ` Joe Perches
2014-04-02 23:01           ` Joe Sylve

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=20140402123844.GE31892@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=joe.sylve@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox