diff options
author | Christophe Lombard <clombard@linux.vnet.ibm.com> | 2016-03-04 14:26:25 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-03-09 05:05:37 +0300 |
commit | 8633186209e35dfafc27c3d0f0d5e702ab47265f (patch) | |
tree | e96502e9dc862b02cb69a1acbe516a1981bc20ba /drivers/misc/cxl/native.c | |
parent | 949e9b827eb4736d96df520c67d07a54c64e99b8 (diff) | |
download | linux-8633186209e35dfafc27c3d0f0d5e702ab47265f.tar.xz |
cxl: Move common code away from bare-metal-specific files
Move around some functions which will be accessed from the bare-metal
and guest environments.
Code in native.c and pci.c is meant to be bare-metal specific.
Other files contain code which may be shared with guests.
Co-authored-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/native.c')
-rw-r--r-- | drivers/misc/cxl/native.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c index f40909793490..0b0a4c8a27d0 100644 --- a/drivers/misc/cxl/native.c +++ b/drivers/misc/cxl/native.c @@ -265,27 +265,6 @@ int cxl_tlb_slb_invalidate(struct cxl *adapter) return 0; } -int cxl_afu_slbia(struct cxl_afu *afu) -{ - unsigned long timeout = jiffies + (HZ * CXL_TIMEOUT); - - pr_devel("cxl_afu_slbia issuing SLBIA command\n"); - cxl_p2n_write(afu, CXL_SLBIA_An, CXL_TLB_SLB_IQ_ALL); - while (cxl_p2n_read(afu, CXL_SLBIA_An) & CXL_TLB_SLB_P) { - if (time_after_eq(jiffies, timeout)) { - dev_warn(&afu->dev, "WARNING: CXL AFU SLBIA timed out!\n"); - return -EBUSY; - } - /* If the adapter has gone down, we can assume that we - * will PERST it and that will invalidate everything. - */ - if (!cxl_adapter_link_ok(afu->adapter)) - return -EIO; - cpu_relax(); - } - return 0; -} - static int cxl_write_sstp(struct cxl_afu *afu, u64 sstp0, u64 sstp1) { int rc; |