public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: always use STRICT_MM_TYPECHECKS
Date: Fri, 29 Apr 2016 23:57:23 +0200	[thread overview]
Message-ID: <1809032.lDnjZlAtrr@wuerfel> (raw)
In-Reply-To: <1461964074-12544-1-git-send-email-yang.shi@linaro.org>

On Friday 29 April 2016 14:07:54 Yang Shi wrote:
> Inspired by the counterpart of powerpc [1], which shows there is no negative
> effect on code generation from enabling STRICT_MM_TYPECHECKS with a modern
> compiler.
> 
> And, Arnd's comment [2] about that patch says STRICT_MM_TYPECHECKS could
> be default as long as the architecture can pass structures in registers as
> function arguments. ARM64 can do it as long as the size of structure <= 16
> bytes. All the page table value types are u64 on ARM64.
> 
> The below disassembly demonstrates it, entry is pte_t type:
> 
>             entry = arch_make_huge_pte(entry, vma, page, writable);
>    0xffff00000826fc38 <+80>:    and     x0, x0, #0xfffffffffffffffd
>    0xffff00000826fc3c <+84>:    mov     w3, w21
>    0xffff00000826fc40 <+88>:    mov     x2, x20
>    0xffff00000826fc44 <+92>:    mov     x1, x19
>    0xffff00000826fc48 <+96>:    orr     x0, x0, #0x400
>    0xffff00000826fc4c <+100>:   bl      0xffff00000809bcc0 <arch_make_huge_pte>
> 
> [1] http://www.spinics.net/lists/linux-mm/msg105951.html
> [2] http://www.spinics.net/lists/linux-mm/msg105969.html
> 
> Signed-off-by: Yang Shi <yang.shi@linaro.org>
> CC: Arnd Bergmann <arnd@arndb.de>
> CC: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

  reply	other threads:[~2016-04-29 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 21:07 [PATCH] arm64: always use STRICT_MM_TYPECHECKS Yang Shi
2016-04-29 21:57 ` Arnd Bergmann [this message]
2016-05-03  8:52 ` Catalin Marinas

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=1809032.lDnjZlAtrr@wuerfel \
    --to=arnd@arndb.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox