/* * H_WATCHDOG Output * * R3: Return code * * H_SUCCESS The operation completed. * * H_BUSY The hypervisor is too busy; retry the operation. * * H_PARAMETER The given "flags" are somehow invalid. Either the * "operation" or "timeoutAction" is invalid, or a * reserved bit is set. * * H_P2 The given "watchdogNumber" is zero or exceeds the * supported maximum value. * * H_P3 The given "timeoutInMs" is below the supported * minimum value. * * H_NOOP The given "watchdogNumber" is already stopped. * * H_HARDWARE The operation failed for ineffable reasons. * * H_FUNCTION The H_WATCHDOG hypercall is not supported by this * hypervisor. * * R4: * * - For the "Query Watchdog Capabilities" operation, a 64-bit * structure:
*/ #define PSERIES_WDTQ_MIN_TIMEOUT(cap) (((cap) >> 48) & 0xffff) #define PSERIES_WDTQ_MAX_NUMBER(cap) (((cap) >> 32) & 0xffff)
rc = plpar_hcall(H_WATCHDOG, ret, PSERIES_WDTF_OP_QUERY); if (rc == H_FUNCTION) return -ENODEV; if (rc != H_SUCCESS) return -EIO;
cap = ret[0];
pw = devm_kzalloc(&pdev->dev, sizeof(*pw), GFP_KERNEL); if (!pw) return -ENOMEM;
/* * Assume watchdogNumber 1 for now. If we ever support * multiple timers we will need to devise a way to choose a * distinct watchdogNumber for each platform device at device * registration time.
*/
pw->num = 1; if (PSERIES_WDTQ_MAX_NUMBER(cap) < pw->num) return -ENODEV;
if (action >= ARRAY_SIZE(pseries_wdt_action)) return -EINVAL;
pw->action = pseries_wdt_action[action];
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.