mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:41:02 +07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: move virtrng_remove to .devexit.text move virtballoon_remove to .devexit.text virtio_blk: Revert serial number support virtio: let header files include virtio_ids.h virtio_blk: revert QUEUE_FLAG_VIRT addition
This commit is contained in:
commit
964fe080d9
@ -42,7 +42,6 @@
|
||||
#include <signal.h>
|
||||
#include "linux/lguest_launcher.h"
|
||||
#include "linux/virtio_config.h"
|
||||
#include <linux/virtio_ids.h>
|
||||
#include "linux/virtio_net.h"
|
||||
#include "linux/virtio_blk.h"
|
||||
#include "linux/virtio_console.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_blk.h>
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
@ -183,34 +182,6 @@ static void do_virtblk_request(struct request_queue *q)
|
||||
vblk->vq->vq_ops->kick(vblk->vq);
|
||||
}
|
||||
|
||||
/* return ATA identify data
|
||||
*/
|
||||
static int virtblk_identify(struct gendisk *disk, void *argp)
|
||||
{
|
||||
struct virtio_blk *vblk = disk->private_data;
|
||||
void *opaque;
|
||||
int err = -ENOMEM;
|
||||
|
||||
opaque = kmalloc(VIRTIO_BLK_ID_BYTES, GFP_KERNEL);
|
||||
if (!opaque)
|
||||
goto out;
|
||||
|
||||
err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY,
|
||||
offsetof(struct virtio_blk_config, identify), opaque,
|
||||
VIRTIO_BLK_ID_BYTES);
|
||||
|
||||
if (err)
|
||||
goto out_kfree;
|
||||
|
||||
if (copy_to_user(argp, opaque, VIRTIO_BLK_ID_BYTES))
|
||||
err = -EFAULT;
|
||||
|
||||
out_kfree:
|
||||
kfree(opaque);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void virtblk_prepare_flush(struct request_queue *q, struct request *req)
|
||||
{
|
||||
req->cmd_type = REQ_TYPE_LINUX_BLOCK;
|
||||
@ -222,10 +193,6 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
{
|
||||
struct gendisk *disk = bdev->bd_disk;
|
||||
struct virtio_blk *vblk = disk->private_data;
|
||||
void __user *argp = (void __user *)data;
|
||||
|
||||
if (cmd == HDIO_GET_IDENTITY)
|
||||
return virtblk_identify(disk, argp);
|
||||
|
||||
/*
|
||||
* Only allow the generic SCSI ioctls if the host can support it.
|
||||
@ -233,7 +200,8 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
|
||||
return -ENOTTY;
|
||||
|
||||
return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
|
||||
return scsi_cmd_ioctl(disk->queue, disk, mode, cmd,
|
||||
(void __user *)data);
|
||||
}
|
||||
|
||||
/* We provide getgeo only to please some old bootloader/partitioning tools */
|
||||
@ -332,7 +300,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
|
||||
}
|
||||
|
||||
vblk->disk->queue->queuedata = vblk;
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue);
|
||||
|
||||
if (index < 26) {
|
||||
sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);
|
||||
@ -445,7 +412,7 @@ static struct virtio_device_id id_table[] = {
|
||||
static unsigned int features[] = {
|
||||
VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX,
|
||||
VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
|
||||
VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY, VIRTIO_BLK_F_FLUSH
|
||||
VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_FLUSH
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_rng.h>
|
||||
|
||||
/* The host will fill any buffer we give it with sweet, sweet randomness. We
|
||||
@ -117,7 +116,7 @@ static int virtrng_probe(struct virtio_device *vdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void virtrng_remove(struct virtio_device *vdev)
|
||||
static void __devexit virtrng_remove(struct virtio_device *vdev)
|
||||
{
|
||||
vdev->config->reset(vdev);
|
||||
hwrng_unregister(&virtio_hwrng);
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_console.h>
|
||||
#include "hvc_console.h"
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_net.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/if_vlan.h>
|
||||
|
@ -19,7 +19,6 @@
|
||||
*/
|
||||
//#define DEBUG
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_balloon.h>
|
||||
#include <linux/swap.h>
|
||||
#include <linux/kthread.h>
|
||||
@ -248,7 +247,7 @@ static int virtballoon_probe(struct virtio_device *vdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
static void virtballoon_remove(struct virtio_device *vdev)
|
||||
static void __devexit virtballoon_remove(struct virtio_device *vdev)
|
||||
{
|
||||
struct virtio_balloon *vb = vdev->priv;
|
||||
|
||||
|
@ -364,6 +364,7 @@ unifdef-y += utsname.h
|
||||
unifdef-y += videodev2.h
|
||||
unifdef-y += videodev.h
|
||||
unifdef-y += virtio_config.h
|
||||
unifdef-y += virtio_ids.h
|
||||
unifdef-y += virtio_blk.h
|
||||
unifdef-y += virtio_net.h
|
||||
unifdef-y += virtio_9p.h
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define _LINUX_VIRTIO_9P_H
|
||||
/* This header is BSD licensed so anyone can use the definitions to implement
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* Maximum number of virtio channels per partition (1 for now) */
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define _LINUX_VIRTIO_BALLOON_H
|
||||
/* This header is BSD licensed so anyone can use the definitions to implement
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* The feature bitmap for virtio balloon */
|
||||
|
@ -3,6 +3,7 @@
|
||||
/* This header is BSD licensed so anyone can use the definitions to implement
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/types.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* Feature bits */
|
||||
@ -13,11 +14,8 @@
|
||||
#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */
|
||||
#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/
|
||||
#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
|
||||
#define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */
|
||||
#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */
|
||||
|
||||
#define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */
|
||||
|
||||
struct virtio_blk_config {
|
||||
/* The capacity (in 512-byte sectors). */
|
||||
__u64 capacity;
|
||||
@ -33,7 +31,6 @@ struct virtio_blk_config {
|
||||
} geometry;
|
||||
/* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
|
||||
__u32 blk_size;
|
||||
__u8 identify[VIRTIO_BLK_ID_BYTES];
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef _LINUX_VIRTIO_CONSOLE_H
|
||||
#define _LINUX_VIRTIO_CONSOLE_H
|
||||
#include <linux/types.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_config.h>
|
||||
/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
|
||||
* anyone can use the definitions to implement compatible drivers/servers. */
|
||||
|
@ -3,6 +3,7 @@
|
||||
/* This header is BSD licensed so anyone can use the definitions to implement
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/types.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define _LINUX_VIRTIO_RNG_H
|
||||
/* This header is BSD licensed so anyone can use the definitions to implement
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
#endif /* _LINUX_VIRTIO_RNG_H */
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include <net/9p/transport.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_ids.h>
|
||||
#include <linux/virtio_9p.h>
|
||||
|
||||
#define VIRTQUEUE_NUM 128
|
||||
|
Loading…
Reference in New Issue
Block a user