|
@@ -9,11 +9,33 @@ static inline long poll_pending(void)
|
|
|
return plpar_hcall_norets(H_POLL_PENDING);
|
|
|
}
|
|
|
|
|
|
+static inline u8 get_cede_latency_hint(void)
|
|
|
+{
|
|
|
+ return get_lppaca()->gpr5_dword.fields.cede_latency_hint;
|
|
|
+}
|
|
|
+
|
|
|
+static inline void set_cede_latency_hint(u8 latency_hint)
|
|
|
+{
|
|
|
+ get_lppaca()->gpr5_dword.fields.cede_latency_hint = latency_hint;
|
|
|
+}
|
|
|
+
|
|
|
static inline long cede_processor(void)
|
|
|
{
|
|
|
return plpar_hcall_norets(H_CEDE);
|
|
|
}
|
|
|
|
|
|
+static inline long extended_cede_processor(unsigned long latency_hint)
|
|
|
+{
|
|
|
+ long rc;
|
|
|
+ u8 old_latency_hint = get_cede_latency_hint();
|
|
|
+
|
|
|
+ set_cede_latency_hint(latency_hint);
|
|
|
+ rc = cede_processor();
|
|
|
+ set_cede_latency_hint(old_latency_hint);
|
|
|
+
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
static inline long vpa_call(unsigned long flags, unsigned long cpu,
|
|
|
unsigned long vpa)
|
|
|
{
|