Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110812
b: refs/heads/master
c: 37f1c01
h: refs/heads/master
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Oct 10, 2008
1 parent 7c6127a commit f2e203d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9d3aed7e1e50183085fcd2af643bf42d6b4bd95
refs/heads/master: 37f1c012f0f23b52df3a0d7850212b336fc9e595
15 changes: 7 additions & 8 deletions trunk/drivers/s390/kvm/kvm_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <asm/kvm_virtio.h>
#include <asm/setup.h>
#include <asm/s390_ext.h>
#include <asm/s390_rdev.h>

#define VIRTIO_SUBCODE_64 0x0D00

Expand Down Expand Up @@ -241,10 +242,7 @@ static struct virtio_config_ops kvm_vq_configspace_ops = {
* The root device for the kvm virtio devices.
* This makes them appear as /sys/devices/kvm_s390/0,1,2 not /sys/devices/0,1,2.
*/
static struct device kvm_root = {
.parent = NULL,
.bus_id = "kvm_s390",
};
static struct device *kvm_root;

/*
* adds a new device and register it with virtio
Expand All @@ -261,7 +259,7 @@ static void add_kvm_device(struct kvm_device_desc *d, unsigned int offset)
return;
}

kdev->vdev.dev.parent = &kvm_root;
kdev->vdev.dev.parent = kvm_root;
kdev->vdev.id.device = d->type;
kdev->vdev.config = &kvm_vq_configspace_ops;
kdev->desc = d;
Expand Down Expand Up @@ -317,15 +315,16 @@ static int __init kvm_devices_init(void)
if (!MACHINE_IS_KVM)
return -ENODEV;

rc = device_register(&kvm_root);
if (rc) {
kvm_root = s390_root_dev_register("kvm_s390");
if (IS_ERR(kvm_root)) {
rc = PTR_ERR(kvm_root);
printk(KERN_ERR "Could not register kvm_s390 root device");
return rc;
}

rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE);
if (rc) {
device_unregister(&kvm_root);
s390_root_dev_unregister(kvm_root);
return rc;
}

Expand Down

0 comments on commit f2e203d

Please sign in to comment.