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 08/10] Revert "cxl: Add cxl_slot_is_supported API"
Date: Mon, 25 Jun 2018 18:24:04 +0200 [thread overview]
Message-ID: <20180625162406.10813-9-fbarrat@linux.ibm.com> (raw)
In-Reply-To: <20180625162406.10813-1-fbarrat@linux.ibm.com>
Remove abandonned capi support for the Mellanox CX4.
This reverts commit 4e56f858bdde5cbfb70f61baddfaa56a8ed851bf.
---
drivers/misc/cxl/pci.c | 37 -------------------------------------
include/misc/cxl.h | 15 ---------------
2 files changed, 52 deletions(-)
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 193ff22f610b..0ca818396524 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1808,43 +1808,6 @@ int cxl_slot_is_switched(struct pci_dev *dev)
return (depth > CXL_MAX_PCIEX_PARENT);
}
-bool cxl_slot_is_supported(struct pci_dev *dev, int flags)
-{
- if (!cpu_has_feature(CPU_FTR_HVMODE))
- return false;
-
- if ((flags & CXL_SLOT_FLAG_DMA) && (!pvr_version_is(PVR_POWER8NVL))) {
- /*
- * CAPP DMA mode is technically supported on regular P8, but
- * will EEH if the card attempts to access memory < 4GB, which
- * we cannot realistically avoid. We might be able to work
- * around the issue, but until then return unsupported:
- */
- return false;
- }
-
- if (cxl_slot_is_switched(dev))
- return false;
-
- /*
- * XXX: This gets a little tricky on regular P8 (not POWER8NVL) since
- * the CAPP can be connected to PHB 0, 1 or 2 on a first come first
- * served basis, which is racy to check from here. If we need to
- * support this in future we might need to consider having this
- * function effectively reserve it ahead of time.
- *
- * Currently, the only user of this API is the Mellanox CX4, which is
- * only supported on P8NVL due to the above mentioned limitation of
- * CAPP DMA mode and therefore does not need to worry about this. If the
- * issue with CAPP DMA mode is later worked around on P8 we might need
- * to revisit this.
- */
-
- return true;
-}
-EXPORT_SYMBOL_GPL(cxl_slot_is_supported);
-
-
static int cxl_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
struct cxl *adapter;
diff --git a/include/misc/cxl.h b/include/misc/cxl.h
index 74da2e440763..ea9ff4a1a9ca 100644
--- a/include/misc/cxl.h
+++ b/include/misc/cxl.h
@@ -24,21 +24,6 @@
* generic PCI API. This API is agnostic to the actual AFU.
*/
-#define CXL_SLOT_FLAG_DMA 0x1
-
-/*
- * Checks if the given card is in a cxl capable slot. Pass CXL_SLOT_FLAG_DMA if
- * the card requires CAPP DMA mode to also check if the system supports it.
- * This is intended to be used by bi-modal devices to determine if they can use
- * cxl mode or if they should continue running in PCI mode.
- *
- * Note that this only checks if the slot is cxl capable - it does not
- * currently check if the CAPP is currently available for chips where it can be
- * assigned to different PHBs on a first come first serve basis (i.e. P8)
- */
-bool cxl_slot_is_supported(struct pci_dev *dev, int flags);
-
-
/* Get the AFU associated with a pci_dev */
struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev);
--
2.17.1
next prev 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 ` [PATCH 06/10] Revert "cxl: Add support for using the kernel API with a real PHB" Frederic Barrat
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 ` Frederic Barrat [this message]
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-9-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).