aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2014-11-19 10:09:11 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-22 08:26:35 +1100
commit80eee19464493fb92f0fdde1b9ec4870f267c96b (patch)
tree68605db1a0a59553d8cb838f7aa2ef4835396e2d /core
parentb5cbf94faeafad94ee77f48c7142630897f27517 (diff)
downloadskiboot-80eee19464493fb92f0fdde1b9ec4870f267c96b.zip
skiboot-80eee19464493fb92f0fdde1b9ec4870f267c96b.tar.gz
skiboot-80eee19464493fb92f0fdde1b9ec4870f267c96b.tar.bz2
opal: Remove machine check interrupt patching in OPAL.
Now that we catch/handle machine check interrupt directly in Linux host PowerNV kernel, we are not anymore dependent on OPAL firmware to do MCE handling job for us. The MCE handling code in OPAL has exclusive stack space (4k size) reserved and remains unused with Linux host not being dependent on it anymore. Hence, this patch removes the code that allows machine check interrupt patching in OPAL and reclaims back 4k of stack space for use of normal stack. For older kernel the patching request will result into an error. The subsequent patch will remove the rest of MCE handling code from OPAL. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core')
-rw-r--r--core/exceptions.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/core/exceptions.c b/core/exceptions.c
index 6e0d27f..a2ef448 100644
--- a/core/exceptions.c
+++ b/core/exceptions.c
@@ -421,30 +421,9 @@ static int64_t patch_exception(uint64_t vector, uint64_t glue, bool hv)
/* Patch-in the vector number */
*(uint32_t *)(glue + exc_secondary_patch_type) |= vector;
- /*
- * If machine check, patch GET_STACK to get to the MC stack
- * instead of the normal stack.
- *
- * To simplify the arithmetic involved I make assumptions
- * on the fact that the base of all CPU stacks is 64k aligned
- * and that our stack size is < 32k, which means that the
- * "addi" instruction used in GET_STACK() is always using a
- * small (<32k) positive offset, which we can then easily
- * fixup with a simple addition
- */
BUILD_ASSERT(STACK_SIZE < 0x8000);
BUILD_ASSERT(!(CPU_STACKS_BASE & 0xffff));
- if (vector == 0x200) {
- /*
- * The addi we try to patch is the 3rd instruction
- * of GET_STACK(). If you change the macro, you must
- * update this code
- */
- iaddr = glue + exc_secondary_patch_stack + 8;
- *(uint32_t *)iaddr += MC_STACK_SIZE;
- }
-
/* Standard exception ? All done */
if (!hv)
goto flush;
@@ -469,13 +448,10 @@ static int64_t patch_exception(uint64_t vector, uint64_t glue, bool hv)
}
static int64_t opal_register_exc_handler(uint64_t opal_exception,
- uint64_t handler_address,
+ uint64_t handler_address __unused,
uint64_t glue_cache_line)
{
switch(opal_exception) {
- case OPAL_MACHINE_CHECK_HANDLER:
- client_mc_address = handler_address;
- return patch_exception(0x200, glue_cache_line, false);
case OPAL_HYPERVISOR_MAINTENANCE_HANDLER:
return patch_exception(0xe60, glue_cache_line, true);
#if 0 /* We let Linux handle softpatch */