staticinlinelong cede_processor(void)
{ /* * We cannot call tracepoints inside RCU idle regions which * means we must not trace H_CEDE.
*/ return plpar_hcall_norets_notrace(H_CEDE);
}
/* plpar_pte_remove_raw can be called in real mode. It calls plpar_hcall_raw */ staticinlinelong plpar_pte_remove_raw(unsignedlong flags, unsignedlong ptex, unsignedlong avpn, unsignedlong *old_pteh_ret, unsignedlong *old_ptel_ret)
{ long rc; unsignedlong retbuf[PLPAR_HCALL_BUFSIZE];
/* plpar_pte_read_raw can be called in real mode. It calls plpar_hcall_raw */ staticinlinelong plpar_pte_read_raw(unsignedlong flags, unsignedlong ptex, unsignedlong *old_pteh_ret, unsignedlong *old_ptel_ret)
{ long rc; unsignedlong retbuf[PLPAR_HCALL_BUFSIZE];
/* * plpar_pte_read_4_raw can be called in real mode. * ptes must be 8*sizeof(unsigned long)
*/ staticinlinelong plpar_pte_read_4_raw(unsignedlong flags, unsignedlong ptex, unsignedlong *ptes)
{ long rc; unsignedlong retbuf[PLPAR_HCALL9_BUFSIZE];
/* * Enable relocation on exceptions on this partition * * Note: this call has a partition wide scope and can take a while to complete. * If it returns H_LONG_BUSY_* it should be retried periodically until it * returns H_SUCCESS.
*/ staticinlinelong enable_reloc_on_exceptions(void)
{ /* mflags = 3: Exceptions at 0xC000000000004000 */ return plpar_set_mode(3, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
}
/* * Disable relocation on exceptions on this partition * * Note: this call has a partition wide scope and can take a while to complete. * If it returns H_LONG_BUSY_* it should be retried periodically until it * returns H_SUCCESS.
*/ staticinlinelong disable_reloc_on_exceptions(void) { return plpar_set_mode(0, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
}
/* * Take exceptions in big endian mode on this partition * * Note: this call has a partition wide scope and can take a while to complete. * If it returns H_LONG_BUSY_* it should be retried periodically until it * returns H_SUCCESS.
*/ staticinlinelong enable_big_endian_exceptions(void)
{ /* mflags = 0: big endian exceptions */ return plpar_set_mode(0, H_SET_MODE_RESOURCE_LE, 0, 0);
}
/* * Take exceptions in little endian mode on this partition * * Note: this call has a partition wide scope and can take a while to complete. * If it returns H_LONG_BUSY_* it should be retried periodically until it * returns H_SUCCESS.
*/ staticinlinelong enable_little_endian_exceptions(void)
{ /* mflags = 1: little endian exceptions */ return plpar_set_mode(1, H_SET_MODE_RESOURCE_LE, 0, 0);
}
staticinlinelong plpar_guest_delete(unsignedlong flags, u64 guest_id)
{ long rc;
do {
rc = plpar_hcall_norets(H_GUEST_DELETE, flags, guest_id); if (rc == H_BUSY)
cond_resched();
if (H_IS_LONG_BUSY(rc)) {
msleep(get_longbusy_msecs(rc));
rc = H_BUSY;
}
} while (rc == H_BUSY);
return rc;
}
staticinlinelong plpar_guest_set_capabilities(unsignedlong flags, unsignedlong capabilities)
{ unsignedlong retbuf[PLPAR_HCALL_BUFSIZE]; long rc;
do {
rc = plpar_hcall(H_GUEST_SET_CAPABILITIES, retbuf, flags, capabilities); if (rc == H_BUSY)
cond_resched();
if (H_IS_LONG_BUSY(rc)) {
msleep(get_longbusy_msecs(rc));
rc = H_BUSY;
}
} while (rc == H_BUSY);
return rc;
}
staticinlinelong plpar_guest_get_capabilities(unsignedlong flags, unsignedlong *capabilities)
{ unsignedlong retbuf[PLPAR_HCALL_BUFSIZE]; long rc;
do {
rc = plpar_hcall(H_GUEST_GET_CAPABILITIES, retbuf, flags); if (rc == H_BUSY)
cond_resched();
if (H_IS_LONG_BUSY(rc)) {
msleep(get_longbusy_msecs(rc));
rc = H_BUSY;
}
} while (rc == H_BUSY);
if (rc == H_SUCCESS)
*capabilities = retbuf[0];
return rc;
}
/* * Wrapper to H_RPT_INVALIDATE hcall that handles return values appropriately * * - Returns H_SUCCESS on success * - For H_BUSY return value, we retry the hcall. * - For any other hcall failures, attempt a full flush once before * resorting to BUG(). * * Note: This hcall is expected to fail only very rarely. The correct * error recovery of killing the process/guest will be eventually * needed.
*/ staticinlinelong pseries_rpt_invalidate(u64 pid, u64 target, u64 type,
u64 page_sizes, u64 start, u64 end)
{ long rc; unsignedlong all;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.