From patchwork Tue Jul 25 05:36:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1812230 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=RLvKOer6; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R95PD1w0Sz1yYC for ; Tue, 25 Jul 2023 15:36:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=RLvKOer6; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4R95PC1V1fz30gr for ; Tue, 25 Jul 2023 15:36:31 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=RLvKOer6; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::c2b; helo=mail-oo1-xc2b.google.com; envelope-from=joel.stan@gmail.com; receiver=lists.ozlabs.org) Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4R95P65m3pz30ft for ; Tue, 25 Jul 2023 15:36:25 +1000 (AEST) Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-56352146799so3587198eaf.3 for ; Mon, 24 Jul 2023 22:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690263381; x=1690868181; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=yMi3Ch89dVD/txad2HcREG0pD8KYvijNqRlMyoz5lZk=; b=RLvKOer6f1wqIcMEsYYvU0FEbCgEOjGxtcgEWE/ifVi+WQCx2S/eCXdoV4sMk02L6w caRkdcxFbFgA2g1EYPg3YSsKsELJg6w/tsXvQjU7u+60jdRoqFgzeQk1xmBg1WlweghW xtAqhAhhS/eHhZlvsB99rJ8w20xBubd6UblZlwxxdwH2fYLlCnQOhBtppEwUnL08YqLJ sn3rI8cdvpA9jBxMmUfp4e412WoIfuAh3ZglCQJjqGM0iGyP+87rxPBNXLgNnBY6IAhb Cqm51rDXrjv8NRkwy4i471FcwMuQHDLQDeHuMDdxktON9sQXfpxASThWhlaEdrFFybN7 V9Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690263381; x=1690868181; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yMi3Ch89dVD/txad2HcREG0pD8KYvijNqRlMyoz5lZk=; b=O+6MNhem0S+1iD997XIyTBiyPcQsHjy9P/aOq/FgTtK/VoEGKxf2j5Q3LwMp1+CQfK y7dTkJ+ybwY7otGxNnxCWVdGmGfXTq87BrZeTOzjfoAY6aezCqQoLg2deRxnin0UG2ah QduwlPZEHF6IYNm7yEAa7yDlZeY4KsN2A31GmHZZ2XqO3jb7YjW8i8dcSgri4D+jdRvh 8sHp1zQYEfCZDuyi03Vg7foBzh0HtxoTA1kS1TpAH740uEF7+Z4wZAEo4N7TSOuEVEzC U+B8KX8i1hMOy60kwsaqiFhoFo/jbfVG84Cgxv81T1H4HKARlvgOTgni0zOr29JGE0Ka mSpw== X-Gm-Message-State: ABy/qLY1Z7XHBKcMJKX4Hd5Rv2G00vkyGH9Fi2J+acauRDbuta4jQZRS t2ziGUAdx4PtiRGW7AvOOBF4D/q1NjE= X-Google-Smtp-Source: APBJJlGMka4SIuo5hsAXzf2UTUImWhJVvcr9B19pyLGxzIhVY7sqDKeU8Wm3Z5lE0V6nRP9uVlOZcg== X-Received: by 2002:a05:6358:430c:b0:134:c1e1:3b08 with SMTP id r12-20020a056358430c00b00134c1e13b08mr10702245rwc.25.1690263381058; Mon, 24 Jul 2023 22:36:21 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.19]) by smtp.gmail.com with ESMTPSA id m26-20020a056a00165a00b0067738f65039sm8609899pfc.83.2023.07.24.22.36.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 22:36:19 -0700 (PDT) From: Joel Stanley To: skiboot@lists.ozlabs.org Date: Tue, 25 Jul 2023 15:06:11 +0930 Message-Id: <20230725053611.190938-1-joel@jms.id.au> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [Skiboot] [PATCH] pci: Remove MVE opal calls 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" These callbacks were used by the p7ioc code that was removed a long time ago. Add them to the list of removed calls and delete the dead code. Linux has removed the code that called these functions in v6.5-rc1. Signed-off-by: Joel Stanley --- v2: Update opal call docs Compltely remove functions instead of leaving stubs --- doc/opal-api/index.rst | 23 +++++++++-- doc/opal-api/opal-pci-set-mve-33.rst | 43 -------------------- doc/opal-api/opal-pci-set-mve-enable-34.rst | 44 --------------------- doc/release-notes/skiboot-7.1.rst | 12 ++++++ include/pci.h | 6 --- core/pci-opal.c | 36 ----------------- 6 files changed, 31 insertions(+), 133 deletions(-) delete mode 100644 doc/opal-api/opal-pci-set-mve-33.rst delete mode 100644 doc/opal-api/opal-pci-set-mve-enable-34.rst create mode 100644 doc/release-notes/skiboot-7.1.rst diff --git a/doc/opal-api/index.rst b/doc/opal-api/index.rst index 663108889bc5..e8196f163640 100644 --- a/doc/opal-api/index.rst +++ b/doc/opal-api/index.rst @@ -85,10 +85,6 @@ The OPAL API is the interface between an Operating System and OPAL. +---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_SET_PELTV` | 32 | v1.0 (Initial Release) | POWER8 | | +---------------------------------------------+--------------+------------------------+----------+-----------------+ -| :ref:`OPAL_PCI_SET_MVE` | 33 | v1.0 (Initial Release) | POWER8 | | -+---------------------------------------------+--------------+------------------------+----------+-----------------+ -| :ref:`OPAL_PCI_SET_MVE_ENABLE` | 34 | v1.0 (Initial Release) | POWER8 | | -+---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_GET_XIVE_REISSUE` | 35 | Never | | Never used or | | | | | | Implemented | +---------------------------------------------+--------------+------------------------+----------+-----------------+ @@ -454,6 +450,10 @@ removed and no longer supported. +---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_PCI_EEH_FREEZE_STATUS2` | 61 | v1.0 Initial Release | :ref:`skiboot-6.4` | +---------------------------------------------+-------+-----------------------+-----------------------+ +| :ref:`OPAL_PCI_SET_MVE` | 33 | v1.0 Initial Release | :ref:`skiboot-7.1` | ++---------------------------------------------+--------------+------------------------+----------+----+ +| :ref:`OPAL_PCI_SET_MVE_ENABLE` | 34 | v1.0 Initial Release | :ref:`skiboot-7.1` | ++---------------------------------------------+--------------+------------------------+----------+----+ .. _OPAL_GET_COMPLETION_TOKEN_STATUS: @@ -664,6 +664,21 @@ and bring-up purposes. Support for p5ioc was removed from the Linux kernel in v4.6-rc1. +.. _OPAL_PCI_SET_MVE: + +OPAL_PCI_SET_MVE +^^^^^^^^^^^^^^^^ + +Dead code, as the callback did nothing after the P7IOC code was removed in +skiboot 6.4. Removed in :ref:`skiboot-7.1`. + +.. _OPAL_PCI_SET_MVE_ENABLE: + +OPAL_PCI_SET_MVE_ENABLE +^^^^^^^^^^^^^^^^^^^^^^^ + +Dead code, as the callback did nothing after the P7IOC code was removed in +skiboot 6.4. Removed in :ref:`skiboot-7.1`. Future Calls ------------ diff --git a/doc/opal-api/opal-pci-set-mve-33.rst b/doc/opal-api/opal-pci-set-mve-33.rst deleted file mode 100644 index b0c7e6111e0d..000000000000 --- a/doc/opal-api/opal-pci-set-mve-33.rst +++ /dev/null @@ -1,43 +0,0 @@ -.. _OPAL_PCI_SET_MVE: - -OPAL_PCI_SET_MVE -================ - -.. code-block:: c - - #define OPAL_PCI_SET_MVE 33 - - int64_t opal_pci_set_mve(uint64_t phb_id, uint32_t mve_number, uint64_t pe_number); - -**WARNING:** following documentation is from old sources, and is possibly -not representative of OPALv3 as implemented by skiboot. This should be -used as a starting point for full documentation. - -The host calls this function to bind a PE to an MSI Validation Table Entry -(MVE) in the PHB. The MVE compares the MSI requester (RID) to a PE RID, -including within the XIVE, to validate that the requester is authorized to -signal an interrupt to the associated DMA address for a message value that -selects a particular XIVE. - -``phb_id`` - is the value from the PHB node ibm,opal-phbid property. - -``mve_number`` - is the index, from 0 to ibm,opal,ibm-num-msi-ports minus1 - -``pe_number`` - is the index of a PE, from 0 to ibm,opal-num-pes minus 1. - -This call maps an MVE to a PE and PE RID domain. OPAL uses the PELT to -determine the PE domain. OPAL treats this call as a NOP for IODA2 PHBs -and returns a status of OPAL_SUCCESS. - - -Return value: - -.. code-block:: c - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve) - return OPAL_UNSUPPORTED; diff --git a/doc/opal-api/opal-pci-set-mve-enable-34.rst b/doc/opal-api/opal-pci-set-mve-enable-34.rst deleted file mode 100644 index 55bf10a08f21..000000000000 --- a/doc/opal-api/opal-pci-set-mve-enable-34.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. _OPAL_PCI_SET_MVE_ENABLE: - -OPAL_PCI_SET_MVE_ENABLE -======================= - - -.. code-block:: c - - #define OPAL_PCI_SET_MVE_ENABLE 34 - - int64_t opal_pci_set_mve_enable(uint64_t phb_id, uint32_t mve_number, uint32_t state); - - enum OpalMveEnableAction { - OPAL_DISABLE_MVE = 0, - OPAL_ENABLE_MVE = 1 - }; - -**WARNING:** following documentation is from old sources, and is possibly -not representative of OPALv3 as implemented by skiboot. This should be -used as a starting point for full documentation. - -The host calls this function to enable or disable an MVE to respond to an MSI -DMA address and message data value. - -``phb_id`` - is the value from the PHB node ibm,opal-phbid property. - -``mve_number`` - is the index, from 0 to ibm,opal,ibm-num-msi-ports minus1 - -``state`` - A '1' value of the state parameter indicates to enable the MVE and a '0' - value indicates to disable the MVE. - -This call sets the MVE to an enabled (1) or disabled (0) state. - -Return value: - -.. code-block:: c - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve_enable) - return OPAL_UNSUPPORTED; diff --git a/doc/release-notes/skiboot-7.1.rst b/doc/release-notes/skiboot-7.1.rst new file mode 100644 index 000000000000..8e37450a651b --- /dev/null +++ b/doc/release-notes/skiboot-7.1.rst @@ -0,0 +1,12 @@ +.. _skiboot-7.1: + +skiboot-7.1 +=========== + +New Features +------------ +Removed OPAL calls +^^^^^^^^^^^^^^^^^^ +The OPAL_PCI_SET_MVE_ENABLE and OPAL_PCI_SET_MVE calls were removed, as they +were noops. Support for IODA1 and both calls was removed from the Linux kernel +in v6.5-rc1. diff --git a/include/pci.h b/include/pci.h index caae74431841..59f9fcc9afaa 100644 --- a/include/pci.h +++ b/include/pci.h @@ -296,12 +296,6 @@ struct phb_ops { int64_t (*get_option)(struct phb *phb, enum OpalPhbOption opt, __be64 *setting); - int64_t (*set_mve)(struct phb *phb, uint32_t mve_number, - uint64_t pe_number); - - int64_t (*set_mve_enable)(struct phb *phb, uint32_t mve_number, - uint32_t state); - int64_t (*set_xive_pe)(struct phb *phb, uint64_t pe_number, uint32_t xive_num); diff --git a/core/pci-opal.c b/core/pci-opal.c index acbcd2a5e60a..28b2c84cc0d5 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -307,42 +307,6 @@ static int64_t opal_pci_set_peltv(uint64_t phb_id, uint32_t parent_pe, } opal_call(OPAL_PCI_SET_PELTV, opal_pci_set_peltv, 4); -static int64_t opal_pci_set_mve(uint64_t phb_id, uint32_t mve_number, - uint64_t pe_number) -{ - struct phb *phb = pci_get_phb(phb_id); - int64_t rc; - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve) - return OPAL_UNSUPPORTED; - phb_lock(phb); - rc = phb->ops->set_mve(phb, mve_number, pe_number); - phb_unlock(phb); - - return rc; -} -opal_call(OPAL_PCI_SET_MVE, opal_pci_set_mve, 3); - -static int64_t opal_pci_set_mve_enable(uint64_t phb_id, uint32_t mve_number, - uint32_t state) -{ - struct phb *phb = pci_get_phb(phb_id); - int64_t rc; - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve_enable) - return OPAL_UNSUPPORTED; - phb_lock(phb); - rc = phb->ops->set_mve_enable(phb, mve_number, state); - phb_unlock(phb); - - return rc; -} -opal_call(OPAL_PCI_SET_MVE_ENABLE, opal_pci_set_mve_enable, 3); - static int64_t opal_pci_msi_eoi(uint64_t phb_id, uint32_t hwirq) {