Print this page
7127  remove -Wno-missing-braces from Makefile.uts


  67 
  68 /* rootnex side data */
  69 
  70 static kmutex_t iommulib_nexus_lock;
  71 static iommulib_nex_t *iommulib_nexus_list;
  72 
  73 /* can be set atomically without lock */
  74 static volatile uint32_t iommulib_fini;
  75 
  76 /* debug flag */
  77 static int iommulib_debug;
  78 
  79 /*
  80  * Module linkage information for the kernel.
  81  */
  82 static struct modlmisc modlmisc = {
  83         &mod_miscops, "IOMMU library module"
  84 };
  85 
  86 static struct modlinkage modlinkage = {
  87         MODREV_1, (void *)&modlmisc, NULL
  88 };
  89 
  90 int
  91 _init(void)
  92 {
  93         return (mod_install(&modlinkage));
  94 }
  95 
  96 int
  97 _fini(void)
  98 {
  99         mutex_enter(&iommulib_lock);
 100         if (iommulib_list != NULL || iommulib_nexus_list != NULL) {
 101                 mutex_exit(&iommulib_lock);
 102                 return (EBUSY);
 103         }
 104         iommulib_fini = 1;
 105 
 106         mutex_exit(&iommulib_lock);
 107         return (mod_remove(&modlinkage));




  67 
  68 /* rootnex side data */
  69 
  70 static kmutex_t iommulib_nexus_lock;
  71 static iommulib_nex_t *iommulib_nexus_list;
  72 
  73 /* can be set atomically without lock */
  74 static volatile uint32_t iommulib_fini;
  75 
  76 /* debug flag */
  77 static int iommulib_debug;
  78 
  79 /*
  80  * Module linkage information for the kernel.
  81  */
  82 static struct modlmisc modlmisc = {
  83         &mod_miscops, "IOMMU library module"
  84 };
  85 
  86 static struct modlinkage modlinkage = {
  87         MODREV_1, { (void *)&modlmisc, NULL }
  88 };
  89 
  90 int
  91 _init(void)
  92 {
  93         return (mod_install(&modlinkage));
  94 }
  95 
  96 int
  97 _fini(void)
  98 {
  99         mutex_enter(&iommulib_lock);
 100         if (iommulib_list != NULL || iommulib_nexus_list != NULL) {
 101                 mutex_exit(&iommulib_lock);
 102                 return (EBUSY);
 103         }
 104         iommulib_fini = 1;
 105 
 106         mutex_exit(&iommulib_lock);
 107         return (mod_remove(&modlinkage));