* [PATCH 222/493] char: remove use of __devinit
From: Bill Pemberton @ 2012-11-19 18:22 UTC (permalink / raw)
To: gregkh
Cc: cbe-oss-dev, Geoff Levand, platform-driver-x86, Mattia Dongili,
Amit Shah, openipmi-developer, virtualization, linuxppc-dev
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Mattia Dongili <malattia@linux.it>
Cc: Amit Shah <amit.shah@redhat.com>
Cc: openipmi-developer@lists.sourceforge.net
Cc: linuxppc-dev@lists.ozlabs.org
Cc: cbe-oss-dev@lists.ozlabs.org
Cc: platform-driver-x86@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
---
drivers/char/ipmi/ipmi_si_intf.c | 24 ++++++++++++------------
drivers/char/ps3flash.c | 2 +-
drivers/char/sonypi.c | 10 +++++-----
drivers/char/tb0219.c | 2 +-
drivers/char/virtio_console.c | 2 +-
drivers/char/xilinx_hwicap/xilinx_hwicap.c | 6 +++---
6 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index b1e0356..29b6bad 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1836,7 +1836,7 @@ static int hotmod_handler(const char *val, struct kernel_param *kp)
return rv;
}
-static int __devinit hardcode_find_bmc(void)
+static int hardcode_find_bmc(void)
{
int ret = -ENODEV;
int i;
@@ -2023,7 +2023,7 @@ struct SPMITable {
s8 spmi_id[1]; /* A '\0' terminated array starts here. */
};
-static int __devinit try_init_spmi(struct SPMITable *spmi)
+static int try_init_spmi(struct SPMITable *spmi)
{
struct smi_info *info;
@@ -2106,7 +2106,7 @@ static int __devinit try_init_spmi(struct SPMITable *spmi)
return 0;
}
-static void __devinit spmi_find_bmc(void)
+static void spmi_find_bmc(void)
{
acpi_status status;
struct SPMITable *spmi;
@@ -2128,7 +2128,7 @@ static void __devinit spmi_find_bmc(void)
}
}
-static int __devinit ipmi_pnp_probe(struct pnp_dev *dev,
+static int ipmi_pnp_probe(struct pnp_dev *dev,
const struct pnp_device_id *dev_id)
{
struct acpi_device *acpi_dev;
@@ -2258,7 +2258,7 @@ struct dmi_ipmi_data {
u8 slave_addr;
};
-static int __devinit decode_dmi(const struct dmi_header *dm,
+static int decode_dmi(const struct dmi_header *dm,
struct dmi_ipmi_data *dmi)
{
const u8 *data = (const u8 *)dm;
@@ -2320,7 +2320,7 @@ static int __devinit decode_dmi(const struct dmi_header *dm,
return 0;
}
-static void __devinit try_init_dmi(struct dmi_ipmi_data *ipmi_data)
+static void try_init_dmi(struct dmi_ipmi_data *ipmi_data)
{
struct smi_info *info;
@@ -2388,7 +2388,7 @@ static void __devinit try_init_dmi(struct dmi_ipmi_data *ipmi_data)
kfree(info);
}
-static void __devinit dmi_find_bmc(void)
+static void dmi_find_bmc(void)
{
const struct dmi_device *dev = NULL;
struct dmi_ipmi_data data;
@@ -2424,7 +2424,7 @@ static void ipmi_pci_cleanup(struct smi_info *info)
pci_disable_device(pdev);
}
-static int __devinit ipmi_pci_probe_regspacing(struct smi_info *info)
+static int ipmi_pci_probe_regspacing(struct smi_info *info)
{
if (info->si_type == SI_KCS) {
unsigned char status;
@@ -2456,7 +2456,7 @@ static int __devinit ipmi_pci_probe_regspacing(struct smi_info *info)
return DEFAULT_REGSPACING;
}
-static int __devinit ipmi_pci_probe(struct pci_dev *pdev,
+static int ipmi_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
int rv;
@@ -2551,7 +2551,7 @@ static struct pci_driver ipmi_pci_driver = {
#endif /* CONFIG_PCI */
static struct of_device_id ipmi_match[];
-static int __devinit ipmi_probe(struct platform_device *dev)
+static int ipmi_probe(struct platform_device *dev)
{
#ifdef CONFIG_OF
const struct of_device_id *match;
@@ -3059,7 +3059,7 @@ static __devinitdata struct ipmi_default_vals
{ .port = 0 }
};
-static void __devinit default_find_bmc(void)
+static void default_find_bmc(void)
{
struct smi_info *info;
int i;
@@ -3359,7 +3359,7 @@ static int try_smi_init(struct smi_info *new_smi)
return rv;
}
-static int __devinit init_ipmi_si(void)
+static int init_ipmi_si(void)
{
int i;
char *str;
diff --git a/drivers/char/ps3flash.c b/drivers/char/ps3flash.c
index 6abdde4..588063ac 100644
--- a/drivers/char/ps3flash.c
+++ b/drivers/char/ps3flash.c
@@ -363,7 +363,7 @@ static struct miscdevice ps3flash_misc = {
.fops = &ps3flash_fops,
};
-static int __devinit ps3flash_probe(struct ps3_system_bus_device *_dev)
+static int ps3flash_probe(struct ps3_system_bus_device *_dev)
{
struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
struct ps3flash_private *priv;
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 34f0db3..861efa4 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1164,7 +1164,7 @@ static struct acpi_driver sonypi_acpi_driver = {
};
#endif
-static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
+static int sonypi_create_input_devices(struct platform_device *pdev)
{
struct input_dev *jog_dev;
struct input_dev *key_dev;
@@ -1225,7 +1225,7 @@ static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
return error;
}
-static int __devinit sonypi_setup_ioports(struct sonypi_device *dev,
+static int sonypi_setup_ioports(struct sonypi_device *dev,
const struct sonypi_ioport_list *ioport_list)
{
/* try to detect if sony-laptop is being used and thus
@@ -1265,7 +1265,7 @@ static int __devinit sonypi_setup_ioports(struct sonypi_device *dev,
return -EBUSY;
}
-static int __devinit sonypi_setup_irq(struct sonypi_device *dev,
+static int sonypi_setup_irq(struct sonypi_device *dev,
const struct sonypi_irq_list *irq_list)
{
while (irq_list->irq) {
@@ -1282,7 +1282,7 @@ static int __devinit sonypi_setup_irq(struct sonypi_device *dev,
return -EBUSY;
}
-static void __devinit sonypi_display_info(void)
+static void sonypi_display_info(void)
{
printk(KERN_INFO "sonypi: detected type%d model, "
"verbose = %d, fnkeyinit = %s, camera = %s, "
@@ -1304,7 +1304,7 @@ static void __devinit sonypi_display_info(void)
sonypi_misc_device.minor);
}
-static int __devinit sonypi_probe(struct platform_device *dev)
+static int sonypi_probe(struct platform_device *dev)
{
const struct sonypi_ioport_list *ioport_list;
const struct sonypi_irq_list *irq_list;
diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c
index 6bfe2af..76e3aea 100644
--- a/drivers/char/tb0219.c
+++ b/drivers/char/tb0219.c
@@ -284,7 +284,7 @@ static void tb0219_pci_irq_init(void)
vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN, IRQ_LEVEL_LOW);
}
-static int __devinit tb0219_probe(struct platform_device *dev)
+static int tb0219_probe(struct platform_device *dev)
{
int retval;
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 4ad8aca..b9d390b 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1848,7 +1848,7 @@ static void remove_controlq_data(struct ports_device *portdev)
* config space to see how many ports the host has spawned. We
* initialize each port found.
*/
-static int __devinit virtcons_probe(struct virtio_device *vdev)
+static int virtcons_probe(struct virtio_device *vdev)
{
struct ports_device *portdev;
int err;
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index 2c5d15b..547ed74 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -595,7 +595,7 @@ static const struct file_operations hwicap_fops = {
.llseek = noop_llseek,
};
-static int __devinit hwicap_setup(struct device *dev, int id,
+static int hwicap_setup(struct device *dev, int id,
const struct resource *regs_res,
const struct hwicap_driver_config *config,
const struct config_registers *config_regs)
@@ -740,7 +740,7 @@ static int __devexit hwicap_remove(struct device *dev)
}
#ifdef CONFIG_OF
-static int __devinit hwicap_of_probe(struct platform_device *op,
+static int hwicap_of_probe(struct platform_device *op,
const struct hwicap_driver_config *config)
{
struct resource res;
@@ -786,7 +786,7 @@ static inline int hwicap_of_probe(struct platform_device *op,
#endif /* CONFIG_OF */
static const struct of_device_id __devinitconst hwicap_of_match[];
-static int __devinit hwicap_drv_probe(struct platform_device *pdev)
+static int hwicap_drv_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
struct resource *res;
--
1.8.0
^ permalink raw reply related
* [PATCH 242/493] pci: remove use of __devinit
From: Bill Pemberton @ 2012-11-19 18:23 UTC (permalink / raw)
To: gregkh; +Cc: linux-pci, xen-devel, virtualization
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: linux-pci@vger.kernel.org
Cc: xen-devel@lists.xensource.com
Cc: virtualization@lists.linux-foundation.org
---
drivers/pci/ioapic.c | 2 +-
drivers/pci/pci.c | 2 +-
drivers/pci/pcie/aer/aerdrv.c | 4 +-
drivers/pci/pcie/portdrv_pci.c | 2 +-
drivers/pci/probe.c | 18 +++---
drivers/pci/quirks.c | 134 ++++++++++++++++++++---------------------
drivers/pci/xen-pcifront.c | 10 +--
include/linux/pci.h | 2 +-
8 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c
index 2b24fb4..4fdc61e 100644
--- a/drivers/pci/ioapic.c
+++ b/drivers/pci/ioapic.c
@@ -27,7 +27,7 @@ struct ioapic {
u32 gsi_base;
};
-static int __devinit ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+static int ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent)
{
acpi_handle handle;
acpi_status status;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index adffc6f..133ffd1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3867,7 +3867,7 @@ static int __init pci_resource_alignment_sysfs_init(void)
late_initcall(pci_resource_alignment_sysfs_init);
-static void __devinit pci_no_domains(void)
+static void pci_no_domains(void)
{
#ifdef CONFIG_PCI_DOMAINS
pci_domains_supported = 0;
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index 030cf12..76ef634 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -41,7 +41,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
-static int __devinit aer_probe(struct pcie_device *dev);
+static int aer_probe(struct pcie_device *dev);
static void aer_remove(struct pcie_device *dev);
static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
enum pci_channel_state error);
@@ -300,7 +300,7 @@ static void aer_remove(struct pcie_device *dev)
*
* Invoked when PCI Express bus loads AER service driver.
*/
-static int __devinit aer_probe(struct pcie_device *dev)
+static int aer_probe(struct pcie_device *dev)
{
int status;
struct aer_rpc *rpc;
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 0761d90..d4824cb 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -182,7 +182,7 @@ static const struct pci_device_id port_runtime_pm_black_list[] = {
* this port device.
*
*/
-static int __devinit pcie_portdrv_probe(struct pci_dev *dev,
+static int pcie_portdrv_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{
int status;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 3d17641..edc3d12 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -305,7 +305,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
}
}
-static void __devinit pci_read_bridge_io(struct pci_bus *child)
+static void pci_read_bridge_io(struct pci_bus *child)
{
struct pci_dev *dev = child->self;
u8 io_base_lo, io_limit_lo;
@@ -345,7 +345,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child)
}
}
-static void __devinit pci_read_bridge_mmio(struct pci_bus *child)
+static void pci_read_bridge_mmio(struct pci_bus *child)
{
struct pci_dev *dev = child->self;
u16 mem_base_lo, mem_limit_lo;
@@ -367,7 +367,7 @@ static void __devinit pci_read_bridge_mmio(struct pci_bus *child)
}
}
-static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child)
+static void pci_read_bridge_mmio_pref(struct pci_bus *child)
{
struct pci_dev *dev = child->self;
u16 mem_base_lo, mem_limit_lo;
@@ -417,7 +417,7 @@ static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child)
}
}
-void __devinit pci_read_bridge_bases(struct pci_bus *child)
+void pci_read_bridge_bases(struct pci_bus *child)
{
struct pci_dev *dev = child->self;
struct resource *res;
@@ -705,7 +705,7 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
* them, we proceed to assigning numbers to the remaining buses in
* order to avoid overlaps between old and new bus numbers.
*/
-int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
+int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
{
struct pci_bus *child;
int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
@@ -1587,7 +1587,7 @@ void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss)
}
EXPORT_SYMBOL_GPL(pcie_bus_configure_settings);
-unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
+unsigned int pci_scan_child_bus(struct pci_bus *bus)
{
unsigned int devfn, pass, max = bus->busn_res.start;
struct pci_dev *dev;
@@ -1791,7 +1791,7 @@ void pci_bus_release_busn_res(struct pci_bus *b)
res, ret ? "can not be" : "is");
}
-struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
+struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
struct pci_ops *ops, void *sysdata, struct list_head *resources)
{
struct pci_host_bridge_window *window;
@@ -1827,7 +1827,7 @@ struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
EXPORT_SYMBOL(pci_scan_root_bus);
/* Deprecated; use pci_scan_root_bus() instead */
-struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent,
+struct pci_bus *pci_scan_bus_parented(struct device *parent,
int bus, struct pci_ops *ops, void *sysdata)
{
LIST_HEAD(resources);
@@ -1845,7 +1845,7 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent,
}
EXPORT_SYMBOL(pci_scan_bus_parented);
-struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops,
+struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,
void *sysdata)
{
LIST_HEAD(resources);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 0c59f7a..ed4b0bd 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -37,7 +37,7 @@
* key system devices. For devices that need to have mmio decoding always-on,
* we need to set the dev->mmio_always_on bit.
*/
-static void __devinit quirk_mmio_always_on(struct pci_dev *dev)
+static void quirk_mmio_always_on(struct pci_dev *dev)
{
dev->mmio_always_on = 1;
}
@@ -48,7 +48,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
* Mark this device with a broken_parity_status, to allow
* PCI scanning code to "skip" this now blacklisted device.
*/
-static void __devinit quirk_mellanox_tavor(struct pci_dev *dev)
+static void quirk_mellanox_tavor(struct pci_dev *dev)
{
dev->broken_parity_status = 1; /* This device gives false positives */
}
@@ -83,7 +83,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_p
This appears to be BIOS not version dependent. So presumably there is a
chipset level fix */
-static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev)
+static void quirk_isa_dma_hangs(struct pci_dev *dev)
{
if (!isa_dma_bridge_buggy) {
isa_dma_bridge_buggy=1;
@@ -106,7 +106,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_d
* Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear
* for some HT machines to use C4 w/o hanging.
*/
-static void __devinit quirk_tigerpoint_bm_sts(struct pci_dev *dev)
+static void quirk_tigerpoint_bm_sts(struct pci_dev *dev)
{
u32 pmbase;
u16 pm1a;
@@ -125,7 +125,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk
/*
* Chipsets where PCI->PCI transfers vanish or hang
*/
-static void __devinit quirk_nopcipci(struct pci_dev *dev)
+static void quirk_nopcipci(struct pci_dev *dev)
{
if ((pci_pci_problems & PCIPCI_FAIL)==0) {
dev_info(&dev->dev, "Disabling direct PCI/PCI transfers\n");
@@ -135,7 +135,7 @@ static void __devinit quirk_nopcipci(struct pci_dev *dev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci);
-static void __devinit quirk_nopciamd(struct pci_dev *dev)
+static void quirk_nopciamd(struct pci_dev *dev)
{
u8 rev;
pci_read_config_byte(dev, 0x08, &rev);
@@ -150,7 +150,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8151_0, quirk_nopci
/*
* Triton requires workarounds to be used by the drivers
*/
-static void __devinit quirk_triton(struct pci_dev *dev)
+static void quirk_triton(struct pci_dev *dev)
{
if ((pci_pci_problems&PCIPCI_TRITON)==0) {
dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -229,7 +229,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, quirk_viala
/*
* VIA Apollo VP3 needs ETBF on BT848/878
*/
-static void __devinit quirk_viaetbf(struct pci_dev *dev)
+static void quirk_viaetbf(struct pci_dev *dev)
{
if ((pci_pci_problems&PCIPCI_VIAETBF)==0) {
dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -238,7 +238,7 @@ static void __devinit quirk_viaetbf(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf);
-static void __devinit quirk_vsfx(struct pci_dev *dev)
+static void quirk_vsfx(struct pci_dev *dev)
{
if ((pci_pci_problems&PCIPCI_VSFX)==0) {
dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -253,7 +253,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576, quirk_vsfx)
* workaround applied too
* [Info kindly provided by ALi]
*/
-static void __devinit quirk_alimagik(struct pci_dev *dev)
+static void quirk_alimagik(struct pci_dev *dev)
{
if ((pci_pci_problems&PCIPCI_ALIMAGIK)==0) {
dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -267,7 +267,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1651, quirk_alimag
* Natoma has some interesting boundary conditions with Zoran stuff
* at least
*/
-static void __devinit quirk_natoma(struct pci_dev *dev)
+static void quirk_natoma(struct pci_dev *dev)
{
if ((pci_pci_problems&PCIPCI_NATOMA)==0) {
dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -285,7 +285,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2, qu
* This chip can cause PCI parity errors if config register 0xA0 is read
* while DMAs are occurring.
*/
-static void __devinit quirk_citrine(struct pci_dev *dev)
+static void quirk_citrine(struct pci_dev *dev)
{
dev->cfg_size = 0xA0;
}
@@ -295,7 +295,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, quirk_cit
* S3 868 and 968 chips report region size equal to 32M, but they decode 64M.
* If it's needed, re-allocate the region.
*/
-static void __devinit quirk_s3_64M(struct pci_dev *dev)
+static void quirk_s3_64M(struct pci_dev *dev)
{
struct resource *r = &dev->resource[0];
@@ -313,7 +313,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_968, quirk_s3_64M);
* BAR0 should be 8 bytes; instead, it may be set to something like 8k
* (which conflicts w/ BAR1's memory range).
*/
-static void __devinit quirk_cs5536_vsa(struct pci_dev *dev)
+static void quirk_cs5536_vsa(struct pci_dev *dev)
{
if (pci_resource_len(dev, 0) != 8) {
struct resource *res = &dev->resource[0];
@@ -324,7 +324,7 @@ static void __devinit quirk_cs5536_vsa(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, quirk_cs5536_vsa);
-static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region,
+static void quirk_io_region(struct pci_dev *dev, unsigned region,
unsigned size, int nr, const char *name)
{
region &= ~(size-1);
@@ -352,7 +352,7 @@ static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region,
* ATI Northbridge setups MCE the processor if you even
* read somewhere between 0x3b0->0x3bb or read 0x3d3
*/
-static void __devinit quirk_ati_exploding_mce(struct pci_dev *dev)
+static void quirk_ati_exploding_mce(struct pci_dev *dev)
{
dev_info(&dev->dev, "ATI Northbridge, reserving I/O ports 0x3b0 to 0x3bb\n");
/* Mae rhaid i ni beidio ag edrych ar y lleoliadiau I/O hyn */
@@ -372,7 +372,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
* 0xE0 (64 bytes of ACPI registers)
* 0xE2 (32 bytes of SMB registers)
*/
-static void __devinit quirk_ali7101_acpi(struct pci_dev *dev)
+static void quirk_ali7101_acpi(struct pci_dev *dev)
{
u16 region;
@@ -440,7 +440,7 @@ static void piix4_mem_quirk(struct pci_dev *dev, const char *name, unsigned int
* 0x90 (16 bytes of SMB registers)
* and a few strange programmable PIIX4 device resources.
*/
-static void __devinit quirk_piix4_acpi(struct pci_dev *dev)
+static void quirk_piix4_acpi(struct pci_dev *dev)
{
u32 region, res_a;
@@ -489,7 +489,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, qui
* 0x40 (128 bytes of ACPI, GPIO & TCO registers)
* 0x58 (64 bytes of GPIO I/O space)
*/
-static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev)
+static void quirk_ich4_lpc_acpi(struct pci_dev *dev)
{
u32 region;
u8 enable;
@@ -531,7 +531,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12,
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, quirk_ich4_lpc_acpi);
-static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev)
+static void ich6_lpc_acpi_gpio(struct pci_dev *dev)
{
u32 region;
u8 enable;
@@ -555,7 +555,7 @@ static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev)
}
}
-static void __devinit ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name, int dynsize)
+static void ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name, int dynsize)
{
u32 val;
u32 size, base;
@@ -583,7 +583,7 @@ static void __devinit ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg,
dev_info(&dev->dev, "%s PIO at %04x-%04x\n", name, base, base+size-1);
}
-static void __devinit quirk_ich6_lpc(struct pci_dev *dev)
+static void quirk_ich6_lpc(struct pci_dev *dev)
{
/* Shared ACPI/GPIO decode with all ICH6+ */
ich6_lpc_acpi_gpio(dev);
@@ -595,7 +595,7 @@ static void __devinit quirk_ich6_lpc(struct pci_dev *dev)
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, quirk_ich6_lpc);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, quirk_ich6_lpc);
-static void __devinit ich7_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name)
+static void ich7_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name)
{
u32 val;
u32 mask, base;
@@ -619,7 +619,7 @@ static void __devinit ich7_lpc_generic_decode(struct pci_dev *dev, unsigned reg,
}
/* ICH7-10 has the same common LPC generic IO decode registers */
-static void __devinit quirk_ich7_lpc(struct pci_dev *dev)
+static void quirk_ich7_lpc(struct pci_dev *dev)
{
/* We share the common ACPI/GPIO decode with ICH6 */
ich6_lpc_acpi_gpio(dev);
@@ -648,7 +648,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_1, qui
* VIA ACPI: One IO region pointed to by longword at
* 0x48 or 0x20 (256 bytes of ACPI registers)
*/
-static void __devinit quirk_vt82c586_acpi(struct pci_dev *dev)
+static void quirk_vt82c586_acpi(struct pci_dev *dev)
{
u32 region;
@@ -666,7 +666,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt
* 0x70 (128 bytes of hardware monitoring register)
* 0x90 (16 bytes of SMB registers)
*/
-static void __devinit quirk_vt82c686_acpi(struct pci_dev *dev)
+static void quirk_vt82c686_acpi(struct pci_dev *dev)
{
u16 hm;
u32 smb;
@@ -688,7 +688,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt
* 0x88 (128 bytes of power management registers)
* 0xd0 (16 bytes of SMB registers)
*/
-static void __devinit quirk_vt8235_acpi(struct pci_dev *dev)
+static void quirk_vt8235_acpi(struct pci_dev *dev)
{
u16 pm, smb;
@@ -706,7 +706,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_vt8235
* TI XIO2000a PCIe-PCI Bridge erroneously reports it supports fast back-to-back:
* Disable fast back-to-back on the secondary bus segment
*/
-static void __devinit quirk_xio2000a(struct pci_dev *dev)
+static void quirk_xio2000a(struct pci_dev *dev)
{
struct pci_dev *pdev;
u16 command;
@@ -780,7 +780,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk
* noapic specified. For the moment we assume it's the erratum. We may be wrong
* of course. However the advice is demonstrably good even if so..
*/
-static void __devinit quirk_amd_ioapic(struct pci_dev *dev)
+static void quirk_amd_ioapic(struct pci_dev *dev)
{
if (dev->revision >= 0x02) {
dev_warn(&dev->dev, "I/O APIC: AMD Erratum #22 may be present. In the event of instability try\n");
@@ -789,7 +789,7 @@ static void __devinit quirk_amd_ioapic(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, quirk_amd_ioapic);
-static void __devinit quirk_ioapic_rmw(struct pci_dev *dev)
+static void quirk_ioapic_rmw(struct pci_dev *dev)
{
if (dev->devfn == 0 && dev->bus->number == 0)
sis_apic_bug = 1;
@@ -801,7 +801,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw);
* Some settings of MMRBC can lead to data corruption so block changes.
* See AMD 8131 HyperTransport PCI-X Tunnel Revision Guide
*/
-static void __devinit quirk_amd_8131_mmrbc(struct pci_dev *dev)
+static void quirk_amd_8131_mmrbc(struct pci_dev *dev)
{
if (dev->subordinate && dev->revision <= 0x12) {
dev_info(&dev->dev, "AMD8131 rev %x detected; "
@@ -819,7 +819,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_
* value of the ACPI SCI interrupt is only done for convenience.
* -jgarzik
*/
-static void __devinit quirk_via_acpi(struct pci_dev *d)
+static void quirk_via_acpi(struct pci_dev *d)
{
/*
* VIA ACPI device: SCI IRQ line in PCI config byte 0x42
@@ -926,7 +926,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_vlink);
* We need to switch it off to be able to recognize the real
* type of the chip.
*/
-static void __devinit quirk_vt82c598_id(struct pci_dev *dev)
+static void quirk_vt82c598_id(struct pci_dev *dev)
{
pci_write_config_byte(dev, 0xfc, 0);
pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device);
@@ -978,7 +978,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C
* assigned to it. We force a larger allocation to ensure that
* nothing gets put too close to it.
*/
-static void __devinit quirk_dunord ( struct pci_dev * dev )
+static void quirk_dunord ( struct pci_dev * dev )
{
struct resource *r = &dev->resource [1];
r->start = 0;
@@ -992,7 +992,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DUNORD, PCI_DEVICE_ID_DUNORD_I3000, quirk
* in the ProgIf. Unfortunately, the ProgIf value is wrong - 0x80
* instead of 0x01.
*/
-static void __devinit quirk_transparent_bridge(struct pci_dev *dev)
+static void quirk_transparent_bridge(struct pci_dev *dev)
{
dev->transparent = 1;
}
@@ -1066,7 +1066,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SATA
/*
* Serverworks CSB5 IDE does not fully support native mode
*/
-static void __devinit quirk_svwks_csb5ide(struct pci_dev *pdev)
+static void quirk_svwks_csb5ide(struct pci_dev *pdev)
{
u8 prog;
pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
@@ -1082,7 +1082,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB
/*
* Intel 82801CAM ICH3-M datasheet says IDE modes must be the same
*/
-static void __devinit quirk_ide_samemode(struct pci_dev *pdev)
+static void quirk_ide_samemode(struct pci_dev *pdev)
{
u8 prog;
@@ -1101,7 +1101,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, qui
* Some ATA devices break if put into D3
*/
-static void __devinit quirk_no_ata_d3(struct pci_dev *pdev)
+static void quirk_no_ata_d3(struct pci_dev *pdev)
{
pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
}
@@ -1121,7 +1121,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
/* This was originally an Alpha specific thing, but it really fits here.
* The i82375 PCI/EISA bridge appears as non-classified. Fix that.
*/
-static void __devinit quirk_eisa_bridge(struct pci_dev *dev)
+static void quirk_eisa_bridge(struct pci_dev *dev)
{
dev->class = PCI_CLASS_BRIDGE_EISA << 8;
}
@@ -1155,7 +1155,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_e
*/
static int asus_hides_smbus;
-static void __devinit asus_hides_smbus_hostbridge(struct pci_dev *dev)
+static void asus_hides_smbus_hostbridge(struct pci_dev *dev)
{
if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB)
@@ -1538,7 +1538,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB3
#endif
#ifdef CONFIG_X86_IO_APIC
-static void __devinit quirk_alder_ioapic(struct pci_dev *pdev)
+static void quirk_alder_ioapic(struct pci_dev *pdev)
{
int i;
@@ -1561,7 +1561,7 @@ static void __devinit quirk_alder_ioapic(struct pci_dev *pdev)
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic);
#endif
-static void __devinit quirk_pcie_mch(struct pci_dev *pdev)
+static void quirk_pcie_mch(struct pci_dev *pdev)
{
pci_msi_off(pdev);
pdev->no_msi = 1;
@@ -1575,7 +1575,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quir
* It's possible for the MSI to get corrupted if shpc and acpi
* are used together on certain PXH-based systems.
*/
-static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
+static void quirk_pcie_pxh(struct pci_dev *dev)
{
pci_msi_off(dev);
dev->no_msi = 1;
@@ -1777,7 +1777,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS, qui
* but the PIO transfers won't work if BAR0 falls at the odd 8 bytes.
* Re-allocate the region if needed...
*/
-static void __devinit quirk_tc86c001_ide(struct pci_dev *dev)
+static void quirk_tc86c001_ide(struct pci_dev *dev)
{
struct resource *r = &dev->resource[0];
@@ -1797,7 +1797,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA_2,
* The BAR0 or BAR1 region may be disabled (size 0) or enabled (size 128).
* Re-allocate the regions to a 256-byte boundary if necessary.
*/
-static void __devinit quirk_plx_pci9050(struct pci_dev *dev)
+static void quirk_plx_pci9050(struct pci_dev *dev)
{
unsigned int bar;
@@ -1829,7 +1829,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
DECLARE_PCI_FIXUP_HEADER(0x1402, 0x2000, quirk_plx_pci9050);
DECLARE_PCI_FIXUP_HEADER(0x1402, 0x2600, quirk_plx_pci9050);
-static void __devinit quirk_netmos(struct pci_dev *dev)
+static void quirk_netmos(struct pci_dev *dev)
{
unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
unsigned int num_serial = dev->subsystem_device & 0xf;
@@ -1867,7 +1867,7 @@ static void __devinit quirk_netmos(struct pci_dev *dev)
DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID,
PCI_CLASS_COMMUNICATION_SERIAL, 8, quirk_netmos);
-static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
+static void quirk_e100_interrupt(struct pci_dev *dev)
{
u16 command, pmcsr;
u8 __iomem *csr;
@@ -1940,7 +1940,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
* The 82575 and 82598 may experience data corruption issues when transitioning
* out of L0S. To prevent this we need to disable L0S on the pci-e link
*/
-static void __devinit quirk_disable_aspm_l0s(struct pci_dev *dev)
+static void quirk_disable_aspm_l0s(struct pci_dev *dev)
{
dev_info(&dev->dev, "Disabling L0s\n");
pci_disable_link_state(dev, PCIE_LINK_STATE_L0S);
@@ -1960,7 +1960,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f1, quirk_disable_aspm_l0s);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f4, quirk_disable_aspm_l0s);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1508, quirk_disable_aspm_l0s);
-static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
+static void fixup_rev1_53c810(struct pci_dev* dev)
{
/* rev 1 ncr53c810 chips don't set the class at all which means
* they don't get their resources remapped. Fix that here.
@@ -1974,7 +1974,7 @@ static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810);
/* Enable 1k I/O space granularity on the Intel P64H2 */
-static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev)
+static void quirk_p64h2_1k_io(struct pci_dev *dev)
{
u16 en1k;
@@ -2007,7 +2007,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
quirk_nvidia_ck804_pcie_aer_ext_cap);
-static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
+static void quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
{
/*
* Disable PCI Bus Parking and PCI Master read caching on CX700
@@ -2070,7 +2070,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_c
* We believe that it is legal to read beyond the end tag and
* therefore the solution is to limit the read/write length.
*/
-static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
+static void quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
{
/*
* Only disable the VPD capability for 5706, 5706S, 5708,
@@ -2130,7 +2130,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
* the DRBs - this is where we expose device 6.
* http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm
*/
-static void __devinit quirk_unhide_mch_dev6(struct pci_dev *dev)
+static void quirk_unhide_mch_dev6(struct pci_dev *dev)
{
u8 reg;
@@ -2154,7 +2154,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82875_HB,
* supports link speed auto negotiation, but falsely sets
* the link speed to 5GT/s.
*/
-static void __devinit quirk_tile_plx_gen1(struct pci_dev *dev)
+static void quirk_tile_plx_gen1(struct pci_dev *dev)
{
if (tile_plx_gen1) {
pci_write_config_dword(dev, 0x98, 0x1);
@@ -2171,7 +2171,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8624, quirk_tile_plx_gen1);
* aware of it. Instead of setting the flag on all busses in the
* machine, simply disable MSI globally.
*/
-static void __devinit quirk_disable_all_msi(struct pci_dev *dev)
+static void quirk_disable_all_msi(struct pci_dev *dev)
{
pci_no_msi();
dev_warn(&dev->dev, "MSI quirk detected; MSI disabled\n");
@@ -2185,7 +2185,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disab
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8380_0, quirk_disable_all_msi);
/* Disable MSI on chipsets that are known to not support it */
-static void __devinit quirk_disable_msi(struct pci_dev *dev)
+static void quirk_disable_msi(struct pci_dev *dev)
{
if (dev->subordinate) {
dev_warn(&dev->dev, "MSI quirk detected; "
@@ -2203,7 +2203,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi);
* we use the possible vendor/device IDs of the host bridge for the
* declared quirk, and search for the APC bridge by slot number.
*/
-static void __devinit quirk_amd_780_apc_msi(struct pci_dev *host_bridge)
+static void quirk_amd_780_apc_msi(struct pci_dev *host_bridge)
{
struct pci_dev *apc_bridge;
@@ -2311,7 +2311,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8132_BRIDGE,
* for the MCP55 NIC. It is not yet determined whether the msi problem
* also affects other devices. As for now, turn off msi for this device.
*/
-static void __devinit nvenet_msi_disable(struct pci_dev *dev)
+static void nvenet_msi_disable(struct pci_dev *dev)
{
const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
@@ -2337,7 +2337,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
* we have it set correctly.
* Note this is an undocumented register.
*/
-static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
+static void nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
{
u32 cfg;
@@ -2573,11 +2573,11 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, nv_msi_ht_cap_q
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk_all);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk_all);
-static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev)
+static void quirk_msi_intx_disable_bug(struct pci_dev *dev)
{
dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
}
-static void __devinit quirk_msi_intx_disable_ati_bug(struct pci_dev *dev)
+static void quirk_msi_intx_disable_ati_bug(struct pci_dev *dev)
{
struct pci_dev *p;
@@ -2651,7 +2651,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, 0x1083,
* kernel fails to allocate resources when hotplug device is
* inserted and PCI bus is rescanned.
*/
-static void __devinit quirk_hotplug_bridge(struct pci_dev *dev)
+static void quirk_hotplug_bridge(struct pci_dev *dev)
{
dev->is_hotplug_bridge = 1;
}
@@ -2791,7 +2791,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, vtd_mask_spec_errors);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
#endif
-static void __devinit fixup_ti816x_class(struct pci_dev* dev)
+static void fixup_ti816x_class(struct pci_dev* dev)
{
/* TI 816x devices do not have class code set when in PCIe boot mode */
dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
@@ -2803,7 +2803,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
/* Some PCIe devices do not work reliably with the claimed maximum
* payload size supported.
*/
-static void __devinit fixup_mpss_256(struct pci_dev *dev)
+static void fixup_mpss_256(struct pci_dev *dev)
{
dev->pcie_mpss = 1; /* 256 bytes */
}
@@ -2821,7 +2821,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
* coalescing must be disabled. Unfortunately, it cannot be re-enabled because
* it is possible to hotplug a device with MPS of 256B.
*/
-static void __devinit quirk_intel_mc_errata(struct pci_dev *dev)
+static void quirk_intel_mc_errata(struct pci_dev *dev)
{
int err;
u16 rcc;
@@ -2927,7 +2927,7 @@ static void fixup_debug_report(struct pci_dev *dev, ktime_t calltime,
* This resolves crashes often seen on monitor unplug.
*/
#define I915_DEIER_REG 0x4400c
-static void __devinit disable_igfx_irq(struct pci_dev *dev)
+static void disable_igfx_irq(struct pci_dev *dev)
{
void __iomem *regs = pci_iomap(dev, 0, 0);
if (regs == NULL) {
@@ -2953,7 +2953,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
* PCI_COMMAND_INTX_DISABLE works though they actually do not properly
* support this feature.
*/
-static void __devinit quirk_broken_intx_masking(struct pci_dev *dev)
+static void quirk_broken_intx_masking(struct pci_dev *dev)
{
dev->broken_intx_masking = 1;
}
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index 0aab85a..db542f4 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -412,7 +412,7 @@ static int pcifront_claim_resource(struct pci_dev *dev, void *data)
return 0;
}
-static int __devinit pcifront_scan_bus(struct pcifront_device *pdev,
+static int pcifront_scan_bus(struct pcifront_device *pdev,
unsigned int domain, unsigned int bus,
struct pci_bus *b)
{
@@ -441,7 +441,7 @@ static int __devinit pcifront_scan_bus(struct pcifront_device *pdev,
return 0;
}
-static int __devinit pcifront_scan_root(struct pcifront_device *pdev,
+static int pcifront_scan_root(struct pcifront_device *pdev,
unsigned int domain, unsigned int bus)
{
struct pci_bus *b;
@@ -503,7 +503,7 @@ err_out:
return err;
}
-static int __devinit pcifront_rescan_root(struct pcifront_device *pdev,
+static int pcifront_rescan_root(struct pcifront_device *pdev,
unsigned int domain, unsigned int bus)
{
int err;
@@ -834,7 +834,7 @@ out:
return err;
}
-static int __devinit pcifront_try_connect(struct pcifront_device *pdev)
+static int pcifront_try_connect(struct pcifront_device *pdev)
{
int err = -EFAULT;
int i, num_roots, len;
@@ -924,7 +924,7 @@ out:
return err;
}
-static int __devinit pcifront_attach_devices(struct pcifront_device *pdev)
+static int pcifront_attach_devices(struct pcifront_device *pdev)
{
int err = -EFAULT;
int i, num_roots, len;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9f99c59..eb9d5e9 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -687,7 +687,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax);
int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax);
void pci_bus_release_busn_res(struct pci_bus *b);
-struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
+struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
struct pci_ops *ops, void *sysdata,
struct list_head *resources);
struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
--
1.8.0
^ permalink raw reply related
* [PATCH 247/493] drivers/block: remove use of __devinit
From: Bill Pemberton @ 2012-11-19 18:23 UTC (permalink / raw)
To: gregkh
Cc: cbe-oss-dev, iss_storagedev, Michael S. Tsirkin, Geoff Levand,
Jim Paris, virtualization, Grant Likely, Chirag Kantharia,
linuxppc-dev
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Chirag Kantharia <chirag.kantharia@hp.com>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Jim Paris <jim@jtan.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: iss_storagedev@hp.com
Cc: linuxppc-dev@lists.ozlabs.org
Cc: cbe-oss-dev@lists.ozlabs.org
Cc: virtualization@lists.linux-foundation.org
---
drivers/block/cciss.c | 62 +++++++++++++++++++++++-----------------------
drivers/block/cpqarray.c | 6 ++---
drivers/block/nvme.c | 10 ++++----
drivers/block/ps3disk.c | 2 +-
drivers/block/ps3vram.c | 4 +--
drivers/block/sunvdc.c | 6 ++---
drivers/block/swim.c | 6 ++---
drivers/block/swim3.c | 2 +-
drivers/block/umem.c | 2 +-
drivers/block/virtio_blk.c | 4 +--
drivers/block/xsysace.c | 6 ++---
11 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index b40068f..3096c79 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -181,8 +181,8 @@ static void cciss_geometry_inquiry(ctlr_info_t *h, int logvol,
sector_t total_size,
unsigned int block_size, InquiryData_struct *inq_buff,
drive_info_struct *drv);
-static void __devinit cciss_interrupt_mode(ctlr_info_t *);
-static int __devinit cciss_enter_simple_mode(struct ctlr_info *h);
+static void cciss_interrupt_mode(ctlr_info_t *);
+static int cciss_enter_simple_mode(struct ctlr_info *h);
static void start_io(ctlr_info_t *h);
static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size,
__u8 page_code, unsigned char scsi3addr[],
@@ -199,13 +199,13 @@ static void cciss_device_release(struct device *dev);
static void cciss_free_gendisk(ctlr_info_t *h, int drv_index);
static void cciss_free_drive_info(ctlr_info_t *h, int drv_index);
static inline u32 next_command(ctlr_info_t *h);
-static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
+static int cciss_find_cfg_addrs(struct pci_dev *pdev,
void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index,
u64 *cfg_offset);
-static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
+static int cciss_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar);
static inline u32 cciss_tag_discard_error_bits(ctlr_info_t *h, u32 tag);
-static __devinit int write_driver_ver_to_cfgtable(
+static int write_driver_ver_to_cfgtable(
CfgTable_struct __iomem *cfgtable);
/* performant mode helper functions */
@@ -550,7 +550,7 @@ static const struct file_operations cciss_proc_fops = {
.write = cciss_proc_write,
};
-static void __devinit cciss_procinit(ctlr_info_t *h)
+static void cciss_procinit(ctlr_info_t *h)
{
struct proc_dir_entry *pde;
@@ -2663,7 +2663,7 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff,
return status;
}
-static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
+static int cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr,
u8 reset_type)
{
CommandList_struct *c;
@@ -3919,7 +3919,7 @@ static void calc_bucket_map(int bucket[], int num_buckets,
}
}
-static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h)
+static void cciss_wait_for_mode_change_ack(ctlr_info_t *h)
{
int i;
@@ -3933,7 +3933,7 @@ static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h)
}
}
-static __devinit void cciss_enter_performant_mode(ctlr_info_t *h,
+static void cciss_enter_performant_mode(ctlr_info_t *h,
u32 use_short_tags)
{
/* This is a bit complicated. There are 8 registers on
@@ -4000,7 +4000,7 @@ static __devinit void cciss_enter_performant_mode(ctlr_info_t *h,
" performant mode\n");
}
-static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h)
+static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
{
__u32 trans_support;
@@ -4062,7 +4062,7 @@ clean_up:
* controllers that are capable. If not, we use IO-APIC mode.
*/
-static void __devinit cciss_interrupt_mode(ctlr_info_t *h)
+static void cciss_interrupt_mode(ctlr_info_t *h)
{
#ifdef CONFIG_PCI_MSI
int err;
@@ -4108,7 +4108,7 @@ default_int_mode:
return;
}
-static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
+static int cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
{
int i;
u32 subsystem_vendor_id, subsystem_device_id;
@@ -4134,7 +4134,7 @@ static inline bool cciss_board_disabled(ctlr_info_t *h)
return ((command & PCI_COMMAND_MEMORY) == 0);
}
-static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
+static int cciss_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar)
{
int i;
@@ -4151,7 +4151,7 @@ static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev,
return -ENODEV;
}
-static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev,
+static int cciss_wait_for_board_state(struct pci_dev *pdev,
void __iomem *vaddr, int wait_for_ready)
#define BOARD_READY 1
#define BOARD_NOT_READY 0
@@ -4179,7 +4179,7 @@ static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev,
return -ENODEV;
}
-static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
+static int cciss_find_cfg_addrs(struct pci_dev *pdev,
void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index,
u64 *cfg_offset)
{
@@ -4195,7 +4195,7 @@ static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev,
return 0;
}
-static int __devinit cciss_find_cfgtables(ctlr_info_t *h)
+static int cciss_find_cfgtables(ctlr_info_t *h)
{
u64 cfg_offset;
u32 cfg_base_addr;
@@ -4224,7 +4224,7 @@ static int __devinit cciss_find_cfgtables(ctlr_info_t *h)
return 0;
}
-static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
+static void cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
{
h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));
@@ -4245,7 +4245,7 @@ static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h)
* max commands, max SG elements without chaining, and with chaining,
* SG chain block size, etc.
*/
-static void __devinit cciss_find_board_params(ctlr_info_t *h)
+static void cciss_find_board_params(ctlr_info_t *h)
{
cciss_get_max_perf_mode_cmds(h);
h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds;
@@ -4304,7 +4304,7 @@ static inline void cciss_p600_dma_prefetch_quirk(ctlr_info_t *h)
pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch);
}
-static int __devinit cciss_pci_init(ctlr_info_t *h)
+static int cciss_pci_init(ctlr_info_t *h)
{
int prod_index, err;
@@ -4424,7 +4424,7 @@ static void free_hba(ctlr_info_t *h)
}
/* Send a message CDB to the firmware. */
-static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, unsigned char type)
+static int cciss_message(struct pci_dev *pdev, unsigned char opcode, unsigned char type)
{
typedef struct {
CommandListHeader_struct CommandHeader;
@@ -4571,13 +4571,13 @@ static int cciss_controller_hard_reset(struct pci_dev *pdev,
return 0;
}
-static __devinit void init_driver_version(char *driver_version, int len)
+static void init_driver_version(char *driver_version, int len)
{
memset(driver_version, 0, len);
strncpy(driver_version, "cciss " DRIVER_NAME, len - 1);
}
-static __devinit int write_driver_ver_to_cfgtable(
+static int write_driver_ver_to_cfgtable(
CfgTable_struct __iomem *cfgtable)
{
char *driver_version;
@@ -4594,7 +4594,7 @@ static __devinit int write_driver_ver_to_cfgtable(
return 0;
}
-static __devinit void read_driver_ver_from_cfgtable(
+static void read_driver_ver_from_cfgtable(
CfgTable_struct __iomem *cfgtable, unsigned char *driver_ver)
{
int i;
@@ -4603,7 +4603,7 @@ static __devinit void read_driver_ver_from_cfgtable(
driver_ver[i] = readb(&cfgtable->driver_version[i]);
}
-static __devinit int controller_reset_failed(
+static int controller_reset_failed(
CfgTable_struct __iomem *cfgtable)
{
@@ -4627,7 +4627,7 @@ static __devinit int controller_reset_failed(
/* This does a hard reset of the controller using PCI power management
* states or using the doorbell register. */
-static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
+static int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
{
u64 cfg_offset;
u32 cfg_base_addr;
@@ -4772,7 +4772,7 @@ unmap_vaddr:
return rc;
}
-static __devinit int cciss_init_reset_devices(struct pci_dev *pdev)
+static int cciss_init_reset_devices(struct pci_dev *pdev)
{
int rc, i;
@@ -4806,7 +4806,7 @@ static __devinit int cciss_init_reset_devices(struct pci_dev *pdev)
return 0;
}
-static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h)
+static int cciss_allocate_cmd_pool(ctlr_info_t *h)
{
h->cmd_pool_bits = kmalloc(BITS_TO_LONGS(h->nr_cmds) *
sizeof(unsigned long), GFP_KERNEL);
@@ -4825,7 +4825,7 @@ static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h)
return 0;
}
-static __devinit int cciss_allocate_scatterlists(ctlr_info_t *h)
+static int cciss_allocate_scatterlists(ctlr_info_t *h)
{
int i;
@@ -4893,7 +4893,7 @@ static int cciss_request_irq(ctlr_info_t *h,
return -1;
}
-static int __devinit cciss_kdump_soft_reset(ctlr_info_t *h)
+static int cciss_kdump_soft_reset(ctlr_info_t *h)
{
if (cciss_send_reset(h, CTLR_LUNID, CCISS_RESET_TYPE_CONTROLLER)) {
dev_warn(&h->pdev->dev, "Resetting array controller failed.\n");
@@ -4952,7 +4952,7 @@ static void cciss_undo_allocations_after_kdump_soft_reset(ctlr_info_t *h)
* stealing all these major device numbers.
* returns the number of block devices registered.
*/
-static int __devinit cciss_init_one(struct pci_dev *pdev,
+static int cciss_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
int i;
@@ -5207,7 +5207,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
free_irq(h->intr[h->intr_mode], h);
}
-static int __devinit cciss_enter_simple_mode(struct ctlr_info *h)
+static int cciss_enter_simple_mode(struct ctlr_info *h)
{
u32 trans_support;
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 389e314..34973bc 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -388,7 +388,7 @@ static void __devexit cpqarray_remove_one_eisa (int i)
}
/* pdev is NULL for eisa */
-static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev)
+static int cpqarray_register_ctlr( int i, struct pci_dev *pdev)
{
struct request_queue *q;
int j;
@@ -505,7 +505,7 @@ Enomem4:
return -1;
}
-static int __devinit cpqarray_init_one( struct pci_dev *pdev,
+static int cpqarray_init_one( struct pci_dev *pdev,
const struct pci_device_id *ent)
{
int i;
@@ -742,7 +742,7 @@ __setup("smart2=", cpqarray_setup);
/*
* Find an EISA controller's signature. Set up an hba if we find it.
*/
-static int __devinit cpqarray_eisa_detect(void)
+static int cpqarray_eisa_detect(void)
{
int i=0, j;
__u32 board_id;
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 1f7acff..8a7dc4c 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -975,7 +975,7 @@ static int queue_request_irq(struct nvme_dev *dev, struct nvme_queue *nvmeq,
IRQF_DISABLED | IRQF_SHARED, name, nvmeq);
}
-static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev,
+static struct nvme_queue *nvme_create_queue(struct nvme_dev *dev,
int qid, int cq_size, int vector)
{
int result;
@@ -1011,7 +1011,7 @@ static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev,
return ERR_PTR(result);
}
-static int __devinit nvme_configure_admin_queue(struct nvme_dev *dev)
+static int nvme_configure_admin_queue(struct nvme_dev *dev)
{
int result = 0;
u32 aqa;
@@ -1408,7 +1408,7 @@ static int set_queue_count(struct nvme_dev *dev, int count)
return min(result & 0xffff, result >> 16) + 1;
}
-static int __devinit nvme_setup_io_queues(struct nvme_dev *dev)
+static int nvme_setup_io_queues(struct nvme_dev *dev)
{
int result, cpu, i, nr_io_queues, db_bar_size, q_depth;
@@ -1481,7 +1481,7 @@ static void nvme_free_queues(struct nvme_dev *dev)
nvme_free_queue(dev, i);
}
-static int __devinit nvme_dev_add(struct nvme_dev *dev)
+static int nvme_dev_add(struct nvme_dev *dev)
{
int res, nn, i;
struct nvme_ns *ns, *next;
@@ -1619,7 +1619,7 @@ static void nvme_release_instance(struct nvme_dev *dev)
spin_unlock(&dev_list_lock);
}
-static int __devinit nvme_probe(struct pci_dev *pdev,
+static int nvme_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
int bars, result = -ENOMEM;
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index da0abc1..d754a88 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -401,7 +401,7 @@ static unsigned long ps3disk_mask;
static DEFINE_MUTEX(ps3disk_mask_mutex);
-static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev)
+static int ps3disk_probe(struct ps3_system_bus_device *_dev)
{
struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
struct ps3disk_private *priv;
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index f58cdcf..75e112d 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -536,7 +536,7 @@ static const struct file_operations ps3vram_proc_fops = {
.release = single_release,
};
-static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev)
+static void ps3vram_proc_init(struct ps3_system_bus_device *dev)
{
struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
struct proc_dir_entry *pde;
@@ -618,7 +618,7 @@ static void ps3vram_make_request(struct request_queue *q, struct bio *bio)
} while (bio);
}
-static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
+static int ps3vram_probe(struct ps3_system_bus_device *dev)
{
struct ps3vram_priv *priv;
int error, status;
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 9dcf76a..9af2797 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -592,7 +592,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len)
return err;
}
-static int __devinit vdc_alloc_tx_ring(struct vdc_port *port)
+static int vdc_alloc_tx_ring(struct vdc_port *port)
{
struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING];
unsigned long len, entry_size;
@@ -725,7 +725,7 @@ static struct vio_driver_ops vdc_vio_ops = {
.handshake_complete = vdc_handshake_complete,
};
-static void __devinit print_version(void)
+static void print_version(void)
{
static int version_printed;
@@ -733,7 +733,7 @@ static void __devinit print_version(void)
printk(KERN_INFO "%s", version);
}
-static int __devinit vdc_port_probe(struct vio_dev *vdev,
+static int vdc_port_probe(struct vio_dev *vdev,
const struct vio_device_id *id)
{
struct mdesc_handle *hp;
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 314f0b4..989f5bd 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -788,7 +788,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
return get_disk(swd->unit[drive].disk);
}
-static int __devinit swim_add_floppy(struct swim_priv *swd,
+static int swim_add_floppy(struct swim_priv *swd,
enum drive_location location)
{
struct floppy_state *fs = &swd->unit[swd->floppy_count];
@@ -812,7 +812,7 @@ static int __devinit swim_add_floppy(struct swim_priv *swd,
return 0;
}
-static int __devinit swim_floppy_init(struct swim_priv *swd)
+static int swim_floppy_init(struct swim_priv *swd)
{
int err;
int drive;
@@ -875,7 +875,7 @@ exit_put_disks:
return err;
}
-static int __devinit swim_probe(struct platform_device *dev)
+static int swim_probe(struct platform_device *dev)
{
struct resource *res;
struct swim __iomem *swim_base;
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 89ddab1..83a97d9 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1194,7 +1194,7 @@ static int swim3_add_device(struct macio_dev *mdev, int index)
return rc;
}
-static int __devinit swim3_attach(struct macio_dev *mdev, const struct of_device_id *match)
+static int swim3_attach(struct macio_dev *mdev, const struct of_device_id *match)
{
struct gendisk *disk;
int index, rc;
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index eb0d821..970d107 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -789,7 +789,7 @@ static const struct block_device_operations mm_fops = {
.revalidate_disk = mm_revalidate,
};
-static int __devinit mm_pci_probe(struct pci_dev *dev,
+static int mm_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{
int ret = -ENODEV;
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index dbba5cf..9f64e5cb 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -696,7 +696,7 @@ static const struct device_attribute dev_attr_cache_type_rw =
__ATTR(cache_type, S_IRUGO|S_IWUSR,
virtblk_cache_type_show, virtblk_cache_type_store);
-static int __devinit virtblk_probe(struct virtio_device *vdev)
+static int virtblk_probe(struct virtio_device *vdev)
{
struct virtio_blk *vblk;
struct request_queue *q;
@@ -963,7 +963,7 @@ static unsigned int features[] = {
/*
* virtio_blk causes spurious section mismatch warning by
- * simultaneously referring to a __devinit and a __devexit function.
+ * simultaneously referring to a and a __devexit function.
* Use __refdata to avoid this warning.
*/
static struct virtio_driver __refdata virtio_blk = {
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index d925121..cc49230 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -961,7 +961,7 @@ static const struct block_device_operations ace_fops = {
/* --------------------------------------------------------------------
* SystemACE device setup/teardown code
*/
-static int __devinit ace_setup(struct ace_device *ace)
+static int ace_setup(struct ace_device *ace)
{
u16 version;
u16 val;
@@ -1092,7 +1092,7 @@ static void __devexit ace_teardown(struct ace_device *ace)
iounmap(ace->baseaddr);
}
-static int __devinit
+static int
ace_alloc(struct device *dev, int id, resource_size_t physaddr,
int irq, int bus_width)
{
@@ -1151,7 +1151,7 @@ static void __devexit ace_free(struct device *dev)
* Platform Bus Support
*/
-static int __devinit ace_probe(struct platform_device *dev)
+static int ace_probe(struct platform_device *dev)
{
resource_size_t physaddr = 0;
int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */
--
1.8.0
^ permalink raw reply related
* [PATCH 297/493] xen: remove use of __devinitdata
From: Bill Pemberton @ 2012-11-19 18:24 UTC (permalink / raw)
To: gregkh; +Cc: xen-devel, virtualization
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devinitdata is no
longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: xen-devel@lists.xensource.com
Cc: virtualization@lists.linux-foundation.org
---
drivers/xen/platform-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 017f66d..361aae3 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -170,7 +170,7 @@ pci_out:
return ret;
}
-static struct pci_device_id platform_pci_tbl[] __devinitdata = {
+static struct pci_device_id platform_pci_tbl[] = {
{PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
--
1.8.0
^ permalink raw reply related
* [PATCH 392/493] block: remove use of __devexit
From: Bill Pemberton @ 2012-11-19 18:25 UTC (permalink / raw)
To: gregkh
Cc: iss_storagedev, Michael S. Tsirkin, virtualization, Grant Likely,
Chirag Kantharia
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Chirag Kantharia <chirag.kantharia@hp.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: iss_storagedev@hp.com
Cc: virtualization@lists.linux-foundation.org
---
drivers/block/cciss.c | 2 +-
drivers/block/cpqarray.c | 6 +++---
drivers/block/nvme.c | 2 +-
drivers/block/swim.c | 2 +-
drivers/block/virtio_blk.c | 4 ++--
drivers/block/xsysace.c | 6 +++---
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 3096c79..d5b415c97 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -5229,7 +5229,7 @@ static int cciss_enter_simple_mode(struct ctlr_info *h)
}
-static void __devexit cciss_remove_one(struct pci_dev *pdev)
+static void cciss_remove_one(struct pci_dev *pdev)
{
ctlr_info_t *h;
int i, j;
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 34973bc..6c2aa76 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -320,7 +320,7 @@ static void release_io_mem(ctlr_info_t *c)
c->io_mem_length = 0;
}
-static void __devexit cpqarray_remove_one(int i)
+static void cpqarray_remove_one(int i)
{
int j;
char buff[4];
@@ -352,7 +352,7 @@ static void __devexit cpqarray_remove_one(int i)
free_hba(i);
}
-static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev)
+static void cpqarray_remove_one_pci (struct pci_dev *pdev)
{
int i;
ctlr_info_t *tmp_ptr;
@@ -377,7 +377,7 @@ static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev)
/* removing an instance that was not removed automatically..
* must be an eisa card.
*/
-static void __devexit cpqarray_remove_one_eisa (int i)
+static void cpqarray_remove_one_eisa (int i)
{
if (hba[i] == NULL) {
printk(KERN_ERR "cpqarray: controller %d appears to have"
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 8a7dc4c..7f40623 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1702,7 +1702,7 @@ static int nvme_probe(struct pci_dev *pdev,
return result;
}
-static void __devexit nvme_remove(struct pci_dev *pdev)
+static void nvme_remove(struct pci_dev *pdev)
{
struct nvme_dev *dev = pci_get_drvdata(pdev);
nvme_dev_remove(dev);
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 989f5bd..a8e09b8 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -936,7 +936,7 @@ out:
return ret;
}
-static int __devexit swim_remove(struct platform_device *dev)
+static int swim_remove(struct platform_device *dev)
{
struct swim_priv *swd = platform_get_drvdata(dev);
int drive;
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 9f64e5cb..6c6df0c 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -885,7 +885,7 @@ out:
return err;
}
-static void __devexit virtblk_remove(struct virtio_device *vdev)
+static void virtblk_remove(struct virtio_device *vdev)
{
struct virtio_blk *vblk = vdev->priv;
int index = vblk->index;
@@ -963,7 +963,7 @@ static unsigned int features[] = {
/*
* virtio_blk causes spurious section mismatch warning by
- * simultaneously referring to a and a __devexit function.
+ * simultaneously referring to a and a function.
* Use __refdata to avoid this warning.
*/
static struct virtio_driver __refdata virtio_blk = {
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 1700b20..a784b176 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1074,7 +1074,7 @@ err_ioremap:
return -ENOMEM;
}
-static void __devexit ace_teardown(struct ace_device *ace)
+static void ace_teardown(struct ace_device *ace)
{
if (ace->gd) {
del_gendisk(ace->gd);
@@ -1135,7 +1135,7 @@ err_noreg:
return rc;
}
-static void __devexit ace_free(struct device *dev)
+static void ace_free(struct device *dev)
{
struct ace_device *ace = dev_get_drvdata(dev);
dev_dbg(dev, "ace_free(%p)\n", dev);
@@ -1182,7 +1182,7 @@ static int ace_probe(struct platform_device *dev)
/*
* Platform bus remove() method
*/
-static int __devexit ace_remove(struct platform_device *dev)
+static int ace_remove(struct platform_device *dev)
{
ace_free(&dev->dev);
return 0;
--
1.8.0
^ permalink raw reply related
* [PATCH 432/493] virtio: remove use of __devexit
From: Bill Pemberton @ 2012-11-19 18:26 UTC (permalink / raw)
To: gregkh; +Cc: virtualization, Michael S. Tsirkin
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux-foundation.org
---
drivers/virtio/virtio_balloon.c | 2 +-
drivers/virtio/virtio_mmio.c | 2 +-
drivers/virtio/virtio_pci.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index c61cce9..ec1e690 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -493,7 +493,7 @@ static void remove_common(struct virtio_balloon *vb)
vb->vdev->config->del_vqs(vb->vdev);
}
-static void __devexit virtballoon_remove(struct virtio_device *vdev)
+static void virtballoon_remove(struct virtio_device *vdev)
{
struct virtio_balloon *vb = vdev->priv;
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 6e0047b..6bcafdd 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -493,7 +493,7 @@ static int virtio_mmio_probe(struct platform_device *pdev)
return register_virtio_device(&vm_dev->vdev);
}
-static int __devexit virtio_mmio_remove(struct platform_device *pdev)
+static int virtio_mmio_remove(struct platform_device *pdev)
{
struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 325e847..941028e 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -751,7 +751,7 @@ out:
return err;
}
-static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
+static void virtio_pci_remove(struct pci_dev *pci_dev)
{
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
--
1.8.0
^ permalink raw reply related
* [PATCH 471/493] net: remove use of __devexit
From: Bill Pemberton @ 2012-11-19 18:27 UTC (permalink / raw)
To: gregkh
Cc: Jiri Slaby, Michael S. Tsirkin, VMware, Inc., virtualization,
Maciej W. Rozycki, Christian Lamparter, Hin-Tak Leung,
Luciano Coelho, Stefano Brivio, libertas-dev, Dan Williams,
ath5k-devel, Luis R. Rodriguez, linux-hippi, Nick Kossifidis,
Francois Romieu, Herton Ronaldo Krzesinski, Stanislav Yakovlev,
b43-dev, Samuel Ortiz, John W. Linville, linux-can, xen-devel,
Marc
In-Reply-To: <1353349642-3677-1-git-send-email-wfp5p@virginia.edu>
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
Cc: "VMware, Inc." <pv-drivers@vmware.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Simon Kelley <simon@thekelleys.org.uk>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Luciano Coelho <coelho@ti.com>
Cc: netdev@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-hippi@sunsite.dk
Cc: virtualization@lists.linux-foundation.org
Cc: linux-wireless@vger.kernel.org
Cc: ath5k-devel@lists.ath5k.org
Cc: b43-dev@lists.infradead.org
Cc: libertas-dev@lists.infradead.org
Cc: xen-devel@lists.xensource.com
---
drivers/net/arcnet/com20020-pci.c | 2 +-
drivers/net/can/at91_can.c | 2 +-
drivers/net/can/bfin_can.c | 2 +-
drivers/net/can/c_can/c_can_pci.c | 2 +-
drivers/net/can/c_can/c_can_platform.c | 2 +-
drivers/net/can/cc770/cc770_isa.c | 2 +-
drivers/net/can/cc770/cc770_platform.c | 2 +-
drivers/net/can/flexcan.c | 4 ++--
drivers/net/can/janz-ican3.c | 6 +++---
drivers/net/can/mcp251x.c | 2 +-
drivers/net/can/mscan/mpc5xxx_can.c | 2 +-
drivers/net/can/pch_can.c | 2 +-
drivers/net/can/sja1000/kvaser_pci.c | 2 +-
drivers/net/can/sja1000/peak_pci.c | 2 +-
drivers/net/can/sja1000/sja1000_isa.c | 2 +-
drivers/net/can/sja1000/sja1000_of_platform.c | 2 +-
drivers/net/can/sja1000/tscan1.c | 2 +-
drivers/net/can/softing/softing_cs.c | 2 +-
drivers/net/can/softing/softing_main.c | 2 +-
drivers/net/can/ti_hecc.c | 2 +-
drivers/net/fddi/defxx.c | 14 +++++++-------
drivers/net/fddi/skfp/skfddi.c | 2 +-
drivers/net/hippi/rrunner.c | 2 +-
drivers/net/ieee802154/at86rf230.c | 2 +-
drivers/net/ieee802154/fakehard.c | 2 +-
drivers/net/ieee802154/fakelb.c | 2 +-
drivers/net/ieee802154/mrf24j40.c | 2 +-
drivers/net/irda/au1k_ir.c | 2 +-
drivers/net/irda/bfin_sir.c | 2 +-
drivers/net/irda/sh_irda.c | 2 +-
drivers/net/irda/sh_sir.c | 2 +-
drivers/net/irda/via-ircc.c | 4 ++--
drivers/net/irda/vlsi_ir.c | 2 +-
drivers/net/phy/mdio-gpio.c | 4 ++--
drivers/net/phy/mdio-mux-gpio.c | 2 +-
drivers/net/phy/mdio-mux-mmioreg.c | 2 +-
drivers/net/phy/mdio-octeon.c | 2 +-
drivers/net/phy/spi_ks8995.c | 2 +-
drivers/net/virtio_net.c | 2 +-
drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
drivers/net/wan/dscc4.c | 2 +-
drivers/net/wan/farsync.c | 2 +-
drivers/net/wan/ixp4xx_hss.c | 2 +-
drivers/net/wan/lmc/lmc_main.c | 2 +-
drivers/net/wireless/adm8211.c | 2 +-
drivers/net/wireless/airo.c | 2 +-
drivers/net/wireless/ath/ath5k/pci.c | 2 +-
drivers/net/wireless/atmel_pci.c | 2 +-
drivers/net/wireless/b43/pcmcia.c | 2 +-
drivers/net/wireless/b43/sdio.c | 2 +-
drivers/net/wireless/ipw2x00/ipw2100.c | 2 +-
drivers/net/wireless/ipw2x00/ipw2200.c | 2 +-
drivers/net/wireless/iwlegacy/3945-mac.c | 2 +-
drivers/net/wireless/iwlegacy/4965-mac.c | 2 +-
drivers/net/wireless/iwlwifi/pcie/drv.c | 2 +-
drivers/net/wireless/libertas/if_spi.c | 2 +-
drivers/net/wireless/mwl8k.c | 4 ++--
drivers/net/wireless/orinoco/orinoco_nortel.c | 2 +-
drivers/net/wireless/orinoco/orinoco_pci.c | 2 +-
drivers/net/wireless/orinoco/orinoco_plx.c | 2 +-
drivers/net/wireless/orinoco/orinoco_tmd.c | 2 +-
drivers/net/wireless/p54/p54pci.c | 2 +-
drivers/net/wireless/p54/p54spi.c | 2 +-
drivers/net/wireless/p54/p54usb.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/dev.c | 2 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 2 +-
drivers/net/wireless/ti/wl1251/sdio.c | 2 +-
drivers/net/wireless/ti/wl1251/spi.c | 2 +-
drivers/net/wireless/ti/wlcore/main.c | 2 +-
drivers/net/wireless/ti/wlcore/sdio.c | 2 +-
drivers/net/wireless/ti/wlcore/spi.c | 2 +-
drivers/net/wireless/ti/wlcore/wlcore.h | 2 +-
drivers/net/xen-netfront.c | 2 +-
73 files changed, 85 insertions(+), 85 deletions(-)
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
index e80f04b..cbc44f5 100644
--- a/drivers/net/arcnet/com20020-pci.c
+++ b/drivers/net/arcnet/com20020-pci.c
@@ -135,7 +135,7 @@ out_dev:
return err;
}
-static void __devexit com20020pci_remove(struct pci_dev *pdev)
+static void com20020pci_remove(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
unregister_netdev(dev);
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index da807f3..e3c4c22 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -1338,7 +1338,7 @@ static int at91_can_probe(struct platform_device *pdev)
return err;
}
-static int __devexit at91_can_remove(struct platform_device *pdev)
+static int at91_can_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct at91_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c
index 16515e3..6918334 100644
--- a/drivers/net/can/bfin_can.c
+++ b/drivers/net/can/bfin_can.c
@@ -611,7 +611,7 @@ exit:
return err;
}
-static int __devexit bfin_can_remove(struct platform_device *pdev)
+static int bfin_can_remove(struct platform_device *pdev)
{
struct net_device *dev = dev_get_drvdata(&pdev->dev);
struct bfin_can_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
index 27db0f2..a1f2631 100644
--- a/drivers/net/can/c_can/c_can_pci.c
+++ b/drivers/net/can/c_can/c_can_pci.c
@@ -174,7 +174,7 @@ out:
return ret;
}
-static void __devexit c_can_pci_remove(struct pci_dev *pdev)
+static void c_can_pci_remove(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct c_can_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 91e7d2b..f133951 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -220,7 +220,7 @@ exit:
return ret;
}
-static int __devexit c_can_plat_remove(struct platform_device *pdev)
+static int c_can_plat_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct c_can_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/cc770/cc770_isa.c b/drivers/net/can/cc770/cc770_isa.c
index bed9d19..8eaaac8 100644
--- a/drivers/net/can/cc770/cc770_isa.c
+++ b/drivers/net/can/cc770/cc770_isa.c
@@ -291,7 +291,7 @@ static int cc770_isa_probe(struct platform_device *pdev)
return err;
}
-static int __devexit cc770_isa_remove(struct platform_device *pdev)
+static int cc770_isa_remove(struct platform_device *pdev)
{
struct net_device *dev = dev_get_drvdata(&pdev->dev);
struct cc770_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
index caf4d70..4af9f4e 100644
--- a/drivers/net/can/cc770/cc770_platform.c
+++ b/drivers/net/can/cc770/cc770_platform.c
@@ -237,7 +237,7 @@ exit_release_mem:
return err;
}
-static int __devexit cc770_platform_remove(struct platform_device *pdev)
+static int cc770_platform_remove(struct platform_device *pdev)
{
struct net_device *dev = dev_get_drvdata(&pdev->dev);
struct cc770_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index dd3c933..dc31c78 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -968,7 +968,7 @@ static int register_flexcandev(struct net_device *dev)
return err;
}
-static void __devexit unregister_flexcandev(struct net_device *dev)
+static void unregister_flexcandev(struct net_device *dev)
{
unregister_candev(dev);
}
@@ -1107,7 +1107,7 @@ static int flexcan_probe(struct platform_device *pdev)
return err;
}
-static int __devexit flexcan_remove(struct platform_device *pdev)
+static int flexcan_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct flexcan_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index 6eb1916..e7d69a4 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -642,7 +642,7 @@ static int ican3_msg_connect(struct ican3_dev *mod)
return ican3_send_msg(mod, &msg);
}
-static int __devexit ican3_msg_disconnect(struct ican3_dev *mod)
+static int ican3_msg_disconnect(struct ican3_dev *mod)
{
struct ican3_msg msg;
@@ -1421,7 +1421,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
return -ETIMEDOUT;
}
-static void __devexit ican3_shutdown_module(struct ican3_dev *mod)
+static void ican3_shutdown_module(struct ican3_dev *mod)
{
ican3_msg_disconnect(mod);
ican3_reset_module(mod);
@@ -1898,7 +1898,7 @@ out_return:
return ret;
}
-static int __devexit ican3_remove(struct platform_device *pdev)
+static int ican3_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct ican3_dev *mod = netdev_priv(ndev);
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 767fdbd..5eaf47b 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -1100,7 +1100,7 @@ error_out:
return ret;
}
-static int __devexit mcp251x_can_remove(struct spi_device *spi)
+static int mcp251x_can_remove(struct spi_device *spi)
{
struct mcp251x_platform_data *pdata = spi->dev.platform_data;
struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 508cbad..12e130a 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -323,7 +323,7 @@ exit_unmap_mem:
return err;
}
-static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev)
+static int mpc5xxx_can_remove(struct platform_device *ofdev)
{
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
struct mscan_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index fad4625..7d17485 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -954,7 +954,7 @@ static const struct net_device_ops pch_can_netdev_ops = {
.ndo_start_xmit = pch_xmit,
};
-static void __devexit pch_can_remove(struct pci_dev *pdev)
+static void pch_can_remove(struct pci_dev *pdev)
{
struct net_device *ndev = pci_get_drvdata(pdev);
struct pch_can_priv *priv = netdev_priv(ndev);
diff --git a/drivers/net/can/sja1000/kvaser_pci.c b/drivers/net/can/sja1000/kvaser_pci.c
index a6191ac..4efdaf2 100644
--- a/drivers/net/can/sja1000/kvaser_pci.c
+++ b/drivers/net/can/sja1000/kvaser_pci.c
@@ -379,7 +379,7 @@ failure:
}
-static void __devexit kvaser_pci_remove_one(struct pci_dev *pdev)
+static void kvaser_pci_remove_one(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index fbf61cf..3faeb3d 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -717,7 +717,7 @@ failure_disable_pci:
return err;
}
-static void __devexit peak_pci_remove(struct pci_dev *pdev)
+static void peak_pci_remove(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev); /* Last device */
struct sja1000_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/sja1000/sja1000_isa.c b/drivers/net/can/sja1000/sja1000_isa.c
index a872f24..5c8da46 100644
--- a/drivers/net/can/sja1000/sja1000_isa.c
+++ b/drivers/net/can/sja1000/sja1000_isa.c
@@ -223,7 +223,7 @@ static int sja1000_isa_probe(struct platform_device *pdev)
return err;
}
-static int __devexit sja1000_isa_remove(struct platform_device *pdev)
+static int sja1000_isa_remove(struct platform_device *pdev)
{
struct net_device *dev = dev_get_drvdata(&pdev->dev);
struct sja1000_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index 1ca0ee1..a7b0152 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -68,7 +68,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
out_8(priv->reg_base + reg, val);
}
-static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)
+static int sja1000_ofp_remove(struct platform_device *ofdev)
{
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
struct sja1000_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/sja1000/tscan1.c b/drivers/net/can/sja1000/tscan1.c
index 6a6db7e..76513dd 100644
--- a/drivers/net/can/sja1000/tscan1.c
+++ b/drivers/net/can/sja1000/tscan1.c
@@ -171,7 +171,7 @@ static int tscan1_probe(struct device *dev, unsigned id)
return -ENXIO;
}
-static int __devexit tscan1_remove(struct device *dev, unsigned id /*unused*/)
+static int tscan1_remove(struct device *dev, unsigned id /*unused*/)
{
struct net_device *netdev;
struct sja1000_priv *priv;
diff --git a/drivers/net/can/softing/softing_cs.c b/drivers/net/can/softing/softing_cs.c
index 04e1539..ce18ba5 100644
--- a/drivers/net/can/softing/softing_cs.c
+++ b/drivers/net/can/softing/softing_cs.c
@@ -215,7 +215,7 @@ static int softingcs_probe_config(struct pcmcia_device *pcmcia,
return pcmcia_request_window(pcmcia, pres, memspeed);
}
-static __devexit void softingcs_remove(struct pcmcia_device *pcmcia)
+static void softingcs_remove(struct pcmcia_device *pcmcia)
{
struct platform_device *pdev = pcmcia->priv;
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c
index aefd297..50b1e0f 100644
--- a/drivers/net/can/softing/softing_main.c
+++ b/drivers/net/can/softing/softing_main.c
@@ -745,7 +745,7 @@ static const struct attribute_group softing_pdev_group = {
/*
* platform driver
*/
-static __devexit int softing_pdev_remove(struct platform_device *pdev)
+static int softing_pdev_remove(struct platform_device *pdev)
{
struct softing *card = platform_get_drvdata(pdev);
int j;
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 80ee814..b5e1683 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -978,7 +978,7 @@ probe_exit:
return err;
}
-static int __devexit ti_hecc_remove(struct platform_device *pdev)
+static int ti_hecc_remove(struct platform_device *pdev)
{
struct resource *res;
struct net_device *ndev = platform_get_drvdata(pdev);
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index fd58f0b..3c8aab7 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -809,7 +809,7 @@ static void dfx_bus_init(struct net_device *dev)
* Interrupts are disabled at the adapter bus-specific logic.
*/
-static void __devexit dfx_bus_uninit(struct net_device *dev)
+static void dfx_bus_uninit(struct net_device *dev)
{
DFX_board_t *bp = netdev_priv(dev);
struct device *bdev = bp->bus_dev;
@@ -3579,7 +3579,7 @@ static void dfx_xmt_flush( DFX_board_t *bp )
* Device structures for FDDI adapters (fddi0, fddi1, etc) are
* freed.
*/
-static void __devexit dfx_unregister(struct device *bdev)
+static void dfx_unregister(struct device *bdev)
{
struct net_device *dev = dev_get_drvdata(bdev);
DFX_board_t *bp = netdev_priv(dev);
@@ -3620,12 +3620,12 @@ static void __devexit dfx_unregister(struct device *bdev)
static int __maybe_unused dfx_dev_register(struct device *);
-static int __devexit __maybe_unused dfx_dev_unregister(struct device *);
+static int __maybe_unused dfx_dev_unregister(struct device *);
#ifdef CONFIG_PCI
static int dfx_pci_register(struct pci_dev *,
const struct pci_device_id *);
-static void __devexit dfx_pci_unregister(struct pci_dev *);
+static void dfx_pci_unregister(struct pci_dev *);
static DEFINE_PCI_DEVICE_TABLE(dfx_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_FDDI) },
@@ -3646,7 +3646,7 @@ static int dfx_pci_register(struct pci_dev *pdev,
return dfx_register(&pdev->dev);
}
-static void __devexit dfx_pci_unregister(struct pci_dev *pdev)
+static void dfx_pci_unregister(struct pci_dev *pdev)
{
dfx_unregister(&pdev->dev);
}
@@ -3704,7 +3704,7 @@ static int __maybe_unused dfx_dev_register(struct device *dev)
return status;
}
-static int __devexit __maybe_unused dfx_dev_unregister(struct device *dev)
+static int __maybe_unused dfx_dev_unregister(struct device *dev)
{
put_device(dev);
dfx_unregister(dev);
@@ -3724,7 +3724,7 @@ static int dfx_init(void)
return status;
}
-static void __devexit dfx_cleanup(void)
+static void dfx_cleanup(void)
{
tc_unregister_driver(&dfx_tc_driver);
eisa_driver_unregister(&dfx_eisa_driver);
diff --git a/drivers/net/fddi/skfp/skfddi.c b/drivers/net/fddi/skfp/skfddi.c
index cbabb74..d5bd563 100644
--- a/drivers/net/fddi/skfp/skfddi.c
+++ b/drivers/net/fddi/skfp/skfddi.c
@@ -321,7 +321,7 @@ err_out1:
/*
* Called for each adapter board from pci_unregister_driver
*/
-static void __devexit skfp_remove_one(struct pci_dev *pdev)
+static void skfp_remove_one(struct pci_dev *pdev)
{
struct net_device *p = pci_get_drvdata(pdev);
struct s_smc *lp = netdev_priv(p);
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 12b7ff9..6be95ed 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -221,7 +221,7 @@ static int rr_init_one(struct pci_dev *pdev,
return ret;
}
-static void __devexit rr_remove_one (struct pci_dev *pdev)
+static void rr_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct rr_private *rr = netdev_priv(dev);
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 1198c6b..a4a62e1 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -920,7 +920,7 @@ err_fill:
return rc;
}
-static int __devexit at86rf230_remove(struct spi_device *spi)
+static int at86rf230_remove(struct spi_device *spi)
{
struct at86rf230_local *lp = spi_get_drvdata(spi);
diff --git a/drivers/net/ieee802154/fakehard.c b/drivers/net/ieee802154/fakehard.c
index fd0438c..1e9cb0b 100644
--- a/drivers/net/ieee802154/fakehard.c
+++ b/drivers/net/ieee802154/fakehard.c
@@ -412,7 +412,7 @@ out:
return err;
}
-static int __devexit ieee802154fake_remove(struct platform_device *pdev)
+static int ieee802154fake_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
unregister_netdev(dev);
diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c
index e4b0e38..b8d2217 100644
--- a/drivers/net/ieee802154/fakelb.c
+++ b/drivers/net/ieee802154/fakelb.c
@@ -253,7 +253,7 @@ err_alloc:
return err;
}
-static int __devexit fakelb_remove(struct platform_device *pdev)
+static int fakelb_remove(struct platform_device *pdev)
{
struct fakelb_priv *priv = platform_get_drvdata(pdev);
struct fakelb_dev_priv *dp, *temp;
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index ef41051..3f2c7aa 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -711,7 +711,7 @@ err_devrec:
return ret;
}
-static int __devexit mrf24j40_remove(struct spi_device *spi)
+static int mrf24j40_remove(struct spi_device *spi)
{
struct mrf24j40 *devrec = dev_get_drvdata(&spi->dev);
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index 7843f50..b5151e4 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -921,7 +921,7 @@ out:
return err;
}
-static int __devexit au1k_irda_remove(struct platform_device *pdev)
+static int au1k_irda_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct au1k_private *aup = netdev_priv(dev);
diff --git a/drivers/net/irda/bfin_sir.c b/drivers/net/irda/bfin_sir.c
index 98c903f..fed4a05 100644
--- a/drivers/net/irda/bfin_sir.c
+++ b/drivers/net/irda/bfin_sir.c
@@ -775,7 +775,7 @@ err_mem_0:
return err;
}
-static int __devexit bfin_sir_remove(struct platform_device *pdev)
+static int bfin_sir_remove(struct platform_device *pdev)
{
struct bfin_sir_port *sir_port;
struct net_device *dev = NULL;
diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
index 2d3f3e6..9448587 100644
--- a/drivers/net/irda/sh_irda.c
+++ b/drivers/net/irda/sh_irda.c
@@ -825,7 +825,7 @@ exit:
return err;
}
-static int __devexit sh_irda_remove(struct platform_device *pdev)
+static int sh_irda_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct sh_irda_self *self = netdev_priv(ndev);
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index 150b56c..24aefcd 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -783,7 +783,7 @@ exit:
return err;
}
-static int __devexit sh_sir_remove(struct platform_device *pdev)
+static int sh_sir_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct sh_sir_self *self = netdev_priv(ndev);
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index d678f52..5488247 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -103,7 +103,7 @@ static void hwreset(struct via_ircc_cb *self);
static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase);
static int upload_rxdata(struct via_ircc_cb *self, int iobase);
static int via_init_one (struct pci_dev *pcidev, const struct pci_device_id *id);
-static void __devexit via_remove_one (struct pci_dev *pdev);
+static void via_remove_one (struct pci_dev *pdev);
/* FIXME : Should use udelay() instead, even if we are x86 only - Jean II */
static void iodelay(int udelay)
@@ -424,7 +424,7 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t * info,
* Close driver instance
*
*/
-static void __devexit via_remove_one(struct pci_dev *pdev)
+static void via_remove_one(struct pci_dev *pdev)
{
struct via_ircc_cb *self = pci_get_drvdata(pdev);
int iobase;
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index e255b65..2f99f88 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -1699,7 +1699,7 @@ out:
return -ENODEV;
}
-static void __devexit vlsi_irda_remove(struct pci_dev *pdev)
+static void vlsi_irda_remove(struct pci_dev *pdev)
{
struct net_device *ndev = pci_get_drvdata(pdev);
vlsi_irda_dev_t *idev;
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index bf30b1d..6b2fdb8 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -173,7 +173,7 @@ static void mdio_gpio_bus_deinit(struct device *dev)
kfree(bitbang);
}
-static void __devexit mdio_gpio_bus_destroy(struct device *dev)
+static void mdio_gpio_bus_destroy(struct device *dev)
{
struct mii_bus *bus = dev_get_drvdata(dev);
@@ -210,7 +210,7 @@ static int mdio_gpio_probe(struct platform_device *pdev)
return ret;
}
-static int __devexit mdio_gpio_remove(struct platform_device *pdev)
+static int mdio_gpio_remove(struct platform_device *pdev)
{
mdio_gpio_bus_destroy(&pdev->dev);
diff --git a/drivers/net/phy/mdio-mux-gpio.c b/drivers/net/phy/mdio-mux-gpio.c
index 23ee064..0c9accb 100644
--- a/drivers/net/phy/mdio-mux-gpio.c
+++ b/drivers/net/phy/mdio-mux-gpio.c
@@ -104,7 +104,7 @@ err:
return r;
}
-static int __devexit mdio_mux_gpio_remove(struct platform_device *pdev)
+static int mdio_mux_gpio_remove(struct platform_device *pdev)
{
struct mdio_mux_gpio_state *s = pdev->dev.platform_data;
mdio_mux_uninit(s->mux_handle);
diff --git a/drivers/net/phy/mdio-mux-mmioreg.c b/drivers/net/phy/mdio-mux-mmioreg.c
index a38951f..9733bd2 100644
--- a/drivers/net/phy/mdio-mux-mmioreg.c
+++ b/drivers/net/phy/mdio-mux-mmioreg.c
@@ -137,7 +137,7 @@ static int mdio_mux_mmioreg_probe(struct platform_device *pdev)
return 0;
}
-static int __devexit mdio_mux_mmioreg_remove(struct platform_device *pdev)
+static int mdio_mux_mmioreg_remove(struct platform_device *pdev)
{
struct mdio_mux_mmioreg_state *s = dev_get_platdata(&pdev->dev);
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index 7a07985..09297fe 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -159,7 +159,7 @@ fail:
return err;
}
-static int __devexit octeon_mdiobus_remove(struct platform_device *pdev)
+static int octeon_mdiobus_remove(struct platform_device *pdev)
{
struct octeon_mdiobus *bus;
union cvmx_smix_en smi_en;
diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
index 1321c99..41eb8ff 100644
--- a/drivers/net/phy/spi_ks8995.c
+++ b/drivers/net/phy/spi_ks8995.c
@@ -332,7 +332,7 @@ err_drvdata:
return err;
}
-static int __devexit ks8995_remove(struct spi_device *spi)
+static int ks8995_remove(struct spi_device *spi)
{
struct ks8995_data *ks8995;
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b0c1630..c5f0ed2 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1195,7 +1195,7 @@ static void remove_vq_common(struct virtnet_info *vi)
__free_pages(get_a_page(vi, GFP_KERNEL), 0);
}
-static void __devexit virtnet_remove(struct virtio_device *vdev)
+static void virtnet_remove(struct virtio_device *vdev)
{
struct virtnet_info *vi = vdev->priv;
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index ac322e5..71b762f 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -3096,7 +3096,7 @@ err_alloc_shared:
}
-static void __devexit
+static void
vmxnet3_remove_device(struct pci_dev *pdev)
{
struct net_device *netdev = pci_get_drvdata(pdev);
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 863df17..d502230 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -1968,7 +1968,7 @@ err_out:
return -ENOMEM;
}
-static void __devexit dscc4_remove_one(struct pci_dev *pdev)
+static void dscc4_remove_one(struct pci_dev *pdev)
{
struct dscc4_pci_priv *ppriv;
struct dscc4_dev_priv *root;
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index dbbe06e..d7adba4 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2615,7 +2615,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/*
* Cleanup and close down a card
*/
-static void __devexit
+static void
fst_remove_one(struct pci_dev *pdev)
{
struct fst_card_info *card;
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index beecbe8..b056691 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -1375,7 +1375,7 @@ err_free:
return err;
}
-static int __devexit hss_remove_one(struct platform_device *pdev)
+static int hss_remove_one(struct platform_device *pdev)
{
struct port *port = platform_get_drvdata(pdev);
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 41a401a..0e443fd 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -986,7 +986,7 @@ err_req_io:
/*
* Called from pci when removing module.
*/
-static void __devexit lmc_remove_one(struct pci_dev *pdev)
+static void lmc_remove_one(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index bd89a29..3d339e0 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1935,7 +1935,7 @@ static int adm8211_probe(struct pci_dev *pdev,
}
-static void __devexit adm8211_remove(struct pci_dev *pdev)
+static void adm8211_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *dev = pci_get_drvdata(pdev);
struct adm8211_priv *priv;
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index b010f41..5329541 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5606,7 +5606,7 @@ static int airo_pci_probe(struct pci_dev *pdev,
return 0;
}
-static void __devexit airo_pci_remove(struct pci_dev *pdev)
+static void airo_pci_remove(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
index 1a78ba3..859db7c 100644
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -285,7 +285,7 @@ err:
return ret;
}
-static void __devexit
+static void
ath5k_pci_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
diff --git a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c
index 1c12fec..c1b159e 100644
--- a/drivers/net/wireless/atmel_pci.c
+++ b/drivers/net/wireless/atmel_pci.c
@@ -69,7 +69,7 @@ static int atmel_pci_probe(struct pci_dev *pdev,
return 0;
}
-static void __devexit atmel_pci_remove(struct pci_dev *pdev)
+static void atmel_pci_remove(struct pci_dev *pdev)
{
stop_atmel_card(pci_get_drvdata(pdev));
}
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 3506cca..f2ea2ce 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -110,7 +110,7 @@ out_error:
return err;
}
-static void __devexit b43_pcmcia_remove(struct pcmcia_device *dev)
+static void b43_pcmcia_remove(struct pcmcia_device *dev)
{
struct ssb_bus *ssb = dev->priv;
diff --git a/drivers/net/wireless/b43/sdio.c b/drivers/net/wireless/b43/sdio.c
index d2b1f98..59a5218 100644
--- a/drivers/net/wireless/b43/sdio.c
+++ b/drivers/net/wireless/b43/sdio.c
@@ -171,7 +171,7 @@ out:
return error;
}
-static void __devexit b43_sdio_remove(struct sdio_func *func)
+static void b43_sdio_remove(struct sdio_func *func)
{
struct b43_sdio *sdio = sdio_get_drvdata(func);
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index b96c615..7588484 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -6413,7 +6413,7 @@ out:
goto out;
}
-static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
+static void ipw2100_pci_remove_one(struct pci_dev *pci_dev)
{
struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
struct net_device *dev = priv->net_dev;
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 3f099a6..941c6b5 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -11895,7 +11895,7 @@ static int ipw_pci_probe(struct pci_dev *pdev,
return err;
}
-static void __devexit ipw_pci_remove(struct pci_dev *pdev)
+static void ipw_pci_remove(struct pci_dev *pdev)
{
struct ipw_priv *priv = pci_get_drvdata(pdev);
struct list_head *p, *q;
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 88fdd39..d604b40 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -3794,7 +3794,7 @@ out:
return err;
}
-static void __devexit
+static void
il3945_pci_remove(struct pci_dev *pdev)
{
struct il_priv *il = pci_get_drvdata(pdev);
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 14e0a94..569e1ae5 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -6664,7 +6664,7 @@ out:
return err;
}
-static void __devexit
+static void
il4965_pci_remove(struct pci_dev *pdev)
{
struct il_priv *il = pci_get_drvdata(pdev);
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index 7cb27af..1f21d60 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -294,7 +294,7 @@ out_free_trans:
return -EFAULT;
}
-static void __devexit iwl_pci_remove(struct pci_dev *pdev)
+static void iwl_pci_remove(struct pci_dev *pdev)
{
struct iwl_trans *trans = pci_get_drvdata(pdev);
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index abc32e3..4bb6574 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -1226,7 +1226,7 @@ out:
return err;
}
-static int __devexit libertas_spi_remove(struct spi_device *spi)
+static int libertas_spi_remove(struct spi_device *spi)
{
struct if_spi_card *card = spi_get_drvdata(spi);
struct lbs_private *priv = card->priv;
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index b9f71fd..19cad01 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5872,12 +5872,12 @@ err_disable_device:
return rc;
}
-static void __devexit mwl8k_shutdown(struct pci_dev *pdev)
+static void mwl8k_shutdown(struct pci_dev *pdev)
{
printk(KERN_ERR "===>%s(%u)\n", __func__, __LINE__);
}
-static void __devexit mwl8k_remove(struct pci_dev *pdev)
+static void mwl8k_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct mwl8k_priv *priv;
diff --git a/drivers/net/wireless/orinoco/orinoco_nortel.c b/drivers/net/wireless/orinoco/orinoco_nortel.c
index f286540..d73fdf6 100644
--- a/drivers/net/wireless/orinoco/orinoco_nortel.c
+++ b/drivers/net/wireless/orinoco/orinoco_nortel.c
@@ -255,7 +255,7 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
return err;
}
-static void __devexit orinoco_nortel_remove_one(struct pci_dev *pdev)
+static void orinoco_nortel_remove_one(struct pci_dev *pdev)
{
struct orinoco_private *priv = pci_get_drvdata(pdev);
struct orinoco_pci_card *card = priv->card;
diff --git a/drivers/net/wireless/orinoco/orinoco_pci.c b/drivers/net/wireless/orinoco/orinoco_pci.c
index bf6d436..677bf14 100644
--- a/drivers/net/wireless/orinoco/orinoco_pci.c
+++ b/drivers/net/wireless/orinoco/orinoco_pci.c
@@ -199,7 +199,7 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
return err;
}
-static void __devexit orinoco_pci_remove_one(struct pci_dev *pdev)
+static void orinoco_pci_remove_one(struct pci_dev *pdev)
{
struct orinoco_private *priv = pci_get_drvdata(pdev);
diff --git a/drivers/net/wireless/orinoco/orinoco_plx.c b/drivers/net/wireless/orinoco/orinoco_plx.c
index 63a614f..2559dbd 100644
--- a/drivers/net/wireless/orinoco/orinoco_plx.c
+++ b/drivers/net/wireless/orinoco/orinoco_plx.c
@@ -294,7 +294,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
return err;
}
-static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev)
+static void orinoco_plx_remove_one(struct pci_dev *pdev)
{
struct orinoco_private *priv = pci_get_drvdata(pdev);
struct orinoco_pci_card *card = priv->card;
diff --git a/drivers/net/wireless/orinoco/orinoco_tmd.c b/drivers/net/wireless/orinoco/orinoco_tmd.c
index f67f43e..42afeee 100644
--- a/drivers/net/wireless/orinoco/orinoco_tmd.c
+++ b/drivers/net/wireless/orinoco/orinoco_tmd.c
@@ -188,7 +188,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
return err;
}
-static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev)
+static void orinoco_tmd_remove_one(struct pci_dev *pdev)
{
struct orinoco_private *priv = pci_get_drvdata(pdev);
struct orinoco_pci_card *card = priv->card;
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index e5b29e9..04eb0ed 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -639,7 +639,7 @@ static int p54p_probe(struct pci_dev *pdev,
return err;
}
-static void __devexit p54p_remove(struct pci_dev *pdev)
+static void p54p_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *dev = pci_get_drvdata(pdev);
struct p54p_priv *priv;
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index d75ab3e..4fd49a0 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -683,7 +683,7 @@ err_free:
return ret;
}
-static int __devexit p54spi_remove(struct spi_device *spi)
+static int p54spi_remove(struct spi_device *spi)
{
struct p54s_priv *priv = dev_get_drvdata(&spi->dev);
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 000f7ba..e71c702 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -1057,7 +1057,7 @@ static int p54u_probe(struct usb_interface *intf,
return err;
}
-static void __devexit p54u_disconnect(struct usb_interface *intf)
+static void p54u_disconnect(struct usb_interface *intf)
{
struct ieee80211_hw *dev = usb_get_intfdata(intf);
struct p54u_priv *priv;
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 6a5c0b8..4af3f91 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -1131,7 +1131,7 @@ static int rtl8180_probe(struct pci_dev *pdev,
return err;
}
-static void __devexit rtl8180_remove(struct pci_dev *pdev)
+static void rtl8180_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *dev = pci_get_drvdata(pdev);
struct rtl8180_priv *priv;
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index f879bc3..be36935 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -1639,7 +1639,7 @@ static int rtl8187_probe(struct usb_interface *intf,
return err;
}
-static void __devexit rtl8187_disconnect(struct usb_interface *intf)
+static void rtl8187_disconnect(struct usb_interface *intf)
{
struct ieee80211_hw *dev = usb_get_intfdata(intf);
struct rtl8187_priv *priv;
diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
index e3f287f..e57ee48 100644
--- a/drivers/net/wireless/ti/wl1251/sdio.c
+++ b/drivers/net/wireless/ti/wl1251/sdio.c
@@ -305,7 +305,7 @@ out_free_hw:
return ret;
}
-static void __devexit wl1251_sdio_remove(struct sdio_func *func)
+static void wl1251_sdio_remove(struct sdio_func *func)
{
struct wl1251 *wl = sdio_get_drvdata(func);
struct wl1251_sdio *wl_sdio = wl->if_priv;
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 640a3d5..3b266d3 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -309,7 +309,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
return ret;
}
-static int __devexit wl1251_spi_remove(struct spi_device *spi)
+static int wl1251_spi_remove(struct spi_device *spi)
{
struct wl1251 *wl = dev_get_drvdata(&spi->dev);
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 2dd4ada..dd38f61 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5682,7 +5682,7 @@ int wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
}
EXPORT_SYMBOL_GPL(wlcore_probe);
-int __devexit wlcore_remove(struct platform_device *pdev)
+int wlcore_remove(struct platform_device *pdev)
{
struct wl1271 *wl = platform_get_drvdata(pdev);
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index 7bf612c..646f703 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -319,7 +319,7 @@ out:
return ret;
}
-static void __devexit wl1271_remove(struct sdio_func *func)
+static void wl1271_remove(struct sdio_func *func)
{
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index ee39484..f06f477 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -403,7 +403,7 @@ out:
return ret;
}
-static int __devexit wl1271_remove(struct spi_device *spi)
+static int wl1271_remove(struct spi_device *spi)
{
struct wl12xx_spi_glue *glue = spi_get_drvdata(spi);
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
index adc6152..c388493 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
@@ -415,7 +415,7 @@ struct wl1271 {
};
int wlcore_probe(struct wl1271 *wl, struct platform_device *pdev);
-int __devexit wlcore_remove(struct platform_device *pdev);
+int wlcore_remove(struct platform_device *pdev);
struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size);
int wlcore_free_hw(struct wl1271 *wl);
int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 6f695fc..b31198c 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1911,7 +1911,7 @@ static const struct xenbus_device_id netfront_ids[] = {
};
-static int __devexit xennet_remove(struct xenbus_device *dev)
+static int xennet_remove(struct xenbus_device *dev)
{
struct netfront_info *info = dev_get_drvdata(&dev->dev);
--
1.8.0
^ permalink raw reply related
* Re: [rfc net-next v6 2/3] virtio_net: multiqueue support
From: Ben Hutchings @ 2012-11-19 18:44 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: krkumar2, kvm, netdev, linux-kernel, virtualization, edumazet,
davem
In-Reply-To: <20121118091354.GA31775@redhat.com>
On Sun, 2012-11-18 at 11:13 +0200, Michael S. Tsirkin wrote:
> On Sat, Nov 17, 2012 at 12:35:29AM +0000, Ben Hutchings wrote:
> > On Tue, 2012-11-13 at 08:40 +0200, Michael S. Tsirkin wrote:
> > > On Mon, Nov 05, 2012 at 11:38:39AM +1030, Rusty Russell wrote:
> > > > > @@ -924,11 +1032,10 @@ static void virtnet_get_ringparam(struct net_device *dev,
> > > > > {
> > > > > struct virtnet_info *vi = netdev_priv(dev);
> > > > >
> > > > > - ring->rx_max_pending = virtqueue_get_vring_size(vi->rvq);
> > > > > - ring->tx_max_pending = virtqueue_get_vring_size(vi->svq);
> > > > > + ring->rx_max_pending = virtqueue_get_vring_size(vi->rq[0].vq);
> > > > > + ring->tx_max_pending = virtqueue_get_vring_size(vi->sq[0].vq);
> > > > > ring->rx_pending = ring->rx_max_pending;
> > > > > ring->tx_pending = ring->tx_max_pending;
> > > > > -
> > > > > }
> > > >
> > > > This assumes all vqs are the same size. I think this should probably
> > > > check: for mq mode, use the first vq, otherewise use the 0th.
> > >
> > > For rx_pending/tx_pending I think what is required here is the
> > > actual number of outstanding buffers.
> > > Dave, Eric - right?
> > >
> > > So this should be the total over all rings and to be useful,
> > > rx_max_pending/tx_max_pending should be the total too.
> >
> > So far as I know, all current implementations use the number of
> > descriptors per ring here. virtio_net should be consistent with this.
> >
> > Ben.
>
> Problem is, it could in theory be different between rings. I guess we
> could use the maximum.
>
> What's the right thing to do for rx_pending - I am guessing
> we want the current outstanding packets right?
The 'max_pending' fields are for the maximum ring sizes supported; the
'pending' fields are for the current ring sizes. The current number of
descriptors pending is not included (would be a bit pointless).
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h
From: David Miller @ 2012-11-19 19:18 UTC (permalink / raw)
To: sachin.kamat; +Cc: kvm, patches, netdev, mst, virtualization
In-Reply-To: <1353324508-22083-1-git-send-email-sachin.kamat@linaro.org>
From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Mon, 19 Nov 2012 16:58:28 +0530
> linux/vhost.h was included twice.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Michael, are you gonna take this?
Thanks.
^ permalink raw reply
* Re: [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h
From: Michael S. Tsirkin @ 2012-11-19 19:49 UTC (permalink / raw)
To: David Miller; +Cc: kvm, patches, sachin.kamat, netdev, virtualization
In-Reply-To: <20121119.141813.2249570877638146916.davem@davemloft.net>
On Mon, Nov 19, 2012 at 02:18:13PM -0500, David Miller wrote:
> From: Sachin Kamat <sachin.kamat@linaro.org>
> Date: Mon, 19 Nov 2012 16:58:28 +0530
>
> > linux/vhost.h was included twice.
> >
> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>
> Michael, are you gonna take this?
>
> Thanks.
Pls pick it up.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
^ permalink raw reply
* Re: [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h
From: David Miller @ 2012-11-19 19:51 UTC (permalink / raw)
To: mst; +Cc: kvm, patches, sachin.kamat, netdev, virtualization
In-Reply-To: <20121119194954.GA12283@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 19 Nov 2012 21:49:55 +0200
> On Mon, Nov 19, 2012 at 02:18:13PM -0500, David Miller wrote:
>> From: Sachin Kamat <sachin.kamat@linaro.org>
>> Date: Mon, 19 Nov 2012 16:58:28 +0530
>>
>> > linux/vhost.h was included twice.
>> >
>> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>
>> Michael, are you gonna take this?
>>
>> Thanks.
>
> Pls pick it up.
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH 471/493] net: remove use of __devexit
From: Larry Finger @ 2012-11-19 20:01 UTC (permalink / raw)
To: Bill Pemberton
Cc: Jiri Slaby, Michael S. Tsirkin, VMware, Inc., virtualization,
Maciej W. Rozycki, Christian Lamparter, Hin-Tak Leung,
Luciano Coelho, Stefano Brivio, libertas-dev, Dan Williams,
ath5k-devel, Luis R. Rodriguez, linux-hippi, Nick Kossifidis,
Francois Romieu, Herton Ronaldo Krzesinski, Stanislav Yakovlev,
b43-dev, Samuel Ortiz, John W. Linville, linux-can, xen-devel,
Marc
In-Reply-To: <1353349642-3677-471-git-send-email-wfp5p@virginia.edu>
On 11/19/2012 12:27 PM, Bill Pemberton wrote:
> CONFIG_HOTPLUG is going away as an option so __devexit is no
> longer needed.
>
> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
> Cc: Jes Sorensen <jes@trained-monkey.org>
> Cc: Samuel Ortiz <samuel@sortiz.org>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
> Cc: "VMware, Inc." <pv-drivers@vmware.com>
> Cc: Francois Romieu <romieu@fr.zoreil.com>
> Cc: Krzysztof Halasa <khc@pm.waw.pl>
> Cc: "John W. Linville" <linville@tuxdriver.com>
> Cc: Jiri Slaby <jirislaby@gmail.com>
> Cc: Nick Kossifidis <mickflemm@gmail.com>
> Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
> Cc: Simon Kelley <simon@thekelleys.org.uk>
> Cc: Stefano Brivio <stefano.brivio@polimi.it>
> Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
> Cc: Dan Williams <dcbw@redhat.com>
> Cc: Christian Lamparter <chunkeey@googlemail.com>
> Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
> Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Luciano Coelho <coelho@ti.com>
> Cc: netdev@vger.kernel.org
> Cc: linux-can@vger.kernel.org
> Cc: linux-hippi@sunsite.dk
> Cc: virtualization@lists.linux-foundation.org
> Cc: linux-wireless@vger.kernel.org
> Cc: ath5k-devel@lists.ath5k.org
> Cc: b43-dev@lists.infradead.org
> Cc: libertas-dev@lists.infradead.org
> Cc: xen-devel@lists.xensource.com
ACKed-by: Larry Finger <Larry.Finger.net> for the rtl8187 part.
> ---
> drivers/net/arcnet/com20020-pci.c | 2 +-
> drivers/net/can/at91_can.c | 2 +-
> drivers/net/can/bfin_can.c | 2 +-
> drivers/net/can/c_can/c_can_pci.c | 2 +-
> drivers/net/can/c_can/c_can_platform.c | 2 +-
> drivers/net/can/cc770/cc770_isa.c | 2 +-
> drivers/net/can/cc770/cc770_platform.c | 2 +-
> drivers/net/can/flexcan.c | 4 ++--
> drivers/net/can/janz-ican3.c | 6 +++---
> drivers/net/can/mcp251x.c | 2 +-
> drivers/net/can/mscan/mpc5xxx_can.c | 2 +-
> drivers/net/can/pch_can.c | 2 +-
> drivers/net/can/sja1000/kvaser_pci.c | 2 +-
> drivers/net/can/sja1000/peak_pci.c | 2 +-
> drivers/net/can/sja1000/sja1000_isa.c | 2 +-
> drivers/net/can/sja1000/sja1000_of_platform.c | 2 +-
> drivers/net/can/sja1000/tscan1.c | 2 +-
> drivers/net/can/softing/softing_cs.c | 2 +-
> drivers/net/can/softing/softing_main.c | 2 +-
> drivers/net/can/ti_hecc.c | 2 +-
> drivers/net/fddi/defxx.c | 14 +++++++-------
> drivers/net/fddi/skfp/skfddi.c | 2 +-
> drivers/net/hippi/rrunner.c | 2 +-
> drivers/net/ieee802154/at86rf230.c | 2 +-
> drivers/net/ieee802154/fakehard.c | 2 +-
> drivers/net/ieee802154/fakelb.c | 2 +-
> drivers/net/ieee802154/mrf24j40.c | 2 +-
> drivers/net/irda/au1k_ir.c | 2 +-
> drivers/net/irda/bfin_sir.c | 2 +-
> drivers/net/irda/sh_irda.c | 2 +-
> drivers/net/irda/sh_sir.c | 2 +-
> drivers/net/irda/via-ircc.c | 4 ++--
> drivers/net/irda/vlsi_ir.c | 2 +-
> drivers/net/phy/mdio-gpio.c | 4 ++--
> drivers/net/phy/mdio-mux-gpio.c | 2 +-
> drivers/net/phy/mdio-mux-mmioreg.c | 2 +-
> drivers/net/phy/mdio-octeon.c | 2 +-
> drivers/net/phy/spi_ks8995.c | 2 +-
> drivers/net/virtio_net.c | 2 +-
> drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
> drivers/net/wan/dscc4.c | 2 +-
> drivers/net/wan/farsync.c | 2 +-
> drivers/net/wan/ixp4xx_hss.c | 2 +-
> drivers/net/wan/lmc/lmc_main.c | 2 +-
> drivers/net/wireless/adm8211.c | 2 +-
> drivers/net/wireless/airo.c | 2 +-
> drivers/net/wireless/ath/ath5k/pci.c | 2 +-
> drivers/net/wireless/atmel_pci.c | 2 +-
> drivers/net/wireless/b43/pcmcia.c | 2 +-
> drivers/net/wireless/b43/sdio.c | 2 +-
> drivers/net/wireless/ipw2x00/ipw2100.c | 2 +-
> drivers/net/wireless/ipw2x00/ipw2200.c | 2 +-
> drivers/net/wireless/iwlegacy/3945-mac.c | 2 +-
> drivers/net/wireless/iwlegacy/4965-mac.c | 2 +-
> drivers/net/wireless/iwlwifi/pcie/drv.c | 2 +-
> drivers/net/wireless/libertas/if_spi.c | 2 +-
> drivers/net/wireless/mwl8k.c | 4 ++--
> drivers/net/wireless/orinoco/orinoco_nortel.c | 2 +-
> drivers/net/wireless/orinoco/orinoco_pci.c | 2 +-
> drivers/net/wireless/orinoco/orinoco_plx.c | 2 +-
> drivers/net/wireless/orinoco/orinoco_tmd.c | 2 +-
> drivers/net/wireless/p54/p54pci.c | 2 +-
> drivers/net/wireless/p54/p54spi.c | 2 +-
> drivers/net/wireless/p54/p54usb.c | 2 +-
> drivers/net/wireless/rtl818x/rtl8180/dev.c | 2 +-
> drivers/net/wireless/rtl818x/rtl8187/dev.c | 2 +-
> drivers/net/wireless/ti/wl1251/sdio.c | 2 +-
> drivers/net/wireless/ti/wl1251/spi.c | 2 +-
> drivers/net/wireless/ti/wlcore/main.c | 2 +-
> drivers/net/wireless/ti/wlcore/sdio.c | 2 +-
> drivers/net/wireless/ti/wlcore/spi.c | 2 +-
> drivers/net/wireless/ti/wlcore/wlcore.h | 2 +-
> drivers/net/xen-netfront.c | 2 +-
> 73 files changed, 85 insertions(+), 85 deletions(-)
>
> diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
> index e80f04b..cbc44f5 100644
> --- a/drivers/net/arcnet/com20020-pci.c
> +++ b/drivers/net/arcnet/com20020-pci.c
> @@ -135,7 +135,7 @@ out_dev:
> return err;
> }
>
> -static void __devexit com20020pci_remove(struct pci_dev *pdev)
> +static void com20020pci_remove(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
> unregister_netdev(dev);
> diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
> index da807f3..e3c4c22 100644
> --- a/drivers/net/can/at91_can.c
> +++ b/drivers/net/can/at91_can.c
> @@ -1338,7 +1338,7 @@ static int at91_can_probe(struct platform_device *pdev)
> return err;
> }
>
> -static int __devexit at91_can_remove(struct platform_device *pdev)
> +static int at91_can_remove(struct platform_device *pdev)
> {
> struct net_device *dev = platform_get_drvdata(pdev);
> struct at91_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c
> index 16515e3..6918334 100644
> --- a/drivers/net/can/bfin_can.c
> +++ b/drivers/net/can/bfin_can.c
> @@ -611,7 +611,7 @@ exit:
> return err;
> }
>
> -static int __devexit bfin_can_remove(struct platform_device *pdev)
> +static int bfin_can_remove(struct platform_device *pdev)
> {
> struct net_device *dev = dev_get_drvdata(&pdev->dev);
> struct bfin_can_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
> index 27db0f2..a1f2631 100644
> --- a/drivers/net/can/c_can/c_can_pci.c
> +++ b/drivers/net/can/c_can/c_can_pci.c
> @@ -174,7 +174,7 @@ out:
> return ret;
> }
>
> -static void __devexit c_can_pci_remove(struct pci_dev *pdev)
> +static void c_can_pci_remove(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
> struct c_can_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
> index 91e7d2b..f133951 100644
> --- a/drivers/net/can/c_can/c_can_platform.c
> +++ b/drivers/net/can/c_can/c_can_platform.c
> @@ -220,7 +220,7 @@ exit:
> return ret;
> }
>
> -static int __devexit c_can_plat_remove(struct platform_device *pdev)
> +static int c_can_plat_remove(struct platform_device *pdev)
> {
> struct net_device *dev = platform_get_drvdata(pdev);
> struct c_can_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/cc770/cc770_isa.c b/drivers/net/can/cc770/cc770_isa.c
> index bed9d19..8eaaac8 100644
> --- a/drivers/net/can/cc770/cc770_isa.c
> +++ b/drivers/net/can/cc770/cc770_isa.c
> @@ -291,7 +291,7 @@ static int cc770_isa_probe(struct platform_device *pdev)
> return err;
> }
>
> -static int __devexit cc770_isa_remove(struct platform_device *pdev)
> +static int cc770_isa_remove(struct platform_device *pdev)
> {
> struct net_device *dev = dev_get_drvdata(&pdev->dev);
> struct cc770_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
> index caf4d70..4af9f4e 100644
> --- a/drivers/net/can/cc770/cc770_platform.c
> +++ b/drivers/net/can/cc770/cc770_platform.c
> @@ -237,7 +237,7 @@ exit_release_mem:
> return err;
> }
>
> -static int __devexit cc770_platform_remove(struct platform_device *pdev)
> +static int cc770_platform_remove(struct platform_device *pdev)
> {
> struct net_device *dev = dev_get_drvdata(&pdev->dev);
> struct cc770_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index dd3c933..dc31c78 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -968,7 +968,7 @@ static int register_flexcandev(struct net_device *dev)
> return err;
> }
>
> -static void __devexit unregister_flexcandev(struct net_device *dev)
> +static void unregister_flexcandev(struct net_device *dev)
> {
> unregister_candev(dev);
> }
> @@ -1107,7 +1107,7 @@ static int flexcan_probe(struct platform_device *pdev)
> return err;
> }
>
> -static int __devexit flexcan_remove(struct platform_device *pdev)
> +static int flexcan_remove(struct platform_device *pdev)
> {
> struct net_device *dev = platform_get_drvdata(pdev);
> struct flexcan_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
> index 6eb1916..e7d69a4 100644
> --- a/drivers/net/can/janz-ican3.c
> +++ b/drivers/net/can/janz-ican3.c
> @@ -642,7 +642,7 @@ static int ican3_msg_connect(struct ican3_dev *mod)
> return ican3_send_msg(mod, &msg);
> }
>
> -static int __devexit ican3_msg_disconnect(struct ican3_dev *mod)
> +static int ican3_msg_disconnect(struct ican3_dev *mod)
> {
> struct ican3_msg msg;
>
> @@ -1421,7 +1421,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
> return -ETIMEDOUT;
> }
>
> -static void __devexit ican3_shutdown_module(struct ican3_dev *mod)
> +static void ican3_shutdown_module(struct ican3_dev *mod)
> {
> ican3_msg_disconnect(mod);
> ican3_reset_module(mod);
> @@ -1898,7 +1898,7 @@ out_return:
> return ret;
> }
>
> -static int __devexit ican3_remove(struct platform_device *pdev)
> +static int ican3_remove(struct platform_device *pdev)
> {
> struct net_device *ndev = platform_get_drvdata(pdev);
> struct ican3_dev *mod = netdev_priv(ndev);
> diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
> index 767fdbd..5eaf47b 100644
> --- a/drivers/net/can/mcp251x.c
> +++ b/drivers/net/can/mcp251x.c
> @@ -1100,7 +1100,7 @@ error_out:
> return ret;
> }
>
> -static int __devexit mcp251x_can_remove(struct spi_device *spi)
> +static int mcp251x_can_remove(struct spi_device *spi)
> {
> struct mcp251x_platform_data *pdata = spi->dev.platform_data;
> struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
> diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
> index 508cbad..12e130a 100644
> --- a/drivers/net/can/mscan/mpc5xxx_can.c
> +++ b/drivers/net/can/mscan/mpc5xxx_can.c
> @@ -323,7 +323,7 @@ exit_unmap_mem:
> return err;
> }
>
> -static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev)
> +static int mpc5xxx_can_remove(struct platform_device *ofdev)
> {
> struct net_device *dev = dev_get_drvdata(&ofdev->dev);
> struct mscan_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
> index fad4625..7d17485 100644
> --- a/drivers/net/can/pch_can.c
> +++ b/drivers/net/can/pch_can.c
> @@ -954,7 +954,7 @@ static const struct net_device_ops pch_can_netdev_ops = {
> .ndo_start_xmit = pch_xmit,
> };
>
> -static void __devexit pch_can_remove(struct pci_dev *pdev)
> +static void pch_can_remove(struct pci_dev *pdev)
> {
> struct net_device *ndev = pci_get_drvdata(pdev);
> struct pch_can_priv *priv = netdev_priv(ndev);
> diff --git a/drivers/net/can/sja1000/kvaser_pci.c b/drivers/net/can/sja1000/kvaser_pci.c
> index a6191ac..4efdaf2 100644
> --- a/drivers/net/can/sja1000/kvaser_pci.c
> +++ b/drivers/net/can/sja1000/kvaser_pci.c
> @@ -379,7 +379,7 @@ failure:
>
> }
>
> -static void __devexit kvaser_pci_remove_one(struct pci_dev *pdev)
> +static void kvaser_pci_remove_one(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
>
> diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
> index fbf61cf..3faeb3d 100644
> --- a/drivers/net/can/sja1000/peak_pci.c
> +++ b/drivers/net/can/sja1000/peak_pci.c
> @@ -717,7 +717,7 @@ failure_disable_pci:
> return err;
> }
>
> -static void __devexit peak_pci_remove(struct pci_dev *pdev)
> +static void peak_pci_remove(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev); /* Last device */
> struct sja1000_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/sja1000/sja1000_isa.c b/drivers/net/can/sja1000/sja1000_isa.c
> index a872f24..5c8da46 100644
> --- a/drivers/net/can/sja1000/sja1000_isa.c
> +++ b/drivers/net/can/sja1000/sja1000_isa.c
> @@ -223,7 +223,7 @@ static int sja1000_isa_probe(struct platform_device *pdev)
> return err;
> }
>
> -static int __devexit sja1000_isa_remove(struct platform_device *pdev)
> +static int sja1000_isa_remove(struct platform_device *pdev)
> {
> struct net_device *dev = dev_get_drvdata(&pdev->dev);
> struct sja1000_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
> index 1ca0ee1..a7b0152 100644
> --- a/drivers/net/can/sja1000/sja1000_of_platform.c
> +++ b/drivers/net/can/sja1000/sja1000_of_platform.c
> @@ -68,7 +68,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
> out_8(priv->reg_base + reg, val);
> }
>
> -static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)
> +static int sja1000_ofp_remove(struct platform_device *ofdev)
> {
> struct net_device *dev = dev_get_drvdata(&ofdev->dev);
> struct sja1000_priv *priv = netdev_priv(dev);
> diff --git a/drivers/net/can/sja1000/tscan1.c b/drivers/net/can/sja1000/tscan1.c
> index 6a6db7e..76513dd 100644
> --- a/drivers/net/can/sja1000/tscan1.c
> +++ b/drivers/net/can/sja1000/tscan1.c
> @@ -171,7 +171,7 @@ static int tscan1_probe(struct device *dev, unsigned id)
> return -ENXIO;
> }
>
> -static int __devexit tscan1_remove(struct device *dev, unsigned id /*unused*/)
> +static int tscan1_remove(struct device *dev, unsigned id /*unused*/)
> {
> struct net_device *netdev;
> struct sja1000_priv *priv;
> diff --git a/drivers/net/can/softing/softing_cs.c b/drivers/net/can/softing/softing_cs.c
> index 04e1539..ce18ba5 100644
> --- a/drivers/net/can/softing/softing_cs.c
> +++ b/drivers/net/can/softing/softing_cs.c
> @@ -215,7 +215,7 @@ static int softingcs_probe_config(struct pcmcia_device *pcmcia,
> return pcmcia_request_window(pcmcia, pres, memspeed);
> }
>
> -static __devexit void softingcs_remove(struct pcmcia_device *pcmcia)
> +static void softingcs_remove(struct pcmcia_device *pcmcia)
> {
> struct platform_device *pdev = pcmcia->priv;
>
> diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c
> index aefd297..50b1e0f 100644
> --- a/drivers/net/can/softing/softing_main.c
> +++ b/drivers/net/can/softing/softing_main.c
> @@ -745,7 +745,7 @@ static const struct attribute_group softing_pdev_group = {
> /*
> * platform driver
> */
> -static __devexit int softing_pdev_remove(struct platform_device *pdev)
> +static int softing_pdev_remove(struct platform_device *pdev)
> {
> struct softing *card = platform_get_drvdata(pdev);
> int j;
> diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
> index 80ee814..b5e1683 100644
> --- a/drivers/net/can/ti_hecc.c
> +++ b/drivers/net/can/ti_hecc.c
> @@ -978,7 +978,7 @@ probe_exit:
> return err;
> }
>
> -static int __devexit ti_hecc_remove(struct platform_device *pdev)
> +static int ti_hecc_remove(struct platform_device *pdev)
> {
> struct resource *res;
> struct net_device *ndev = platform_get_drvdata(pdev);
> diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
> index fd58f0b..3c8aab7 100644
> --- a/drivers/net/fddi/defxx.c
> +++ b/drivers/net/fddi/defxx.c
> @@ -809,7 +809,7 @@ static void dfx_bus_init(struct net_device *dev)
> * Interrupts are disabled at the adapter bus-specific logic.
> */
>
> -static void __devexit dfx_bus_uninit(struct net_device *dev)
> +static void dfx_bus_uninit(struct net_device *dev)
> {
> DFX_board_t *bp = netdev_priv(dev);
> struct device *bdev = bp->bus_dev;
> @@ -3579,7 +3579,7 @@ static void dfx_xmt_flush( DFX_board_t *bp )
> * Device structures for FDDI adapters (fddi0, fddi1, etc) are
> * freed.
> */
> -static void __devexit dfx_unregister(struct device *bdev)
> +static void dfx_unregister(struct device *bdev)
> {
> struct net_device *dev = dev_get_drvdata(bdev);
> DFX_board_t *bp = netdev_priv(dev);
> @@ -3620,12 +3620,12 @@ static void __devexit dfx_unregister(struct device *bdev)
>
>
> static int __maybe_unused dfx_dev_register(struct device *);
> -static int __devexit __maybe_unused dfx_dev_unregister(struct device *);
> +static int __maybe_unused dfx_dev_unregister(struct device *);
>
> #ifdef CONFIG_PCI
> static int dfx_pci_register(struct pci_dev *,
> const struct pci_device_id *);
> -static void __devexit dfx_pci_unregister(struct pci_dev *);
> +static void dfx_pci_unregister(struct pci_dev *);
>
> static DEFINE_PCI_DEVICE_TABLE(dfx_pci_table) = {
> { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_FDDI) },
> @@ -3646,7 +3646,7 @@ static int dfx_pci_register(struct pci_dev *pdev,
> return dfx_register(&pdev->dev);
> }
>
> -static void __devexit dfx_pci_unregister(struct pci_dev *pdev)
> +static void dfx_pci_unregister(struct pci_dev *pdev)
> {
> dfx_unregister(&pdev->dev);
> }
> @@ -3704,7 +3704,7 @@ static int __maybe_unused dfx_dev_register(struct device *dev)
> return status;
> }
>
> -static int __devexit __maybe_unused dfx_dev_unregister(struct device *dev)
> +static int __maybe_unused dfx_dev_unregister(struct device *dev)
> {
> put_device(dev);
> dfx_unregister(dev);
> @@ -3724,7 +3724,7 @@ static int dfx_init(void)
> return status;
> }
>
> -static void __devexit dfx_cleanup(void)
> +static void dfx_cleanup(void)
> {
> tc_unregister_driver(&dfx_tc_driver);
> eisa_driver_unregister(&dfx_eisa_driver);
> diff --git a/drivers/net/fddi/skfp/skfddi.c b/drivers/net/fddi/skfp/skfddi.c
> index cbabb74..d5bd563 100644
> --- a/drivers/net/fddi/skfp/skfddi.c
> +++ b/drivers/net/fddi/skfp/skfddi.c
> @@ -321,7 +321,7 @@ err_out1:
> /*
> * Called for each adapter board from pci_unregister_driver
> */
> -static void __devexit skfp_remove_one(struct pci_dev *pdev)
> +static void skfp_remove_one(struct pci_dev *pdev)
> {
> struct net_device *p = pci_get_drvdata(pdev);
> struct s_smc *lp = netdev_priv(p);
> diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
> index 12b7ff9..6be95ed 100644
> --- a/drivers/net/hippi/rrunner.c
> +++ b/drivers/net/hippi/rrunner.c
> @@ -221,7 +221,7 @@ static int rr_init_one(struct pci_dev *pdev,
> return ret;
> }
>
> -static void __devexit rr_remove_one (struct pci_dev *pdev)
> +static void rr_remove_one (struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
> struct rr_private *rr = netdev_priv(dev);
> diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
> index 1198c6b..a4a62e1 100644
> --- a/drivers/net/ieee802154/at86rf230.c
> +++ b/drivers/net/ieee802154/at86rf230.c
> @@ -920,7 +920,7 @@ err_fill:
> return rc;
> }
>
> -static int __devexit at86rf230_remove(struct spi_device *spi)
> +static int at86rf230_remove(struct spi_device *spi)
> {
> struct at86rf230_local *lp = spi_get_drvdata(spi);
>
> diff --git a/drivers/net/ieee802154/fakehard.c b/drivers/net/ieee802154/fakehard.c
> index fd0438c..1e9cb0b 100644
> --- a/drivers/net/ieee802154/fakehard.c
> +++ b/drivers/net/ieee802154/fakehard.c
> @@ -412,7 +412,7 @@ out:
> return err;
> }
>
> -static int __devexit ieee802154fake_remove(struct platform_device *pdev)
> +static int ieee802154fake_remove(struct platform_device *pdev)
> {
> struct net_device *dev = platform_get_drvdata(pdev);
> unregister_netdev(dev);
> diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c
> index e4b0e38..b8d2217 100644
> --- a/drivers/net/ieee802154/fakelb.c
> +++ b/drivers/net/ieee802154/fakelb.c
> @@ -253,7 +253,7 @@ err_alloc:
> return err;
> }
>
> -static int __devexit fakelb_remove(struct platform_device *pdev)
> +static int fakelb_remove(struct platform_device *pdev)
> {
> struct fakelb_priv *priv = platform_get_drvdata(pdev);
> struct fakelb_dev_priv *dp, *temp;
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index ef41051..3f2c7aa 100644
> --- a/drivers/net/ieee802154/mrf24j40.c
> +++ b/drivers/net/ieee802154/mrf24j40.c
> @@ -711,7 +711,7 @@ err_devrec:
> return ret;
> }
>
> -static int __devexit mrf24j40_remove(struct spi_device *spi)
> +static int mrf24j40_remove(struct spi_device *spi)
> {
> struct mrf24j40 *devrec = dev_get_drvdata(&spi->dev);
>
> diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
> index 7843f50..b5151e4 100644
> --- a/drivers/net/irda/au1k_ir.c
> +++ b/drivers/net/irda/au1k_ir.c
> @@ -921,7 +921,7 @@ out:
> return err;
> }
>
> -static int __devexit au1k_irda_remove(struct platform_device *pdev)
> +static int au1k_irda_remove(struct platform_device *pdev)
> {
> struct net_device *dev = platform_get_drvdata(pdev);
> struct au1k_private *aup = netdev_priv(dev);
> diff --git a/drivers/net/irda/bfin_sir.c b/drivers/net/irda/bfin_sir.c
> index 98c903f..fed4a05 100644
> --- a/drivers/net/irda/bfin_sir.c
> +++ b/drivers/net/irda/bfin_sir.c
> @@ -775,7 +775,7 @@ err_mem_0:
> return err;
> }
>
> -static int __devexit bfin_sir_remove(struct platform_device *pdev)
> +static int bfin_sir_remove(struct platform_device *pdev)
> {
> struct bfin_sir_port *sir_port;
> struct net_device *dev = NULL;
> diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
> index 2d3f3e6..9448587 100644
> --- a/drivers/net/irda/sh_irda.c
> +++ b/drivers/net/irda/sh_irda.c
> @@ -825,7 +825,7 @@ exit:
> return err;
> }
>
> -static int __devexit sh_irda_remove(struct platform_device *pdev)
> +static int sh_irda_remove(struct platform_device *pdev)
> {
> struct net_device *ndev = platform_get_drvdata(pdev);
> struct sh_irda_self *self = netdev_priv(ndev);
> diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
> index 150b56c..24aefcd 100644
> --- a/drivers/net/irda/sh_sir.c
> +++ b/drivers/net/irda/sh_sir.c
> @@ -783,7 +783,7 @@ exit:
> return err;
> }
>
> -static int __devexit sh_sir_remove(struct platform_device *pdev)
> +static int sh_sir_remove(struct platform_device *pdev)
> {
> struct net_device *ndev = platform_get_drvdata(pdev);
> struct sh_sir_self *self = netdev_priv(ndev);
> diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
> index d678f52..5488247 100644
> --- a/drivers/net/irda/via-ircc.c
> +++ b/drivers/net/irda/via-ircc.c
> @@ -103,7 +103,7 @@ static void hwreset(struct via_ircc_cb *self);
> static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase);
> static int upload_rxdata(struct via_ircc_cb *self, int iobase);
> static int via_init_one (struct pci_dev *pcidev, const struct pci_device_id *id);
> -static void __devexit via_remove_one (struct pci_dev *pdev);
> +static void via_remove_one (struct pci_dev *pdev);
>
> /* FIXME : Should use udelay() instead, even if we are x86 only - Jean II */
> static void iodelay(int udelay)
> @@ -424,7 +424,7 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t * info,
> * Close driver instance
> *
> */
> -static void __devexit via_remove_one(struct pci_dev *pdev)
> +static void via_remove_one(struct pci_dev *pdev)
> {
> struct via_ircc_cb *self = pci_get_drvdata(pdev);
> int iobase;
> diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
> index e255b65..2f99f88 100644
> --- a/drivers/net/irda/vlsi_ir.c
> +++ b/drivers/net/irda/vlsi_ir.c
> @@ -1699,7 +1699,7 @@ out:
> return -ENODEV;
> }
>
> -static void __devexit vlsi_irda_remove(struct pci_dev *pdev)
> +static void vlsi_irda_remove(struct pci_dev *pdev)
> {
> struct net_device *ndev = pci_get_drvdata(pdev);
> vlsi_irda_dev_t *idev;
> diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
> index bf30b1d..6b2fdb8 100644
> --- a/drivers/net/phy/mdio-gpio.c
> +++ b/drivers/net/phy/mdio-gpio.c
> @@ -173,7 +173,7 @@ static void mdio_gpio_bus_deinit(struct device *dev)
> kfree(bitbang);
> }
>
> -static void __devexit mdio_gpio_bus_destroy(struct device *dev)
> +static void mdio_gpio_bus_destroy(struct device *dev)
> {
> struct mii_bus *bus = dev_get_drvdata(dev);
>
> @@ -210,7 +210,7 @@ static int mdio_gpio_probe(struct platform_device *pdev)
> return ret;
> }
>
> -static int __devexit mdio_gpio_remove(struct platform_device *pdev)
> +static int mdio_gpio_remove(struct platform_device *pdev)
> {
> mdio_gpio_bus_destroy(&pdev->dev);
>
> diff --git a/drivers/net/phy/mdio-mux-gpio.c b/drivers/net/phy/mdio-mux-gpio.c
> index 23ee064..0c9accb 100644
> --- a/drivers/net/phy/mdio-mux-gpio.c
> +++ b/drivers/net/phy/mdio-mux-gpio.c
> @@ -104,7 +104,7 @@ err:
> return r;
> }
>
> -static int __devexit mdio_mux_gpio_remove(struct platform_device *pdev)
> +static int mdio_mux_gpio_remove(struct platform_device *pdev)
> {
> struct mdio_mux_gpio_state *s = pdev->dev.platform_data;
> mdio_mux_uninit(s->mux_handle);
> diff --git a/drivers/net/phy/mdio-mux-mmioreg.c b/drivers/net/phy/mdio-mux-mmioreg.c
> index a38951f..9733bd2 100644
> --- a/drivers/net/phy/mdio-mux-mmioreg.c
> +++ b/drivers/net/phy/mdio-mux-mmioreg.c
> @@ -137,7 +137,7 @@ static int mdio_mux_mmioreg_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static int __devexit mdio_mux_mmioreg_remove(struct platform_device *pdev)
> +static int mdio_mux_mmioreg_remove(struct platform_device *pdev)
> {
> struct mdio_mux_mmioreg_state *s = dev_get_platdata(&pdev->dev);
>
> diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
> index 7a07985..09297fe 100644
> --- a/drivers/net/phy/mdio-octeon.c
> +++ b/drivers/net/phy/mdio-octeon.c
> @@ -159,7 +159,7 @@ fail:
> return err;
> }
>
> -static int __devexit octeon_mdiobus_remove(struct platform_device *pdev)
> +static int octeon_mdiobus_remove(struct platform_device *pdev)
> {
> struct octeon_mdiobus *bus;
> union cvmx_smix_en smi_en;
> diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
> index 1321c99..41eb8ff 100644
> --- a/drivers/net/phy/spi_ks8995.c
> +++ b/drivers/net/phy/spi_ks8995.c
> @@ -332,7 +332,7 @@ err_drvdata:
> return err;
> }
>
> -static int __devexit ks8995_remove(struct spi_device *spi)
> +static int ks8995_remove(struct spi_device *spi)
> {
> struct ks8995_data *ks8995;
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index b0c1630..c5f0ed2 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1195,7 +1195,7 @@ static void remove_vq_common(struct virtnet_info *vi)
> __free_pages(get_a_page(vi, GFP_KERNEL), 0);
> }
>
> -static void __devexit virtnet_remove(struct virtio_device *vdev)
> +static void virtnet_remove(struct virtio_device *vdev)
> {
> struct virtnet_info *vi = vdev->priv;
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> index ac322e5..71b762f 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -3096,7 +3096,7 @@ err_alloc_shared:
> }
>
>
> -static void __devexit
> +static void
> vmxnet3_remove_device(struct pci_dev *pdev)
> {
> struct net_device *netdev = pci_get_drvdata(pdev);
> diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
> index 863df17..d502230 100644
> --- a/drivers/net/wan/dscc4.c
> +++ b/drivers/net/wan/dscc4.c
> @@ -1968,7 +1968,7 @@ err_out:
> return -ENOMEM;
> }
>
> -static void __devexit dscc4_remove_one(struct pci_dev *pdev)
> +static void dscc4_remove_one(struct pci_dev *pdev)
> {
> struct dscc4_pci_priv *ppriv;
> struct dscc4_dev_priv *root;
> diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
> index dbbe06e..d7adba4 100644
> --- a/drivers/net/wan/farsync.c
> +++ b/drivers/net/wan/farsync.c
> @@ -2615,7 +2615,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> /*
> * Cleanup and close down a card
> */
> -static void __devexit
> +static void
> fst_remove_one(struct pci_dev *pdev)
> {
> struct fst_card_info *card;
> diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
> index beecbe8..b056691 100644
> --- a/drivers/net/wan/ixp4xx_hss.c
> +++ b/drivers/net/wan/ixp4xx_hss.c
> @@ -1375,7 +1375,7 @@ err_free:
> return err;
> }
>
> -static int __devexit hss_remove_one(struct platform_device *pdev)
> +static int hss_remove_one(struct platform_device *pdev)
> {
> struct port *port = platform_get_drvdata(pdev);
>
> diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
> index 41a401a..0e443fd 100644
> --- a/drivers/net/wan/lmc/lmc_main.c
> +++ b/drivers/net/wan/lmc/lmc_main.c
> @@ -986,7 +986,7 @@ err_req_io:
> /*
> * Called from pci when removing module.
> */
> -static void __devexit lmc_remove_one(struct pci_dev *pdev)
> +static void lmc_remove_one(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
>
> diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
> index bd89a29..3d339e0 100644
> --- a/drivers/net/wireless/adm8211.c
> +++ b/drivers/net/wireless/adm8211.c
> @@ -1935,7 +1935,7 @@ static int adm8211_probe(struct pci_dev *pdev,
> }
>
>
> -static void __devexit adm8211_remove(struct pci_dev *pdev)
> +static void adm8211_remove(struct pci_dev *pdev)
> {
> struct ieee80211_hw *dev = pci_get_drvdata(pdev);
> struct adm8211_priv *priv;
> diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
> index b010f41..5329541 100644
> --- a/drivers/net/wireless/airo.c
> +++ b/drivers/net/wireless/airo.c
> @@ -5606,7 +5606,7 @@ static int airo_pci_probe(struct pci_dev *pdev,
> return 0;
> }
>
> -static void __devexit airo_pci_remove(struct pci_dev *pdev)
> +static void airo_pci_remove(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
>
> diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
> index 1a78ba3..859db7c 100644
> --- a/drivers/net/wireless/ath/ath5k/pci.c
> +++ b/drivers/net/wireless/ath/ath5k/pci.c
> @@ -285,7 +285,7 @@ err:
> return ret;
> }
>
> -static void __devexit
> +static void
> ath5k_pci_remove(struct pci_dev *pdev)
> {
> struct ieee80211_hw *hw = pci_get_drvdata(pdev);
> diff --git a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c
> index 1c12fec..c1b159e 100644
> --- a/drivers/net/wireless/atmel_pci.c
> +++ b/drivers/net/wireless/atmel_pci.c
> @@ -69,7 +69,7 @@ static int atmel_pci_probe(struct pci_dev *pdev,
> return 0;
> }
>
> -static void __devexit atmel_pci_remove(struct pci_dev *pdev)
> +static void atmel_pci_remove(struct pci_dev *pdev)
> {
> stop_atmel_card(pci_get_drvdata(pdev));
> }
> diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
> index 3506cca..f2ea2ce 100644
> --- a/drivers/net/wireless/b43/pcmcia.c
> +++ b/drivers/net/wireless/b43/pcmcia.c
> @@ -110,7 +110,7 @@ out_error:
> return err;
> }
>
> -static void __devexit b43_pcmcia_remove(struct pcmcia_device *dev)
> +static void b43_pcmcia_remove(struct pcmcia_device *dev)
> {
> struct ssb_bus *ssb = dev->priv;
>
> diff --git a/drivers/net/wireless/b43/sdio.c b/drivers/net/wireless/b43/sdio.c
> index d2b1f98..59a5218 100644
> --- a/drivers/net/wireless/b43/sdio.c
> +++ b/drivers/net/wireless/b43/sdio.c
> @@ -171,7 +171,7 @@ out:
> return error;
> }
>
> -static void __devexit b43_sdio_remove(struct sdio_func *func)
> +static void b43_sdio_remove(struct sdio_func *func)
> {
> struct b43_sdio *sdio = sdio_get_drvdata(func);
>
> diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
> index b96c615..7588484 100644
> --- a/drivers/net/wireless/ipw2x00/ipw2100.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2100.c
> @@ -6413,7 +6413,7 @@ out:
> goto out;
> }
>
> -static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
> +static void ipw2100_pci_remove_one(struct pci_dev *pci_dev)
> {
> struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
> struct net_device *dev = priv->net_dev;
> diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
> index 3f099a6..941c6b5 100644
> --- a/drivers/net/wireless/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2200.c
> @@ -11895,7 +11895,7 @@ static int ipw_pci_probe(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit ipw_pci_remove(struct pci_dev *pdev)
> +static void ipw_pci_remove(struct pci_dev *pdev)
> {
> struct ipw_priv *priv = pci_get_drvdata(pdev);
> struct list_head *p, *q;
> diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
> index 88fdd39..d604b40 100644
> --- a/drivers/net/wireless/iwlegacy/3945-mac.c
> +++ b/drivers/net/wireless/iwlegacy/3945-mac.c
> @@ -3794,7 +3794,7 @@ out:
> return err;
> }
>
> -static void __devexit
> +static void
> il3945_pci_remove(struct pci_dev *pdev)
> {
> struct il_priv *il = pci_get_drvdata(pdev);
> diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
> index 14e0a94..569e1ae5 100644
> --- a/drivers/net/wireless/iwlegacy/4965-mac.c
> +++ b/drivers/net/wireless/iwlegacy/4965-mac.c
> @@ -6664,7 +6664,7 @@ out:
> return err;
> }
>
> -static void __devexit
> +static void
> il4965_pci_remove(struct pci_dev *pdev)
> {
> struct il_priv *il = pci_get_drvdata(pdev);
> diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
> index 7cb27af..1f21d60 100644
> --- a/drivers/net/wireless/iwlwifi/pcie/drv.c
> +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
> @@ -294,7 +294,7 @@ out_free_trans:
> return -EFAULT;
> }
>
> -static void __devexit iwl_pci_remove(struct pci_dev *pdev)
> +static void iwl_pci_remove(struct pci_dev *pdev)
> {
> struct iwl_trans *trans = pci_get_drvdata(pdev);
> struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
> diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
> index abc32e3..4bb6574 100644
> --- a/drivers/net/wireless/libertas/if_spi.c
> +++ b/drivers/net/wireless/libertas/if_spi.c
> @@ -1226,7 +1226,7 @@ out:
> return err;
> }
>
> -static int __devexit libertas_spi_remove(struct spi_device *spi)
> +static int libertas_spi_remove(struct spi_device *spi)
> {
> struct if_spi_card *card = spi_get_drvdata(spi);
> struct lbs_private *priv = card->priv;
> diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> index b9f71fd..19cad01 100644
> --- a/drivers/net/wireless/mwl8k.c
> +++ b/drivers/net/wireless/mwl8k.c
> @@ -5872,12 +5872,12 @@ err_disable_device:
> return rc;
> }
>
> -static void __devexit mwl8k_shutdown(struct pci_dev *pdev)
> +static void mwl8k_shutdown(struct pci_dev *pdev)
> {
> printk(KERN_ERR "===>%s(%u)\n", __func__, __LINE__);
> }
>
> -static void __devexit mwl8k_remove(struct pci_dev *pdev)
> +static void mwl8k_remove(struct pci_dev *pdev)
> {
> struct ieee80211_hw *hw = pci_get_drvdata(pdev);
> struct mwl8k_priv *priv;
> diff --git a/drivers/net/wireless/orinoco/orinoco_nortel.c b/drivers/net/wireless/orinoco/orinoco_nortel.c
> index f286540..d73fdf6 100644
> --- a/drivers/net/wireless/orinoco/orinoco_nortel.c
> +++ b/drivers/net/wireless/orinoco/orinoco_nortel.c
> @@ -255,7 +255,7 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit orinoco_nortel_remove_one(struct pci_dev *pdev)
> +static void orinoco_nortel_remove_one(struct pci_dev *pdev)
> {
> struct orinoco_private *priv = pci_get_drvdata(pdev);
> struct orinoco_pci_card *card = priv->card;
> diff --git a/drivers/net/wireless/orinoco/orinoco_pci.c b/drivers/net/wireless/orinoco/orinoco_pci.c
> index bf6d436..677bf14 100644
> --- a/drivers/net/wireless/orinoco/orinoco_pci.c
> +++ b/drivers/net/wireless/orinoco/orinoco_pci.c
> @@ -199,7 +199,7 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit orinoco_pci_remove_one(struct pci_dev *pdev)
> +static void orinoco_pci_remove_one(struct pci_dev *pdev)
> {
> struct orinoco_private *priv = pci_get_drvdata(pdev);
>
> diff --git a/drivers/net/wireless/orinoco/orinoco_plx.c b/drivers/net/wireless/orinoco/orinoco_plx.c
> index 63a614f..2559dbd 100644
> --- a/drivers/net/wireless/orinoco/orinoco_plx.c
> +++ b/drivers/net/wireless/orinoco/orinoco_plx.c
> @@ -294,7 +294,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev)
> +static void orinoco_plx_remove_one(struct pci_dev *pdev)
> {
> struct orinoco_private *priv = pci_get_drvdata(pdev);
> struct orinoco_pci_card *card = priv->card;
> diff --git a/drivers/net/wireless/orinoco/orinoco_tmd.c b/drivers/net/wireless/orinoco/orinoco_tmd.c
> index f67f43e..42afeee 100644
> --- a/drivers/net/wireless/orinoco/orinoco_tmd.c
> +++ b/drivers/net/wireless/orinoco/orinoco_tmd.c
> @@ -188,7 +188,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev)
> +static void orinoco_tmd_remove_one(struct pci_dev *pdev)
> {
> struct orinoco_private *priv = pci_get_drvdata(pdev);
> struct orinoco_pci_card *card = priv->card;
> diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
> index e5b29e9..04eb0ed 100644
> --- a/drivers/net/wireless/p54/p54pci.c
> +++ b/drivers/net/wireless/p54/p54pci.c
> @@ -639,7 +639,7 @@ static int p54p_probe(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit p54p_remove(struct pci_dev *pdev)
> +static void p54p_remove(struct pci_dev *pdev)
> {
> struct ieee80211_hw *dev = pci_get_drvdata(pdev);
> struct p54p_priv *priv;
> diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
> index d75ab3e..4fd49a0 100644
> --- a/drivers/net/wireless/p54/p54spi.c
> +++ b/drivers/net/wireless/p54/p54spi.c
> @@ -683,7 +683,7 @@ err_free:
> return ret;
> }
>
> -static int __devexit p54spi_remove(struct spi_device *spi)
> +static int p54spi_remove(struct spi_device *spi)
> {
> struct p54s_priv *priv = dev_get_drvdata(&spi->dev);
>
> diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
> index 000f7ba..e71c702 100644
> --- a/drivers/net/wireless/p54/p54usb.c
> +++ b/drivers/net/wireless/p54/p54usb.c
> @@ -1057,7 +1057,7 @@ static int p54u_probe(struct usb_interface *intf,
> return err;
> }
>
> -static void __devexit p54u_disconnect(struct usb_interface *intf)
> +static void p54u_disconnect(struct usb_interface *intf)
> {
> struct ieee80211_hw *dev = usb_get_intfdata(intf);
> struct p54u_priv *priv;
> diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
> index 6a5c0b8..4af3f91 100644
> --- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
> +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
> @@ -1131,7 +1131,7 @@ static int rtl8180_probe(struct pci_dev *pdev,
> return err;
> }
>
> -static void __devexit rtl8180_remove(struct pci_dev *pdev)
> +static void rtl8180_remove(struct pci_dev *pdev)
> {
> struct ieee80211_hw *dev = pci_get_drvdata(pdev);
> struct rtl8180_priv *priv;
> diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
> index f879bc3..be36935 100644
> --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
> +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
> @@ -1639,7 +1639,7 @@ static int rtl8187_probe(struct usb_interface *intf,
> return err;
> }
>
> -static void __devexit rtl8187_disconnect(struct usb_interface *intf)
> +static void rtl8187_disconnect(struct usb_interface *intf)
> {
> struct ieee80211_hw *dev = usb_get_intfdata(intf);
> struct rtl8187_priv *priv;
> diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
> index e3f287f..e57ee48 100644
> --- a/drivers/net/wireless/ti/wl1251/sdio.c
> +++ b/drivers/net/wireless/ti/wl1251/sdio.c
> @@ -305,7 +305,7 @@ out_free_hw:
> return ret;
> }
>
> -static void __devexit wl1251_sdio_remove(struct sdio_func *func)
> +static void wl1251_sdio_remove(struct sdio_func *func)
> {
> struct wl1251 *wl = sdio_get_drvdata(func);
> struct wl1251_sdio *wl_sdio = wl->if_priv;
> diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
> index 640a3d5..3b266d3 100644
> --- a/drivers/net/wireless/ti/wl1251/spi.c
> +++ b/drivers/net/wireless/ti/wl1251/spi.c
> @@ -309,7 +309,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
> return ret;
> }
>
> -static int __devexit wl1251_spi_remove(struct spi_device *spi)
> +static int wl1251_spi_remove(struct spi_device *spi)
> {
> struct wl1251 *wl = dev_get_drvdata(&spi->dev);
>
> diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
> index 2dd4ada..dd38f61 100644
> --- a/drivers/net/wireless/ti/wlcore/main.c
> +++ b/drivers/net/wireless/ti/wlcore/main.c
> @@ -5682,7 +5682,7 @@ int wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
> }
> EXPORT_SYMBOL_GPL(wlcore_probe);
>
> -int __devexit wlcore_remove(struct platform_device *pdev)
> +int wlcore_remove(struct platform_device *pdev)
> {
> struct wl1271 *wl = platform_get_drvdata(pdev);
>
> diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
> index 7bf612c..646f703 100644
> --- a/drivers/net/wireless/ti/wlcore/sdio.c
> +++ b/drivers/net/wireless/ti/wlcore/sdio.c
> @@ -319,7 +319,7 @@ out:
> return ret;
> }
>
> -static void __devexit wl1271_remove(struct sdio_func *func)
> +static void wl1271_remove(struct sdio_func *func)
> {
> struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
>
> diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
> index ee39484..f06f477 100644
> --- a/drivers/net/wireless/ti/wlcore/spi.c
> +++ b/drivers/net/wireless/ti/wlcore/spi.c
> @@ -403,7 +403,7 @@ out:
> return ret;
> }
>
> -static int __devexit wl1271_remove(struct spi_device *spi)
> +static int wl1271_remove(struct spi_device *spi)
> {
> struct wl12xx_spi_glue *glue = spi_get_drvdata(spi);
>
> diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
> index adc6152..c388493 100644
> --- a/drivers/net/wireless/ti/wlcore/wlcore.h
> +++ b/drivers/net/wireless/ti/wlcore/wlcore.h
> @@ -415,7 +415,7 @@ struct wl1271 {
> };
>
> int wlcore_probe(struct wl1271 *wl, struct platform_device *pdev);
> -int __devexit wlcore_remove(struct platform_device *pdev);
> +int wlcore_remove(struct platform_device *pdev);
> struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size);
> int wlcore_free_hw(struct wl1271 *wl);
> int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index 6f695fc..b31198c 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -1911,7 +1911,7 @@ static const struct xenbus_device_id netfront_ids[] = {
> };
>
>
> -static int __devexit xennet_remove(struct xenbus_device *dev)
> +static int xennet_remove(struct xenbus_device *dev)
> {
> struct netfront_info *info = dev_get_drvdata(&dev->dev);
>
>
^ permalink raw reply
* Re: [PATCH] vhost-blk: Add vhost-blk support v5
From: Michael S. Tsirkin @ 2012-11-19 20:26 UTC (permalink / raw)
To: Asias He; +Cc: axboe, kvm, linux-kernel, virtualization, Christoph Hellwig
In-Reply-To: <1353315222-27685-1-git-send-email-asias@redhat.com>
On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote:
> vhost-blk is an in-kernel virito-blk device accelerator.
>
> Due to lack of proper in-kernel AIO interface, this version converts
> guest's I/O request to bio and use submit_bio() to submit I/O directly.
> So this version any supports raw block device as guest's disk image,
> e.g. /dev/sda, /dev/ram0. We can add file based image support to
> vhost-blk once we have in-kernel AIO interface. There are some work in
> progress for in-kernel AIO interface from Dave Kleikamp and Zach Brown:
>
> http://marc.info/?l=linux-fsdevel&m=133312234313122
>
> Performance evaluation:
> -----------------------------
> 1) LKVM
> Fio with libaio ioengine on Fusion IO device using kvm tool
> IOPS(k) Before After Improvement
> seq-read 107 121 +13.0%
> seq-write 130 179 +37.6%
> rnd-read 102 122 +19.6%
> rnd-write 125 159 +27.0%
>
> 2) QEMU
> Fio with libaio ioengine on Fusion IO device using QEMU
> IOPS(k) Before After Improvement
> seq-read 76 123 +61.8%
> seq-write 139 173 +24.4%
> rnd-read 73 120 +64.3%
> rnd-write 75 156 +108.0%
Could you compare with dataplane qemu as well please?
>
> Userspace bits:
> -----------------------------
> 1) LKVM
> The latest vhost-blk userspace bits for kvm tool can be found here:
> git@github.com:asias/linux-kvm.git blk.vhost-blk
>
> 2) QEMU
> The latest vhost-blk userspace prototype for QEMU can be found here:
> git@github.com:asias/qemu.git blk.vhost-blk
>
> Changes in v5:
> - Do not assume the buffer layout
> - Fix wakeup race
>
> Changes in v4:
> - Mark req->status as userspace pointer
> - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status()
> - Add if (need_resched()) schedule() in blk thread
> - Kill vhost_blk_stop_vq() and move it into vhost_blk_stop()
> - Use vq_err() instead of pr_warn()
> - Fail un Unsupported request
> - Add flush in vhost_blk_set_features()
>
> Changes in v3:
> - Sending REQ_FLUSH bio instead of vfs_fsync, thanks Christoph!
> - Check file passed by user is a raw block device file
>
> Signed-off-by: Asias He <asias@redhat.com>
Since there are files shared by this and vhost net
it's easiest for me to merge this all through the
vhost tree.
Jens, could you ack this and the bio usage in this driver
please?
> ---
> drivers/vhost/Kconfig | 1 +
> drivers/vhost/Kconfig.blk | 10 +
> drivers/vhost/Makefile | 2 +
> drivers/vhost/blk.c | 697 ++++++++++++++++++++++++++++++++++++++++++++++
> drivers/vhost/blk.h | 8 +
> 5 files changed, 718 insertions(+)
> create mode 100644 drivers/vhost/Kconfig.blk
> create mode 100644 drivers/vhost/blk.c
> create mode 100644 drivers/vhost/blk.h
>
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> index 202bba6..acd8038 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -11,4 +11,5 @@ config VHOST_NET
>
> if STAGING
> source "drivers/vhost/Kconfig.tcm"
> +source "drivers/vhost/Kconfig.blk"
> endif
> diff --git a/drivers/vhost/Kconfig.blk b/drivers/vhost/Kconfig.blk
> new file mode 100644
> index 0000000..ff8ab76
> --- /dev/null
> +++ b/drivers/vhost/Kconfig.blk
> @@ -0,0 +1,10 @@
> +config VHOST_BLK
> + tristate "Host kernel accelerator for virtio blk (EXPERIMENTAL)"
> + depends on BLOCK && EXPERIMENTAL && m
> + ---help---
> + This kernel module can be loaded in host kernel to accelerate
> + guest block with virtio_blk. Not to be confused with virtio_blk
> + module itself which needs to be loaded in guest kernel.
> +
> + To compile this driver as a module, choose M here: the module will
> + be called vhost_blk.
> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
> index a27b053..1a8a4a5 100644
> --- a/drivers/vhost/Makefile
> +++ b/drivers/vhost/Makefile
> @@ -2,3 +2,5 @@ obj-$(CONFIG_VHOST_NET) += vhost_net.o
> vhost_net-y := vhost.o net.o
>
> obj-$(CONFIG_TCM_VHOST) += tcm_vhost.o
> +obj-$(CONFIG_VHOST_BLK) += vhost_blk.o
> +vhost_blk-y := blk.o
> diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
> new file mode 100644
> index 0000000..f0f118a
> --- /dev/null
> +++ b/drivers/vhost/blk.c
> @@ -0,0 +1,697 @@
> +/*
> + * Copyright (C) 2011 Taobao, Inc.
> + * Author: Liu Yuan <tailai.ly@taobao.com>
> + *
> + * Copyright (C) 2012 Red Hat, Inc.
> + * Author: Asias He <asias@redhat.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.
> + *
> + * virtio-blk server in host kernel.
> + */
> +
> +#include <linux/miscdevice.h>
> +#include <linux/module.h>
> +#include <linux/vhost.h>
> +#include <linux/virtio_blk.h>
> +#include <linux/mutex.h>
> +#include <linux/file.h>
> +#include <linux/kthread.h>
> +#include <linux/blkdev.h>
> +#include <linux/llist.h>
> +
> +#include "vhost.c"
> +#include "vhost.h"
> +#include "blk.h"
> +
> +static DEFINE_IDA(vhost_blk_index_ida);
> +
> +enum {
> + VHOST_BLK_VQ_REQ = 0,
> + VHOST_BLK_VQ_MAX = 1,
> +};
> +
> +struct req_page_list {
> + struct page **pages;
> + int pages_nr;
> +};
> +
> +struct vhost_blk_req {
> + struct llist_node llnode;
> + struct req_page_list *pl;
> + struct vhost_blk *blk;
> +
> + struct iovec *iov;
> + int iov_nr;
> +
> + struct bio **bio;
> + atomic_t bio_nr;
> +
> + struct iovec status[1];
> +
> + sector_t sector;
> + int write;
> + u16 head;
> + long len;
> +};
> +
> +struct vhost_blk {
> + struct task_struct *host_kick;
Could you please add a comment here explaining why
is this better than using the builtin vhost thread?
> + struct iovec iov[UIO_MAXIOV];
> + struct vhost_blk_req *reqs;
> + struct vhost_virtqueue vq;
> + struct llist_head llhead;
> + struct vhost_dev dev;
> + u16 reqs_nr;
> + int index;
> +};
> +
> +static int move_iovec(struct iovec *from, struct iovec *to,
> + size_t len, int iov_count)
> +{
> + int seg = 0;
> + size_t size;
> +
> + while (len && seg < iov_count) {
> + if (from->iov_len == 0) {
> + ++from;
> + continue;
> + }
> + size = min(from->iov_len, len);
> + to->iov_base = from->iov_base;
> + to->iov_len = size;
> + from->iov_len -= size;
> + from->iov_base += size;
> + len -= size;
> + ++from;
> + ++to;
> + ++seg;
> + }
> + return seg;
> +}
> +
> +static inline int iov_num_pages(struct iovec *iov)
> +{
> + return (PAGE_ALIGN((unsigned long)iov->iov_base + iov->iov_len) -
> + ((unsigned long)iov->iov_base & PAGE_MASK)) >> PAGE_SHIFT;
> +}
> +
> +static int vhost_blk_setup(struct vhost_blk *blk)
> +{
> + blk->reqs_nr = blk->vq.num;
> +
> + blk->reqs = kmalloc(sizeof(struct vhost_blk_req) * blk->reqs_nr,
> + GFP_KERNEL);
> + if (!blk->reqs)
> + return -ENOMEM;
> +
> + return 0;
> +}
> +
> +static inline int vhost_blk_set_status(struct vhost_blk_req *req, u8 status)
> +{
> + struct vhost_blk *blk = req->blk;
> + int ret;
> +
> + ret = memcpy_toiovecend(req->status, &status, 0, sizeof(status));
> +
> + if (ret) {
> + vq_err(&blk->vq, "Failed to write status\n");
> + return -EFAULT;
> + }
> +
> + return 0;
> +}
> +
> +static void vhost_blk_enable_vq(struct vhost_blk *blk,
> + struct vhost_virtqueue *vq)
> +{
> + wake_up_process(blk->host_kick);
> +}
> +
> +static void vhost_blk_req_done(struct bio *bio, int err)
> +{
> + struct vhost_blk_req *req = bio->bi_private;
> + struct vhost_blk *blk = req->blk;
> +
> + if (err)
> + req->len = err;
> +
> + if (atomic_dec_and_test(&req->bio_nr)) {
> + llist_add(&req->llnode, &blk->llhead);
> + wake_up_process(blk->host_kick);
> + }
> +
> + bio_put(bio);
> +}
> +
> +static void vhost_blk_req_umap(struct vhost_blk_req *req)
> +{
> + struct req_page_list *pl;
> + int i, j;
> +
> +
> + if (!req->pl) {
> + kfree(req->bio);
> + return;
> + }
> +
> + for (i = 0; i < req->iov_nr; i++) {
> + pl = &req->pl[i];
> + for (j = 0; j < pl->pages_nr; j++) {
> + if (!req->write)
> + set_page_dirty_lock(pl->pages[j]);
> + page_cache_release(pl->pages[j]);
> + }
> + }
> +
> + kfree(req->pl);
> +}
> +
> +static int vhost_blk_bio_make(struct vhost_blk_req *req,
> + struct block_device *bdev)
> +{
> + int pl_len, page_len, bio_len;
> + int pages_nr_total, i, j, ret;
> + struct iovec *iov = req->iov;
> + int iov_nr = req->iov_nr;
> + struct page **pages, *page;
> + struct bio *bio = NULL;
> + int bio_nr = 0;
> + void *buf;
> +
> + pages_nr_total = 0;
> + for (i = 0; i < iov_nr; i++)
> + pages_nr_total += iov_num_pages(&iov[i]);
> +
> + if (unlikely(req->write == WRITE_FLUSH)) {
> + req->pl = NULL;
> + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL);
> + bio = bio_alloc(GFP_KERNEL, 1);
> + if (!bio) {
> + kfree(req->bio);
> + return -ENOMEM;
> + }
> + bio->bi_sector = req->sector;
> + bio->bi_bdev = bdev;
> + bio->bi_private = req;
> + bio->bi_end_io = vhost_blk_req_done;
> + req->bio[bio_nr++] = bio;
> +
> + goto out;
> + }
> +
> + pl_len = iov_nr * sizeof(req->pl[0]);
> + page_len = pages_nr_total * sizeof(struct page *);
> + bio_len = pages_nr_total * sizeof(struct bio *);
> +
> + buf = kmalloc(pl_len + page_len + bio_len, GFP_KERNEL);
> + if (!buf)
> + return -ENOMEM;
> +
> + req->pl = buf;
> + pages = buf + pl_len;
> + req->bio = buf + pl_len + page_len;
> +
> + req->iov_nr = 0;
> + for (i = 0; i < iov_nr; i++) {
> + int pages_nr = iov_num_pages(&iov[i]);
> + unsigned long iov_base, iov_len;
> + struct req_page_list *pl;
> +
> + iov_base = (unsigned long)iov[i].iov_base;
> + iov_len = (unsigned long)iov[i].iov_len;
> +
> + /* TODO: Limit the total number of pages pinned */
What's the plan here? Is there some limit if e.g. aio is used?
> + ret = get_user_pages_fast(iov_base, pages_nr,
> + !req->write, pages);
> + if (ret != pages_nr)
> + goto fail;
> +
> + req->iov_nr++;
> + pl = &req->pl[i];
> + pl->pages_nr = pages_nr;
> + pl->pages = pages;
> +
> + for (j = 0; j < pages_nr; j++) {
> + unsigned int off, len;
> + page = pages[j];
> + off = iov_base & ~PAGE_MASK;
> + len = PAGE_SIZE - off;
> + if (len > iov_len)
> + len = iov_len;
> +
> + while (!bio || bio_add_page(bio, page, len, off) <= 0) {
> + bio = bio_alloc(GFP_KERNEL, pages_nr);
> + if (!bio)
> + goto fail;
> + bio->bi_sector = req->sector;
> + bio->bi_bdev = bdev;
> + bio->bi_private = req;
> + bio->bi_end_io = vhost_blk_req_done;
> + req->bio[bio_nr++] = bio;
> + }
> + req->sector += len >> 9;
> + iov_base += len;
> + iov_len -= len;
> + }
> +
> + pages += pages_nr;
> + }
> +out:
> + atomic_set(&req->bio_nr, bio_nr);
> + return 0;
> +
> +fail:
> + for (i = 0; i < bio_nr; i++)
> + bio_put(req->bio[i]);
> + vhost_blk_req_umap(req);
> + return -ENOMEM;
> +}
> +
> +static inline void vhost_blk_bio_send(struct vhost_blk_req *req)
> +{
> + struct blk_plug plug;
> + int i, bio_nr;
> +
> + bio_nr = atomic_read(&req->bio_nr);
> + blk_start_plug(&plug);
> + for (i = 0; i < bio_nr; i++)
> + submit_bio(req->write, req->bio[i]);
> + blk_finish_plug(&plug);
> +}
> +
> +static int vhost_blk_req_submit(struct vhost_blk_req *req, struct file *file)
> +{
> +
> + struct inode *inode = file->f_mapping->host;
> + struct block_device *bdev = inode->i_bdev;
> + int ret;
> +
> + ret = vhost_blk_bio_make(req, bdev);
> + if (ret < 0)
> + return ret;
> +
> + vhost_blk_bio_send(req);
> +
> + return ret;
> +}
> +
> +static int vhost_blk_req_done_thread(void *data)
> +{
> + mm_segment_t oldfs = get_fs();
> + struct vhost_blk *blk = data;
> + struct vhost_virtqueue *vq;
> + struct llist_node *llnode;
> + struct vhost_blk_req *req;
> + bool added;
> + u8 status;
> + int ret;
> +
> + vq = &blk->vq;
> + set_fs(USER_DS);
> + use_mm(blk->dev.mm);
> + for (;;) {
> + set_current_state(TASK_INTERRUPTIBLE);
> + llnode = llist_del_all(&blk->llhead);
> + if (!llnode) {
> + schedule();
> + if (unlikely(kthread_should_stop()))
> + break;
> + continue;
> + }
> + set_current_state(TASK_RUNNING);
> +
> + if (need_resched())
> + schedule();
> +
> + added = false;
> + while (llnode) {
> + req = llist_entry(llnode, struct vhost_blk_req, llnode);
> + llnode = llist_next(llnode);
> +
> + vhost_blk_req_umap(req);
> +
> + status = req->len > 0 ?
> + VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR;
> + ret = vhost_blk_set_status(req, status);
> + if (unlikely(ret))
> + continue;
> + vhost_add_used(&blk->vq, req->head, req->len);
> + added = true;
> + }
> + if (likely(added))
> + vhost_signal(&blk->dev, &blk->vq);
> + }
> + unuse_mm(blk->dev.mm);
> + set_fs(oldfs);
> + return 0;
> +}
> +
> +static void vhost_blk_flush(struct vhost_blk *blk)
> +{
> + vhost_poll_flush(&blk->vq.poll);
> +}
> +
> +static inline void vhost_blk_stop(struct vhost_blk *blk, struct file **file)
> +{
> + struct vhost_virtqueue *vq = &blk->vq;
> + struct file *f;
> +
> + mutex_lock(&vq->mutex);
> + f = rcu_dereference_protected(vq->private_data,
> + lockdep_is_held(&vq->mutex));
> + rcu_assign_pointer(vq->private_data, NULL);
> + mutex_unlock(&vq->mutex);
> +
> + *file = f;
> +}
> +
> +/* Handle guest request */
> +static int vhost_blk_req_handle(struct vhost_virtqueue *vq,
> + struct virtio_blk_outhdr *hdr,
> + u16 head, u16 out, u16 in,
> + struct file *file)
> +{
> + struct vhost_blk *blk = container_of(vq->dev, struct vhost_blk, dev);
> + unsigned char id[VIRTIO_BLK_ID_BYTES];
> + struct vhost_blk_req *req;
> + int ret, len;
> + u8 status;
> +
> + req = &blk->reqs[head];
> + req->head = head;
> + req->blk = blk;
> + req->sector = hdr->sector;
> + req->iov = blk->iov;
> +
> + req->len = iov_length(vq->iov, out + in) - sizeof(status);
> + req->iov_nr = move_iovec(vq->iov, req->iov, req->len, out + in);
> +
> + move_iovec(vq->iov, req->status, sizeof(status), out + in);
> +
> + switch (hdr->type) {
> + case VIRTIO_BLK_T_OUT:
> + req->write = WRITE;
> + ret = vhost_blk_req_submit(req, file);
> + break;
> + case VIRTIO_BLK_T_IN:
> + req->write = READ;
> + ret = vhost_blk_req_submit(req, file);
> + break;
> + case VIRTIO_BLK_T_FLUSH:
> + req->write = WRITE_FLUSH;
> + ret = vhost_blk_req_submit(req, file);
> + break;
> + case VIRTIO_BLK_T_GET_ID:
> + ret = snprintf(id, VIRTIO_BLK_ID_BYTES,
> + "vhost-blk%d", blk->index);
> + if (ret < 0)
> + break;
> + len = ret;
> + ret = memcpy_toiovecend(req->iov, id, 0, len);
> + status = ret < 0 ? VIRTIO_BLK_S_IOERR : VIRTIO_BLK_S_OK;
> + ret = vhost_blk_set_status(req, status);
> + if (ret)
> + break;
> + vhost_add_used_and_signal(&blk->dev, vq, head, len);
> + break;
> + default:
> + vq_err(vq, "Unsupported request type %d\n", hdr->type);
> + status = VIRTIO_BLK_S_UNSUPP;
> + ret = vhost_blk_set_status(req, status);
> + if (ret)
> + break;
> + vhost_add_used_and_signal(&blk->dev, vq, head, 0);
> + }
> +
> + return ret;
> +}
> +
> +/* Guest kick us for IO request */
> +static void vhost_blk_handle_guest_kick(struct vhost_work *work)
> +{
> + struct virtio_blk_outhdr hdr;
> + struct vhost_virtqueue *vq;
> + struct vhost_blk *blk;
> + int in, out, ret;
> + struct file *f;
> + u16 head;
> +
> + vq = container_of(work, struct vhost_virtqueue, poll.work);
> + blk = container_of(vq->dev, struct vhost_blk, dev);
> +
> + /* TODO: check that we are running from vhost_worker? */
> + f = rcu_dereference_check(vq->private_data, 1);
> + if (!f)
> + return;
> +
> + vhost_disable_notify(&blk->dev, vq);
> + for (;;) {
> + head = vhost_get_vq_desc(&blk->dev, vq, vq->iov,
> + ARRAY_SIZE(vq->iov),
> + &out, &in, NULL, NULL);
> + if (unlikely(head < 0))
> + break;
> +
> + if (unlikely(head == vq->num)) {
> + if (unlikely(vhost_enable_notify(&blk->dev, vq))) {
> + vhost_disable_notify(&blk->dev, vq);
> + continue;
> + }
> + break;
> + }
> + move_iovec(vq->iov, vq->hdr, sizeof(hdr), out);
> + ret = memcpy_fromiovecend((unsigned char *)&hdr, vq->hdr, 0,
> + sizeof(hdr));
> + if (ret < 0) {
> + vq_err(vq, "Failed to get block header!\n");
> + vhost_discard_vq_desc(vq, 1);
> + break;
> + }
> +
> + if (vhost_blk_req_handle(vq, &hdr, head, out, in, f) < 0)
> + break;
> + }
> +}
> +
> +static int vhost_blk_open(struct inode *inode, struct file *file)
> +{
> + struct vhost_blk *blk;
> + int ret;
> +
> + blk = kzalloc(sizeof(*blk), GFP_KERNEL);
> + if (!blk) {
> + ret = -ENOMEM;
> + goto out;
> + }
> +
> + ret = ida_simple_get(&vhost_blk_index_ida, 0, 0, GFP_KERNEL);
> + if (ret < 0)
> + goto out_dev;
> + blk->index = ret;
> +
> + blk->vq.handle_kick = vhost_blk_handle_guest_kick;
> +
> + ret = vhost_dev_init(&blk->dev, &blk->vq, VHOST_BLK_VQ_MAX);
> + if (ret < 0)
> + goto out_dev;
> + file->private_data = blk;
> +
> + blk->host_kick = kthread_create(vhost_blk_req_done_thread,
> + blk, "vhost-blk-%d", current->pid);
> + if (IS_ERR(blk->host_kick)) {
> + ret = PTR_ERR(blk->host_kick);
> + goto out_dev;
> + }
> +
> + return ret;
> +out_dev:
> + kfree(blk);
> +out:
> + return ret;
> +}
> +
> +static int vhost_blk_release(struct inode *inode, struct file *f)
> +{
> + struct vhost_blk *blk = f->private_data;
> + struct file *file;
> +
> + ida_simple_remove(&vhost_blk_index_ida, blk->index);
> + vhost_blk_stop(blk, &file);
> + vhost_blk_flush(blk);
> + vhost_dev_cleanup(&blk->dev, false);
> + if (file)
> + fput(file);
> + kthread_stop(blk->host_kick);
> + kfree(blk->reqs);
> + kfree(blk);
> +
> + return 0;
> +}
> +
> +static int vhost_blk_set_features(struct vhost_blk *blk, u64 features)
> +{
> + mutex_lock(&blk->dev.mutex);
> + blk->dev.acked_features = features;
> + vhost_blk_flush(blk);
> + mutex_unlock(&blk->dev.mutex);
> +
> + return 0;
> +}
> +
> +static long vhost_blk_set_backend(struct vhost_blk *blk, unsigned index, int fd)
> +{
> + struct vhost_virtqueue *vq = &blk->vq;
> + struct file *file, *oldfile;
> + struct inode *inode;
> + int ret;
> +
> + mutex_lock(&blk->dev.mutex);
> + ret = vhost_dev_check_owner(&blk->dev);
> + if (ret)
> + goto out_dev;
> +
> + if (index >= VHOST_BLK_VQ_MAX) {
> + ret = -ENOBUFS;
> + goto out_dev;
> + }
> +
> + mutex_lock(&vq->mutex);
> +
> + if (!vhost_vq_access_ok(vq)) {
> + ret = -EFAULT;
> + goto out_vq;
> + }
> +
> + file = fget(fd);
> + if (IS_ERR(file)) {
> + ret = PTR_ERR(file);
> + goto out_vq;
> + }
> +
> + /* Only raw block device is supported for now */
> + inode = file->f_mapping->host;
> + if (!S_ISBLK(inode->i_mode)) {
> + ret = -EFAULT;
> + goto out_file;
> + }
> +
> + oldfile = rcu_dereference_protected(vq->private_data,
> + lockdep_is_held(&vq->mutex));
> + if (file != oldfile) {
> + rcu_assign_pointer(vq->private_data, file);
> + vhost_blk_enable_vq(blk, vq);
> +
> + ret = vhost_init_used(vq);
> + if (ret)
> + goto out_file;
> + }
> +
> + mutex_unlock(&vq->mutex);
> +
> + if (oldfile) {
> + vhost_blk_flush(blk);
> + fput(oldfile);
> + }
> +
> + mutex_unlock(&blk->dev.mutex);
> + return 0;
> +
> +out_file:
> + fput(file);
> +out_vq:
> + mutex_unlock(&vq->mutex);
> +out_dev:
> + mutex_unlock(&blk->dev.mutex);
> + return ret;
> +}
> +
> +static long vhost_blk_reset_owner(struct vhost_blk *blk)
> +{
> + struct file *file = NULL;
> + int err;
> +
> + mutex_lock(&blk->dev.mutex);
> + err = vhost_dev_check_owner(&blk->dev);
> + if (err)
> + goto done;
> + vhost_blk_stop(blk, &file);
> + vhost_blk_flush(blk);
> + err = vhost_dev_reset_owner(&blk->dev);
> +done:
> + mutex_unlock(&blk->dev.mutex);
> + if (file)
> + fput(file);
> + return err;
> +}
> +
> +static long vhost_blk_ioctl(struct file *f, unsigned int ioctl,
> + unsigned long arg)
> +{
> + struct vhost_blk *blk = f->private_data;
> + void __user *argp = (void __user *)arg;
> + struct vhost_vring_file backend;
> + u64 __user *featurep = argp;
> + u64 features;
> + int ret;
> +
> + switch (ioctl) {
> + case VHOST_BLK_SET_BACKEND:
> + if (copy_from_user(&backend, argp, sizeof(backend)))
> + return -EFAULT;
> + return vhost_blk_set_backend(blk, backend.index, backend.fd);
> + case VHOST_GET_FEATURES:
> + features = VHOST_BLK_FEATURES;
> + if (copy_to_user(featurep, &features, sizeof(features)))
> + return -EFAULT;
> + return 0;
> + case VHOST_SET_FEATURES:
> + if (copy_from_user(&features, featurep, sizeof(features)))
> + return -EFAULT;
> + if (features & ~VHOST_BLK_FEATURES)
> + return -EOPNOTSUPP;
> + return vhost_blk_set_features(blk, features);
> + case VHOST_RESET_OWNER:
> + return vhost_blk_reset_owner(blk);
> + default:
> + mutex_lock(&blk->dev.mutex);
> + ret = vhost_dev_ioctl(&blk->dev, ioctl, arg);
> + if (!ret && ioctl == VHOST_SET_VRING_NUM)
> + ret = vhost_blk_setup(blk);
> + vhost_blk_flush(blk);
> + mutex_unlock(&blk->dev.mutex);
> + return ret;
> + }
> +}
> +
> +static const struct file_operations vhost_blk_fops = {
> + .owner = THIS_MODULE,
> + .open = vhost_blk_open,
> + .release = vhost_blk_release,
> + .llseek = noop_llseek,
> + .unlocked_ioctl = vhost_blk_ioctl,
> +};
> +
> +static struct miscdevice vhost_blk_misc = {
> + MISC_DYNAMIC_MINOR,
> + "vhost-blk",
> + &vhost_blk_fops,
> +};
> +
> +static int vhost_blk_init(void)
> +{
> + return misc_register(&vhost_blk_misc);
> +}
> +
> +static void vhost_blk_exit(void)
> +{
> + misc_deregister(&vhost_blk_misc);
> +}
> +
> +module_init(vhost_blk_init);
> +module_exit(vhost_blk_exit);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Asias He");
> +MODULE_DESCRIPTION("Host kernel accelerator for virtio_blk");
> diff --git a/drivers/vhost/blk.h b/drivers/vhost/blk.h
> new file mode 100644
> index 0000000..2f674f0
> --- /dev/null
> +++ b/drivers/vhost/blk.h
> @@ -0,0 +1,8 @@
> +#include <linux/vhost.h>
> +
> +enum {
> + VHOST_BLK_FEATURES = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
> + (1ULL << VIRTIO_RING_F_EVENT_IDX),
> +};
> +/* VHOST_BLK specific defines */
> +#define VHOST_BLK_SET_BACKEND _IOW(VHOST_VIRTIO, 0x50, struct vhost_vring_file)
> --
> 1.7.11.7
^ permalink raw reply
* Re: [PATCH 158/493] video: remove use of __devinit
From: Jingoo Han @ 2012-11-20 1:58 UTC (permalink / raw)
To: Bill Pemberton
Cc: linux-fbdev@vger.kernel.org, Benjamin Herrenschmidt,
virtualization@lists.linux-foundation.org, Michal Januszewski,
Paul Mackerras, linux-nvidia@lists.surfsouth.com, Daniel Walker,
Kukjin Kim, Russell King, Wan ZongShun, Florian Tobias Schandinat,
Jingoo Han, Tomi Valkeinen, David Brown, Jaya Kumar,
cbe-oss-dev@lists.ozlabs.org, Antonino Daplas,
linux-arm-msm@vger.kernel.org, Thomas Winischhofer <thom>
On Tuesday, November 20, 2012 3:22 AM, Bill Pemberton wrote
>
> CONFIG_HOTPLUG is going away as an option so __devinit is no longer
> needed.
>
> Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> Cc: Jaya Kumar <jayalk@intworks.biz>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Cc: Ferenc Bakonyi <fero@drama.obuda.kando.hu>
> Cc: Antonino Daplas <adaplas@gmail.com>
> Cc: Maik Broemme <mbroemme@plusserver.de>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Bryan Huntsman <bryanh@codeaurora.org>
> Cc: Wan ZongShun <mcuos.com@gmail.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Geoff Levand <geoff@infradead.org>
> Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Thomas Winischhofer <thomas@winischhofer.net>
> Cc: Michal Januszewski <spock@gentoo.org>
> Cc: Tony Prisk <linux@prisktech.co.nz>
> Cc: linux-fbdev@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-geode@lists.infradead.org
> Cc: linux-nvidia@lists.surfsouth.com
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: cbe-oss-dev@lists.ozlabs.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: xen-devel@lists.xensource.com
> Cc: virtualization@lists.linux-foundation.org
> ---
> drivers/video/acornfb.c | 14 ++--
> drivers/video/arcfb.c | 2 +-
> drivers/video/arkfb.c | 2 +-
> drivers/video/asiliantfb.c | 6 +-
> drivers/video/aty/aty128fb.c | 22 +++---
> drivers/video/aty/atyfb_base.c | 22 +++---
> drivers/video/aty/mach64_ct.c | 4 +-
> drivers/video/aty/mach64_cursor.c | 2 +-
> drivers/video/aty/radeon_base.c | 14 ++--
> drivers/video/aty/radeon_monitor.c | 16 ++---
> drivers/video/au1100fb.c | 2 +-
> drivers/video/au1200fb.c | 2 +-
> drivers/video/auo_k1900fb.c | 2 +-
> drivers/video/auo_k1901fb.c | 2 +-
> drivers/video/auo_k190x.c | 2 +-
> drivers/video/bf537-lq035.c | 6 +-
> drivers/video/bf54x-lq043fb.c | 2 +-
> drivers/video/bfin-lq035q1-fb.c | 6 +-
> drivers/video/bfin-t350mcqb-fb.c | 2 +-
> drivers/video/bfin_adv7393fb.c | 2 +-
> drivers/video/broadsheetfb.c | 8 +--
> drivers/video/bw2.c | 6 +-
> drivers/video/carminefb.c | 4 +-
> drivers/video/cg14.c | 4 +-
> drivers/video/cg3.c | 8 +--
> drivers/video/cg6.c | 8 +--
> drivers/video/chipsfb.c | 4 +-
> drivers/video/cirrusfb.c | 10 +--
> drivers/video/cobalt_lcdfb.c | 2 +-
> drivers/video/console/sticore.c | 47 ++++++-------
> drivers/video/cyber2000fb.c | 12 ++--
> drivers/video/da8xx-fb.c | 2 +-
> drivers/video/dnfb.c | 2 +-
> drivers/video/ep93xx-fb.c | 4 +-
> drivers/video/exynos/exynos_dp_core.c | 2 +-
> drivers/video/ffb.c | 2 +-
> drivers/video/fm2fb.c | 4 +-
> drivers/video/fsl-diu-fb.c | 4 +-
> drivers/video/gbefb.c | 4 +-
> drivers/video/geode/gx1fb_core.c | 6 +-
> drivers/video/geode/gxfb_core.c | 10 +--
> drivers/video/geode/lxfb_core.c | 10 +--
> drivers/video/grvga.c | 4 +-
> drivers/video/gxt4500.c | 4 +-
> drivers/video/hecubafb.c | 2 +-
> drivers/video/hgafb.c | 4 +-
> drivers/video/hitfb.c | 2 +-
> drivers/video/hpfb.c | 4 +-
> drivers/video/i740fb.c | 4 +-
> drivers/video/i810/i810_main.c | 26 +++----
> drivers/video/i810/i810_main.h | 2 +-
> drivers/video/imsttfb.c | 4 +-
> drivers/video/intelfb/intelfbdrv.c | 16 ++---
> drivers/video/jz4740_fb.c | 2 +-
> drivers/video/kyro/fbdev.c | 2 +-
> drivers/video/leo.c | 2 +-
> drivers/video/mb862xx/mb862xxfbdrv.c | 6 +-
> drivers/video/mbx/mbxdebugfs.c | 2 +-
> drivers/video/mbx/mbxfb.c | 10 +--
> drivers/video/metronomefb.c | 12 ++--
> drivers/video/msm/mddi.c | 6 +-
> drivers/video/mxsfb.c | 6 +-
> drivers/video/neofb.c | 12 ++--
> drivers/video/nuc900fb.c | 4 +-
> drivers/video/nvidia/nvidia.c | 12 ++--
> .../omap2/displays/panel-lgphilips-lb035q02.c | 2 +-
> drivers/video/p9100.c | 2 +-
> drivers/video/platinumfb.c | 6 +-
> drivers/video/pm2fb.c | 2 +-
> drivers/video/pm3fb.c | 4 +-
> drivers/video/pmag-ba-fb.c | 2 +-
> drivers/video/pmagb-b-fb.c | 6 +-
> drivers/video/ps3fb.c | 2 +-
> drivers/video/pvr2fb.c | 6 +-
> drivers/video/pxa168fb.c | 4 +-
> drivers/video/pxa3xx-gcu.c | 2 +-
> drivers/video/pxafb.c | 20 +++---
> drivers/video/q40fb.c | 2 +-
> drivers/video/riva/fbdev.c | 20 +++---
> drivers/video/riva/rivafb-i2c.c | 6 +-
> drivers/video/s1d13xxxfb.c | 4 +-
> drivers/video/s3c-fb.c | 6 +-
> drivers/video/s3c2410fb.c | 8 +--
> drivers/video/s3fb.c | 6 +-
> drivers/video/sa1100fb.c | 6 +-
> drivers/video/savage/savagefb_driver.c | 8 +--
> drivers/video/sgivwfb.c | 2 +-
> drivers/video/sh7760fb.c | 2 +-
> drivers/video/sh_mobile_lcdcfb.c | 16 ++---
> drivers/video/sh_mobile_meram.c | 2 +-
> drivers/video/sis/sis_main.c | 82 +++++++++++-----------
> drivers/video/skeletonfb.c | 2 +-
> drivers/video/sm501fb.c | 8 +--
> drivers/video/sstfb.c | 18 ++---
> drivers/video/sunxvr1000.c | 6 +-
> drivers/video/sunxvr2500.c | 6 +-
> drivers/video/sunxvr500.c | 6 +-
> drivers/video/tcx.c | 2 +-
> drivers/video/tdfxfb.c | 10 +--
> drivers/video/tgafb.c | 16 ++---
> drivers/video/tmiofb.c | 2 +-
> drivers/video/tridentfb.c | 8 +--
> drivers/video/uvesafb.c | 30 ++++----
> drivers/video/vermilion/vermilion.c | 2 +-
> drivers/video/vfb.c | 2 +-
> drivers/video/vga16fb.c | 2 +-
> drivers/video/via/dvi.c | 8 +--
> drivers/video/via/dvi.h | 4 +-
> drivers/video/via/hw.c | 16 ++---
> drivers/video/via/hw.h | 4 +-
> drivers/video/via/lcd.c | 10 +--
> drivers/video/via/lcd.h | 6 +-
> drivers/video/via/via-core.c | 10 +--
> drivers/video/via/via-gpio.c | 2 +-
> drivers/video/via/viafbdev.c | 10 +--
> drivers/video/vt8500lcdfb.c | 2 +-
> drivers/video/vt8623fb.c | 2 +-
> drivers/video/w100fb.c | 6 +-
> drivers/video/wm8505fb.c | 2 +-
> drivers/video/wmt_ge_rops.c | 2 +-
> drivers/video/xen-fbfront.c | 4 +-
> drivers/video/xilinxfb.c | 2 +-
> 122 files changed, 438 insertions(+), 443 deletions(-)
>
For drivers/video/s3c-fb.c, drivers/video/exynos/exynos_dp_core.c
Acked-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
^ permalink raw reply
* Re: [PATCH] vhost-blk: Add vhost-blk support v5
From: Asias He @ 2012-11-20 6:39 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: axboe, kvm, linux-kernel, virtualization, Christoph Hellwig
In-Reply-To: <20121119202641.GB12283@redhat.com>
On 11/20/2012 04:26 AM, Michael S. Tsirkin wrote:
> On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote:
>> vhost-blk is an in-kernel virito-blk device accelerator.
>>
>> Due to lack of proper in-kernel AIO interface, this version converts
>> guest's I/O request to bio and use submit_bio() to submit I/O directly.
>> So this version any supports raw block device as guest's disk image,
>> e.g. /dev/sda, /dev/ram0. We can add file based image support to
>> vhost-blk once we have in-kernel AIO interface. There are some work in
>> progress for in-kernel AIO interface from Dave Kleikamp and Zach Brown:
>>
>> http://marc.info/?l=linux-fsdevel&m=133312234313122
>>
>> Performance evaluation:
>> -----------------------------
>> 1) LKVM
>> Fio with libaio ioengine on Fusion IO device using kvm tool
>> IOPS(k) Before After Improvement
>> seq-read 107 121 +13.0%
>> seq-write 130 179 +37.6%
>> rnd-read 102 122 +19.6%
>> rnd-write 125 159 +27.0%
>>
>> 2) QEMU
>> Fio with libaio ioengine on Fusion IO device using QEMU
>> IOPS(k) Before After Improvement
>> seq-read 76 123 +61.8%
>> seq-write 139 173 +24.4%
>> rnd-read 73 120 +64.3%
>> rnd-write 75 156 +108.0%
>
> Could you compare with dataplane qemu as well please?
Well, I will try to collect it.
>
>>
>> Userspace bits:
>> -----------------------------
>> 1) LKVM
>> The latest vhost-blk userspace bits for kvm tool can be found here:
>> git@github.com:asias/linux-kvm.git blk.vhost-blk
>>
>> 2) QEMU
>> The latest vhost-blk userspace prototype for QEMU can be found here:
>> git@github.com:asias/qemu.git blk.vhost-blk
>>
>> Changes in v5:
>> - Do not assume the buffer layout
>> - Fix wakeup race
>>
>> Changes in v4:
>> - Mark req->status as userspace pointer
>> - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status()
>> - Add if (need_resched()) schedule() in blk thread
>> - Kill vhost_blk_stop_vq() and move it into vhost_blk_stop()
>> - Use vq_err() instead of pr_warn()
>> - Fail un Unsupported request
>> - Add flush in vhost_blk_set_features()
>>
>> Changes in v3:
>> - Sending REQ_FLUSH bio instead of vfs_fsync, thanks Christoph!
>> - Check file passed by user is a raw block device file
>>
>> Signed-off-by: Asias He <asias@redhat.com>
>
> Since there are files shared by this and vhost net
> it's easiest for me to merge this all through the
> vhost tree.
>
> Jens, could you ack this and the bio usage in this driver
> please?
>
>> ---
>> drivers/vhost/Kconfig | 1 +
>> drivers/vhost/Kconfig.blk | 10 +
>> drivers/vhost/Makefile | 2 +
>> drivers/vhost/blk.c | 697 ++++++++++++++++++++++++++++++++++++++++++++++
>> drivers/vhost/blk.h | 8 +
>> 5 files changed, 718 insertions(+)
>> create mode 100644 drivers/vhost/Kconfig.blk
>> create mode 100644 drivers/vhost/blk.c
>> create mode 100644 drivers/vhost/blk.h
>>
>> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
>> index 202bba6..acd8038 100644
>> --- a/drivers/vhost/Kconfig
>> +++ b/drivers/vhost/Kconfig
>> @@ -11,4 +11,5 @@ config VHOST_NET
>>
>> if STAGING
>> source "drivers/vhost/Kconfig.tcm"
>> +source "drivers/vhost/Kconfig.blk"
>> endif
>> diff --git a/drivers/vhost/Kconfig.blk b/drivers/vhost/Kconfig.blk
>> new file mode 100644
>> index 0000000..ff8ab76
>> --- /dev/null
>> +++ b/drivers/vhost/Kconfig.blk
>> @@ -0,0 +1,10 @@
>> +config VHOST_BLK
>> + tristate "Host kernel accelerator for virtio blk (EXPERIMENTAL)"
>> + depends on BLOCK && EXPERIMENTAL && m
>> + ---help---
>> + This kernel module can be loaded in host kernel to accelerate
>> + guest block with virtio_blk. Not to be confused with virtio_blk
>> + module itself which needs to be loaded in guest kernel.
>> +
>> + To compile this driver as a module, choose M here: the module will
>> + be called vhost_blk.
>> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
>> index a27b053..1a8a4a5 100644
>> --- a/drivers/vhost/Makefile
>> +++ b/drivers/vhost/Makefile
>> @@ -2,3 +2,5 @@ obj-$(CONFIG_VHOST_NET) += vhost_net.o
>> vhost_net-y := vhost.o net.o
>>
>> obj-$(CONFIG_TCM_VHOST) += tcm_vhost.o
>> +obj-$(CONFIG_VHOST_BLK) += vhost_blk.o
>> +vhost_blk-y := blk.o
>> diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
>> new file mode 100644
>> index 0000000..f0f118a
>> --- /dev/null
>> +++ b/drivers/vhost/blk.c
>> @@ -0,0 +1,697 @@
>> +/*
>> + * Copyright (C) 2011 Taobao, Inc.
>> + * Author: Liu Yuan <tailai.ly@taobao.com>
>> + *
>> + * Copyright (C) 2012 Red Hat, Inc.
>> + * Author: Asias He <asias@redhat.com>
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2.
>> + *
>> + * virtio-blk server in host kernel.
>> + */
>> +
>> +#include <linux/miscdevice.h>
>> +#include <linux/module.h>
>> +#include <linux/vhost.h>
>> +#include <linux/virtio_blk.h>
>> +#include <linux/mutex.h>
>> +#include <linux/file.h>
>> +#include <linux/kthread.h>
>> +#include <linux/blkdev.h>
>> +#include <linux/llist.h>
>> +
>> +#include "vhost.c"
>> +#include "vhost.h"
>> +#include "blk.h"
>> +
>> +static DEFINE_IDA(vhost_blk_index_ida);
>> +
>> +enum {
>> + VHOST_BLK_VQ_REQ = 0,
>> + VHOST_BLK_VQ_MAX = 1,
>> +};
>> +
>> +struct req_page_list {
>> + struct page **pages;
>> + int pages_nr;
>> +};
>> +
>> +struct vhost_blk_req {
>> + struct llist_node llnode;
>> + struct req_page_list *pl;
>> + struct vhost_blk *blk;
>> +
>> + struct iovec *iov;
>> + int iov_nr;
>> +
>> + struct bio **bio;
>> + atomic_t bio_nr;
>> +
>> + struct iovec status[1];
>> +
>> + sector_t sector;
>> + int write;
>> + u16 head;
>> + long len;
>> +};
>> +
>> +struct vhost_blk {
>> + struct task_struct *host_kick;
>
> Could you please add a comment here explaining why
> is this better than using the builtin vhost thread?
With separate thread model, the request submit and request completion
can be handled in parallel. I have measured significant performance
improvement with this model. In the long term, It would be nice if the
vhost core can provide multiple thread support.
>> + struct iovec iov[UIO_MAXIOV];
>> + struct vhost_blk_req *reqs;
>> + struct vhost_virtqueue vq;
>> + struct llist_head llhead;
>> + struct vhost_dev dev;
>> + u16 reqs_nr;
>> + int index;
>> +};
>> +
>> +static int move_iovec(struct iovec *from, struct iovec *to,
>> + size_t len, int iov_count)
>> +{
>> + int seg = 0;
>> + size_t size;
>> +
>> + while (len && seg < iov_count) {
>> + if (from->iov_len == 0) {
>> + ++from;
>> + continue;
>> + }
>> + size = min(from->iov_len, len);
>> + to->iov_base = from->iov_base;
>> + to->iov_len = size;
>> + from->iov_len -= size;
>> + from->iov_base += size;
>> + len -= size;
>> + ++from;
>> + ++to;
>> + ++seg;
>> + }
>> + return seg;
>> +}
>> +
>> +static inline int iov_num_pages(struct iovec *iov)
>> +{
>> + return (PAGE_ALIGN((unsigned long)iov->iov_base + iov->iov_len) -
>> + ((unsigned long)iov->iov_base & PAGE_MASK)) >> PAGE_SHIFT;
>> +}
>> +
>> +static int vhost_blk_setup(struct vhost_blk *blk)
>> +{
>> + blk->reqs_nr = blk->vq.num;
>> +
>> + blk->reqs = kmalloc(sizeof(struct vhost_blk_req) * blk->reqs_nr,
>> + GFP_KERNEL);
>> + if (!blk->reqs)
>> + return -ENOMEM;
>> +
>> + return 0;
>> +}
>> +
>> +static inline int vhost_blk_set_status(struct vhost_blk_req *req, u8 status)
>> +{
>> + struct vhost_blk *blk = req->blk;
>> + int ret;
>> +
>> + ret = memcpy_toiovecend(req->status, &status, 0, sizeof(status));
>> +
>> + if (ret) {
>> + vq_err(&blk->vq, "Failed to write status\n");
>> + return -EFAULT;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static void vhost_blk_enable_vq(struct vhost_blk *blk,
>> + struct vhost_virtqueue *vq)
>> +{
>> + wake_up_process(blk->host_kick);
>> +}
>> +
>> +static void vhost_blk_req_done(struct bio *bio, int err)
>> +{
>> + struct vhost_blk_req *req = bio->bi_private;
>> + struct vhost_blk *blk = req->blk;
>> +
>> + if (err)
>> + req->len = err;
>> +
>> + if (atomic_dec_and_test(&req->bio_nr)) {
>> + llist_add(&req->llnode, &blk->llhead);
>> + wake_up_process(blk->host_kick);
>> + }
>> +
>> + bio_put(bio);
>> +}
>> +
>> +static void vhost_blk_req_umap(struct vhost_blk_req *req)
>> +{
>> + struct req_page_list *pl;
>> + int i, j;
>> +
>> +
>> + if (!req->pl) {
>> + kfree(req->bio);
>> + return;
>> + }
>> +
>> + for (i = 0; i < req->iov_nr; i++) {
>> + pl = &req->pl[i];
>> + for (j = 0; j < pl->pages_nr; j++) {
>> + if (!req->write)
>> + set_page_dirty_lock(pl->pages[j]);
>> + page_cache_release(pl->pages[j]);
>> + }
>> + }
>> +
>> + kfree(req->pl);
>> +}
>> +
>> +static int vhost_blk_bio_make(struct vhost_blk_req *req,
>> + struct block_device *bdev)
>> +{
>> + int pl_len, page_len, bio_len;
>> + int pages_nr_total, i, j, ret;
>> + struct iovec *iov = req->iov;
>> + int iov_nr = req->iov_nr;
>> + struct page **pages, *page;
>> + struct bio *bio = NULL;
>> + int bio_nr = 0;
>> + void *buf;
>> +
>> + pages_nr_total = 0;
>> + for (i = 0; i < iov_nr; i++)
>> + pages_nr_total += iov_num_pages(&iov[i]);
>> +
>> + if (unlikely(req->write == WRITE_FLUSH)) {
>> + req->pl = NULL;
>> + req->bio = kmalloc(sizeof(struct bio *), GFP_KERNEL);
>> + bio = bio_alloc(GFP_KERNEL, 1);
>> + if (!bio) {
>> + kfree(req->bio);
>> + return -ENOMEM;
>> + }
>> + bio->bi_sector = req->sector;
>> + bio->bi_bdev = bdev;
>> + bio->bi_private = req;
>> + bio->bi_end_io = vhost_blk_req_done;
>> + req->bio[bio_nr++] = bio;
>> +
>> + goto out;
>> + }
>> +
>> + pl_len = iov_nr * sizeof(req->pl[0]);
>> + page_len = pages_nr_total * sizeof(struct page *);
>> + bio_len = pages_nr_total * sizeof(struct bio *);
>> +
>> + buf = kmalloc(pl_len + page_len + bio_len, GFP_KERNEL);
>> + if (!buf)
>> + return -ENOMEM;
>> +
>> + req->pl = buf;
>> + pages = buf + pl_len;
>> + req->bio = buf + pl_len + page_len;
>> +
>> + req->iov_nr = 0;
>> + for (i = 0; i < iov_nr; i++) {
>> + int pages_nr = iov_num_pages(&iov[i]);
>> + unsigned long iov_base, iov_len;
>> + struct req_page_list *pl;
>> +
>> + iov_base = (unsigned long)iov[i].iov_base;
>> + iov_len = (unsigned long)iov[i].iov_len;
>> +
>> + /* TODO: Limit the total number of pages pinned */
>
> What's the plan here? Is there some limit if e.g. aio is used?
The problem is there is no easy way to find a proper limit number. May
be 16 * vq size number of pages as you sugguested.
With aio, we do not touch this code path at all.
>> + ret = get_user_pages_fast(iov_base, pages_nr,
>> + !req->write, pages);
>> + if (ret != pages_nr)
>> + goto fail;
>> +
>> + req->iov_nr++;
>> + pl = &req->pl[i];
>> + pl->pages_nr = pages_nr;
>> + pl->pages = pages;
>> +
>> + for (j = 0; j < pages_nr; j++) {
>> + unsigned int off, len;
>> + page = pages[j];
>> + off = iov_base & ~PAGE_MASK;
>> + len = PAGE_SIZE - off;
>> + if (len > iov_len)
>> + len = iov_len;
>> +
>> + while (!bio || bio_add_page(bio, page, len, off) <= 0) {
>> + bio = bio_alloc(GFP_KERNEL, pages_nr);
>> + if (!bio)
>> + goto fail;
>> + bio->bi_sector = req->sector;
>> + bio->bi_bdev = bdev;
>> + bio->bi_private = req;
>> + bio->bi_end_io = vhost_blk_req_done;
>> + req->bio[bio_nr++] = bio;
>> + }
>> + req->sector += len >> 9;
>> + iov_base += len;
>> + iov_len -= len;
>> + }
>> +
>> + pages += pages_nr;
>> + }
>> +out:
>> + atomic_set(&req->bio_nr, bio_nr);
>> + return 0;
>> +
>> +fail:
>> + for (i = 0; i < bio_nr; i++)
>> + bio_put(req->bio[i]);
>> + vhost_blk_req_umap(req);
>> + return -ENOMEM;
>> +}
>> +
>> +static inline void vhost_blk_bio_send(struct vhost_blk_req *req)
>> +{
>> + struct blk_plug plug;
>> + int i, bio_nr;
>> +
>> + bio_nr = atomic_read(&req->bio_nr);
>> + blk_start_plug(&plug);
>> + for (i = 0; i < bio_nr; i++)
>> + submit_bio(req->write, req->bio[i]);
>> + blk_finish_plug(&plug);
>> +}
>> +
>> +static int vhost_blk_req_submit(struct vhost_blk_req *req, struct file *file)
>> +{
>> +
>> + struct inode *inode = file->f_mapping->host;
>> + struct block_device *bdev = inode->i_bdev;
>> + int ret;
>> +
>> + ret = vhost_blk_bio_make(req, bdev);
>> + if (ret < 0)
>> + return ret;
>> +
>> + vhost_blk_bio_send(req);
>> +
>> + return ret;
>> +}
>> +
>> +static int vhost_blk_req_done_thread(void *data)
>> +{
>> + mm_segment_t oldfs = get_fs();
>> + struct vhost_blk *blk = data;
>> + struct vhost_virtqueue *vq;
>> + struct llist_node *llnode;
>> + struct vhost_blk_req *req;
>> + bool added;
>> + u8 status;
>> + int ret;
>> +
>> + vq = &blk->vq;
>> + set_fs(USER_DS);
>> + use_mm(blk->dev.mm);
>> + for (;;) {
>> + set_current_state(TASK_INTERRUPTIBLE);
>> + llnode = llist_del_all(&blk->llhead);
>> + if (!llnode) {
>> + schedule();
>> + if (unlikely(kthread_should_stop()))
>> + break;
>> + continue;
>> + }
>> + set_current_state(TASK_RUNNING);
>> +
>> + if (need_resched())
>> + schedule();
>> +
>> + added = false;
>> + while (llnode) {
>> + req = llist_entry(llnode, struct vhost_blk_req, llnode);
>> + llnode = llist_next(llnode);
>> +
>> + vhost_blk_req_umap(req);
>> +
>> + status = req->len > 0 ?
>> + VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR;
>> + ret = vhost_blk_set_status(req, status);
>> + if (unlikely(ret))
>> + continue;
>> + vhost_add_used(&blk->vq, req->head, req->len);
>> + added = true;
>> + }
>> + if (likely(added))
>> + vhost_signal(&blk->dev, &blk->vq);
>> + }
>> + unuse_mm(blk->dev.mm);
>> + set_fs(oldfs);
>> + return 0;
>> +}
>> +
>> +static void vhost_blk_flush(struct vhost_blk *blk)
>> +{
>> + vhost_poll_flush(&blk->vq.poll);
>> +}
>> +
>> +static inline void vhost_blk_stop(struct vhost_blk *blk, struct file **file)
>> +{
>> + struct vhost_virtqueue *vq = &blk->vq;
>> + struct file *f;
>> +
>> + mutex_lock(&vq->mutex);
>> + f = rcu_dereference_protected(vq->private_data,
>> + lockdep_is_held(&vq->mutex));
>> + rcu_assign_pointer(vq->private_data, NULL);
>> + mutex_unlock(&vq->mutex);
>> +
>> + *file = f;
>> +}
>> +
>> +/* Handle guest request */
>> +static int vhost_blk_req_handle(struct vhost_virtqueue *vq,
>> + struct virtio_blk_outhdr *hdr,
>> + u16 head, u16 out, u16 in,
>> + struct file *file)
>> +{
>> + struct vhost_blk *blk = container_of(vq->dev, struct vhost_blk, dev);
>> + unsigned char id[VIRTIO_BLK_ID_BYTES];
>> + struct vhost_blk_req *req;
>> + int ret, len;
>> + u8 status;
>> +
>> + req = &blk->reqs[head];
>> + req->head = head;
>> + req->blk = blk;
>> + req->sector = hdr->sector;
>> + req->iov = blk->iov;
>> +
>> + req->len = iov_length(vq->iov, out + in) - sizeof(status);
>> + req->iov_nr = move_iovec(vq->iov, req->iov, req->len, out + in);
>> +
>> + move_iovec(vq->iov, req->status, sizeof(status), out + in);
>> +
>> + switch (hdr->type) {
>> + case VIRTIO_BLK_T_OUT:
>> + req->write = WRITE;
>> + ret = vhost_blk_req_submit(req, file);
>> + break;
>> + case VIRTIO_BLK_T_IN:
>> + req->write = READ;
>> + ret = vhost_blk_req_submit(req, file);
>> + break;
>> + case VIRTIO_BLK_T_FLUSH:
>> + req->write = WRITE_FLUSH;
>> + ret = vhost_blk_req_submit(req, file);
>> + break;
>> + case VIRTIO_BLK_T_GET_ID:
>> + ret = snprintf(id, VIRTIO_BLK_ID_BYTES,
>> + "vhost-blk%d", blk->index);
>> + if (ret < 0)
>> + break;
>> + len = ret;
>> + ret = memcpy_toiovecend(req->iov, id, 0, len);
>> + status = ret < 0 ? VIRTIO_BLK_S_IOERR : VIRTIO_BLK_S_OK;
>> + ret = vhost_blk_set_status(req, status);
>> + if (ret)
>> + break;
>> + vhost_add_used_and_signal(&blk->dev, vq, head, len);
>> + break;
>> + default:
>> + vq_err(vq, "Unsupported request type %d\n", hdr->type);
>> + status = VIRTIO_BLK_S_UNSUPP;
>> + ret = vhost_blk_set_status(req, status);
>> + if (ret)
>> + break;
>> + vhost_add_used_and_signal(&blk->dev, vq, head, 0);
>> + }
>> +
>> + return ret;
>> +}
>> +
>> +/* Guest kick us for IO request */
>> +static void vhost_blk_handle_guest_kick(struct vhost_work *work)
>> +{
>> + struct virtio_blk_outhdr hdr;
>> + struct vhost_virtqueue *vq;
>> + struct vhost_blk *blk;
>> + int in, out, ret;
>> + struct file *f;
>> + u16 head;
>> +
>> + vq = container_of(work, struct vhost_virtqueue, poll.work);
>> + blk = container_of(vq->dev, struct vhost_blk, dev);
>> +
>> + /* TODO: check that we are running from vhost_worker? */
>> + f = rcu_dereference_check(vq->private_data, 1);
>> + if (!f)
>> + return;
>> +
>> + vhost_disable_notify(&blk->dev, vq);
>> + for (;;) {
>> + head = vhost_get_vq_desc(&blk->dev, vq, vq->iov,
>> + ARRAY_SIZE(vq->iov),
>> + &out, &in, NULL, NULL);
>> + if (unlikely(head < 0))
>> + break;
>> +
>> + if (unlikely(head == vq->num)) {
>> + if (unlikely(vhost_enable_notify(&blk->dev, vq))) {
>> + vhost_disable_notify(&blk->dev, vq);
>> + continue;
>> + }
>> + break;
>> + }
>> + move_iovec(vq->iov, vq->hdr, sizeof(hdr), out);
>> + ret = memcpy_fromiovecend((unsigned char *)&hdr, vq->hdr, 0,
>> + sizeof(hdr));
>> + if (ret < 0) {
>> + vq_err(vq, "Failed to get block header!\n");
>> + vhost_discard_vq_desc(vq, 1);
>> + break;
>> + }
>> +
>> + if (vhost_blk_req_handle(vq, &hdr, head, out, in, f) < 0)
>> + break;
>> + }
>> +}
>> +
>> +static int vhost_blk_open(struct inode *inode, struct file *file)
>> +{
>> + struct vhost_blk *blk;
>> + int ret;
>> +
>> + blk = kzalloc(sizeof(*blk), GFP_KERNEL);
>> + if (!blk) {
>> + ret = -ENOMEM;
>> + goto out;
>> + }
>> +
>> + ret = ida_simple_get(&vhost_blk_index_ida, 0, 0, GFP_KERNEL);
>> + if (ret < 0)
>> + goto out_dev;
>> + blk->index = ret;
>> +
>> + blk->vq.handle_kick = vhost_blk_handle_guest_kick;
>> +
>> + ret = vhost_dev_init(&blk->dev, &blk->vq, VHOST_BLK_VQ_MAX);
>> + if (ret < 0)
>> + goto out_dev;
>> + file->private_data = blk;
>> +
>> + blk->host_kick = kthread_create(vhost_blk_req_done_thread,
>> + blk, "vhost-blk-%d", current->pid);
>> + if (IS_ERR(blk->host_kick)) {
>> + ret = PTR_ERR(blk->host_kick);
>> + goto out_dev;
>> + }
>> +
>> + return ret;
>> +out_dev:
>> + kfree(blk);
>> +out:
>> + return ret;
>> +}
>> +
>> +static int vhost_blk_release(struct inode *inode, struct file *f)
>> +{
>> + struct vhost_blk *blk = f->private_data;
>> + struct file *file;
>> +
>> + ida_simple_remove(&vhost_blk_index_ida, blk->index);
>> + vhost_blk_stop(blk, &file);
>> + vhost_blk_flush(blk);
>> + vhost_dev_cleanup(&blk->dev, false);
>> + if (file)
>> + fput(file);
>> + kthread_stop(blk->host_kick);
>> + kfree(blk->reqs);
>> + kfree(blk);
>> +
>> + return 0;
>> +}
>> +
>> +static int vhost_blk_set_features(struct vhost_blk *blk, u64 features)
>> +{
>> + mutex_lock(&blk->dev.mutex);
>> + blk->dev.acked_features = features;
>> + vhost_blk_flush(blk);
>> + mutex_unlock(&blk->dev.mutex);
>> +
>> + return 0;
>> +}
>> +
>> +static long vhost_blk_set_backend(struct vhost_blk *blk, unsigned index, int fd)
>> +{
>> + struct vhost_virtqueue *vq = &blk->vq;
>> + struct file *file, *oldfile;
>> + struct inode *inode;
>> + int ret;
>> +
>> + mutex_lock(&blk->dev.mutex);
>> + ret = vhost_dev_check_owner(&blk->dev);
>> + if (ret)
>> + goto out_dev;
>> +
>> + if (index >= VHOST_BLK_VQ_MAX) {
>> + ret = -ENOBUFS;
>> + goto out_dev;
>> + }
>> +
>> + mutex_lock(&vq->mutex);
>> +
>> + if (!vhost_vq_access_ok(vq)) {
>> + ret = -EFAULT;
>> + goto out_vq;
>> + }
>> +
>> + file = fget(fd);
>> + if (IS_ERR(file)) {
>> + ret = PTR_ERR(file);
>> + goto out_vq;
>> + }
>> +
>> + /* Only raw block device is supported for now */
>> + inode = file->f_mapping->host;
>> + if (!S_ISBLK(inode->i_mode)) {
>> + ret = -EFAULT;
>> + goto out_file;
>> + }
>> +
>> + oldfile = rcu_dereference_protected(vq->private_data,
>> + lockdep_is_held(&vq->mutex));
>> + if (file != oldfile) {
>> + rcu_assign_pointer(vq->private_data, file);
>> + vhost_blk_enable_vq(blk, vq);
>> +
>> + ret = vhost_init_used(vq);
>> + if (ret)
>> + goto out_file;
>> + }
>> +
>> + mutex_unlock(&vq->mutex);
>> +
>> + if (oldfile) {
>> + vhost_blk_flush(blk);
>> + fput(oldfile);
>> + }
>> +
>> + mutex_unlock(&blk->dev.mutex);
>> + return 0;
>> +
>> +out_file:
>> + fput(file);
>> +out_vq:
>> + mutex_unlock(&vq->mutex);
>> +out_dev:
>> + mutex_unlock(&blk->dev.mutex);
>> + return ret;
>> +}
>> +
>> +static long vhost_blk_reset_owner(struct vhost_blk *blk)
>> +{
>> + struct file *file = NULL;
>> + int err;
>> +
>> + mutex_lock(&blk->dev.mutex);
>> + err = vhost_dev_check_owner(&blk->dev);
>> + if (err)
>> + goto done;
>> + vhost_blk_stop(blk, &file);
>> + vhost_blk_flush(blk);
>> + err = vhost_dev_reset_owner(&blk->dev);
>> +done:
>> + mutex_unlock(&blk->dev.mutex);
>> + if (file)
>> + fput(file);
>> + return err;
>> +}
>> +
>> +static long vhost_blk_ioctl(struct file *f, unsigned int ioctl,
>> + unsigned long arg)
>> +{
>> + struct vhost_blk *blk = f->private_data;
>> + void __user *argp = (void __user *)arg;
>> + struct vhost_vring_file backend;
>> + u64 __user *featurep = argp;
>> + u64 features;
>> + int ret;
>> +
>> + switch (ioctl) {
>> + case VHOST_BLK_SET_BACKEND:
>> + if (copy_from_user(&backend, argp, sizeof(backend)))
>> + return -EFAULT;
>> + return vhost_blk_set_backend(blk, backend.index, backend.fd);
>> + case VHOST_GET_FEATURES:
>> + features = VHOST_BLK_FEATURES;
>> + if (copy_to_user(featurep, &features, sizeof(features)))
>> + return -EFAULT;
>> + return 0;
>> + case VHOST_SET_FEATURES:
>> + if (copy_from_user(&features, featurep, sizeof(features)))
>> + return -EFAULT;
>> + if (features & ~VHOST_BLK_FEATURES)
>> + return -EOPNOTSUPP;
>> + return vhost_blk_set_features(blk, features);
>> + case VHOST_RESET_OWNER:
>> + return vhost_blk_reset_owner(blk);
>> + default:
>> + mutex_lock(&blk->dev.mutex);
>> + ret = vhost_dev_ioctl(&blk->dev, ioctl, arg);
>> + if (!ret && ioctl == VHOST_SET_VRING_NUM)
>> + ret = vhost_blk_setup(blk);
>> + vhost_blk_flush(blk);
>> + mutex_unlock(&blk->dev.mutex);
>> + return ret;
>> + }
>> +}
>> +
>> +static const struct file_operations vhost_blk_fops = {
>> + .owner = THIS_MODULE,
>> + .open = vhost_blk_open,
>> + .release = vhost_blk_release,
>> + .llseek = noop_llseek,
>> + .unlocked_ioctl = vhost_blk_ioctl,
>> +};
>> +
>> +static struct miscdevice vhost_blk_misc = {
>> + MISC_DYNAMIC_MINOR,
>> + "vhost-blk",
>> + &vhost_blk_fops,
>> +};
>> +
>> +static int vhost_blk_init(void)
>> +{
>> + return misc_register(&vhost_blk_misc);
>> +}
>> +
>> +static void vhost_blk_exit(void)
>> +{
>> + misc_deregister(&vhost_blk_misc);
>> +}
>> +
>> +module_init(vhost_blk_init);
>> +module_exit(vhost_blk_exit);
>> +
>> +MODULE_LICENSE("GPL v2");
>> +MODULE_AUTHOR("Asias He");
>> +MODULE_DESCRIPTION("Host kernel accelerator for virtio_blk");
>> diff --git a/drivers/vhost/blk.h b/drivers/vhost/blk.h
>> new file mode 100644
>> index 0000000..2f674f0
>> --- /dev/null
>> +++ b/drivers/vhost/blk.h
>> @@ -0,0 +1,8 @@
>> +#include <linux/vhost.h>
>> +
>> +enum {
>> + VHOST_BLK_FEATURES = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
>> + (1ULL << VIRTIO_RING_F_EVENT_IDX),
>> +};
>> +/* VHOST_BLK specific defines */
>> +#define VHOST_BLK_SET_BACKEND _IOW(VHOST_VIRTIO, 0x50, struct vhost_vring_file)
>> --
>> 1.7.11.7
--
Asias
^ permalink raw reply
* Re: [PATCH] vhost-blk: Add vhost-blk support v5
From: Michael S. Tsirkin @ 2012-11-20 13:37 UTC (permalink / raw)
To: Asias He; +Cc: axboe, kvm, linux-kernel, virtualization, Christoph Hellwig
In-Reply-To: <50AB25AC.2070606@redhat.com>
On Tue, Nov 20, 2012 at 02:39:40PM +0800, Asias He wrote:
> On 11/20/2012 04:26 AM, Michael S. Tsirkin wrote:
> > On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote:
> >> vhost-blk is an in-kernel virito-blk device accelerator.
> >>
> >> Due to lack of proper in-kernel AIO interface, this version converts
> >> guest's I/O request to bio and use submit_bio() to submit I/O directly.
> >> So this version any supports raw block device as guest's disk image,
> >> e.g. /dev/sda, /dev/ram0. We can add file based image support to
> >> vhost-blk once we have in-kernel AIO interface. There are some work in
> >> progress for in-kernel AIO interface from Dave Kleikamp and Zach Brown:
> >>
> >> http://marc.info/?l=linux-fsdevel&m=133312234313122
> >>
> >> Performance evaluation:
> >> -----------------------------
> >> 1) LKVM
> >> Fio with libaio ioengine on Fusion IO device using kvm tool
> >> IOPS(k) Before After Improvement
> >> seq-read 107 121 +13.0%
> >> seq-write 130 179 +37.6%
> >> rnd-read 102 122 +19.6%
> >> rnd-write 125 159 +27.0%
> >>
> >> 2) QEMU
> >> Fio with libaio ioengine on Fusion IO device using QEMU
> >> IOPS(k) Before After Improvement
> >> seq-read 76 123 +61.8%
> >> seq-write 139 173 +24.4%
> >> rnd-read 73 120 +64.3%
> >> rnd-write 75 156 +108.0%
> >
> > Could you compare with dataplane qemu as well please?
>
>
> Well, I will try to collect it.
>
> >
> >>
> >> Userspace bits:
> >> -----------------------------
> >> 1) LKVM
> >> The latest vhost-blk userspace bits for kvm tool can be found here:
> >> git@github.com:asias/linux-kvm.git blk.vhost-blk
> >>
> >> 2) QEMU
> >> The latest vhost-blk userspace prototype for QEMU can be found here:
> >> git@github.com:asias/qemu.git blk.vhost-blk
> >>
> >> Changes in v5:
> >> - Do not assume the buffer layout
> >> - Fix wakeup race
> >>
> >> Changes in v4:
> >> - Mark req->status as userspace pointer
> >> - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status()
> >> - Add if (need_resched()) schedule() in blk thread
> >> - Kill vhost_blk_stop_vq() and move it into vhost_blk_stop()
> >> - Use vq_err() instead of pr_warn()
> >> - Fail un Unsupported request
> >> - Add flush in vhost_blk_set_features()
> >>
> >> Changes in v3:
> >> - Sending REQ_FLUSH bio instead of vfs_fsync, thanks Christoph!
> >> - Check file passed by user is a raw block device file
> >>
> >> Signed-off-by: Asias He <asias@redhat.com>
> >
> > Since there are files shared by this and vhost net
> > it's easiest for me to merge this all through the
> > vhost tree.
> >
> > Jens, could you ack this and the bio usage in this driver
> > please?
> >
> >> ---
> >> drivers/vhost/Kconfig | 1 +
> >> drivers/vhost/Kconfig.blk | 10 +
> >> drivers/vhost/Makefile | 2 +
> >> drivers/vhost/blk.c | 697 ++++++++++++++++++++++++++++++++++++++++++++++
> >> drivers/vhost/blk.h | 8 +
> >> 5 files changed, 718 insertions(+)
> >> create mode 100644 drivers/vhost/Kconfig.blk
> >> create mode 100644 drivers/vhost/blk.c
> >> create mode 100644 drivers/vhost/blk.h
> >>
> >> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> >> index 202bba6..acd8038 100644
> >> --- a/drivers/vhost/Kconfig
> >> +++ b/drivers/vhost/Kconfig
> >> @@ -11,4 +11,5 @@ config VHOST_NET
> >>
> >> if STAGING
> >> source "drivers/vhost/Kconfig.tcm"
> >> +source "drivers/vhost/Kconfig.blk"
> >> endif
> >> diff --git a/drivers/vhost/Kconfig.blk b/drivers/vhost/Kconfig.blk
> >> new file mode 100644
> >> index 0000000..ff8ab76
> >> --- /dev/null
> >> +++ b/drivers/vhost/Kconfig.blk
> >> @@ -0,0 +1,10 @@
> >> +config VHOST_BLK
> >> + tristate "Host kernel accelerator for virtio blk (EXPERIMENTAL)"
> >> + depends on BLOCK && EXPERIMENTAL && m
> >> + ---help---
> >> + This kernel module can be loaded in host kernel to accelerate
> >> + guest block with virtio_blk. Not to be confused with virtio_blk
> >> + module itself which needs to be loaded in guest kernel.
> >> +
> >> + To compile this driver as a module, choose M here: the module will
> >> + be called vhost_blk.
> >> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
> >> index a27b053..1a8a4a5 100644
> >> --- a/drivers/vhost/Makefile
> >> +++ b/drivers/vhost/Makefile
> >> @@ -2,3 +2,5 @@ obj-$(CONFIG_VHOST_NET) += vhost_net.o
> >> vhost_net-y := vhost.o net.o
> >>
> >> obj-$(CONFIG_TCM_VHOST) += tcm_vhost.o
> >> +obj-$(CONFIG_VHOST_BLK) += vhost_blk.o
> >> +vhost_blk-y := blk.o
> >> diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
> >> new file mode 100644
> >> index 0000000..f0f118a
> >> --- /dev/null
> >> +++ b/drivers/vhost/blk.c
> >> @@ -0,0 +1,697 @@
> >> +/*
> >> + * Copyright (C) 2011 Taobao, Inc.
> >> + * Author: Liu Yuan <tailai.ly@taobao.com>
> >> + *
> >> + * Copyright (C) 2012 Red Hat, Inc.
> >> + * Author: Asias He <asias@redhat.com>
> >> + *
> >> + * This work is licensed under the terms of the GNU GPL, version 2.
> >> + *
> >> + * virtio-blk server in host kernel.
> >> + */
> >> +
> >> +#include <linux/miscdevice.h>
> >> +#include <linux/module.h>
> >> +#include <linux/vhost.h>
> >> +#include <linux/virtio_blk.h>
> >> +#include <linux/mutex.h>
> >> +#include <linux/file.h>
> >> +#include <linux/kthread.h>
> >> +#include <linux/blkdev.h>
> >> +#include <linux/llist.h>
> >> +
> >> +#include "vhost.c"
> >> +#include "vhost.h"
> >> +#include "blk.h"
> >> +
> >> +static DEFINE_IDA(vhost_blk_index_ida);
> >> +
> >> +enum {
> >> + VHOST_BLK_VQ_REQ = 0,
> >> + VHOST_BLK_VQ_MAX = 1,
> >> +};
> >> +
> >> +struct req_page_list {
> >> + struct page **pages;
> >> + int pages_nr;
> >> +};
> >> +
> >> +struct vhost_blk_req {
> >> + struct llist_node llnode;
> >> + struct req_page_list *pl;
> >> + struct vhost_blk *blk;
> >> +
> >> + struct iovec *iov;
> >> + int iov_nr;
> >> +
> >> + struct bio **bio;
> >> + atomic_t bio_nr;
> >> +
> >> + struct iovec status[1];
> >> +
> >> + sector_t sector;
> >> + int write;
> >> + u16 head;
> >> + long len;
> >> +};
> >> +
> >> +struct vhost_blk {
> >> + struct task_struct *host_kick;
> >
> > Could you please add a comment here explaining why
> > is this better than using the builtin vhost thread?
>
> With separate thread model, the request submit and request completion
> can be handled in parallel. I have measured significant performance
> improvement with this model.
> In the long term, It would be nice if the
> vhost core can provide multiple thread support.
Strange, all completion does it write out the used ring.
I am guessing you didn't complete requests
in a timely manner which was what caused the issue.
OTOH I'm not sure how increasing the number of threads
scales with # of VMs. Increased scheduler pressure is
also a concern.
Did you try checking completion after each
submitted request to address this?
^ permalink raw reply
* Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages
From: Rafael Aquini @ 2012-11-20 14:14 UTC (permalink / raw)
To: Sasha Levin
Cc: Rik van Riel, Michael S. Tsirkin, Minchan Kim, linux-kernel,
virtualization, linux-mm, Andrew Morton
In-Reply-To: <CA+1xoqfbxL-mL3XRDXxnuv0R6b9w6qxU7t+8U3FwS2eK5Sf0OA@mail.gmail.com>
On Sun, Nov 18, 2012 at 09:59:47AM -0500, Sasha Levin wrote:
> On Sat, Nov 17, 2012 at 4:54 PM, Rafael Aquini <aquini@redhat.com> wrote:
> > On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha Levin wrote:
> >>
> >> I'm getting the following while fuzzing using trinity inside a KVM tools guest,
> >> on latest -next:
> >>
> >> [ 1642.783728] BUG: unable to handle kernel NULL pointer dereference at 0000000000000194
> >> [ 1642.785083] IP: [<ffffffff8122b354>] isolate_migratepages_range+0x344/0x7b0
> >>
> >> My guess is that we see those because of a race during the check in
> >> isolate_migratepages_range().
> >>
> >>
> >> Thanks,
> >> Sasha
> >
> > Sasha, could you share your .config and steps you did used with trinity? So I
> > can attempt to reproduce this issue you reported.
>
> Basically try running trinity (with ./trinity -m --quiet --dangerous
> -l off) inside a disposable guest as root.
>
> I manage to hit that every couple of hours.
>
> Config attached.
>
Howdy Sasha,
After several hours since last Sunday running trinity tests on a traditional
KVM-QEMU guest as well as running it on a lkvm guest (both running
next-20121115) I couldn't hit a single time the crash you've reported,
(un)fortunately.
Also, the .config you gave me, applied on top of next-20121115, haven't produced
the same bin you've running and hitting the mentioned bug, apparently.
Here's the RIP for your crash:
[ 1642.783728] BUG: unable to handle kernel NULL pointer dereference at
0000000000000194
[ 1642.785083] IP: [<ffffffff8122b354>] isolate_migratepages_range+0x344/0x7b0
And here's the symbol address for the next-20121115 with your .config I've been
running tests on:
[raquini@x61 linux]$ nm -n vmlinux | grep isolate_migratepages_range
ffffffff8122d890 T isolate_migratepages_range
Also, it seems quite clear I'm missing something from your tree, as applying the
RIP displacement (0x344) to my local isolate_migratepages_range sym addr leads
me to the _middle_ of a instruction opcode that does not dereference any
pointers at all.
So, if you're consistently reproducing the same crash, consider to share with us
a disassembled dump from the isolate_migratepages_range() you're running along
with the crash stack-dump, please.
Cheers!
-- Rafael
^ permalink raw reply
* Re: [PATCH v2 02/11] x86/kexec: Add extra pointers to transition page table PGD, PUD, PMD and PTE
From: Jan Beulich @ 2012-11-20 15:52 UTC (permalink / raw)
To: Daniel Kiper
Cc: xen-devel, konrad.wilk, andrew.cooper3, x86, kexec, linux-kernel,
virtualization, mingo, ebiederm, hpa, tglx
In-Reply-To: <1353423893-23125-3-git-send-email-daniel.kiper@oracle.com>
>>> On 20.11.12 at 16:04, Daniel Kiper <daniel.kiper@oracle.com> wrote:
> Some implementations (e.g. Xen PVOPS) could not use part of identity page
> table
> to construct transition page table. It means that they require separate
> PUDs,
> PMDs and PTEs for virtual and physical (identity) mapping. To satisfy that
> requirement add extra pointer to PGD, PUD, PMD and PTE and align existing
> code.
As said for v1 already - this is not really a requirement of the
interface, or else none of our Xen kernels since 2.6.30 would
have worked. I don't think it is desirable to introduce overhead
for everyone if it's not even needed for Xen.
Jan
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> arch/x86/include/asm/kexec.h | 10 +++++++---
> arch/x86/kernel/machine_kexec_64.c | 12 ++++++------
> 2 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
> index 317ff17..3cf5600 100644
> --- a/arch/x86/include/asm/kexec.h
> +++ b/arch/x86/include/asm/kexec.h
> @@ -157,9 +157,13 @@ struct kimage_arch {
> };
> #else
> struct kimage_arch {
> - pud_t *pud;
> - pmd_t *pmd;
> - pte_t *pte;
> + pgd_t *pgd;
> + pud_t *pud0;
> + pud_t *pud1;
> + pmd_t *pmd0;
> + pmd_t *pmd1;
> + pte_t *pte0;
> + pte_t *pte1;
> };
> #endif
>
> diff --git a/arch/x86/kernel/machine_kexec_64.c
> b/arch/x86/kernel/machine_kexec_64.c
> index b3ea9db..976e54b 100644
> --- a/arch/x86/kernel/machine_kexec_64.c
> +++ b/arch/x86/kernel/machine_kexec_64.c
> @@ -137,9 +137,9 @@ out:
>
> static void free_transition_pgtable(struct kimage *image)
> {
> - free_page((unsigned long)image->arch.pud);
> - free_page((unsigned long)image->arch.pmd);
> - free_page((unsigned long)image->arch.pte);
> + free_page((unsigned long)image->arch.pud0);
> + free_page((unsigned long)image->arch.pmd0);
> + free_page((unsigned long)image->arch.pte0);
> }
>
> static int init_transition_pgtable(struct kimage *image, pgd_t *pgd)
> @@ -157,7 +157,7 @@ static int init_transition_pgtable(struct kimage *image,
> pgd_t *pgd)
> pud = (pud_t *)get_zeroed_page(GFP_KERNEL);
> if (!pud)
> goto err;
> - image->arch.pud = pud;
> + image->arch.pud0 = pud;
> set_pgd(pgd, __pgd(__pa(pud) | _KERNPG_TABLE));
> }
> pud = pud_offset(pgd, vaddr);
> @@ -165,7 +165,7 @@ static int init_transition_pgtable(struct kimage *image,
> pgd_t *pgd)
> pmd = (pmd_t *)get_zeroed_page(GFP_KERNEL);
> if (!pmd)
> goto err;
> - image->arch.pmd = pmd;
> + image->arch.pmd0 = pmd;
> set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE));
> }
> pmd = pmd_offset(pud, vaddr);
> @@ -173,7 +173,7 @@ static int init_transition_pgtable(struct kimage *image,
> pgd_t *pgd)
> pte = (pte_t *)get_zeroed_page(GFP_KERNEL);
> if (!pte)
> goto err;
> - image->arch.pte = pte;
> + image->arch.pte0 = pte;
> set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE));
> }
> pte = pte_offset_kernel(pmd, vaddr);
> --
> 1.5.6.5
^ permalink raw reply
* Re: [PATCH v2 01/11] kexec: introduce kexec_ops struct
From: Eric W. Biederman @ 2012-11-20 16:40 UTC (permalink / raw)
To: Daniel Kiper
Cc: xen-devel, konrad.wilk, andrew.cooper3, x86, kexec, linux-kernel,
virtualization, mingo, jbeulich, hpa, tglx
In-Reply-To: <1353423893-23125-2-git-send-email-daniel.kiper@oracle.com>
Daniel Kiper <daniel.kiper@oracle.com> writes:
> Some kexec/kdump implementations (e.g. Xen PVOPS) could not use default
> functions or require some changes in behavior of kexec/kdump generic code.
> To cope with that problem kexec_ops struct was introduced. It allows
> a developer to replace all or some functions and control some
> functionality of kexec/kdump generic code.
>
> Default behavior of kexec/kdump generic code is not changed.
Ick.
> v2 - suggestions/fixes:
> - add comment for kexec_ops.crash_alloc_temp_store member
> (suggested by Konrad Rzeszutek Wilk),
> - simplify kexec_ops usage
> (suggested by Konrad Rzeszutek Wilk).
>
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> include/linux/kexec.h | 26 ++++++++++
> kernel/kexec.c | 131 +++++++++++++++++++++++++++++++++++++------------
> 2 files changed, 125 insertions(+), 32 deletions(-)
>
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index d0b8458..c8d0b35 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -116,7 +116,33 @@ struct kimage {
> #endif
> };
>
> +struct kexec_ops {
> + /*
> + * Some kdump implementations (e.g. Xen PVOPS dom0) could not access
> + * directly crash kernel memory area. In this situation they must
> + * allocate memory outside of it and later move contents from temporary
> + * storage to final resting places (usualy done by relocate_kernel()).
> + * Such behavior could be enforced by setting
> + * crash_alloc_temp_store member to true.
> + */
Why in the world would Xen not be able to access crash kernel memory?
As currently defined it is normal memory that the kernel chooses not to
use.
If relocate kernel can access that memory you definitely can access the
memory so the comment does not make any sense.
> + bool crash_alloc_temp_store;
> + struct page *(*kimage_alloc_pages)(gfp_t gfp_mask,
> + unsigned int order,
> + unsigned long limit);
> + void (*kimage_free_pages)(struct page *page);
> + unsigned long (*page_to_pfn)(struct page *page);
> + struct page *(*pfn_to_page)(unsigned long pfn);
> + unsigned long (*virt_to_phys)(volatile void *address);
> + void *(*phys_to_virt)(unsigned long address);
> + int (*machine_kexec_prepare)(struct kimage *image);
> + int (*machine_kexec_load)(struct kimage *image);
> + void (*machine_kexec_cleanup)(struct kimage *image);
> + void (*machine_kexec_unload)(struct kimage *image);
> + void (*machine_kexec_shutdown)(void);
> + void (*machine_kexec)(struct kimage *image);
> +};
Ugh. This is a nasty abstraction.
You are mixing and matching a bunch of things together here.
If you need to override machine_kexec_xxx please do that on a per
architecture basis.
Special case overrides of page_to_pfn, pfn_to_page, virt_to_phys,
phys_to_virt, and friends seem completely inappropriate.
There may be a point to all of these but you are mixing and matching
things badly.
Eric
^ permalink raw reply
* Re: [PATCH v11 7/7] mm: add vm event counters for balloon pages compaction
From: Andrew Morton @ 2012-11-20 23:29 UTC (permalink / raw)
To: Rafael Aquini
Cc: Rik van Riel, Konrad Rzeszutek Wilk, Michael S. Tsirkin,
Peter Zijlstra, linux-kernel, virtualization, linux-mm,
Andi Kleen, Minchan Kim, Paul E. McKenney
In-Reply-To: <20121109145829.GC4308@optiplex.redhat.com>
On Fri, 9 Nov 2012 12:58:29 -0200
Rafael Aquini <aquini@redhat.com> wrote:
> On Fri, Nov 09, 2012 at 12:20:33PM +0000, Mel Gorman wrote:
> > On Wed, Nov 07, 2012 at 01:05:54AM -0200, Rafael Aquini wrote:
> > > This patch introduces a new set of vm event counters to keep track of
> > > ballooned pages compaction activity.
> > >
> > > Signed-off-by: Rafael Aquini <aquini@redhat.com>
> >
> > Other than confirming the thing actually works can any meaningful
> > conclusions be drawn from this counters?
> >
> > I know I have been inconsistent on this myself in the past but recently
> > I've been taking the attitude that the counters can be used to fit into
> > some other metric. I'm looking to change the compaction counters to be
> > able to build a basic cost model for example. The same idea could be
> > used for balloons of course but it's a less critical path than
> > compaction for THP for example.
> >
> > Assuming it builds and all the defines are correct when the feature is
> > not configured (I didn't check) then there is nothing wrong with the
> > patch. However, if it was dropped would it make life very hard or would
> > you notice?
> >
>
> Originally, I proposed this patch as droppable (and it's still droppable)
> because its major purpose was solely to show the thing working consistently
>
> OTOH, it might make the life easier to spot breakages if it remains with the
> merged bits, and per a reviewer request I removed its 'DROP BEFORE MERGE'
> disclaimer.
>
> https://lkml.org/lkml/2012/8/8/616
There's a lot to be said for not merging things.
I think I'll maintain this as a mm-only patch. That way it's
available in linux-next and we can merge it later if a need arises.
^ permalink raw reply
* Re: [PATCH v11 4/7] mm: introduce compaction and migration for ballooned pages
From: Andrew Morton @ 2012-11-20 23:33 UTC (permalink / raw)
To: Mel Gorman
Cc: Rik van Riel, Rafael Aquini, Konrad Rzeszutek Wilk,
Michael S. Tsirkin, Peter Zijlstra, linux-kernel, virtualization,
linux-mm, Andi Kleen, Minchan Kim, Paul E. McKenney
In-Reply-To: <20121109121602.GQ3886@csn.ul.ie>
On Fri, 9 Nov 2012 12:16:02 +0000
Mel Gorman <mel@csn.ul.ie> wrote:
> On Wed, Nov 07, 2012 at 01:05:51AM -0200, Rafael Aquini wrote:
> > Memory fragmentation introduced by ballooning might reduce significantly
> > the number of 2MB contiguous memory blocks that can be used within a guest,
> > thus imposing performance penalties associated with the reduced number of
> > transparent huge pages that could be used by the guest workload.
> >
> > This patch introduces the helper functions as well as the necessary changes
> > to teach compaction and migration bits how to cope with pages which are
> > part of a guest memory balloon, in order to make them movable by memory
> > compaction procedures.
> >
>
> ...
>
> > --- a/mm/compaction.c
> > +++ b/mm/compaction.c
> > @@ -14,6 +14,7 @@
> > #include <linux/backing-dev.h>
> > #include <linux/sysctl.h>
> > #include <linux/sysfs.h>
> > +#include <linux/balloon_compaction.h>
> > #include "internal.h"
> >
> > #if defined CONFIG_COMPACTION || defined CONFIG_CMA
> > @@ -565,9 +566,24 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
> > goto next_pageblock;
> > }
> >
> > - /* Check may be lockless but that's ok as we recheck later */
> > - if (!PageLRU(page))
> > + /*
> > + * Check may be lockless but that's ok as we recheck later.
> > + * It's possible to migrate LRU pages and balloon pages
> > + * Skip any other type of page
> > + */
> > + if (!PageLRU(page)) {
> > + if (unlikely(balloon_page_movable(page))) {
>
> Because it's lockless, it really seems that the barrier stuck down there
> is unnecessary. At worst you get a temporarily incorrect answer that you
> recheck later under page lock in balloon_page_isolate.
What happened with this?
Also: what barrier?
^ permalink raw reply
* Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages
From: Sasha Levin @ 2012-11-21 1:18 UTC (permalink / raw)
To: Rafael Aquini
Cc: Rik van Riel, Michael S. Tsirkin, Minchan Kim, linux-kernel,
virtualization, linux-mm, Andrew Morton
In-Reply-To: <20121120141438.GA21672@x61.redhat.com>
On 11/20/2012 09:14 AM, Rafael Aquini wrote:
> On Sun, Nov 18, 2012 at 09:59:47AM -0500, Sasha Levin wrote:
>> On Sat, Nov 17, 2012 at 4:54 PM, Rafael Aquini <aquini@redhat.com> wrote:
>>> On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha Levin wrote:
>>>>
>>>> I'm getting the following while fuzzing using trinity inside a KVM tools guest,
>>>> on latest -next:
>>>>
>>>> [ 1642.783728] BUG: unable to handle kernel NULL pointer dereference at 0000000000000194
>>>> [ 1642.785083] IP: [<ffffffff8122b354>] isolate_migratepages_range+0x344/0x7b0
>>>>
>>>> My guess is that we see those because of a race during the check in
>>>> isolate_migratepages_range().
>>>>
>>>>
>>>> Thanks,
>>>> Sasha
>>>
>>> Sasha, could you share your .config and steps you did used with trinity? So I
>>> can attempt to reproduce this issue you reported.
>>
>> Basically try running trinity (with ./trinity -m --quiet --dangerous
>> -l off) inside a disposable guest as root.
>>
>> I manage to hit that every couple of hours.
>>
>> Config attached.
>>
>
> Howdy Sasha,
>
> After several hours since last Sunday running trinity tests on a traditional
> KVM-QEMU guest as well as running it on a lkvm guest (both running
> next-20121115) I couldn't hit a single time the crash you've reported,
> (un)fortunately.
Odd... I can see it happening here every couple of hours.
> Also, the .config you gave me, applied on top of next-20121115, haven't produced
> the same bin you've running and hitting the mentioned bug, apparently.
>
> Here's the RIP for your crash:
> [ 1642.783728] BUG: unable to handle kernel NULL pointer dereference at
> 0000000000000194
> [ 1642.785083] IP: [<ffffffff8122b354>] isolate_migratepages_range+0x344/0x7b0
>
>
> And here's the symbol address for the next-20121115 with your .config I've been
> running tests on:
> [raquini@x61 linux]$ nm -n vmlinux | grep isolate_migratepages_range
> ffffffff8122d890 T isolate_migratepages_range
>
> Also, it seems quite clear I'm missing something from your tree, as applying the
> RIP displacement (0x344) to my local isolate_migratepages_range sym addr leads
> me to the _middle_ of a instruction opcode that does not dereference any
> pointers at all.
Yup, I carry another small fix to mpol (which is unrelated to this one).
> So, if you're consistently reproducing the same crash, consider to share with us
> a disassembled dump from the isolate_migratepages_range() you're running along
> with the crash stack-dump, please.
Sure!
The call chain is:
isolate_migratepages_range
balloon_page_movable
__is_movable_balloon_page
mapping_balloon
mapping_balloon() fails because it checks for mapping to be non-null (and it is -
it's usually a small value like 0x50), and then it dereferences that.
The relevant assembly is:
static inline int mapping_balloon(struct address_space *mapping)
{
return mapping && test_bit(AS_BALLOON_MAP, &mapping->flags);
17ab: 48 85 c0 test %rax,%rax
17ae: 0f 84 4c 02 00 00 je 1a00 <isolate_migratepages_range+0x590>
17b4: 48 8b 80 40 01 00 00 mov 0x140(%rax),%rax
17bb: a9 00 00 00 20 test $0x20000000,%eax
17c0: 0f 84 3a 02 00 00 je 1a00 <isolate_migratepages_range+0x590>
It dies on 17b4.
Let me know if you need anything else from me, I can also add debug code into the
kernel if it would help you...
Thanks,
Sasha
^ permalink raw reply
* Re: [PATCH] vhost-blk: Add vhost-blk support v5
From: Asias He @ 2012-11-21 4:24 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: axboe, kvm, linux-kernel, virtualization, Christoph Hellwig
In-Reply-To: <20121120133714.GC3448@redhat.com>
On 11/20/2012 09:37 PM, Michael S. Tsirkin wrote:
> On Tue, Nov 20, 2012 at 02:39:40PM +0800, Asias He wrote:
>> On 11/20/2012 04:26 AM, Michael S. Tsirkin wrote:
>>> On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote:
>>>> vhost-blk is an in-kernel virito-blk device accelerator.
>>>>
>>>> Due to lack of proper in-kernel AIO interface, this version converts
>>>> guest's I/O request to bio and use submit_bio() to submit I/O directly.
>>>> So this version any supports raw block device as guest's disk image,
>>>> e.g. /dev/sda, /dev/ram0. We can add file based image support to
>>>> vhost-blk once we have in-kernel AIO interface. There are some work in
>>>> progress for in-kernel AIO interface from Dave Kleikamp and Zach Brown:
>>>>
>>>> http://marc.info/?l=linux-fsdevel&m=133312234313122
>>>>
>>>> Performance evaluation:
>>>> -----------------------------
>>>> 1) LKVM
>>>> Fio with libaio ioengine on Fusion IO device using kvm tool
>>>> IOPS(k) Before After Improvement
>>>> seq-read 107 121 +13.0%
>>>> seq-write 130 179 +37.6%
>>>> rnd-read 102 122 +19.6%
>>>> rnd-write 125 159 +27.0%
>>>>
>>>> 2) QEMU
>>>> Fio with libaio ioengine on Fusion IO device using QEMU
>>>> IOPS(k) Before After Improvement
>>>> seq-read 76 123 +61.8%
>>>> seq-write 139 173 +24.4%
>>>> rnd-read 73 120 +64.3%
>>>> rnd-write 75 156 +108.0%
>>>
>>> Could you compare with dataplane qemu as well please?
>>
>>
>> Well, I will try to collect it.
>>
>>>
>>>>
>>>> Userspace bits:
>>>> -----------------------------
>>>> 1) LKVM
>>>> The latest vhost-blk userspace bits for kvm tool can be found here:
>>>> git@github.com:asias/linux-kvm.git blk.vhost-blk
>>>>
>>>> 2) QEMU
>>>> The latest vhost-blk userspace prototype for QEMU can be found here:
>>>> git@github.com:asias/qemu.git blk.vhost-blk
>>>>
>>>> Changes in v5:
>>>> - Do not assume the buffer layout
>>>> - Fix wakeup race
>>>>
>>>> Changes in v4:
>>>> - Mark req->status as userspace pointer
>>>> - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status()
>>>> - Add if (need_resched()) schedule() in blk thread
>>>> - Kill vhost_blk_stop_vq() and move it into vhost_blk_stop()
>>>> - Use vq_err() instead of pr_warn()
>>>> - Fail un Unsupported request
>>>> - Add flush in vhost_blk_set_features()
>>>>
>>>> Changes in v3:
>>>> - Sending REQ_FLUSH bio instead of vfs_fsync, thanks Christoph!
>>>> - Check file passed by user is a raw block device file
>>>>
>>>> Signed-off-by: Asias He <asias@redhat.com>
>>>
>>> Since there are files shared by this and vhost net
>>> it's easiest for me to merge this all through the
>>> vhost tree.
>>>
>>> Jens, could you ack this and the bio usage in this driver
>>> please?
>>>
>>>> ---
>>>> drivers/vhost/Kconfig | 1 +
>>>> drivers/vhost/Kconfig.blk | 10 +
>>>> drivers/vhost/Makefile | 2 +
>>>> drivers/vhost/blk.c | 697 ++++++++++++++++++++++++++++++++++++++++++++++
>>>> drivers/vhost/blk.h | 8 +
>>>> 5 files changed, 718 insertions(+)
>>>> create mode 100644 drivers/vhost/Kconfig.blk
>>>> create mode 100644 drivers/vhost/blk.c
>>>> create mode 100644 drivers/vhost/blk.h
>>>>
>>>> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
>>>> index 202bba6..acd8038 100644
>>>> --- a/drivers/vhost/Kconfig
>>>> +++ b/drivers/vhost/Kconfig
>>>> @@ -11,4 +11,5 @@ config VHOST_NET
>>>>
>>>> if STAGING
>>>> source "drivers/vhost/Kconfig.tcm"
>>>> +source "drivers/vhost/Kconfig.blk"
>>>> endif
>>>> diff --git a/drivers/vhost/Kconfig.blk b/drivers/vhost/Kconfig.blk
>>>> new file mode 100644
>>>> index 0000000..ff8ab76
>>>> --- /dev/null
>>>> +++ b/drivers/vhost/Kconfig.blk
>>>> @@ -0,0 +1,10 @@
>>>> +config VHOST_BLK
>>>> + tristate "Host kernel accelerator for virtio blk (EXPERIMENTAL)"
>>>> + depends on BLOCK && EXPERIMENTAL && m
>>>> + ---help---
>>>> + This kernel module can be loaded in host kernel to accelerate
>>>> + guest block with virtio_blk. Not to be confused with virtio_blk
>>>> + module itself which needs to be loaded in guest kernel.
>>>> +
>>>> + To compile this driver as a module, choose M here: the module will
>>>> + be called vhost_blk.
>>>> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
>>>> index a27b053..1a8a4a5 100644
>>>> --- a/drivers/vhost/Makefile
>>>> +++ b/drivers/vhost/Makefile
>>>> @@ -2,3 +2,5 @@ obj-$(CONFIG_VHOST_NET) += vhost_net.o
>>>> vhost_net-y := vhost.o net.o
>>>>
>>>> obj-$(CONFIG_TCM_VHOST) += tcm_vhost.o
>>>> +obj-$(CONFIG_VHOST_BLK) += vhost_blk.o
>>>> +vhost_blk-y := blk.o
>>>> diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
>>>> new file mode 100644
>>>> index 0000000..f0f118a
>>>> --- /dev/null
>>>> +++ b/drivers/vhost/blk.c
>>>> @@ -0,0 +1,697 @@
>>>> +/*
>>>> + * Copyright (C) 2011 Taobao, Inc.
>>>> + * Author: Liu Yuan <tailai.ly@taobao.com>
>>>> + *
>>>> + * Copyright (C) 2012 Red Hat, Inc.
>>>> + * Author: Asias He <asias@redhat.com>
>>>> + *
>>>> + * This work is licensed under the terms of the GNU GPL, version 2.
>>>> + *
>>>> + * virtio-blk server in host kernel.
>>>> + */
>>>> +
>>>> +#include <linux/miscdevice.h>
>>>> +#include <linux/module.h>
>>>> +#include <linux/vhost.h>
>>>> +#include <linux/virtio_blk.h>
>>>> +#include <linux/mutex.h>
>>>> +#include <linux/file.h>
>>>> +#include <linux/kthread.h>
>>>> +#include <linux/blkdev.h>
>>>> +#include <linux/llist.h>
>>>> +
>>>> +#include "vhost.c"
>>>> +#include "vhost.h"
>>>> +#include "blk.h"
>>>> +
>>>> +static DEFINE_IDA(vhost_blk_index_ida);
>>>> +
>>>> +enum {
>>>> + VHOST_BLK_VQ_REQ = 0,
>>>> + VHOST_BLK_VQ_MAX = 1,
>>>> +};
>>>> +
>>>> +struct req_page_list {
>>>> + struct page **pages;
>>>> + int pages_nr;
>>>> +};
>>>> +
>>>> +struct vhost_blk_req {
>>>> + struct llist_node llnode;
>>>> + struct req_page_list *pl;
>>>> + struct vhost_blk *blk;
>>>> +
>>>> + struct iovec *iov;
>>>> + int iov_nr;
>>>> +
>>>> + struct bio **bio;
>>>> + atomic_t bio_nr;
>>>> +
>>>> + struct iovec status[1];
>>>> +
>>>> + sector_t sector;
>>>> + int write;
>>>> + u16 head;
>>>> + long len;
>>>> +};
>>>> +
>>>> +struct vhost_blk {
>>>> + struct task_struct *host_kick;
>>>
>>> Could you please add a comment here explaining why
>>> is this better than using the builtin vhost thread?
>>
>> With separate thread model, the request submit and request completion
>> can be handled in parallel. I have measured significant performance
>> improvement with this model.
>> In the long term, It would be nice if the
>> vhost core can provide multiple thread support.
>
> Strange, all completion does it write out the used ring.
> I am guessing you didn't complete requests
> in a timely manner which was what caused the issue.
Previously, there was two 'struct vhost_work' work which poll on the
guest kick eventfd and host aio eventfd. The vhost thread is handling
the works when there are data in eventfd, either guest kick or aio
completion.
> OTOH I'm not sure how increasing the number of threads
> scales with # of VMs. Increased scheduler pressure is
> also a concern.
Agree, this is also my concern. However, this is a trade-off. we have a
price to pay for the parallelism. Also, one thread per vhost device
might not scale with # of VMs too, compared to e.g. per cpu thread.
> Did you try checking completion after each
> submitted request to address this?
Isn't this a sync operation? We can not only account on the checking the
completion in the submit path. Another polling on the completion is
needed anyway. Mixing the completion in submit path, 1) makes the submit
delay longer 2) does not help with the case where a single request takes
relatively long time to finish. IMHO, I do not think mixing the submit
and completion is a good idea.
--
Asias
^ permalink raw reply
* Re: [PATCH] vhost-blk: Add vhost-blk support v5
From: Michael S. Tsirkin @ 2012-11-21 11:57 UTC (permalink / raw)
To: Asias He; +Cc: axboe, kvm, linux-kernel, virtualization, Christoph Hellwig
In-Reply-To: <50AC5797.1060604@redhat.com>
On Wed, Nov 21, 2012 at 12:24:55PM +0800, Asias He wrote:
> On 11/20/2012 09:37 PM, Michael S. Tsirkin wrote:
> > On Tue, Nov 20, 2012 at 02:39:40PM +0800, Asias He wrote:
> >> On 11/20/2012 04:26 AM, Michael S. Tsirkin wrote:
> >>> On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote:
> >>>> vhost-blk is an in-kernel virito-blk device accelerator.
> >>>>
> >>>> Due to lack of proper in-kernel AIO interface, this version converts
> >>>> guest's I/O request to bio and use submit_bio() to submit I/O directly.
> >>>> So this version any supports raw block device as guest's disk image,
> >>>> e.g. /dev/sda, /dev/ram0. We can add file based image support to
> >>>> vhost-blk once we have in-kernel AIO interface. There are some work in
> >>>> progress for in-kernel AIO interface from Dave Kleikamp and Zach Brown:
> >>>>
> >>>> http://marc.info/?l=linux-fsdevel&m=133312234313122
> >>>>
> >>>> Performance evaluation:
> >>>> -----------------------------
> >>>> 1) LKVM
> >>>> Fio with libaio ioengine on Fusion IO device using kvm tool
> >>>> IOPS(k) Before After Improvement
> >>>> seq-read 107 121 +13.0%
> >>>> seq-write 130 179 +37.6%
> >>>> rnd-read 102 122 +19.6%
> >>>> rnd-write 125 159 +27.0%
> >>>>
> >>>> 2) QEMU
> >>>> Fio with libaio ioengine on Fusion IO device using QEMU
> >>>> IOPS(k) Before After Improvement
> >>>> seq-read 76 123 +61.8%
> >>>> seq-write 139 173 +24.4%
> >>>> rnd-read 73 120 +64.3%
> >>>> rnd-write 75 156 +108.0%
> >>>
> >>> Could you compare with dataplane qemu as well please?
> >>
> >>
> >> Well, I will try to collect it.
> >>
> >>>
> >>>>
> >>>> Userspace bits:
> >>>> -----------------------------
> >>>> 1) LKVM
> >>>> The latest vhost-blk userspace bits for kvm tool can be found here:
> >>>> git@github.com:asias/linux-kvm.git blk.vhost-blk
> >>>>
> >>>> 2) QEMU
> >>>> The latest vhost-blk userspace prototype for QEMU can be found here:
> >>>> git@github.com:asias/qemu.git blk.vhost-blk
> >>>>
> >>>> Changes in v5:
> >>>> - Do not assume the buffer layout
> >>>> - Fix wakeup race
> >>>>
> >>>> Changes in v4:
> >>>> - Mark req->status as userspace pointer
> >>>> - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status()
> >>>> - Add if (need_resched()) schedule() in blk thread
> >>>> - Kill vhost_blk_stop_vq() and move it into vhost_blk_stop()
> >>>> - Use vq_err() instead of pr_warn()
> >>>> - Fail un Unsupported request
> >>>> - Add flush in vhost_blk_set_features()
> >>>>
> >>>> Changes in v3:
> >>>> - Sending REQ_FLUSH bio instead of vfs_fsync, thanks Christoph!
> >>>> - Check file passed by user is a raw block device file
> >>>>
> >>>> Signed-off-by: Asias He <asias@redhat.com>
> >>>
> >>> Since there are files shared by this and vhost net
> >>> it's easiest for me to merge this all through the
> >>> vhost tree.
> >>>
> >>> Jens, could you ack this and the bio usage in this driver
> >>> please?
> >>>
> >>>> ---
> >>>> drivers/vhost/Kconfig | 1 +
> >>>> drivers/vhost/Kconfig.blk | 10 +
> >>>> drivers/vhost/Makefile | 2 +
> >>>> drivers/vhost/blk.c | 697 ++++++++++++++++++++++++++++++++++++++++++++++
> >>>> drivers/vhost/blk.h | 8 +
> >>>> 5 files changed, 718 insertions(+)
> >>>> create mode 100644 drivers/vhost/Kconfig.blk
> >>>> create mode 100644 drivers/vhost/blk.c
> >>>> create mode 100644 drivers/vhost/blk.h
> >>>>
> >>>> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> >>>> index 202bba6..acd8038 100644
> >>>> --- a/drivers/vhost/Kconfig
> >>>> +++ b/drivers/vhost/Kconfig
> >>>> @@ -11,4 +11,5 @@ config VHOST_NET
> >>>>
> >>>> if STAGING
> >>>> source "drivers/vhost/Kconfig.tcm"
> >>>> +source "drivers/vhost/Kconfig.blk"
> >>>> endif
> >>>> diff --git a/drivers/vhost/Kconfig.blk b/drivers/vhost/Kconfig.blk
> >>>> new file mode 100644
> >>>> index 0000000..ff8ab76
> >>>> --- /dev/null
> >>>> +++ b/drivers/vhost/Kconfig.blk
> >>>> @@ -0,0 +1,10 @@
> >>>> +config VHOST_BLK
> >>>> + tristate "Host kernel accelerator for virtio blk (EXPERIMENTAL)"
> >>>> + depends on BLOCK && EXPERIMENTAL && m
> >>>> + ---help---
> >>>> + This kernel module can be loaded in host kernel to accelerate
> >>>> + guest block with virtio_blk. Not to be confused with virtio_blk
> >>>> + module itself which needs to be loaded in guest kernel.
> >>>> +
> >>>> + To compile this driver as a module, choose M here: the module will
> >>>> + be called vhost_blk.
> >>>> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
> >>>> index a27b053..1a8a4a5 100644
> >>>> --- a/drivers/vhost/Makefile
> >>>> +++ b/drivers/vhost/Makefile
> >>>> @@ -2,3 +2,5 @@ obj-$(CONFIG_VHOST_NET) += vhost_net.o
> >>>> vhost_net-y := vhost.o net.o
> >>>>
> >>>> obj-$(CONFIG_TCM_VHOST) += tcm_vhost.o
> >>>> +obj-$(CONFIG_VHOST_BLK) += vhost_blk.o
> >>>> +vhost_blk-y := blk.o
> >>>> diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
> >>>> new file mode 100644
> >>>> index 0000000..f0f118a
> >>>> --- /dev/null
> >>>> +++ b/drivers/vhost/blk.c
> >>>> @@ -0,0 +1,697 @@
> >>>> +/*
> >>>> + * Copyright (C) 2011 Taobao, Inc.
> >>>> + * Author: Liu Yuan <tailai.ly@taobao.com>
> >>>> + *
> >>>> + * Copyright (C) 2012 Red Hat, Inc.
> >>>> + * Author: Asias He <asias@redhat.com>
> >>>> + *
> >>>> + * This work is licensed under the terms of the GNU GPL, version 2.
> >>>> + *
> >>>> + * virtio-blk server in host kernel.
> >>>> + */
> >>>> +
> >>>> +#include <linux/miscdevice.h>
> >>>> +#include <linux/module.h>
> >>>> +#include <linux/vhost.h>
> >>>> +#include <linux/virtio_blk.h>
> >>>> +#include <linux/mutex.h>
> >>>> +#include <linux/file.h>
> >>>> +#include <linux/kthread.h>
> >>>> +#include <linux/blkdev.h>
> >>>> +#include <linux/llist.h>
> >>>> +
> >>>> +#include "vhost.c"
> >>>> +#include "vhost.h"
> >>>> +#include "blk.h"
> >>>> +
> >>>> +static DEFINE_IDA(vhost_blk_index_ida);
> >>>> +
> >>>> +enum {
> >>>> + VHOST_BLK_VQ_REQ = 0,
> >>>> + VHOST_BLK_VQ_MAX = 1,
> >>>> +};
> >>>> +
> >>>> +struct req_page_list {
> >>>> + struct page **pages;
> >>>> + int pages_nr;
> >>>> +};
> >>>> +
> >>>> +struct vhost_blk_req {
> >>>> + struct llist_node llnode;
> >>>> + struct req_page_list *pl;
> >>>> + struct vhost_blk *blk;
> >>>> +
> >>>> + struct iovec *iov;
> >>>> + int iov_nr;
> >>>> +
> >>>> + struct bio **bio;
> >>>> + atomic_t bio_nr;
> >>>> +
> >>>> + struct iovec status[1];
> >>>> +
> >>>> + sector_t sector;
> >>>> + int write;
> >>>> + u16 head;
> >>>> + long len;
> >>>> +};
> >>>> +
> >>>> +struct vhost_blk {
> >>>> + struct task_struct *host_kick;
> >>>
> >>> Could you please add a comment here explaining why
> >>> is this better than using the builtin vhost thread?
> >>
> >> With separate thread model, the request submit and request completion
> >> can be handled in parallel. I have measured significant performance
> >> improvement with this model.
> >> In the long term, It would be nice if the
> >> vhost core can provide multiple thread support.
> >
> > Strange, all completion does it write out the used ring.
> > I am guessing you didn't complete requests
> > in a timely manner which was what caused the issue.
>
> Previously, there was two 'struct vhost_work' work which poll on the
> guest kick eventfd and host aio eventfd. The vhost thread is handling
> the works when there are data in eventfd, either guest kick or aio
> completion.
See VHOST_NET_WEIGHT in how in -net we prevent starvation
between tx and rx.
> > OTOH I'm not sure how increasing the number of threads
> > scales with # of VMs. Increased scheduler pressure is
> > also a concern.
>
> Agree, this is also my concern. However, this is a trade-off. we have a
> price to pay for the parallelism.
If the work offloaded is trivial in size then the gain is likely
to be marginal.
> Also, one thread per vhost device
> might not scale with # of VMs too, compared to e.g. per cpu thread.
I'e no idea how to do QoS with a per cpu thread otherwise
> > Did you try checking completion after each
> > submitted request to address this?
>
> Isn't this a sync operation? We can not only account on the checking the
> completion in the submit path. Another polling on the completion is
> needed anyway. Mixing the completion in submit path, 1) makes the submit
> delay longer 2) does not help with the case where a single request takes
> relatively long time to finish. IMHO, I do not think mixing the submit
> and completion is a good idea.
To clarify, you would
1. do llist_del_all in handle_kick -
the delay this adds should be trivial
2. for completion queue work on vhost thread -
this can be as simple as waking up the regular
kick handler
You can further reduce overhead by batching
the wakeups in 2. See my patch
vhost-net: reduce vq polling on tx zerocopy
that does this for -net.
> --
> Asias
^ permalink raw reply
* WorldCIST'13: Indexed by ISI, SCOPUS, DBLP and EI-Compendex - Deadline: November 28
From: WorldCIST @ 2012-11-21 17:44 UTC (permalink / raw)
To: virtualization
[-- Attachment #1: Type: text/plain, Size: 6599 bytes --]
Apologies if you are receiving this mail more than once...
Please disseminate by colleagues, researchers, students, etc. Thanks a lot!
**********************************************************************************
WorldCIST'13
The 2013 World Conference on Information Systems and Technologies
March 27 - 30, Algarve, Portugal
http://www.aisti.eu/worldcist13/
**********************************************************************************
SCOPE
The 2013 World Conference on Information Systems and Technologies (WorldCIST'13: http://www.aisti.eu/worldcist13/) is a global forum for researchers and practitioners to present and discuss the most recent innovations, trends, results, experiences and concerns in the several perspectives of Information Systems and Technologies.
We are pleased to invite you to submit your papers to WorldCISTI'13. All submissions will be reviewed on the basis of relevance, originality, importance and clarity.
THEMES
Submitted papers should be related with one or more of the main themes proposed for the Conference:
A) Information and Knowledge Management (IKM);
B) Organizational Models and Information Systems (OMIS);
C) Intelligent and Decision Support Systems (IDSS);
D) Software Systems, Architectures, Applications and Tools (SSAAT);
E) Computer Networks, Mobility and Pervasive Systems (CNMPS);
F) Human-Computer Interaction (HCI).
TYPES OF SUBMISSIONS AND DECISIONS
Four types of papers can be submitted:
Full paper: Finished or consolidated R&D works, to be included in one of the Conference themes. These papers are assigned a 10-page limit.
Short paper: Ongoing works with relevant preliminary results, open to discussion. These papers are assigned a 7-page limit.
Poster paper: Initial work with relevant ideas, open to discussion. These papers are assigned to a 4-page limit.
Company paper: Companies' papers that show practical experience, R & D, tools, etc., focused on some topics of the conference. These papers are assigned to a 4-page limit.
Submitted papers must comply with the format of Advances in Intelligent Systems and Computing Series (see http://www.aisti.eu/worldcist13/springerformat.doc) be written in English, must not have been published before, not be under review for any other conference or publication and not include any information leading to the authors identification. Therefore, the authors names, affiliations and bibliographic references should not be included in the version for evaluation by the Program Committee. This information should only be included in the camera-ready version.
All papers will be subjected to a double-blind review by at least two members of the Program Committee.
Based on Program Committee evaluation, a paper can be rejected or accepted by the Conference Chairs. In the later case, it can be accepted as the type originally submitted or as another type. Thus, full papers can be accepted as short papers or poster papers only. Similarly, short papers can be accepted as poster papers only. In these cases, the authors will be allowed to maintain the original number of pages in the camera-ready version.
The authors of accepted poster papers must also build and print a poster to be exhibited during the Conference. This poster must follow an A1 or A2 vertical format. The Conference includes Work Sessions where these posters are presented and orally discussed, with a 5 minute limit per poster.
The authors of accepted full papers will have 15 minutes to present their work in a Conference Work Session; approximately 5 minutes of discussion will follow each presentation. The authors of accepted short papers and company papers will have 11 minutes to present their work in a Conference Work Session; approximately 4 minutes of discussion will follow each presentation.
PUBLICATION AND INDEXING
To ensure that a full paper, short paper, poster paper or company paper is published in the Proceedings, at least one of the authors must be fully registered by the 11th of January 2013, and the paper must comply with the suggested layout and page-limit. Additionally, all recommended changes must be addressed by the authors before they submit the camera-ready version.
No more than one paper per registration will be published in the Conference Proceedings. An extra fee must be paid for publication of additional papers, with a maximum of two additional papers per registration.
Full and short papers will be published in Proceedings by Springer, in Advances in Intelligent Systems and Computing Series. Poster and company papers will be published in Proceedings by AISTI.
Published full and short papers will be indexed by ISI, EI-Compendex, SCOPUS, DBLP and EBSCO, among others, and will be available in the SpringerLink Digital Library. Published poster and company papers will be indexed in EI-Compendex and EBSCO.
The authors of the best selected papers will be invited to extend them for publication in edited books and in international journals indexed by ISI/JCR, SCOPUS and/or DBLP, among others, such as:
- ACM Transactions on Modeling and Computer Simulation (TOMACS)
- Online Information Review (OIR)
- Informatics for Health and Social Care (IHSC)
- Computer Science and Information Systems (ComSIS)
- Telecommunication Systems Journal (TSJ)
- INFORMATION - An International Interdisciplinary Journal
- Journal of Organizational and End User Computing (JOEUC)
- Information Researh (IR)
- International Journal of Internet Protocol Technology (IJIPT)
- Studies in Computational Intelligence (SCI)
- Journal of Advanced Computational Intelligence and Intelligent Informatics (JACIII)
- Journal of Electrical and Computer Engineering (JECE): Special Issue in Advances in Radar Technology
- WSEAS Transactions on Systems (TS)
- Library Review (LR)
- Education for Information (EI)
- International Journal of IT/Business Alignment and Governance (IJITBAG)
- International Journal of Systems and Service-Oriented Engineering (IJSSOE)
- International Journal of Interactive Multimedia and Artificial Intelligence (IJIMAI)
IMPORTANT DATES
Paper Submission: November 25, 2012
Notification of Acceptance: December 30, 2012
Camera-ready Submission: January 9, 2013
Payment of Registration, to ensure the inclusion of an accepted paper in the conference proceedings: January 11, 2013.
-
Kind regards,
Maria Lemos
WorldCIST'13
http://www.aisti.eu/worldcist13/
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox