Eliminate more warnings in s390x
This commit is contained in:
parent
82d1c9e925
commit
17fa839a56
@ -21,50 +21,50 @@ typedef struct SigpInfo {
|
|||||||
uint64_t *status_reg;
|
uint64_t *status_reg;
|
||||||
} SigpInfo;
|
} SigpInfo;
|
||||||
|
|
||||||
static void set_sigp_status(SigpInfo *si, uint64_t status)
|
// static void set_sigp_status(SigpInfo *si, uint64_t status)
|
||||||
{
|
// {
|
||||||
*si->status_reg &= 0xffffffff00000000ULL;
|
// *si->status_reg &= 0xffffffff00000000ULL;
|
||||||
*si->status_reg |= status;
|
// *si->status_reg |= status;
|
||||||
si->cc = SIGP_CC_STATUS_STORED;
|
// si->cc = SIGP_CC_STATUS_STORED;
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void sigp_sense(S390CPU *dst_cpu, SigpInfo *si)
|
// static void sigp_sense(S390CPU *dst_cpu, SigpInfo *si)
|
||||||
{
|
// {
|
||||||
uint8_t state = s390_cpu_get_state(dst_cpu);
|
// uint8_t state = s390_cpu_get_state(dst_cpu);
|
||||||
bool ext_call = dst_cpu->env.pending_int & INTERRUPT_EXTERNAL_CALL;
|
// bool ext_call = dst_cpu->env.pending_int & INTERRUPT_EXTERNAL_CALL;
|
||||||
uint64_t status = 0;
|
// uint64_t status = 0;
|
||||||
|
|
||||||
/* sensing without locks is racy, but it's the same for real hw */
|
// /* sensing without locks is racy, but it's the same for real hw */
|
||||||
if (state != S390_CPU_STATE_STOPPED && !ext_call) {
|
// if (state != S390_CPU_STATE_STOPPED && !ext_call) {
|
||||||
si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
// si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
||||||
} else {
|
// } else {
|
||||||
if (ext_call) {
|
// if (ext_call) {
|
||||||
status |= SIGP_STAT_EXT_CALL_PENDING;
|
// status |= SIGP_STAT_EXT_CALL_PENDING;
|
||||||
}
|
// }
|
||||||
if (state == S390_CPU_STATE_STOPPED) {
|
// if (state == S390_CPU_STATE_STOPPED) {
|
||||||
status |= SIGP_STAT_STOPPED;
|
// status |= SIGP_STAT_STOPPED;
|
||||||
}
|
// }
|
||||||
set_sigp_status(si, status);
|
// set_sigp_status(si, status);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void sigp_external_call(S390CPU *src_cpu, S390CPU *dst_cpu, SigpInfo *si)
|
// static void sigp_external_call(S390CPU *src_cpu, S390CPU *dst_cpu, SigpInfo *si)
|
||||||
{
|
// {
|
||||||
int ret;
|
// int ret;
|
||||||
|
|
||||||
ret = cpu_inject_external_call(dst_cpu, src_cpu->env.core_id);
|
// ret = cpu_inject_external_call(dst_cpu, src_cpu->env.core_id);
|
||||||
if (!ret) {
|
// if (!ret) {
|
||||||
si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
// si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
||||||
} else {
|
// } else {
|
||||||
set_sigp_status(si, SIGP_STAT_EXT_CALL_PENDING);
|
// set_sigp_status(si, SIGP_STAT_EXT_CALL_PENDING);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void sigp_emergency(S390CPU *src_cpu, S390CPU *dst_cpu, SigpInfo *si)
|
// static void sigp_emergency(S390CPU *src_cpu, S390CPU *dst_cpu, SigpInfo *si)
|
||||||
{
|
// {
|
||||||
cpu_inject_emergency_signal(dst_cpu, src_cpu->env.core_id);
|
// cpu_inject_emergency_signal(dst_cpu, src_cpu->env.core_id);
|
||||||
si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
// si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
||||||
}
|
// }
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void sigp_start(CPUState *cs, run_on_cpu_data arg)
|
static void sigp_start(CPUState *cs, run_on_cpu_data arg)
|
||||||
@ -277,49 +277,49 @@ static void sigp_set_prefix(CPUState *cs, run_on_cpu_data arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void sigp_cond_emergency(S390CPU *src_cpu, S390CPU *dst_cpu,
|
// static void sigp_cond_emergency(S390CPU *src_cpu, S390CPU *dst_cpu,
|
||||||
SigpInfo *si)
|
// SigpInfo *si)
|
||||||
{
|
// {
|
||||||
const uint64_t psw_int_mask = PSW_MASK_IO | PSW_MASK_EXT;
|
// const uint64_t psw_int_mask = PSW_MASK_IO | PSW_MASK_EXT;
|
||||||
uint16_t p_asn, s_asn, asn;
|
// uint16_t p_asn, s_asn, asn;
|
||||||
uint64_t psw_addr, psw_mask;
|
// uint64_t psw_addr, psw_mask;
|
||||||
bool idle;
|
// bool idle;
|
||||||
|
|
||||||
/* this looks racy, but these values are only used when STOPPED */
|
// /* this looks racy, but these values are only used when STOPPED */
|
||||||
idle = CPU(dst_cpu)->halted;
|
// idle = CPU(dst_cpu)->halted;
|
||||||
psw_addr = dst_cpu->env.psw.addr;
|
// psw_addr = dst_cpu->env.psw.addr;
|
||||||
psw_mask = dst_cpu->env.psw.mask;
|
// psw_mask = dst_cpu->env.psw.mask;
|
||||||
asn = si->param;
|
// asn = si->param;
|
||||||
p_asn = dst_cpu->env.cregs[4] & 0xffff; /* Primary ASN */
|
// p_asn = dst_cpu->env.cregs[4] & 0xffff; /* Primary ASN */
|
||||||
s_asn = dst_cpu->env.cregs[3] & 0xffff; /* Secondary ASN */
|
// s_asn = dst_cpu->env.cregs[3] & 0xffff; /* Secondary ASN */
|
||||||
|
|
||||||
if (s390_cpu_get_state(dst_cpu) != S390_CPU_STATE_STOPPED ||
|
// if (s390_cpu_get_state(dst_cpu) != S390_CPU_STATE_STOPPED ||
|
||||||
(psw_mask & psw_int_mask) != psw_int_mask ||
|
// (psw_mask & psw_int_mask) != psw_int_mask ||
|
||||||
(idle && psw_addr != 0) ||
|
// (idle && psw_addr != 0) ||
|
||||||
(!idle && (asn == p_asn || asn == s_asn))) {
|
// (!idle && (asn == p_asn || asn == s_asn))) {
|
||||||
cpu_inject_emergency_signal(dst_cpu, src_cpu->env.core_id);
|
// cpu_inject_emergency_signal(dst_cpu, src_cpu->env.core_id);
|
||||||
} else {
|
// } else {
|
||||||
set_sigp_status(si, SIGP_STAT_INCORRECT_STATE);
|
// set_sigp_status(si, SIGP_STAT_INCORRECT_STATE);
|
||||||
}
|
// }
|
||||||
|
|
||||||
si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
// si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void sigp_sense_running(S390CPU *dst_cpu, SigpInfo *si)
|
// static void sigp_sense_running(S390CPU *dst_cpu, SigpInfo *si)
|
||||||
{
|
// {
|
||||||
/* sensing without locks is racy, but it's the same for real hw */
|
// /* sensing without locks is racy, but it's the same for real hw */
|
||||||
//if (!s390_has_feat(S390_FEAT_SENSE_RUNNING_STATUS)) {
|
// //if (!s390_has_feat(S390_FEAT_SENSE_RUNNING_STATUS)) {
|
||||||
// set_sigp_status(si, SIGP_STAT_INVALID_ORDER);
|
// // set_sigp_status(si, SIGP_STAT_INVALID_ORDER);
|
||||||
// return;
|
// // return;
|
||||||
//}
|
// //}
|
||||||
|
|
||||||
/* If halted (which includes also STOPPED), it is not running */
|
// /* If halted (which includes also STOPPED), it is not running */
|
||||||
if (CPU(dst_cpu)->halted) {
|
// if (CPU(dst_cpu)->halted) {
|
||||||
set_sigp_status(si, SIGP_STAT_NOT_RUNNING);
|
// set_sigp_status(si, SIGP_STAT_NOT_RUNNING);
|
||||||
} else {
|
// } else {
|
||||||
si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
// si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// static int handle_sigp_single_dst(S390CPU *cpu, S390CPU *dst_cpu, uint8_t order,
|
// static int handle_sigp_single_dst(S390CPU *cpu, S390CPU *dst_cpu, uint8_t order,
|
||||||
// uint64_t param, uint64_t *status_reg)
|
// uint64_t param, uint64_t *status_reg)
|
||||||
|
Loading…
Reference in New Issue
Block a user