summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
ModeNameSize
-rw-r--r--Kconfig6634logstatsplainblame
-rw-r--r--Makefile2588logstatsplainblame
d---------amd100logstatsplain
d---------armada813logstatsplain
d---------ast456logstatsplain
-rw-r--r--ati_pcigart.c5765logstatsplainblame
d---------atmel-hlcdc394logstatsplain
d---------bochs301logstatsplain
d---------bridge218logstatsplain
d---------cirrus315logstatsplain
-rw-r--r--drm_agpsupport.c13413logstatsplainblame
-rw-r--r--drm_atomic.c46721logstatsplainblame
-rw-r--r--drm_atomic_helper.c65467logstatsplainblame
-rw-r--r--drm_auth.c3176logstatsplainblame
-rw-r--r--drm_bridge.c10011logstatsplainblame
-rw-r--r--drm_bufs.c39676logstatsplainblame
-rw-r--r--drm_cache.c3973logstatsplainblame
-rw-r--r--drm_context.c11972logstatsplainblame
-rw-r--r--drm_crtc.c165796logstatsplainblame
-rw-r--r--drm_crtc_helper.c31175logstatsplainblame
-rw-r--r--drm_crtc_internal.h1944logstatsplainblame
-rw-r--r--drm_debugfs.c10317logstatsplainblame
-rw-r--r--drm_dma.c4297logstatsplainblame
-rw-r--r--drm_dp_helper.c18495logstatsplainblame
-rw-r--r--drm_dp_mst_topology.c76909logstatsplainblame
-rw-r--r--drm_drv.c22752logstatsplainblame
-rw-r--r--drm_edid.c124068logstatsplainblame
-rw-r--r--drm_edid_load.c9838logstatsplainblame
-rw-r--r--drm_encoder_slave.c5512logstatsplainblame
-rw-r--r--drm_fb_cma_helper.c12054logstatsplainblame
-rw-r--r--drm_fb_helper.c52797logstatsplainblame
-rw-r--r--drm_flip_work.c4923logstatsplainblame
-rw-r--r--drm_fops.c14148logstatsplainblame
-rw-r--r--drm_gem.c26438logstatsplainblame
-rw-r--r--drm_gem_cma_helper.c15862logstatsplainblame
-rw-r--r--drm_global.c3046logstatsplainblame
-rw-r--r--drm_hashtab.c5570logstatsplainblame
-rw-r--r--drm_info.c6225logstatsplainblame
-rw-r--r--drm_internal.h4908logstatsplainblame
-rw-r--r--drm_ioc32.c32689logstatsplainblame
-rw-r--r--drm_ioctl.c25160logstatsplainblame
-rw-r--r--drm_irq.c53857logstatsplainblame
-rw-r--r--drm_legacy.h4289logstatsplainblame
-rw-r--r--drm_lock.c10643logstatsplainblame
-rw-r--r--drm_memory.c4493logstatsplainblame
-rw-r--r--drm_mipi_dsi.c23318logstatsplainblame
-rw-r--r--drm_mm.c25478logstatsplainblame
-rw-r--r--drm_modes.c45734logstatsplainblame
-rw-r--r--drm_modeset_lock.c12633logstatsplainblame
-rw-r--r--drm_of.c1549logstatsplainblame
-rw-r--r--drm_panel.c2698logstatsplainblame
-rw-r--r--drm_pci.c12147logstatsplainblame
-rw-r--r--drm_plane_helper.c18849logstatsplainblame
-rw-r--r--drm_platform.c3157logstatsplainblame
-rw-r--r--drm_prime.c20944logstatsplainblame
-rw-r--r--drm_probe_helper.c17088logstatsplainblame
-rw-r--r--drm_rect.c11334logstatsplainblame
-rw-r--r--drm_scatter.c5530logstatsplainblame
-rw-r--r--drm_sysfs.c16866logstatsplainblame
-rw-r--r--drm_trace.h1647logstatsplainblame
-rw-r--r--drm_trace_points.c74logstatsplainblame
-rw-r--r--drm_vm.c20014logstatsplainblame
-rw-r--r--drm_vma_manager.c13931logstatsplainblame
d---------exynos2326logstatsplain
d---------gma5002902logstatsplain
d---------i2c348logstatsplain
d---------i810150logstatsplain
d---------i9153726logstatsplain
d---------imx433logstatsplain
d---------mga300logstatsplain
d---------mgag200444logstatsplain
d---------msm957logstatsplain
d---------nouveau2817logstatsplain
d---------omapdrm824logstatsplain
d---------panel251logstatsplain
d---------qxl799logstatsplain
d---------r128268logstatsplain
d---------radeon8189logstatsplain
d---------rcar-du1115logstatsplain
d---------rockchip579logstatsplain
d---------savage198logstatsplain
d---------shmobile563logstatsplain
d---------sis146logstatsplain
d---------sti1536logstatsplain
d---------tdfx112logstatsplain
d---------tegra850logstatsplain
d---------tilcdc642logstatsplain
d---------ttm573logstatsplain
d---------udl463logstatsplain
d---------vgem112logstatsplain
d---------via502logstatsplain
d---------virtio621logstatsplain
d---------vmwgfx1554logstatsplain
; "(%u/%u) buffer:%p [%s]\n", req, req->cmd, (unsigned long)blk_rq_pos(req), blk_rq_cur_sectors(req), blk_rq_sectors(req), req->buffer, rq_data_dir(req) ? "write" : "read"); if (blkif_queue_request(req)) { blk_requeue_request(rq, req); wait: /* Avoid pointless unplugs. */ blk_stop_queue(rq); break; } queued++; } if (queued != 0) flush_requests(info); } static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size) { struct request_queue *rq; rq = blk_init_queue(do_blkif_request, &blkif_io_lock); if (rq == NULL) return -1; queue_flag_set_unlocked(QUEUE_FLAG_VIRT, rq); /* Hard sector size and max sectors impersonate the equiv. hardware. */ blk_queue_logical_block_size(rq, sector_size); blk_queue_max_hw_sectors(rq, 512); /* Each segment in a request is up to an aligned page in size. */ blk_queue_segment_boundary(rq, PAGE_SIZE - 1); blk_queue_max_segment_size(rq, PAGE_SIZE); /* Ensure a merged request will fit in a single I/O ring slot. */ blk_queue_max_segments(rq, BLKIF_MAX_SEGMENTS_PER_REQUEST); /* Make sure buffer addresses are sector-aligned. */ blk_queue_dma_alignment(rq, 511); /* Make sure we don't use bounce buffers. */ blk_queue_bounce_limit(rq, BLK_BOUNCE_ANY); gd->queue = rq; return 0; } static int xlvbd_barrier(struct blkfront_info *info) { int err; err = blk_queue_ordered(info->rq, info->feature_barrier ? QUEUE_ORDERED_DRAIN : QUEUE_ORDERED_NONE, NULL); if (err) return err; printk(KERN_INFO "blkfront: %s: barriers %s\n", info->gd->disk_name, info->feature_barrier ? "enabled" : "disabled"); return 0; } static int xlvbd_alloc_gendisk(blkif_sector_t capacity, struct blkfront_info *info, u16 vdisk_info, u16 sector_size) { struct gendisk *gd; int nr_minors = 1; int err = -ENODEV; unsigned int offset; int minor; int nr_parts; BUG_ON(info->gd != NULL); BUG_ON(info->rq != NULL); if ((info->vdevice>>EXT_SHIFT) > 1) { /* this is above the extended range; something is wrong */ printk(KERN_WARNING "blkfront: vdevice 0x%x is above the extended range; ignoring\n", info->vdevice); return -ENODEV; } if (!VDEV_IS_EXTENDED(info->vdevice)) { minor = BLKIF_MINOR(info->vdevice); nr_parts = PARTS_PER_DISK; } else { minor = BLKIF_MINOR_EXT(info->vdevice); nr_parts = PARTS_PER_EXT_DISK; } if ((minor % nr_parts) == 0) nr_minors = nr_parts; gd = alloc_disk(nr_minors); if (gd == NULL) goto out; offset = minor / nr_parts; if (nr_minors > 1) { if (offset < 26) sprintf(gd->disk_name, "%s%c", DEV_NAME, 'a' + offset); else sprintf(gd->disk_name, "%s%c%c", DEV_NAME, 'a' + ((offset / 26)-1), 'a' + (offset % 26)); } else { if (offset < 26) sprintf(gd->disk_name, "%s%c%d", DEV_NAME, 'a' + offset, minor & (nr_parts - 1)); else sprintf(gd->disk_name, "%s%c%c%d", DEV_NAME, 'a' + ((offset / 26) - 1), 'a' + (offset % 26), minor & (nr_parts - 1)); } gd->major = XENVBD_MAJOR; gd->first_minor = minor; gd->fops = &xlvbd_block_fops; gd->private_data = info; gd->driverfs_dev = &(info->xbdev->dev); set_capacity(gd, capacity); if (xlvbd_init_blk_queue(gd, sector_size)) { del_gendisk(gd); goto out; } info->rq = gd->queue; info->gd = gd; if (info->feature_barrier) xlvbd_barrier(info); if (vdisk_info & VDISK_READONLY) set_disk_ro(gd, 1); if (vdisk_info & VDISK_REMOVABLE) gd->flags |= GENHD_FL_REMOVABLE; if (vdisk_info & VDISK_CDROM) gd->flags |= GENHD_FL_CD; return 0; out: return err; } static void kick_pending_request_queues(struct blkfront_info *info) { if (!RING_FULL(&info->ring)) { /* Re-enable calldowns. */ blk_start_queue(info->rq); /* Kick things off immediately. */ do_blkif_request(info->rq); } } static void blkif_restart_queue(struct work_struct *work) { struct blkfront_info *info = container_of(work, struct blkfront_info, work); spin_lock_irq(&blkif_io_lock); if (info->connected == BLKIF_STATE_CONNECTED) kick_pending_request_queues(info); spin_unlock_irq(&blkif_io_lock); } static void blkif_free(struct blkfront_info *info, int suspend) { /* Prevent new requests being issued until we fix things up. */ spin_lock_irq(&blkif_io_lock); info->connected = suspend ? BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED; /* No more blkif_request(). */ if (info->rq) blk_stop_queue(info->rq); /* No more gnttab callback work. */ gnttab_cancel_free_callback(&info->callback); spin_unlock_irq(&blkif_io_lock); /* Flush gnttab callback work. Must be done with no locks held. */ flush_scheduled_work(); /* Free resources associated with old device channel. */ if (info->ring_ref != GRANT_INVALID_REF) { gnttab_end_foreign_access(info->ring_ref, 0, (unsigned long)info->ring.sring); info->ring_ref = GRANT_INVALID_REF; info->ring.sring = NULL; } if (info->irq) unbind_from_irqhandler(info->irq, info); info->evtchn = info->irq = 0; } static void blkif_completion(struct blk_shadow *s) { int i; for (i = 0; i < s->req.nr_segments; i++) gnttab_end_foreign_access(s->req.seg[i].gref, 0, 0UL); } static irqreturn_t blkif_interrupt(int irq, void *dev_id) { struct request *req; struct blkif_response *bret; RING_IDX i, rp; unsigned long flags; struct blkfront_info *info = (struct blkfront_info *)dev_id; int error; spin_lock_irqsave(&blkif_io_lock, flags); if (unlikely(info->connected != BLKIF_STATE_CONNECTED)) { spin_unlock_irqrestore(&blkif_io_lock, flags); return IRQ_HANDLED; } again: rp = info->ring.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ for (i = info->ring.rsp_cons; i != rp; i++) { unsigned long id; bret = RING_GET_RESPONSE(&info->ring, i); id = bret->id; req = (struct request *)info->shadow[id].request; blkif_completion(&info->shadow[id]); add_id_to_freelist(info, id); error = (bret->status == BLKIF_RSP_OKAY) ? 0 : -EIO; switch (bret->operation) { case BLKIF_OP_WRITE_BARRIER: if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) { printk(KERN_WARNING "blkfront: %s: write barrier op failed\n", info->gd->disk_name); error = -EOPNOTSUPP; info->feature_barrier = 0; xlvbd_barrier(info); } /* fall through */ case BLKIF_OP_READ: case BLKIF_OP_WRITE: if (unlikely(bret->status != BLKIF_RSP_OKAY)) dev_dbg(&info->xbdev->dev, "Bad return from blkdev data " "request: %x\n", bret->status); __blk_end_request_all(req, error); break; default: BUG(); } } info->ring.rsp_cons = i; if (i != info->ring.req_prod_pvt) { int more_to_do; RING_FINAL_CHECK_FOR_RESPONSES(&info->ring, more_to_do); if (more_to_do) goto again; } else info->ring.sring->rsp_event = i + 1; kick_pending_request_queues(info); spin_unlock_irqrestore(&blkif_io_lock, flags); return IRQ_HANDLED; } static int setup_blkring(struct xenbus_device *dev, struct blkfront_info *info) { struct blkif_sring *sring; int err; info->ring_ref = GRANT_INVALID_REF; sring = (struct blkif_sring *)__get_free_page(GFP_NOIO | __GFP_HIGH); if (!sring) { xenbus_dev_fatal(dev, -ENOMEM, "allocating shared ring"); return -ENOMEM; } SHARED_RING_INIT(sring); FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE); sg_init_table(info->sg, BLKIF_MAX_SEGMENTS_PER_REQUEST); err = xenbus_grant_ring(dev, virt_to_mfn(info->ring.sring)); if (err < 0) { free_page((unsigned long)sring); info->ring.sring = NULL; goto fail; } info->ring_ref = err; err = xenbus_alloc_evtchn(dev, &info->evtchn); if (err) goto fail; err = bind_evtchn_to_irqhandler(info->evtchn, blkif_interrupt, IRQF_SAMPLE_RANDOM, "blkif", info); if (err <= 0) { xenbus_dev_fatal(dev, err, "bind_evtchn_to_irqhandler failed"); goto fail; } info->irq = err; return 0; fail: blkif_free(info, 0); return err; } /* Common code used when first setting up, and when resuming. */ static int talk_to_backend(struct xenbus_device *dev, struct blkfront_info *info) { const char *message = NULL; struct xenbus_transaction xbt; int err; /* Create shared ring, alloc event channel. */ err = setup_blkring(dev, info); if (err) goto out; again: err = xenbus_transaction_start(&xbt); if (err) { xenbus_dev_fatal(dev, err, "starting transaction"); goto destroy_blkring; } err = xenbus_printf(xbt, dev->nodename, "ring-ref", "%u", info->ring_ref); if (err) { message = "writing ring-ref"; goto abort_transaction; } err = xenbus_printf(xbt, dev->nodename, "event-channel", "%u", info->evtchn); if (err) { message = "writing event-channel"; goto abort_transaction; } err = xenbus_printf(xbt, dev->nodename, "protocol", "%s", XEN_IO_PROTO_ABI_NATIVE); if (err) { message = "writing protocol"; goto abort_transaction; } err = xenbus_transaction_end(xbt, 0); if (err) { if (err == -EAGAIN) goto again; xenbus_dev_fatal(dev, err, "completing transaction"); goto destroy_blkring; } xenbus_switch_state(dev, XenbusStateInitialised); return 0; abort_transaction: xenbus_transaction_end(xbt, 1); if (message) xenbus_dev_fatal(dev, err, "%s", message); destroy_blkring: blkif_free(info, 0); out: return err; } /** * Entry point to this code when a new device is created. Allocate the basic * structures and the ring buffer for communication with the backend, and * inform the backend of the appropriate details for those. Switch to * Initialised state. */ static int blkfront_probe(struct xenbus_device *dev, const struct xenbus_device_id *id) { int err, vdevice, i; struct blkfront_info *info; /* FIXME: Use dynamic device id if this is not set. */ err = xenbus_scanf(XBT_NIL, dev->nodename, "virtual-device", "%i", &vdevice); if (err != 1) { /* go looking in the extended area instead */ err = xenbus_scanf(XBT_NIL, dev->nodename, "virtual-device-ext", "%i", &vdevice); if (err != 1) { xenbus_dev_fatal(dev, err, "reading virtual-device"); return err; } } info = kzalloc(sizeof(*info), GFP_KERNEL); if (!info) { xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); return -ENOMEM; } info->xbdev = dev; info->vdevice = vdevice; info->connected = BLKIF_STATE_DISCONNECTED; INIT_WORK(&info->work, blkif_restart_queue); for (i = 0; i < BLK_RING_SIZE; i++) info->shadow[i].req.id = i+1; info->shadow[BLK_RING_SIZE-1].req.id = 0x0fffffff; /* Front end dir is a number, which is used as the id. */ info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0); dev_set_drvdata(&dev->dev, info); err = talk_to_backend(dev, info); if (err) { kfree(info); dev_set_drvdata(&dev->dev, NULL); return err; } return 0; } static int blkif_recover(struct blkfront_info *info) { int i; struct blkif_request *req; struct blk_shadow *copy; int j; /* Stage 1: Make a safe copy of the shadow state. */ copy = kmalloc(sizeof(info->shadow), GFP_NOIO | __GFP_REPEAT | __GFP_HIGH); if (!copy) return -ENOMEM; memcpy(copy, info->shadow, sizeof(info->shadow)); /* Stage 2: Set up free list. */ memset(&info->shadow, 0, sizeof(info->shadow)); for (i = 0; i < BLK_RING_SIZE; i++) info->shadow[i].req.id = i+1; info->shadow_free = info->ring.req_prod_pvt; info->shadow[BLK_RING_SIZE-1].req.id = 0x0fffffff; /* Stage 3: Find pending requests and requeue them. */ for (i = 0; i < BLK_RING_SIZE; i++) { /* Not in use? */ if (copy[i].request == 0) continue; /* Grab a request slot and copy shadow state into it. */ req = RING_GET_REQUEST(&info->ring, info->ring.req_prod_pvt); *req = copy[i].req; /* We get a new request id, and must reset the shadow state. */ req->id = get_id_from_freelist(info); memcpy(&info->shadow[req->id], &copy[i], sizeof(copy[i])); /* Rewrite any grant references invalidated by susp/resume. */ for (j = 0; j < req->nr_segments; j++) gnttab_grant_foreign_access_ref( req->seg[j].gref, info->xbdev->otherend_id, pfn_to_mfn(info->shadow[req->id].frame[j]), rq_data_dir( (struct request *) info->shadow[req->id].request)); info->shadow[req->id].req = *req; info->ring.req_prod_pvt++; } kfree(copy); xenbus_switch_state(info->xbdev, XenbusStateConnected); spin_lock_irq(&blkif_io_lock); /* Now safe for us to use the shared ring */ info->connected = BLKIF_STATE_CONNECTED; /* Send off requeued requests */ flush_requests(info); /* Kick any other new requests queued since we resumed */ kick_pending_request_queues(info); spin_unlock_irq(&blkif_io_lock); return 0; } /** * We are reconnecting to the backend, due to a suspend/resume, or a backend * driver restart. We tear down our blkif structure and recreate it, but * leave the device-layer structures intact so that this is transparent to the * rest of the kernel. */ static int blkfront_resume(struct xenbus_device *dev) { struct blkfront_info *info = dev_get_drvdata(&dev->dev); int err; dev_dbg(&dev->dev, "blkfront_resume: %s\n", dev->nodename); blkif_free(info, info->connected == BLKIF_STATE_CONNECTED); err = talk_to_backend(dev, info); if (info->connected == BLKIF_STATE_SUSPENDED && !err) err = blkif_recover(info); return err; } /* * Invoked when the backend is finally 'ready' (and has told produced * the details about the physical device - #sectors, size, etc). */ static void blkfront_connect(struct blkfront_info *info) { unsigned long long sectors; unsigned long sector_size; unsigned int binfo; int err; if ((info->connected == BLKIF_STATE_CONNECTED) || (info->connected == BLKIF_STATE_SUSPENDED) ) return; dev_dbg(&info->xbdev->dev, "%s:%s.\n", __func__, info->xbdev->otherend); err = xenbus_gather(XBT_NIL, info->xbdev->otherend, "sectors", "%llu", &sectors, "info", "%u", &binfo, "sector-size", "%lu", &sector_size, NULL); if (err) { xenbus_dev_fatal(info->xbdev, err, "reading backend fields at %s", info->xbdev->otherend); return; } err = xenbus_gather(XBT_NIL, info->xbdev->otherend, "feature-barrier", "%lu", &info->feature_barrier, NULL); if (err) info->feature_barrier = 0; err = xlvbd_alloc_gendisk(sectors, info, binfo, sector_size); if (err) { xenbus_dev_fatal(info->xbdev, err, "xlvbd_add at %s", info->xbdev->otherend); return; } xenbus_switch_state(info->xbdev, XenbusStateConnected); /* Kick pending requests. */ spin_lock_irq(&blkif_io_lock); info->connected = BLKIF_STATE_CONNECTED; kick_pending_request_queues(info); spin_unlock_irq(&blkif_io_lock); add_disk(info->gd); info->is_ready = 1; } /** * Handle the change of state of the backend to Closing. We must delete our * device-layer structures now, to ensure that writes are flushed through to * the backend. Once is this done, we can switch to Closed in * acknowledgement. */ static void blkfront_closing(struct xenbus_device *dev) { struct blkfront_info *info = dev_get_drvdata(&dev->dev); unsigned long flags; dev_dbg(&dev->dev, "blkfront_closing: %s removed\n", dev->nodename); if (info->rq == NULL) goto out; spin_lock_irqsave(&blkif_io_lock, flags); /* No more blkif_request(). */ blk_stop_queue(info->rq); /* No more gnttab callback work. */ gnttab_cancel_free_callback(&info->callback); spin_unlock_irqrestore(&blkif_io_lock, flags); /* Flush gnttab callback work. Must be done with no locks held. */ flush_scheduled_work(); blk_cleanup_queue(info->rq); info->rq = NULL; del_gendisk(info->gd); out: xenbus_frontend_closed(dev); } /** * Callback received when the backend's state changes. */ static void backend_changed(struct xenbus_device *dev, enum xenbus_state backend_state) { struct blkfront_info *info = dev_get_drvdata(&dev->dev); struct block_device *bd; dev_dbg(&dev->dev, "blkfront:backend_changed.\n"); switch (backend_state) { case XenbusStateInitialising: case XenbusStateInitWait: case XenbusStateInitialised: case XenbusStateUnknown: case XenbusStateClosed: break; case XenbusStateConnected: blkfront_connect(info); break; case XenbusStateClosing: if (info->gd == NULL) { xenbus_frontend_closed(dev); break; } bd = bdget_disk(info->gd, 0); if (bd == NULL) xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); mutex_lock(&bd->bd_mutex); if (info->users > 0) xenbus_dev_error(dev, -EBUSY, "Device in use; refusing to close"); else blkfront_closing(dev); mutex_unlock(&bd->bd_mutex); bdput(bd); break; } } static int blkfront_remove(struct xenbus_device *dev) { struct blkfront_info *info = dev_get_drvdata(&dev->dev); dev_dbg(&dev->dev, "blkfront_remove: %s removed\n", dev->nodename); blkif_free(info, 0); kfree(info); return 0; } static int blkfront_is_ready(struct xenbus_device *dev) { struct blkfront_info *info = dev_get_drvdata(&dev->dev); return info->is_ready; } static int blkif_open(struct block_device *bdev, fmode_t mode) { struct blkfront_info *info = bdev->bd_disk->private_data; info->users++; return 0; } static int blkif_release(struct gendisk *disk, fmode_t mode) { struct blkfront_info *info = disk->private_data; info->users--; if (info->users == 0) { /* Check whether we have been instructed to close. We will have ignored this request initially, as the device was still mounted. */ struct xenbus_device *dev = info->xbdev; enum xenbus_state state = xenbus_read_driver_state(dev->otherend); if (state == XenbusStateClosing && info->is_ready) blkfront_closing(dev); } return 0; } static const struct block_device_operations xlvbd_block_fops = { .owner = THIS_MODULE, .open = blkif_open, .release = blkif_release, .getgeo = blkif_getgeo, .locked_ioctl = blkif_ioctl, }; static const struct xenbus_device_id blkfront_ids[] = { { "vbd" }, { "" } }; static struct xenbus_driver blkfront = { .name = "vbd", .owner = THIS_MODULE, .ids = blkfront_ids, .probe = blkfront_probe, .remove = blkfront_remove, .resume = blkfront_resume, .otherend_changed = backend_changed, .is_ready = blkfront_is_ready, }; static int __init xlblk_init(void) { if (!xen_domain()) return -ENODEV; if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) { printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n", XENVBD_MAJOR, DEV_NAME); return -ENODEV; } return xenbus_register_frontend(&blkfront); } module_init(xlblk_init); static void __exit xlblk_exit(void) { return xenbus_unregister_driver(&blkfront); } module_exit(xlblk_exit); MODULE_DESCRIPTION("Xen virtual block device frontend"); MODULE_LICENSE("GPL"); MODULE_ALIAS_BLOCKDEV_MAJOR(XENVBD_MAJOR); MODULE_ALIAS("xen:vbd"); MODULE_ALIAS("xenblk");