]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: mm: Enable STRICT_MM_TYPECHECKS
authorVineet Gupta <vgupta@kernel.org>
Mon, 28 Oct 2019 20:49:41 +0000 (13:49 -0700)
committerVineet Gupta <vgupta@kernel.org>
Tue, 24 Aug 2021 21:25:48 +0000 (14:25 -0700)
commitdb96785950ae776bdae9dfd664c702ca1649fa6a
treed7ad70c32da50f803b46d2fc4d7761664e790161
parentfd57fc1c33e59f6c6ddb249948dbe693667f5914
ARC: mm: Enable STRICT_MM_TYPECHECKS

In the past I've refrained from doing this (at least 2 times) due to the
slight code bloat due to ABI implications of pte_t etc becoming struct

Per ARC ABI, functions return struct via memory and not through register
r0, even if the struct would fit in register(s)

 - caller allocates space on stack and passes the address as first arg
   (r0), shifting rest of args by one

 - callee creates return struct in memory (referenced via r0)

This time around the code actually shrunk slightly (due to subtle
inlining heuristic effects), but still slightly inefficient due to
return values passed through memory. That however seems like a small
cost compared to maintenance burden given the impending new mmu support
for page walk etc

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
arch/arc/include/asm/page.h
arch/arc/mm/ioremap.c