summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/main.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-07-03 15:05:43 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2017-07-03 15:05:43 +0200
commit218ea31039e84901b449c3769035456688f6e17d (patch)
tree340773129b6a056c07b3ffe6d60326e0e89ef73c /drivers/misc/cxl/main.c
parentpowerpc/dts: Use #include "..." to include local DT (diff)
parentpowerpc/32: Avoid miscompilation w/GCC 4.6.3 - don't inline copy_to/from_user() (diff)
downloadlinux-218ea31039e84901b449c3769035456688f6e17d.tar.xz
linux-218ea31039e84901b449c3769035456688f6e17d.zip
Merge branch 'fixes' into next
Merge our fixes branch, a few of them are tripping people up while working on top of next, and we also have a dependency between the CXL fixes and new CXL code we want to merge into next.
Diffstat (limited to 'drivers/misc/cxl/main.c')
-rw-r--r--drivers/misc/cxl/main.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c
index 1703655072b1..c1ba0d42cbc8 100644
--- a/drivers/misc/cxl/main.c
+++ b/drivers/misc/cxl/main.c
@@ -329,8 +329,15 @@ static int __init init_cxl(void)
cxl_debugfs_init();
- if ((rc = register_cxl_calls(&cxl_calls)))
- goto err;
+ /*
+ * we don't register the callback on P9. slb callack is only
+ * used for the PSL8 MMU and CX4.
+ */
+ if (cxl_is_power8()) {
+ rc = register_cxl_calls(&cxl_calls);
+ if (rc)
+ goto err;
+ }
if (cpu_has_feature(CPU_FTR_HVMODE)) {
cxl_ops = &cxl_native_ops;
@@ -347,7 +354,8 @@ static int __init init_cxl(void)
return 0;
err1:
- unregister_cxl_calls(&cxl_calls);
+ if (cxl_is_power8())
+ unregister_cxl_calls(&cxl_calls);
err:
cxl_debugfs_exit();
cxl_file_exit();
@@ -366,7 +374,8 @@ static void exit_cxl(void)
cxl_debugfs_exit();
cxl_file_exit();
- unregister_cxl_calls(&cxl_calls);
+ if (cxl_is_power8())
+ unregister_cxl_calls(&cxl_calls);
idr_destroy(&cxl_adapter_idr);
}