aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-01-12 14:54:05 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-15 12:42:54 +1100
commitaa5e4abbad929bf520605b654b37eb638e3c1760 (patch)
tree7efea791f673d7d8da1daac862a220be1b821953
parentac5e0d83622bca7efa13ee87ec868a3cceab0f3d (diff)
downloadskiboot-aa5e4abbad929bf520605b654b37eb638e3c1760.zip
skiboot-aa5e4abbad929bf520605b654b37eb638e3c1760.tar.gz
skiboot-aa5e4abbad929bf520605b654b37eb638e3c1760.tar.bz2
hdat: rename add_icp() to add_xics_icp()
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@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hdata/paca.c9
-rw-r--r--hdata/pcia.c7
2 files changed, 11 insertions, 5 deletions
diff --git a/hdata/paca.c b/hdata/paca.c
index 7284a6e..1938d4a 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 a54d4cf..1c339d0 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;
}