1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0+ 2*4882a593Smuzhiyun // Copyright 2017 IBM Corp. 3*4882a593Smuzhiyun #include <linux/module.h> 4*4882a593Smuzhiyun #include <linux/pci.h> 5*4882a593Smuzhiyun #include <asm/mmu.h> 6*4882a593Smuzhiyun #include "ocxl_internal.h" 7*4882a593Smuzhiyun init_ocxl(void)8*4882a593Smuzhiyunstatic int __init init_ocxl(void) 9*4882a593Smuzhiyun { 10*4882a593Smuzhiyun int rc = 0; 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun if (!tlbie_capable) 13*4882a593Smuzhiyun return -EINVAL; 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun rc = ocxl_file_init(); 16*4882a593Smuzhiyun if (rc) 17*4882a593Smuzhiyun return rc; 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun rc = pci_register_driver(&ocxl_pci_driver); 20*4882a593Smuzhiyun if (rc) { 21*4882a593Smuzhiyun ocxl_file_exit(); 22*4882a593Smuzhiyun return rc; 23*4882a593Smuzhiyun } 24*4882a593Smuzhiyun return 0; 25*4882a593Smuzhiyun } 26*4882a593Smuzhiyun exit_ocxl(void)27*4882a593Smuzhiyunstatic void exit_ocxl(void) 28*4882a593Smuzhiyun { 29*4882a593Smuzhiyun pci_unregister_driver(&ocxl_pci_driver); 30*4882a593Smuzhiyun ocxl_file_exit(); 31*4882a593Smuzhiyun } 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun module_init(init_ocxl); 34*4882a593Smuzhiyun module_exit(exit_ocxl); 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun MODULE_DESCRIPTION("Open Coherent Accelerator"); 37*4882a593Smuzhiyun MODULE_LICENSE("GPL"); 38