[Skiboot] [PATCH] dt: add ibm, tlb-(radix-)congruence-classes for tlbie invalidation
Nicholas Piggin
npiggin at gmail.com
Fri Feb 24 23:43:36 AEDT 2017
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
doc/device-tree.rst | 3 +++
hdata/cpu-common.c | 15 +++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/doc/device-tree.rst b/doc/device-tree.rst
index fe527c65..b6cc7d2f 100644
--- a/doc/device-tree.rst
+++ b/doc/device-tree.rst
@@ -181,6 +181,9 @@ Root node of device tree
/* SLB size, use as-is */
ibm,slb-size = <0x20>;
+ /* TLB congruence classes for TLBIE invalidation */
+ ibm,tlb-congruence-classes = <0x200>;
+
/* VSX support, use as-is */
ibm,vmx = <0x2>;
diff --git a/hdata/cpu-common.c b/hdata/cpu-common.c
index 50c6adc7..aa2752c1 100644
--- a/hdata/cpu-common.c
+++ b/hdata/cpu-common.c
@@ -64,6 +64,8 @@ struct dt_node * add_core_common(struct dt_node *cpus,
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 48 .. 55 */
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 56 .. 63 */
};
+ int tlb_congruence = 0;
+ int tlb_radix_congruence = 0;
const uint8_t *pa_features;
size_t pa_features_size;
@@ -84,11 +86,13 @@ struct dt_node * add_core_common(struct dt_node *cpus,
name = "PowerPC,POWER7";
pa_features = pa_features_p7;
pa_features_size = sizeof(pa_features_p7);
+ tlb_congruence = 128;
break;
case PVR_TYPE_P7P:
name = "PowerPC,POWER7+";
pa_features = pa_features_p7p;
pa_features_size = sizeof(pa_features_p7p);
+ tlb_congruence = 128;
break;
case PVR_TYPE_P8E:
case PVR_TYPE_P8:
@@ -96,6 +100,7 @@ struct dt_node * add_core_common(struct dt_node *cpus,
name = "PowerPC,POWER8";
pa_features = pa_features_p8;
pa_features_size = sizeof(pa_features_p8);
+ tlb_congruence = 512;
break;
case PVR_TYPE_P9:
name = "PowerPC,POWER9";
@@ -106,6 +111,8 @@ struct dt_node * add_core_common(struct dt_node *cpus,
pa_features = pa_features_p9_dd2;
pa_features_size = sizeof(pa_features_p9_dd2);
}
+ tlb_congruence = 256;
+ tlb_radix_congruence = 128;
break;
default:
name = "PowerPC,Unknown";
@@ -147,6 +154,14 @@ struct dt_node * add_core_common(struct dt_node *cpus,
pa_features, pa_features_size);
}
dt_add_property_cells(cpu, "ibm,slb-size", 0x20);
+ if (tlb_congruence) {
+ dt_add_property_cells(cpu, "ibm,tlb-congruence-classes",
+ tlb_congruence);
+ }
+ if (tlb_radix_congruence) {
+ dt_add_property_cells(cpu, "ibm,tlb-radix-congruence-classes",
+ tlb_radix_congruence);
+ }
dt_add_property_cells(cpu, "ibm,vmx", 0x2);
dt_add_property_cells(cpu, "ibm,dfp", 0x2);
--
2.11.0
More information about the Skiboot
mailing list