Re: how to use mmap() on a disk file to get a kernel address?

2013-12-30 Thread Yu Bi
Thanks for your idea. Because I implement a kernel storage service based on a disk file through VFS layer. To simplify the implementation, I prefer to read/write the mapped kernel space address instead of the file data access api(such as page cache API / VFS API). In FreeBSD, I can use

Re: Can't cleanly unload driver

2013-12-30 Thread Eric Fowler
So, I finally figured this out, and for the benefit of web posterity and the search engines, I'm gonna lay it out: I was using *both* the register_chrdev() and the cdev_*() functions on the same device. I guess you can't do that. I can't, anyway. Rubini's scull code uses both, and it looks like he

Looking an example to use v4l2 mem2mem codec driver

2013-12-30 Thread m silverstri
Hi, Can you please tell me how to use v4l2 mem2mem codec driver? or where I can find example for it? Thank you. Mike ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Can't cleanly unload driver

2013-12-30 Thread Eric Fowler
Actually, I was working with a homegrown makefile. I made the change you recommended and am still having the problem. I am thinking now about something else as being the problem. Is this code legitimate? file scope struct cdev my_cdev; ///inside init function cdev_init(&my_cdev, ); cd

Re: Can't cleanly unload driver

2013-12-30 Thread Rajat Sharma
Hi Eric, I have seen some errors with module reference counting with a nicely written code, but culprit for my case was a missing compilation flag -DMODULE which gives definition of THIS_MODULE, otherwise it is null e.g. for modules which are compiled in kernel, so they are never unloaded. Unless

Re: MPC8641 based custom board kernel Bug

2013-12-30 Thread Sri Ram Vemulpali
You need to modify the base address of the each node to map in to processor address space. All device nodes in device tree are provisioned with physical addresses in processor domain. You need to understand the device tree structure. Check your specs regarding the I/O mapping of the processor memor

Re: MPC8641 based custom board kernel Bug

2013-12-30 Thread wyang
On 12/26/2013 01:09 PM, Ashish Khetan wrote: Hi, I was trying to port Linux-3.12 for MPC8641 based custom designed board for evaluation purpose. I have been facing a kernel bug at mpic initialization. Is somebody have faced this kind of bugs or can give me any pointer for further steps how to

Re: Can't cleanly unload driver

2013-12-30 Thread Eric Fowler
Still working on this. Here is some dmesg spew: [ 514.245846] foobar: module verification failed: signature and/or required key missing - tainting kernel [ 514.245937] kobject: 'foobar' (f7f060c8): kobject_add_internal: parent: 'module', set: 'module' [ 514.245951] kobject: 'holders' (f5ff3d40)

Re: user space vs kernel space address space

2013-12-30 Thread Miles MH Chen
Hi Pritam, Every page frame is controlled by kernel, but kernel does not have to map all pages in all time. On a 32-bit bit, 3:1 split Linux kernel, the kernel has at most 1GB VIRTUAL address space. (user space has 3GB). If there are 2GB of physical DRAM on the system, our kernel obviously cannot

Re: user space vs kernel space address space

2013-12-30 Thread Pritam Bankar
Miles thanks a lot for response but I still have some doubts please see my comments inline. On Sun, Dec 29, 2013 at 7:04 PM, Miles MH Chen wrote: > Hi Pritam, > > 1) Yes, all 512RAM will be direct mapped to kernel address space IF the > kernel have a 896MB direct mapping area. > Actually you c