[Skiboot] [PATCH 06/14] hdat: rename add_icp() to add_xics_icp()

Oliver O'Halloran oohall at gmail.com
Thu Jan 12 14:54:05 AEDT 2017


With the arrival of XIVE there there is no longer a single type of ICP.
This patch renames this function for better clarity.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 hdata/paca.c | 9 +++++++--
 hdata/pcia.c | 7 ++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/hdata/paca.c b/hdata/paca.c
index 7284a6e9d1a1..1938d4affbeb 100644
--- a/hdata/paca.c
+++ b/hdata/paca.c
@@ -134,7 +134,7 @@ static void add_be32_sorted(__be32 arr[], __be32 new, unsigned num)
 	arr[i] = new;
 }
 
-static void add_icps(void)
+static void add_xics_icps(void)
 {
 	struct dt_node *cpu;
 	unsigned int i;
@@ -321,7 +321,12 @@ static bool __paca_parse(void)
 		free(new_prop);
 	}
 
-	add_icps();
+	/*
+	 * P7 and P8 use the XICS interrupt controller which has a per-core
+	 * interrupt controller node.
+	 */
+	if (proc_gen <= proc_gen_p8)
+		add_xics_icps();
 
 	return true;
 }
diff --git a/hdata/pcia.c b/hdata/pcia.c
index a54d4cf535ba..1c339d01c410 100644
--- a/hdata/pcia.c
+++ b/hdata/pcia.c
@@ -55,7 +55,7 @@ static const struct sppcia_cpu_thread *find_tada(const void *pcia,
 	return NULL;
 }
 
-static void add_icp(const void *pcia, u32 tcount, const char *compat)
+static void add_xics_icp(const void *pcia, u32 tcount, const char *compat)
 {
 	const struct sppcia_cpu_thread *t;
 	struct dt_node *icp;
@@ -182,8 +182,9 @@ static struct dt_node *add_core_node(struct dt_node *cpus,
 
 	dt_add_property(cpu, "ibm,ppc-interrupt-server#s", iserv, 4 * threads);
 
-	/* Add the ICP node for this CPU */
-	add_icp(pcia, threads, icp_compat);
+	/* Add the ICP node for this CPU for P7 / P8 */
+	if (proc_gen <= proc_gen_p8)
+		add_xics_icp(pcia, threads, icp_compat);
 
 	return cpu;
 }
-- 
2.7.4



More information about the Skiboot mailing list