mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
powerpc: Drop OPAL_HANDLE_HMI2 for now, to avoid panicking
It's possible for a Hypervisor Maintenance Interrupt (HMI) to occur while in the pmap code, holding locks. This can cause WITNESS to panic due to lock errors in calling pmap_kextract(). Since we don't yet handle the flags returned by OPAL_HANDLE_HMI2, just stop using it, so that we don't call into pmap_kextract(). Reported by: pkubaj
This commit is contained in:
parent
98ce554a3d
commit
b4698b7a6c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347013
@ -38,25 +38,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/trap.h>
|
||||
#include "opal.h"
|
||||
|
||||
static int
|
||||
opal_hmi_handler2(struct trapframe *frame)
|
||||
{
|
||||
int64_t flags;
|
||||
int err;
|
||||
|
||||
err = opal_call(OPAL_HANDLE_HMI2, vtophys(&flags));
|
||||
|
||||
/* XXX: At some point, handle the flags outvar. */
|
||||
if (err == OPAL_SUCCESS) {
|
||||
mtspr(SPR_HMER, 0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
printf("HMI handler failed! OPAL error code: %d\n", err);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static int
|
||||
opal_hmi_handler(struct trapframe *frame)
|
||||
{
|
||||
@ -81,9 +62,7 @@ opal_setup_hmi(void *data)
|
||||
if (opal_check() != 0)
|
||||
return;
|
||||
|
||||
if (opal_call(OPAL_CHECK_TOKEN, OPAL_HANDLE_HMI2) == OPAL_TOKEN_PRESENT)
|
||||
hmi_handler = opal_hmi_handler2;
|
||||
else if (opal_call(OPAL_CHECK_TOKEN, OPAL_HANDLE_HMI) == OPAL_TOKEN_PRESENT)
|
||||
if (opal_call(OPAL_CHECK_TOKEN, OPAL_HANDLE_HMI) == OPAL_TOKEN_PRESENT)
|
||||
hmi_handler = opal_hmi_handler;
|
||||
else {
|
||||
printf("Warning: No OPAL HMI handler found.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user