From: Sangjin Kim Date: Mon, 24 Jun 2013 08:42:14 +0000 (+0900) Subject: Update sdk version to tizen_2.2 X-Git-Tag: 2.2.1_release~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c128d88d2e4543f14de8132ed0e74b01b6dbfd2e;p=sdk%2Femulator%2Femulator-kernel.git Update sdk version to tizen_2.2 Change-Id: I4cb4ff2d7b52e143d11cf5f6f76f0a85c8891e4b Signed-off-by: Sangjin Kim --- diff --git a/build_x86.sh b/build_x86.sh index 3ef952cfdeed..4b89cfb14b63 100755 --- a/build_x86.sh +++ b/build_x86.sh @@ -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 diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0d39f2f4294a..3325e5b646ca 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -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 diff --git a/drivers/maru/maru_virtio_keyboard.c b/drivers/maru/maru_virtio_keyboard.c index b1f8e256f3da..7fb3e2a8ff1e 100644 --- a/drivers/maru/maru_virtio_keyboard.c +++ b/drivers/maru/maru_virtio_keyboard.c @@ -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) { diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 984c501c258f..ba9979af7158 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -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 }; diff --git a/package/changelog b/package/changelog index 8d2cd5b1be8e..c787674bf2c2 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,6 @@ +* 1.4.22 +- applied smack patches +== Kitae Kim 2013-05-28 * 1.4.19 - modified process of using virtio keyboard queue == Sungmin Ha 2013-05-14 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 901587676425..9e76928681ba 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version: 1.4.19 +Version: 1.4.22 Maintainer: Yeong-Kyoon, Lee Source: emulator-kernel