linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.ibm.com>
To: alastair@au1.ibm.com, andrew.donnellan@au1.ibm.com,
	vaibhav@linux.ibm.com, clombard@linux.ibm.com,
	felix@linux.ibm.com, linuxppc-dev@lists.ozlabs.org
Cc: huyn@mellanox.com
Subject: [PATCH 06/10] Revert "cxl: Add support for using the kernel API with a real PHB"
Date: Mon, 25 Jun 2018 18:24:02 +0200	[thread overview]
Message-ID: <20180625162406.10813-7-fbarrat@linux.ibm.com> (raw)
In-Reply-To: <20180625162406.10813-1-fbarrat@linux.ibm.com>

From: Alastair D'Silva <alastair@d-silva.org>

Remove abandonned capi support for the Mellanox CX4.

This reverts commit 317f5ef1b363417b6f1e93b90dfd2ffd6be6e867.
---
 drivers/misc/cxl/pci.c  |  3 ---
 drivers/misc/cxl/vphb.c | 16 ++--------------
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 9c5a21fee835..193ff22f610b 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1886,9 +1886,6 @@ static int cxl_probe(struct pci_dev *dev, const struct pci_device_id *id)
 			dev_err(&dev->dev, "AFU %i failed to start: %i\n", slice, rc);
 	}
 
-	if (pnv_pci_on_cxl_phb(dev) && adapter->slices >= 1)
-		pnv_cxl_phb_set_peer_afu(dev, adapter->afu[0]);
-
 	return 0;
 }
 
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
index 7fd0bdc1436a..1a99c9c7a6fb 100644
--- a/drivers/misc/cxl/vphb.c
+++ b/drivers/misc/cxl/vphb.c
@@ -9,7 +9,6 @@
 
 #include <linux/pci.h>
 #include <misc/cxl.h>
-#include <asm/pnv-pci.h>
 #include "cxl.h"
 
 static int cxl_dma_set_mask(struct pci_dev *pdev, u64 dma_mask)
@@ -284,18 +283,13 @@ void cxl_pci_vphb_remove(struct cxl_afu *afu)
 	 */
 }
 
-static bool _cxl_pci_is_vphb_device(struct pci_controller *phb)
-{
-	return (phb->ops == &cxl_pcie_pci_ops);
-}
-
 bool cxl_pci_is_vphb_device(struct pci_dev *dev)
 {
 	struct pci_controller *phb;
 
 	phb = pci_bus_to_host(dev->bus);
 
-	return _cxl_pci_is_vphb_device(phb);
+	return (phb->ops == &cxl_pcie_pci_ops);
 }
 
 struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev)
@@ -304,13 +298,7 @@ struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev)
 
 	phb = pci_bus_to_host(dev->bus);
 
-	if (_cxl_pci_is_vphb_device(phb))
-		return (struct cxl_afu *)phb->private_data;
-
-	if (pnv_pci_on_cxl_phb(dev))
-		return pnv_cxl_phb_to_afu(phb);
-
-	return ERR_PTR(-ENODEV);
+	return (struct cxl_afu *)phb->private_data;
 }
 EXPORT_SYMBOL_GPL(cxl_pci_to_afu);
 
-- 
2.17.1

  parent reply	other threads:[~2018-06-25 16:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 16:23 [PATCH 00/10] cxl: Remove abandonned capi support for the Mellanox CX4 Frederic Barrat
2018-06-25 16:23 ` [PATCH 01/10] Revert "cxl: Add kernel API to allow a context to operate with relocate disabled" Frederic Barrat
2018-06-25 16:23 ` [PATCH 02/10] Revert "cxl: Add support for interrupts on the Mellanox CX4" Frederic Barrat
2018-06-25 16:23 ` [PATCH 03/10] Revert "cxl: Add preliminary workaround for CX4 interrupt limitation" Frederic Barrat
2018-06-25 16:24 ` [PATCH 04/10] Revert "cxl: Add kernel APIs to get & set the max irqs per context" Frederic Barrat
2018-06-25 16:24 ` [PATCH 05/10] Revert "cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards" Frederic Barrat
2018-06-25 16:24 ` Frederic Barrat [this message]
2018-06-25 16:24 ` [PATCH 07/10] Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb" Frederic Barrat
2018-06-25 16:24 ` [PATCH 08/10] Revert "cxl: Add cxl_slot_is_supported API" Frederic Barrat
2018-06-25 16:24 ` [PATCH 09/10] Revert "cxl: Allow a default context to be associated with an external pci_dev" Frederic Barrat
2018-06-25 16:24 ` [PATCH 10/10] cxl: Remove abandonned capi support for the Mellanox CX4, final cleanup Frederic Barrat
2018-06-26  2:31 ` [PATCH 00/10] cxl: Remove abandonned capi support for the Mellanox CX4 Andrew Donnellan
2018-06-26  3:26   ` Andrew Donnellan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180625162406.10813-7-fbarrat@linux.ibm.com \
    --to=fbarrat@linux.ibm.com \
    --cc=alastair@au1.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=clombard@linux.ibm.com \
    --cc=felix@linux.ibm.com \
    --cc=huyn@mellanox.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=vaibhav@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).