powerpc/8xx: Map IMMR area with 512k page at a fixed address
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 17 May 2016 07:02:45 +0000 (09:02 +0200)
committerScott Wood <oss@buserror.net>
Sat, 9 Jul 2016 07:02:48 +0000 (02:02 -0500)
commit4badd43ae44109c88438cc6421d208f513cf537f
treeb228a4e7dfa771df94a052bafd7b06c87ece9eae
parentf86ef74ed9193c52411277eeac2eec69af553392
powerpc/8xx: Map IMMR area with 512k page at a fixed address

Once the linear memory space has been mapped with 8Mb pages, as
seen in the related commit, we get 11 millions DTLB missed during
the reference 600s period. 77% of the misses are on user addresses
and 23% are on kernel addresses (1 fourth for linear address space
and 3 fourth for virtual address space)

Traditionaly, each driver manages one computer board which has its
own components with its own memory maps.
But on embedded chips like the MPC8xx, the SOC has all registers
located in the same IO area.

When looking at ioremaps done during startup, we see that
many drivers are re-mapping small parts of the IMMR for their own use
and all those small pieces gets their own 4k page, amplifying the
number of TLB misses: in our system we get 0xff000000 mapped 31 times
and 0xff003000 mapped 9 times.

Even if each part of IMMR was mapped only once with 4k pages, it would
still be several small mappings towards linear area.

This patch maps the IMMR with a single 512k page.

With this patch applied, the number of DTLB misses during the 10 min
period is reduced to 11.8 millions for a duration of 5.8s, which
represents 2% of the non-idle time hence yet another 10% reduction.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
arch/powerpc/kernel/head_8xx.S
arch/powerpc/mm/8xx_mmu.c
arch/powerpc/mm/mmu_decl.h