Update sdk version to tizen_2.2
authorSangjin Kim <sangjin3.kim@samsung.com>
Mon, 24 Jun 2013 08:42:14 +0000 (17:42 +0900)
committerSangjin Kim <sangjin3.kim@samsung.com>
Mon, 24 Jun 2013 08:42:14 +0000 (17:42 +0900)
Change-Id: I4cb4ff2d7b52e143d11cf5f6f76f0a85c8891e4b
Signed-off-by: Sangjin Kim <sangjin3.kim@samsung.com>
build_x86.sh
drivers/block/virtio_blk.c
drivers/maru/maru_virtio_keyboard.c
drivers/virtio/virtio.c
package/changelog
package/pkginfo.manifest

index 3ef952cfdeeddca2fecce9653b90f61192850de8..4b89cfb14b63142c49d031e23d0c0bef53fc5b17 100755 (executable)
@@ -2,4 +2,4 @@
 # Build x86 emulator kernel image
 
 ARCH=i386 make i386_tizen_emul_defconfig
-ARCH=i386 make -j8
+ARCH=i386 CROSS_COMPILE='' make -j8
index 0d39f2f4294a3c2587e5c019e39904b3f8440fc2..3325e5b646ca4a1936342610d080167097ad3253 100644 (file)
@@ -29,9 +29,6 @@ struct virtio_blk
        /* The disk structure for the kernel. */
        struct gendisk *disk;
 
-       /* Request tracking. */
-       struct list_head reqs;
-
        mempool_t *pool;
 
        /* Process context for config space updates */
@@ -55,7 +52,6 @@ struct virtio_blk
 
 struct virtblk_req
 {
-       struct list_head list;
        struct request *req;
        struct virtio_blk_outhdr out_hdr;
        struct virtio_scsi_inhdr in_hdr;
@@ -99,7 +95,6 @@ static void blk_done(struct virtqueue *vq)
                }
 
                __blk_end_request_all(vbr->req, error);
-               list_del(&vbr->list);
                mempool_free(vbr, vblk->pool);
        }
        /* In case queue is stopped waiting for more buffers. */
@@ -184,7 +179,6 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
                return false;
        }
 
-       list_add_tail(&vbr->list, &vblk->reqs);
        return true;
 }
 
@@ -437,7 +431,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
                goto out_free_index;
        }
 
-       INIT_LIST_HEAD(&vblk->reqs);
        spin_lock_init(&vblk->lock);
        vblk->vdev = vdev;
        vblk->sg_elems = sg_elems;
@@ -471,7 +464,19 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
 
        q->queuedata = vblk;
 
+#ifdef CONFIG_MARU // for virtio sdcard...
+       // index 0 for root partition
+       // index 1 for swap partition
+       // index over 2 for mmcblk
+       if (index > 1) {
+               snprintf(vblk->disk->disk_name, DISK_NAME_LEN, "mmcblk%d", index - 2);
+       }
+       else {
+               virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN);
+       }
+#else
        virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN);
+#endif
 
        vblk->disk->major = major;
        vblk->disk->first_minor = index_to_minor(index);
@@ -583,27 +588,30 @@ static void __devexit virtblk_remove(struct virtio_device *vdev)
 {
        struct virtio_blk *vblk = vdev->priv;
        int index = vblk->index;
+       int refc;
 
        /* Prevent config work handler from accessing the device. */
        mutex_lock(&vblk->config_lock);
        vblk->config_enable = false;
        mutex_unlock(&vblk->config_lock);
 
-       /* Nothing should be pending. */
-       BUG_ON(!list_empty(&vblk->reqs));
+       del_gendisk(vblk->disk);
+       blk_cleanup_queue(vblk->disk->queue);
 
        /* Stop all the virtqueues. */
        vdev->config->reset(vdev);
 
        flush_work(&vblk->config_work);
 
-       del_gendisk(vblk->disk);
-       blk_cleanup_queue(vblk->disk->queue);
+       refc = atomic_read(&disk_to_dev(vblk->disk)->kobj.kref.refcount);
        put_disk(vblk->disk);
        mempool_destroy(vblk->pool);
        vdev->config->del_vqs(vdev);
        kfree(vblk);
-       ida_simple_remove(&vd_index_ida, index);
+
+       /* Only free device id if we don't have any users */
+       if (refc == 1)
+               ida_simple_remove(&vd_index_ida, index);
 }
 
 #ifdef CONFIG_PM
index b1f8e256f3da1a2e46184b58bea5a292a96dd58c..7fb3e2a8ff1ed4e6072d769854616aa9f9e4705d 100644 (file)
@@ -88,6 +88,7 @@ static void vq_keyboard_handle(struct virtqueue *vq)
                return;
        }
 
+        VKBD_LOG(KERN_DEBUG, "vqidx: %d\n", vqidx);
         while (1) {
                memcpy(&kbdevent, &vkbd->kbdevt[vqidx], sizeof(kbdevent));
 #if 1
@@ -151,6 +152,7 @@ static int virtio_keyboard_probe(struct virtio_device *vdev)
        int index = 0;
 
        VKBD_LOG(KERN_INFO, "driver is probed\n");
+       vqidx = 0;
 
        vdev->priv = vkbd = kmalloc(sizeof(struct virtio_keyboard), GFP_KERNEL);
        if (!vkbd) {
index 984c501c258ffa8bc6f7ad1ad14be741494ba5ee..ba9979af7158a656bb6e2cb37986f164161d45ff 100644 (file)
@@ -47,12 +47,30 @@ static ssize_t features_show(struct device *_d,
        len += sprintf(buf+len, "\n");
        return len;
 }
+
+#ifdef CONFIG_MARU // for virtio sdcard...
+#include "linux/virtio_ids.h"
+static ssize_t type_show(struct device *_d,
+                            struct device_attribute *attr, char *buf)
+{
+       struct virtio_device *dev = container_of(_d, struct virtio_device, dev);
+
+    if (dev->id.device == VIRTIO_ID_BLOCK) {
+        //FIXME
+        return sprintf(buf, "SD\n");
+    }
+    return sprintf(buf, "0\n");
+}
+#endif
 static struct device_attribute virtio_dev_attrs[] = {
        __ATTR_RO(device),
        __ATTR_RO(vendor),
        __ATTR_RO(status),
        __ATTR_RO(modalias),
        __ATTR_RO(features),
+#ifdef CONFIG_MARU
+    __ATTR_RO(type),
+#endif
        __ATTR_NULL
 };
 
index 8d2cd5b1be8e6bbfd1bca7cb0358b27a470e8110..c787674bf2c21206c297b78454fa68f88894a76e 100644 (file)
@@ -1,3 +1,6 @@
+* 1.4.22
+- applied smack patches
+== Kitae Kim <kt920.kim@samsung.com> 2013-05-28
 * 1.4.19
 - modified process of using virtio keyboard queue
 == Sungmin Ha <sungmin82.ha@samsung.com> 2013-05-14
index 901587676425a9867bc468a36a2020f191d479ce..9e76928681ba2d0e053c793c1f59172a71caa6ae 100644 (file)
@@ -1,4 +1,4 @@
-Version: 1.4.19
+Version: 1.4.22
 Maintainer: Yeong-Kyoon, Lee <yeongkyoon.lee@samsung.com>
 Source: emulator-kernel