From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbbJLVFu (ORCPT ); Mon, 12 Oct 2015 17:05:50 -0400 Received: from mga03.intel.com ([134.134.136.65]:30537 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973AbbJLVFs (ORCPT ); Mon, 12 Oct 2015 17:05:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,675,1437462000"; d="scan'208";a="579266721" Date: Mon, 12 Oct 2015 21:05:46 +0000 (UTC) From: Keith Busch X-X-Sender: vmware@localhost.lm.intel.com To: Bjorn Helgaas cc: Keith Busch , LKML , x86@kernel.org, linux-pci@vger.kernel.org, Jiang Liu , Thomas Gleixner , Dan Williams , Bjorn Helgaas , Bryan Veal , Ingo Molnar , "H. Peter Anvin" Subject: Re: [RFC PATCHv2] x86/pci: Initial commit for new VMD device driver In-Reply-To: <20151006231412.GF29420@localhost> Message-ID: References: <1443721454-25467-1-git-send-email-keith.busch@intel.com> <20151006231412.GF29420@localhost> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Oct 2015, Bjorn Helgaas wrote: >> +static int __init vmd_init(void) >> +{ >> + return pci_register_driver(&vmd_drv); >> +} >> +module_init(vmd_init); > > module_pci_driver(vmd_drv)? We actually only have a module_init in this driver, and purposely left out module_exit. We don't want to be able to unload this because we can't reference count this module for modules depending on it. 'rmmod ' returns busy if you're actively using a device that module is driving, but the end devices VMD provides are not driven by the VMD driver; it'd be kind of like being able to unload the pci core driver.