Commit 927078c6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Add hypervisor busy return codes

From: Dave Boutcher <boutcher@us.ibm.com>

Add hypervisor busy return codes
parent 13bb3995
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
#define H_Success 0 #define H_Success 0
#define H_Busy 1 /* Hardware busy -- retry later */ #define H_Busy 1 /* Hardware busy -- retry later */
#define H_Constrained 4 /* Resource request constrained to max allowed */ #define H_Constrained 4 /* Resource request constrained to max allowed */
#define H_LongBusyStartRange 9900 /* Start of long busy range */
#define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */
#define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */
#define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */
#define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */
#define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */
#define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */
#define H_LongBusyEndRange 9905 /* End of long busy range */
#define H_Hardware -1 /* Hardware error */ #define H_Hardware -1 /* Hardware error */
#define H_Function -2 /* Function not supported */ #define H_Function -2 /* Function not supported */
#define H_Privilege -3 /* Caller not privileged */ #define H_Privilege -3 /* Caller not privileged */
...@@ -21,6 +29,16 @@ ...@@ -21,6 +29,16 @@
#define H_RemoteParm -15 #define H_RemoteParm -15
#define H_Resource -16 #define H_Resource -16
/* Long Busy is a condition that can be returned by the firmware
* when a call cannot be completed now, but the identical call
* should be retried later. This prevents calls blocking in the
* firmware for long periods of time. Annoyingly the firmware can return
* a range of return codes, hinting at how long we should wait before
* retrying. If you don't care for the hint, the macro below is a good
* way to check for the long_busy return codes
*/
#define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange))
/* Flags */ /* Flags */
#define H_LARGE_PAGE (1UL<<(63-16)) #define H_LARGE_PAGE (1UL<<(63-16))
#define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */ #define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */
...@@ -76,7 +94,7 @@ ...@@ -76,7 +94,7 @@
#define H_PROD 0xE8 #define H_PROD 0xE8
#define H_GET_PPP 0xEC #define H_GET_PPP 0xEC
#define H_SET_PPP 0xF0 #define H_SET_PPP 0xF0
#define H_SET_PURR 0xF4 #define H_PURR 0xF4
#define H_PIC 0xF8 #define H_PIC 0xF8
#define H_REG_CRQ 0xFC #define H_REG_CRQ 0xFC
#define H_FREE_CRQ 0x100 #define H_FREE_CRQ 0x100
...@@ -84,6 +102,9 @@ ...@@ -84,6 +102,9 @@
#define H_SEND_CRQ 0x108 #define H_SEND_CRQ 0x108
#define H_COPY_RDMA 0x110 #define H_COPY_RDMA 0x110
#define H_POLL_PENDING 0x1D8 #define H_POLL_PENDING 0x1D8
#define H_VTERM_PARTNER_INFO 0x150
#define H_REGISTER_VTERM 0x154
#define H_FREE_VTERM 0x158
/* plpar_hcall() -- Generic call interface using above opcodes /* plpar_hcall() -- Generic call interface using above opcodes
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment