return plpar_hcall_norets(H_SIGNAL_SYS_RESET, cpu);
}
-static inline long plpar_get_cpu_characteristics(unsigned long *character,
- unsigned long *behavior)
+static inline long plpar_get_cpu_characteristics(struct h_cpu_char_result *p)
{
- long rc;
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
+ long rc;
rc = plpar_hcall(H_GET_CPU_CHARACTERISTICS, retbuf);
-
- if (character)
- *character = retbuf[0];
- if (behavior)
- *behavior = retbuf[1];
+ if (rc == H_SUCCESS) {
+ p->character = retbuf[0];
+ p->behaviour = retbuf[1];
+ }
return rc;
}
static void pSeries_setup_rfi_flush(void)
{
- unsigned long character, behaviour, rc;
+ struct h_cpu_char_result result;
enum l1d_flush_type types;
bool enable;
+ long rc;
/* Enable by default */
enable = true;
- rc = plpar_get_cpu_characteristics(&character, &behaviour);
+ rc = plpar_get_cpu_characteristics(&result);
if (rc == H_SUCCESS) {
types = L1D_FLUSH_NONE;
- if (character & H_CPU_CHAR_L1D_FLUSH_TRIG2)
+ if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2)
types |= L1D_FLUSH_MTTRIG;
- if (character & H_CPU_CHAR_L1D_FLUSH_ORI30)
+ if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30)
types |= L1D_FLUSH_ORI;
/* Use fallback if nothing set in hcall */
if (types == L1D_FLUSH_NONE)
types = L1D_FLUSH_FALLBACK;
- if (!(behaviour & H_CPU_BEHAV_L1D_FLUSH_PR))
+ if (!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR))
enable = false;
} else {
/* Default to fallback if case hcall is not available */