From patchwork Fri May 31 06:13:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1108148 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45FZVR0tKWz9s00 for ; Fri, 31 May 2019 16:36:47 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45FZVQ75C9zDqmQ for ; Fri, 31 May 2019 16:36:46 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com 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 45FZ0Q0688zDqXX for ; Fri, 31 May 2019 16:14:13 +1000 (AEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4V64CBB076028 for ; Fri, 31 May 2019 02:14:10 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2stvha4a61-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 31 May 2019 02:14:10 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 May 2019 07:14:09 +0100 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 31 May 2019 07:14:07 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4V6E6Is28705014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 31 May 2019 06:14:06 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A22EB2066 for ; Fri, 31 May 2019 06:14:06 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0FE02B2064 for ; Fri, 31 May 2019 06:14:06 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.91]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP for ; Fri, 31 May 2019 06:14:06 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 09A4250CBDB; Fri, 31 May 2019 16:13:58 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Fri, 31 May 2019 16:13:28 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190531061351.22973-1-stewart@linux.ibm.com> References: <20190531061351.22973-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19053106-0040-0000-0000-000004F6E3D4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011189; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01211088; UDB=6.00636341; IPR=6.00992124; MB=3.00027126; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-31 06:14:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19053106-0041-0000-0000-00000902FEA3 Message-Id: <20190531061351.22973-88-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-31_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905310040 Subject: [Skiboot] [PATCH 087/110] Remove remnants of OPAL_PCI_GET_PHB_DIAG_DATA X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 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" Never present in a public OPAL release, and only kernels prior to 3.11 would ever attempt to call it. Signed-off-by: Stewart Smith Reviewed-by: Andrew Donnellan --- core/pci-opal.c | 22 ------------------ doc/opal-api/index.rst | 23 ++++++++++++++++++- .../opal-pci-get-phb-diag-data2-64.rst | 11 --------- hw/npu.c | 1 - hw/npu2-opencapi.c | 1 - hw/npu2.c | 1 - hw/p7ioc-phb.c | 1 - hw/phb3.c | 1 - hw/phb4.c | 1 - include/pci.h | 2 -- 10 files changed, 22 insertions(+), 42 deletions(-) diff --git a/core/pci-opal.c b/core/pci-opal.c index 043d9483c026..94afc6df9a8b 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -807,28 +807,6 @@ static int64_t opal_pci_set_power_state(uint64_t async_token, } opal_call(OPAL_PCI_SET_POWER_STATE, opal_pci_set_power_state, 3); -static int64_t opal_pci_get_phb_diag_data(uint64_t phb_id, - void *diag_buffer, - uint64_t diag_buffer_len) -{ - struct phb *phb = pci_get_phb(phb_id); - int64_t rc; - - if (!opal_addr_valid(diag_buffer)) - return OPAL_PARAMETER; - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->get_diag_data) - return OPAL_UNSUPPORTED; - phb_lock(phb); - rc = phb->ops->get_diag_data(phb, diag_buffer, diag_buffer_len); - phb_unlock(phb); - - return rc; -} -opal_call(OPAL_PCI_GET_PHB_DIAG_DATA, opal_pci_get_phb_diag_data, 3); - static int64_t opal_pci_get_phb_diag_data2(uint64_t phb_id, void *diag_buffer, uint64_t diag_buffer_len) diff --git a/doc/opal-api/index.rst b/doc/opal-api/index.rst index d0e6483fceb1..00ec72f4f74a 100644 --- a/doc/opal-api/index.rst +++ b/doc/opal-api/index.rst @@ -118,7 +118,10 @@ The OPAL API is the interface between an Operating System and OPAL. +---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_GET_HUB_DIAG_DATA` | 50 | v1.0 (Initial Release) | POWER8 | | +---------------------------------------------+--------------+------------------------+----------+-----------------+ -| :ref:`OPAL_PCI_GET_PHB_DIAG_DATA` | 51 | v1.0 (Initial Release) | POWER8 | | +| :ref:`OPAL_PCI_GET_PHB_DIAG_DATA` | 51 | N/A | | Only | +| | | | | implemented | +| | | | | prior to public | +| | | | | release. | +---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_FENCE_PHB` | 52 | v1.0 (Initial Release) | POWER8 | | +---------------------------------------------+--------------+------------------------+----------+-----------------+ @@ -397,6 +400,10 @@ removed and no longer supported. +---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_PCI_GET_XIVE_REISSUE` | 36 | Never | | +---------------------------------------------+-------+-----------------------+-----------------------+ +| :ref:`OPAL_PCI_GET_PHB_DIAG_DATA` | 51 | pre-v1.0 | pre-v1.0, with last | +| | | | remnants removed in | +| | | | :ref:`skiboot-6.4` | ++---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_GET_XIVE_SOURCE` | 38 | v1.0 Initial Release | :ref:`skiboot-6.4` | +---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_WRITE_OPPANEL` | 43 | pre-v1.0 | pre-v1.0 | @@ -457,6 +464,20 @@ A remnant of something prior to OPALv3. Never implemented in skiboot and never used by anyone. Returend :ref:`OPAL_UNSUPPORTED` until :ref:`skiboot-6.4`, where it was removed. +.. _OPAL_PCI_GET_PHB_DIAG_DATA: + +OPAL_PCI_GET_PHB_DIAG_DATA +========================== + +This call was introduced and functionally removed (all backends for it were) +before the first public opal release. It has not been used since Linux 3.11-rc1. +Considering the state of EEH in such old kernels and firmware, removing the +remnants of this call is considered safe. If for some bizarre reason such an +old kernel is run on :ref:`skiboot-6.4` or later, an :ref:`OPAL_PARAMETER` error +will be returned instead of :ref:`OPAL_UNSUPPORTED`. + +It is replaced by :ref:`OPAL_PCI_GET_PHB_DIAG_DATA2` instead. + .. _OPAL_GET_XIVE_SOURCE: OPAL_GET_XIVE_SOURCE diff --git a/doc/opal-api/opal-pci-get-phb-diag-data2-64.rst b/doc/opal-api/opal-pci-get-phb-diag-data2-64.rst index 7a2f98322ea6..ac98bc2a7a45 100644 --- a/doc/opal-api/opal-pci-get-phb-diag-data2-64.rst +++ b/doc/opal-api/opal-pci-get-phb-diag-data2-64.rst @@ -1,14 +1,3 @@ -.. _OPAL_PCI_GET_PHB_DIAG_DATA: - -OPAL_PCI_GET_PHB_DIAG_DATA -========================== - -.. note:: This call is deprecated. It has not been used since Linux 3.11-rc1. - Use :ref:`OPAL_PCI_GET_PHB_DIAG_DATA2` instead. - -.. note:: This call may be removed in the future. - - .. _OPAL_PCI_GET_PHB_DIAG_DATA2: OPAL_PCI_GET_PHB_DIAG_DATA2 diff --git a/hw/npu.c b/hw/npu.c index 2c3f19e51ad1..2de07470989e 100644 --- a/hw/npu.c +++ b/hw/npu.c @@ -1015,7 +1015,6 @@ static const struct phb_ops npu_ops = { .eeh_freeze_set = NULL, .next_error = npu_eeh_next_error, .err_inject = npu_err_inject, - .get_diag_data = NULL, .get_diag_data2 = NULL, .set_capi_mode = NULL, .set_capp_recovery = NULL, diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c index 7a90cfac40ff..d6d899675f07 100644 --- a/hw/npu2-opencapi.c +++ b/hw/npu2-opencapi.c @@ -1817,7 +1817,6 @@ static const struct phb_ops npu2_opencapi_ops = { .eeh_freeze_set = NULL, .next_error = npu2_opencapi_eeh_next_error, .err_inject = NULL, - .get_diag_data = NULL, .get_diag_data2 = NULL, .set_capi_mode = NULL, .set_capp_recovery = NULL, diff --git a/hw/npu2.c b/hw/npu2.c index 97139dd8baed..b0116e829ec7 100644 --- a/hw/npu2.c +++ b/hw/npu2.c @@ -1385,7 +1385,6 @@ static const struct phb_ops npu_ops = { .eeh_freeze_set = NULL, .next_error = npu2_eeh_next_error, .err_inject = NULL, - .get_diag_data = NULL, .get_diag_data2 = NULL, .set_capi_mode = NULL, .set_capp_recovery = NULL, diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c index 97730a0be989..ac011039a73b 100644 --- a/hw/p7ioc-phb.c +++ b/hw/p7ioc-phb.c @@ -2304,7 +2304,6 @@ static const struct phb_ops p7ioc_phb_ops = { .eeh_freeze_clear = p7ioc_eeh_freeze_clear, .eeh_freeze_set = p7ioc_eeh_freeze_set, .err_inject = p7ioc_err_inject, - .get_diag_data = NULL, .get_diag_data2 = p7ioc_get_diag_data, .next_error = p7ioc_eeh_next_error, .phb_mmio_enable = p7ioc_phb_mmio_enable, diff --git a/hw/phb3.c b/hw/phb3.c index ee98fd51dd79..3042c3e69cbf 100644 --- a/hw/phb3.c +++ b/hw/phb3.c @@ -3793,7 +3793,6 @@ static const struct phb_ops phb3_ops = { .eeh_freeze_set = phb3_eeh_freeze_set, .next_error = phb3_eeh_next_error, .err_inject = phb3_err_inject, - .get_diag_data = NULL, .get_diag_data2 = phb3_get_diag_data, .set_capi_mode = phb3_set_capi_mode, .set_capp_recovery = phb3_set_capp_recovery, diff --git a/hw/phb4.c b/hw/phb4.c index 3ae96f2eb941..f29729b957ee 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -4797,7 +4797,6 @@ static const struct phb_ops phb4_ops = { .eeh_freeze_set = phb4_eeh_freeze_set, .next_error = phb4_eeh_next_error, .err_inject = phb4_err_inject, - .get_diag_data = NULL, .get_diag_data2 = phb4_get_diag_data, .tce_kill = phb4_tce_kill, .set_capi_mode = phb4_set_capi_mode, diff --git a/include/pci.h b/include/pci.h index b63b1193a806..2b7a3c2893d5 100644 --- a/include/pci.h +++ b/include/pci.h @@ -268,8 +268,6 @@ struct phb_ops { int64_t (*err_inject)(struct phb *phb, uint64_t pe_number, uint32_t type, uint32_t func, uint64_t addr, uint64_t mask); - int64_t (*get_diag_data)(struct phb *phb, void *diag_buffer, - uint64_t diag_buffer_len); int64_t (*get_diag_data2)(struct phb *phb, void *diag_buffer, uint64_t diag_buffer_len); int64_t (*next_error)(struct phb *phb, uint64_t *first_frozen_pe,