arm64: Handle traps from accessing CNTVCT/CNTFRQ via 32-bit instructions
authorNicolin Chen <nicolinc@nvidia.com>
Wed, 10 Jan 2018 02:59:20 +0000 (18:59 -0800)
committerWinnie Hsu <whsu@nvidia.com>
Mon, 12 Mar 2018 17:19:26 +0000 (10:19 -0700)
commit0cb7266c36abc577ee941ff557b76290db98e248
tree10069ca33a8ce5d0bdbdd315de135b078649e7cc
parent1b3eb6afd937579e5c422f436b57dcf7b4ecebae
arm64: Handle traps from accessing CNTVCT/CNTFRQ via 32-bit instructions

CNTVCT and CNTFRQ can be accessed via 32-bit instructions (mrrc/mrc).

So the trap handler should take care of these two situations as well.
Otherwise, it will trigger an "undefined instruction" state and file
a SIGILL back to user space without caring about which application.

Bug 2044346

Change-Id: I39de0a3f332c405042bb181ccdf616eeb96b1608
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1635304
(cherry picked from commit c4f4342ab3dc8c3185820bc55e08feeed0240c0a)
Reviewed-on: https://git-master.nvidia.com/r/1648572
Reviewed-by: Jeetesh Burman <jburman@nvidia.com>
Tested-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
arch/arm64/include/asm/esr.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/traps.c