From patchwork Fri Feb 24 00:49:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ananth N Mavinakayanahalli X-Patchwork-Id: 731854 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vTsvc5z1tz9s7N for ; Fri, 24 Feb 2017 11:50:04 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vTsvc58WqzDqHC for ; Fri, 24 Feb 2017 11:50:04 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vTsvW1sPjzDqC0 for ; Fri, 24 Feb 2017 11:49:59 +1100 (AEDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1O0mfrd064388 for ; Thu, 23 Feb 2017 19:49:57 -0500 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 28t605a9dq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 23 Feb 2017 19:49:56 -0500 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 24 Feb 2017 10:49:54 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 24 Feb 2017 10:49:52 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 6E9593578052 for ; Fri, 24 Feb 2017 11:49:52 +1100 (EST) Received: from d23av06.au.ibm.com (d23av06.au.ibm.com [9.190.235.151]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1O0niCl32637136 for ; Fri, 24 Feb 2017 11:49:52 +1100 Received: from d23av06.au.ibm.com (localhost [127.0.0.1]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v1O0nKrp017099 for ; Fri, 24 Feb 2017 11:49:20 +1100 Received: from thinktux.in.ibm.com ([9.199.50.217]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v1O0nIPm016780 for ; Fri, 24 Feb 2017 11:49:19 +1100 From: Ananth N Mavinakayanahalli To: skiboot@lists.ozlabs.org Date: Fri, 24 Feb 2017 06:19:02 +0530 User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022400-0008-0000-0000-0000010E47E6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022400-0009-0000-0000-0000091D4269 Message-Id: <148789734198.3828.8266723369226905966.stgit@thinktux.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-23_17:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=13 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702240007 Subject: [Skiboot] [PATCH V2] platforms/zz: Initialize PRD in skiboot 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: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" ... since PRD runs in host userspace for FSP based P9 systems. Signed-off-by: Ananth N Mavinakayanahalli Reviewed-by: Mahesh Salgaonkar --- hw/prd.c | 16 +++++++++------- platforms/ibm-fsp/zz.c | 3 +++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/prd.c b/hw/prd.c index a44faa9..d63c03f 100644 --- a/hw/prd.c +++ b/hw/prd.c @@ -361,13 +361,15 @@ void prd_init(void) } unlock(&ipoll_lock); - if (fsp_present()) { - /* todo: FSP implementation */ - queue_prd_msg = queue_prd_msg_nop; - } else { - queue_prd_msg = queue_prd_msg_hbrt; - opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); - } + /* + * P9 FSP based systems work similar to the OpenPOWER + * ones in that the PRD runs in host userspace. On such + * systems, prd_init() gets called from the platform + * probe callback and the setup for them is similar + * to the OpenPOWER systems. + */ + queue_prd_msg = queue_prd_msg_hbrt; + opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); prd_node = dt_new(opal_node, "diagnostics"); dt_add_property_strings(prd_node, "compatible", "ibm,opal-prd"); diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c index 89d87b4..4d50799 100644 --- a/platforms/ibm-fsp/zz.c +++ b/platforms/ibm-fsp/zz.c @@ -29,6 +29,9 @@ static bool zz_probe(void) { + /* PRD runs in host userspace on P9 FSP platforms */ + prd_init(); + /* FIXME: make this neater when the dust settles */ if (dt_node_is_compatible(dt_root, "ibm,zz-1s2u") || dt_node_is_compatible(dt_root, "ibm,zz-1s4u") ||