|
@@ -403,6 +403,34 @@ static int pnv_xive_get_eas(XiveRouter *xrtr, uint8_t blk, uint32_t idx,
|
|
return pnv_xive_vst_read(xive, VST_TSEL_IVT, blk, idx, eas);
|
|
return pnv_xive_vst_read(xive, VST_TSEL_IVT, blk, idx, eas);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int pnv_xive_get_pq(XiveRouter *xrtr, uint8_t blk, uint32_t idx,
|
|
|
|
+ uint8_t *pq)
|
|
|
|
+{
|
|
|
|
+ PnvXive *xive = PNV_XIVE(xrtr);
|
|
|
|
+
|
|
|
|
+ if (pnv_xive_block_id(xive) != blk) {
|
|
|
|
+ xive_error(xive, "VST: EAS %x is remote !?", XIVE_EAS(blk, idx));
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ *pq = xive_source_esb_get(&xive->ipi_source, idx);
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static int pnv_xive_set_pq(XiveRouter *xrtr, uint8_t blk, uint32_t idx,
|
|
|
|
+ uint8_t *pq)
|
|
|
|
+{
|
|
|
|
+ PnvXive *xive = PNV_XIVE(xrtr);
|
|
|
|
+
|
|
|
|
+ if (pnv_xive_block_id(xive) != blk) {
|
|
|
|
+ xive_error(xive, "VST: EAS %x is remote !?", XIVE_EAS(blk, idx));
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ *pq = xive_source_esb_set(&xive->ipi_source, idx, *pq);
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* One bit per thread id. The first register PC_THREAD_EN_REG0 covers
|
|
* One bit per thread id. The first register PC_THREAD_EN_REG0 covers
|
|
* the first cores 0-15 (normal) of the chip or 0-7 (fused). The
|
|
* the first cores 0-15 (normal) of the chip or 0-7 (fused). The
|
|
@@ -499,12 +527,12 @@ static PnvXive *pnv_xive_tm_get_xive(PowerPCCPU *cpu)
|
|
* event notification to the Router. This is required on a multichip
|
|
* event notification to the Router. This is required on a multichip
|
|
* system.
|
|
* system.
|
|
*/
|
|
*/
|
|
-static void pnv_xive_notify(XiveNotifier *xn, uint32_t srcno)
|
|
|
|
|
|
+static void pnv_xive_notify(XiveNotifier *xn, uint32_t srcno, bool pq_checked)
|
|
{
|
|
{
|
|
PnvXive *xive = PNV_XIVE(xn);
|
|
PnvXive *xive = PNV_XIVE(xn);
|
|
uint8_t blk = pnv_xive_block_id(xive);
|
|
uint8_t blk = pnv_xive_block_id(xive);
|
|
|
|
|
|
- xive_router_notify(xn, XIVE_EAS(blk, srcno));
|
|
|
|
|
|
+ xive_router_notify(xn, XIVE_EAS(blk, srcno), pq_checked);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1351,7 +1379,8 @@ static void pnv_xive_ic_hw_trigger(PnvXive *xive, hwaddr addr, uint64_t val)
|
|
blk = XIVE_EAS_BLOCK(val);
|
|
blk = XIVE_EAS_BLOCK(val);
|
|
idx = XIVE_EAS_INDEX(val);
|
|
idx = XIVE_EAS_INDEX(val);
|
|
|
|
|
|
- xive_router_notify(XIVE_NOTIFIER(xive), XIVE_EAS(blk, idx));
|
|
|
|
|
|
+ xive_router_notify(XIVE_NOTIFIER(xive), XIVE_EAS(blk, idx),
|
|
|
|
+ !!(val & XIVE_TRIGGER_PQ));
|
|
}
|
|
}
|
|
|
|
|
|
static void pnv_xive_ic_notify_write(void *opaque, hwaddr addr, uint64_t val,
|
|
static void pnv_xive_ic_notify_write(void *opaque, hwaddr addr, uint64_t val,
|
|
@@ -1971,6 +2000,8 @@ static void pnv_xive_class_init(ObjectClass *klass, void *data)
|
|
device_class_set_props(dc, pnv_xive_properties);
|
|
device_class_set_props(dc, pnv_xive_properties);
|
|
|
|
|
|
xrc->get_eas = pnv_xive_get_eas;
|
|
xrc->get_eas = pnv_xive_get_eas;
|
|
|
|
+ xrc->get_pq = pnv_xive_get_pq;
|
|
|
|
+ xrc->set_pq = pnv_xive_set_pq;
|
|
xrc->get_end = pnv_xive_get_end;
|
|
xrc->get_end = pnv_xive_get_end;
|
|
xrc->write_end = pnv_xive_write_end;
|
|
xrc->write_end = pnv_xive_write_end;
|
|
xrc->get_nvt = pnv_xive_get_nvt;
|
|
xrc->get_nvt = pnv_xive_get_nvt;
|