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