]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc64: fix M8 ADI support
authorAnthony Yznaga <anthony.yznaga@oracle.com>
Wed, 31 May 2017 19:34:59 +0000 (12:34 -0700)
committerShannon Nelson <shannon.nelson@oracle.com>
Fri, 2 Jun 2017 17:10:47 +0000 (10:10 -0700)
commitf04a0fd93c5bdf919884b76d1a95c621a66c93a7
treedf41716e001b9a4a8e47536498f07a7861116b37
parente75d992a4ef379c821aefd0461a119d234d5617b
sparc64: fix M8 ADI support

For platforms that support ADI two things must be done during boot.

First, etrap is patched to ensure that execution in the kernel runs with
PSTATE.mcde=1.  This ensures that version checking is enabled if the
kernel accesses ADI-enabled user memory through copy_{to/from}_user,
etc..

Second, the initialization of the common flags used in TTEs must be
adjusted to not set TTE.cv (cacheable-in-virtually-indexed-cache) which
has been replaced by TTE.mcd which enables MCD (aka ADI).

These steps are currently done for M7.  This patch adds support for M8
and does some minor cleanup to avoid M7-specific naming and reduce the
number of places chip type needs to be checked (and adjusted in the
future).

Orabug: 26096575
Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
arch/sparc/include/asm/pgtable_64.h
arch/sparc/include/asm/trap_block.h
arch/sparc/kernel/entry.h
arch/sparc/kernel/etrap_64.S
arch/sparc/kernel/setup_64.c
arch/sparc/kernel/vmlinux.lds.S
arch/sparc/mm/init_64.c