phb4/5: Escalate page-level TCE kills

An hw issue was found on P10 (HW560152) where a page-level TCE kill
can be dropped if there are enough TCE kill requests already being
processed. The net effect is that data integrity is not
guaranteed. The circumvention is to stay away from page-level kills
and escalate those to PE kills. Which hurts performance.
It also affects P9.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
diff --git a/hw/phb4.c b/hw/phb4.c
index 79083d4..ddaa18f 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -1051,6 +1051,14 @@
 	uint64_t val;
 	int64_t rc;
 
+	/*
+	 * HW560152: a page-level kill can be dropped if the
+	 *	 processing queue is backed-up, which can cause data
+	 *	 integrity issues
+	 */
+	if (kill_type == OPAL_PCI_TCE_KILL_PAGES)
+		kill_type = OPAL_PCI_TCE_KILL_PE;
+
 	sync();
 	switch(kill_type) {
 	case OPAL_PCI_TCE_KILL_PAGES: