From aa5e4abbad929bf520605b654b37eb638e3c1760 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 12 Jan 2017 14:54:05 +1100 Subject: 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 Reviewed-by: Vasant Hegde Signed-off-by: Stewart Smith --- hdata/paca.c | 9 +++++++-- hdata/pcia.c | 7 ++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'hdata') 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; } -- cgit v1.1