summaryrefslogtreecommitdiff
path: root/target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-18 17:53:53 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-18 17:53:53 +0000
commit13e1228de3690c8c831b9cccbe5a34674e743362 (patch)
tree0c747bbe3b9ccb30a4e4c5e277825d9a8ba914e4 /target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch
parent8f54e709747e711460f8a49acdcf86841920db8b (diff)
goldfish: R.I.P.
It is broken and it is not maintained by anyone since long time. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34766 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch')
-rw-r--r--target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch84
1 files changed, 0 insertions, 84 deletions
diff --git a/target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch b/target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch
deleted file mode 100644
index 44554a6176..0000000000
--- a/target/linux/goldfish/patches-2.6.30/0133--ARM-goldfish-qemutrace-Add-mmap-support.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 2309613958ee518f94f1a7ba900e08e604e06048 Mon Sep 17 00:00:00 2001
-From: Jack Veenstra <veenstra@android.com>
-Date: Fri, 1 May 2009 18:50:10 -0700
-Subject: [PATCH 133/134] [ARM] goldfish: qemutrace: Add mmap support.
-
-This makes a page of data available for writing from user-space to allow
-the Dalvik interpreter to send method trace information to the emulator.
-
-Signed-off-by: Jack Veenstra <veenstra@android.com>
----
- drivers/misc/qemutrace/qemu_trace.c | 35 ++++++++++++++++++++++++++++++++++-
- 1 files changed, 34 insertions(+), 1 deletions(-)
-
---- a/drivers/misc/qemutrace/qemu_trace.c
-+++ b/drivers/misc/qemutrace/qemu_trace.c
-@@ -53,6 +53,7 @@
-
- static unsigned char __iomem *qt_base;
- static int init_called;
-+static uint32_t qemu_trace_paddr;
-
- /* PIDs that start before our device registered */
- #define MAX_INIT_PIDS 2048
-@@ -330,8 +331,30 @@ static void qemu_trace_dump_init_threads
- }
- }
-
-+static int qemu_trace_mmap_fop(struct file *file, struct vm_area_struct *vma)
-+{
-+ int ret = io_remap_pfn_range(vma, vma->vm_start,
-+ (qemu_trace_paddr >> PAGE_SHIFT) + 1,
-+ PAGE_SIZE, vma->vm_page_prot);
-+ if (ret < 0)
-+ return ret;
-+ return 0;
-+}
-+
-+static const struct file_operations qemu_trace_fops = {
-+ .owner = THIS_MODULE,
-+ .mmap = qemu_trace_mmap_fop,
-+};
-+
-+static struct miscdevice qemu_trace_device = {
-+ .minor = MISC_DYNAMIC_MINOR,
-+ .name = "qemu_trace",
-+ .fops = &qemu_trace_fops,
-+};
-+
- static int qemu_trace_probe(struct platform_device *pdev)
- {
-+ int err;
- struct resource *r;
-
- /* not thread safe, but this should not happen */
-@@ -340,18 +363,28 @@ static int qemu_trace_probe(struct platf
- return -ENODEV;
- }
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- if (r == NULL)
-+ if (r == NULL || r->end - r->start < 2 * PAGE_SIZE - 1)
- return -EINVAL;
-+ qemu_trace_paddr = r->start;
- qt_base = ioremap(r->start, PAGE_SIZE);
- printk(KERN_INFO "QEMU TRACE Device: The mapped IO base is %p\n", qt_base);
-
- qemu_trace_dump_init_threads();
-+ err = misc_register(&qemu_trace_device);
-+ if (err)
-+ goto err_misc_register;
-
- return 0;
-+
-+err_misc_register:
-+ iounmap(qt_base);
-+ qt_base = NULL;
-+ return err;
- }
-
- static int qemu_trace_remove(struct platform_device *pdev)
- {
-+ misc_deregister(&qemu_trace_device);
- iounmap(qt_base);
- qt_base = NULL;
- return 0;