ppc: Make alignment exceptions suck less
commit3433b732a4c9abb413eb39a6badb63e83ad2288c
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 27 Jul 2016 06:56:41 +0000 (27 16:56 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 7 Sep 2016 02:40:10 +0000 (7 12:40 +1000)
tree82a1c93d253ce3f35acd9de6892e66d2839ffdce
parentb00a3b3648c32cd1d2baaeef6d6a81e8d9341259
ppc: Make alignment exceptions suck less

The current alignment exception generation tries to load the opcode
to put in DSISR from a context where a cpu_ldl_code() is really not
a good idea. It might fault and longjmp out and that's not something
we want happening here.

Instead, pass the releavant opcode bits via the error_code.

There are a couple of cases of alignment interrupts that won't set
anything, the ones coming from access to direct store segments, but
that doesn't happen in practice, nobody used direct store segments
and they are gone from newer chips.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target-ppc/excp_helper.c
target-ppc/translate.c