From patchwork Thu Jan 12 03:54:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 714204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tzX6f4Hg0z9sXx for ; Thu, 12 Jan 2017 14:58:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Zt4FMIQf"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3tzX6f3FrRzDqRc for ; Thu, 12 Jan 2017 14:58:18 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Zt4FMIQf"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tzX2S5MyvzDqQl for ; Thu, 12 Jan 2017 14:54:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Zt4FMIQf"; dkim-atps=neutral Received: by mail-pf0-x241.google.com with SMTP id f144so1309522pfa.2 for ; Wed, 11 Jan 2017 19:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NWk0cgmlD9nZj3C9mSMxvhFNm51OEIdzyvBe0mUdYU0=; b=Zt4FMIQfdJDuq962PVKRcwR1Wv3mmzMXShqp/uArTNsL3xizIeiSg+seGEZJf/1MCv QItu9Rr7aBx8JFbNDIu5Clu+TUfBgqMpjzP9t7vXX8DxzNn3JNBdlrnyF7RJIBQ73E4X CRZ87sp7pTfoCFn41nEG89UYLl8c0adgtySgwNKAxas1p4/sum0Y4FKDuW4rCDhtm/sP b+f5fYf0U5PtlFoP5GiZzOGDWEWjydhbFq1PnbK0Q2xKiQqSl04nzsDFl9mxSBLUupnF 1HB2YhSOVk/neDEHtSjvt0inMk4Jpe3trCX3M1POkDLy6s1InpcS3KmL+2yj3ECtFMwo fcug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NWk0cgmlD9nZj3C9mSMxvhFNm51OEIdzyvBe0mUdYU0=; b=T21mhjoSKaPWXVXjVPvwnhdiXqOtvtpH5pr2V1pfsmlYWSPLi5cwN5F/mBkYejDXjE ylZUcNzKb3gZWrk/Ubh3v8lz0i2/rWJjgskjkt9jh+oPRvJHv6Kg57pvRcGMim0Gw2bN C+3bb13fO3mG0dMvcuOyQ+nVKgH5deeI6373ex5l0FfpnXmZcC41uv5CkUBFAomLtIbD +d6WfwdumHEiEKOc1MB13pCl12QOe6cNiLvTIEYlvKkwtlqDm/KJXaecwSm4xT+sdr90 CMC/PmoJDnpmEKTksAW4FBTbu6WEbB/NOA2eJmk/JEapZM7DmAeYgHg7bMezqXJVNLZr LxHA== X-Gm-Message-State: AIkVDXKVqa9v4lHsnYk/HB1/Hl1m0zgcIaD+mH6jrkGV8mZ8IUWtx1+e5/cisCfYf+6uEA== X-Received: by 10.99.122.67 with SMTP id j3mr14980212pgn.112.1484193278915; Wed, 11 Jan 2017 19:54:38 -0800 (PST) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id r78sm16971004pfe.55.2017.01.11.19.54.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 19:54:38 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Thu, 12 Jan 2017 14:54:06 +1100 Message-Id: <1484193253-25307-7-git-send-email-oohall@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484193253-25307-1-git-send-email-oohall@gmail.com> References: <1484193253-25307-1-git-send-email-oohall@gmail.com> Subject: [Skiboot] [PATCH 07/14] hdat: stop using proc_int_line in favor of pir X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This field has been deprecated in the P9 HDAT format. Due to how XICS works proc_int_line has always been equal to the pir field of the same structure. This equality has always been enforced by an assert() in skiboot on P7 and P8 so it's safe to just look at the pir field instead. Signed-off-by: Oliver O'Halloran --- hdata/pcia.c | 14 +++++++------- hdata/test/p8-840-spira.dt | 12 ++++++------ hdata/test/p81-811.spira.dt | 40 ++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/hdata/pcia.c b/hdata/pcia.c index 1c339d01c410..9b210e4dfbff 100644 --- a/hdata/pcia.c +++ b/hdata/pcia.c @@ -72,7 +72,7 @@ static void add_xics_icp(const void *pcia, u32 tcount, const char *compat) t = find_tada(pcia, i); assert(t); if (i == 0) - irange[0] = be32_to_cpu(t->proc_int_line); + irange[0] = be32_to_cpu(t->pir); reg[i * 2] = cpu_to_be64(cleanup_addr(be64_to_cpu(t->ibase))); reg[i * 2 + 1] = cpu_to_be64(0x1000); } @@ -125,8 +125,8 @@ static struct dt_node *add_core_node(struct dt_node *cpus, >> CPU_ID_NUM_SECONDARY_THREAD_SHIFT) + 1; assert(threads <= PCIA_MAX_THREADS); - prlog(PR_INFO, "CORE[%i]: PIR=%i RES=%i %s %s(%u threads)\n", - pcia_index(pcia), t->pir, t->proc_int_line, + prlog(PR_INFO, "CORE[%i]: PIR=%.8x %s %s(%u threads)\n", + pcia_index(pcia), be32_to_cpu(t->pir), ve_flags & CPU_ID_PACA_RESERVED ? "**RESERVED**" : cpu_state(ve_flags), be32_to_cpu(t->pir) == boot_cpu->pir ? "[boot] " : "", threads); @@ -146,7 +146,7 @@ static struct dt_node *add_core_node(struct dt_node *cpus, } cpu = add_core_common(cpus, cache, timebase, - be32_to_cpu(t->proc_int_line), okay); + be32_to_cpu(t->pir), okay); /* Core attributes */ attr = HDIF_get_idata(pcia, SPPCIA_IDATA_CPU_ATTR, &size); @@ -155,7 +155,7 @@ static struct dt_node *add_core_node(struct dt_node *cpus, /* Add cache info */ l2_phandle = add_core_cache_info(cpus, cache, - be32_to_cpu(t->proc_int_line), okay); + be32_to_cpu(t->pir), okay); dt_add_property_cells(cpu, "l2-cache", l2_phandle); if (proc_gen == proc_gen_p7) @@ -176,8 +176,8 @@ static struct dt_node *add_core_node(struct dt_node *cpus, threads = i; break; } - iserv[i] = t->proc_int_line; - assert(t->proc_int_line == t->pir); + + iserv[i] = t->pir; } dt_add_property(cpu, "ibm,ppc-interrupt-server#s", iserv, 4 * threads); diff --git a/hdata/test/p8-840-spira.dt b/hdata/test/p8-840-spira.dt index f538d2289f70..b71388973907 100644 --- a/hdata/test/p8-840-spira.dt +++ b/hdata/test/p8-840-spira.dt @@ -1,22 +1,22 @@ SPIRA-S found. Got PCIA ! CORE[0]: HW_PROC_ID=1 PROC_CHIP_ID=0 EC=0x21 OK -CORE[0]: PIR=671088640 RES=671088640 OK (8 threads) +CORE[0]: PIR=00000028 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[1]: HW_PROC_ID=3 PROC_CHIP_ID=0 EC=0x21 OK -CORE[1]: PIR=1610612736 RES=1610612736 OK (8 threads) +CORE[1]: PIR=00000060 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[2]: HW_PROC_ID=4 PROC_CHIP_ID=0 EC=0x21 OK -CORE[2]: PIR=1744830464 RES=1744830464 OK (8 threads) +CORE[2]: PIR=00000068 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[3]: HW_PROC_ID=8 PROC_CHIP_ID=1 EC=0x21 OK -CORE[3]: PIR=-1342177280 RES=-1342177280 OK (8 threads) +CORE[3]: PIR=000000b0 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[4]: HW_PROC_ID=10 PROC_CHIP_ID=1 EC=0x21 OK -CORE[4]: PIR=-402653184 RES=-402653184 OK (8 threads) +CORE[4]: PIR=000000e8 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[5]: HW_PROC_ID=11 PROC_CHIP_ID=1 EC=0x21 OK -CORE[5]: PIR=-268435456 RES=-268435456 OK (8 threads) +CORE[5]: PIR=000000f0 OK (8 threads) Cache: I=32 D=64/512/8192/0 IPLPARAMS: 1 serial ports in array IPLPARAMS: Serial 0 rsrc: 2a00 loc: U78C9.001.WZS0CWX-P1-C1-T1 diff --git a/hdata/test/p81-811.spira.dt b/hdata/test/p81-811.spira.dt index 2286915481e0..e8ec6f463829 100644 --- a/hdata/test/p81-811.spira.dt +++ b/hdata/test/p81-811.spira.dt @@ -1,63 +1,63 @@ Got PCIA ! CORE[0]: HW_PROC_ID=0 PROC_CHIP_ID=0 EC=0x21 OK -CORE[0]: PIR=536870912 RES=536870912 OK (8 threads) +CORE[0]: PIR=00000020 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[1]: HW_PROC_ID=2 PROC_CHIP_ID=0 EC=0x21 OK -CORE[1]: PIR=805306368 RES=805306368 OK (8 threads) +CORE[1]: PIR=00000030 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[2]: HW_PROC_ID=3 PROC_CHIP_ID=0 EC=0x21 OK -CORE[2]: PIR=1610612736 RES=1610612736 OK (8 threads) +CORE[2]: PIR=00000060 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[3]: HW_PROC_ID=4 PROC_CHIP_ID=0 EC=0x21 OK -CORE[3]: PIR=1744830464 RES=1744830464 OK (8 threads) +CORE[3]: PIR=00000068 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[4]: HW_PROC_ID=5 PROC_CHIP_ID=0 EC=0x21 OK -CORE[4]: PIR=1879048192 RES=1879048192 OK (8 threads) +CORE[4]: PIR=00000070 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[5]: HW_PROC_ID=7 PROC_CHIP_ID=1 EC=0x21 OK -CORE[5]: PIR=-1476395008 RES=-1476395008 OK (8 threads) +CORE[5]: PIR=000000a8 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[6]: HW_PROC_ID=8 PROC_CHIP_ID=1 EC=0x21 OK -CORE[6]: PIR=-1342177280 RES=-1342177280 OK (8 threads) +CORE[6]: PIR=000000b0 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[7]: HW_PROC_ID=9 PROC_CHIP_ID=1 EC=0x21 OK -CORE[7]: PIR=-536870912 RES=-536870912 OK (8 threads) +CORE[7]: PIR=000000e0 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[8]: HW_PROC_ID=10 PROC_CHIP_ID=1 EC=0x21 OK -CORE[8]: PIR=-402653184 RES=-402653184 OK (8 threads) +CORE[8]: PIR=000000e8 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[9]: HW_PROC_ID=11 PROC_CHIP_ID=1 EC=0x21 OK -CORE[9]: PIR=-268435456 RES=-268435456 OK (8 threads) +CORE[9]: PIR=000000f0 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[10]: HW_PROC_ID=13 PROC_CHIP_ID=2 EC=0x21 OK -CORE[10]: PIR=671612928 RES=671612928 OK (8 threads) +CORE[10]: PIR=00000828 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[11]: HW_PROC_ID=14 PROC_CHIP_ID=2 EC=0x21 OK -CORE[11]: PIR=805830656 RES=805830656 OK (8 threads) +CORE[11]: PIR=00000830 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[12]: HW_PROC_ID=15 PROC_CHIP_ID=2 EC=0x21 OK -CORE[12]: PIR=1611137024 RES=1611137024 OK (8 threads) +CORE[12]: PIR=00000860 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[13]: HW_PROC_ID=16 PROC_CHIP_ID=2 EC=0x21 OK -CORE[13]: PIR=1745354752 RES=1745354752 OK (8 threads) +CORE[13]: PIR=00000868 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[14]: HW_PROC_ID=17 PROC_CHIP_ID=2 EC=0x21 OK -CORE[14]: PIR=1879572480 RES=1879572480 OK (8 threads) +CORE[14]: PIR=00000870 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[15]: HW_PROC_ID=18 PROC_CHIP_ID=3 EC=0x21 OK -CORE[15]: PIR=-1610088448 RES=-1610088448 OK (8 threads) +CORE[15]: PIR=000008a0 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[16]: HW_PROC_ID=19 PROC_CHIP_ID=3 EC=0x21 OK -CORE[16]: PIR=-1475870720 RES=-1475870720 OK (8 threads) +CORE[16]: PIR=000008a8 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[17]: HW_PROC_ID=20 PROC_CHIP_ID=3 EC=0x21 OK -CORE[17]: PIR=-1341652992 RES=-1341652992 OK (8 threads) +CORE[17]: PIR=000008b0 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[18]: HW_PROC_ID=22 PROC_CHIP_ID=3 EC=0x21 OK -CORE[18]: PIR=-402128896 RES=-402128896 OK (8 threads) +CORE[18]: PIR=000008e8 OK (8 threads) Cache: I=32 D=64/512/8192/0 CORE[19]: HW_PROC_ID=23 PROC_CHIP_ID=3 EC=0x21 OK -CORE[19]: PIR=-267911168 RES=-267911168 OK (8 threads) +CORE[19]: PIR=000008f0 OK (8 threads) Cache: I=32 D=64/512/8192/0 IPLPARAMS: 1 serial ports in array IPLPARAMS: Serial 0 rsrc: 2a00 loc: U78CB.001.WZS00AL-P1-C1-T1