**** BEGIN LOGGING AT Fri Jun 06 03:00:00 2014 Jun 06 04:31:52 panto : shared memory works. Now I'm have created sysfs entries for toggling IO pins + another sysfs entry for shared memory b/w kernel and PRU (kernel sends a value to the PRU via shared memory, PRU manipulates it as expected and returns ) Jun 06 04:31:59 panto : :) Jun 06 09:49:48 panto : So now I have a single page of memory shared between the kernel and PRU. How do I export this to user space via mmap? I looked at a couple of sources, but in all the examples the "vm_area_struct" which we are getting via the param seems to have all the values populated beforehand. How does that work? how do I map to an existing page in kernel memory (which I've got from dma_alloc_coherent) to userspace? Jun 06 09:55:21 If you can get the physical address of the mem to user space then you could call mmap directly with that. IIRC UIO does it that way but I think there could be a better way Jun 06 10:06:37 I didn't get you..... what do you mean "get the physical address of the mem to user space" ? Jun 06 10:08:36 Export a value via sysfs? Jun 06 10:09:15 oh, idk about that Jun 06 10:09:33 how could you call mmap with the physical addr again? Jun 06 10:10:19 AFAIK the userspace is completely clueless about the physical addr that is getting mapped! Jun 06 10:10:19 first things first Jun 06 10:10:40 it might be bad to export the area you got from dma_alloc_coherent Jun 06 10:11:04 you need the physical address of an area in memory that has no other mappings in ARM Jun 06 10:11:38 ah Jun 06 10:12:08 But then how does UIO do it? Jun 06 10:12:12 okay, so do the mmap first Jun 06 10:12:34 get the resulting physical addr that has been assigned Jun 06 10:12:40 and give that to the PRU Jun 06 10:13:55 * Abhishek_ is experiencing bad connectivity right now Jun 06 10:13:58 physical address being (vm->vm_pgoff) >> PAGE_SHIFT Jun 06 10:13:59 hmm, it just passes that to uio Jun 06 10:14:05 I'm not sure this is correct Jun 06 10:14:18 it might work, but it could be bad Jun 06 10:14:31 anyway, use dma_coherent for now Jun 06 10:14:39 I'll ask mdp when he shoes up Jun 06 10:14:41 *shows Jun 06 10:14:44 https://www.kernel.org/doc/Documentation/dma-buf-sharing.txt Jun 06 10:14:52 but this is the modern interface to use Jun 06 10:17:45 Going throught it Jun 06 10:40:34 Abhishek_, karki, please send me via email links to your kernel trees Jun 06 10:50:53 panto : I have mailed it to your gmail id. Jun 06 10:53:34 ok Jun 06 11:03:48 panto: I've sent it to your gmail id as well Jun 06 11:08:25 what exactly is an anonymous file? Jun 06 11:19:08 one that only exists in memory and not in the filesystem Jun 06 11:20:33 like sysfs procfs etc? Jun 06 11:20:40 panto: isn't it more suited for shared DMA between drivers than kernel->userspace? Jun 06 11:21:09 karki: that's a filesystem Jun 06 11:21:47 I think it more like an already opened file with a file number so that I can do whatever I want with the file without caring how it was opened Jun 06 11:24:51 ah, yes. I read it as "a file that exists in memory, not on the disk" Jun 06 11:24:54 :p Jun 06 11:24:56 my bad Jun 06 14:34:52 rseethamraju : hows it going ? Jun 06 14:35:01 ok Jun 06 14:35:10 nnot that great! Jun 06 14:35:14 stupid exams Jun 06 14:35:14 how many exams left? Jun 06 14:35:16 3 Jun 06 14:35:20 2 over Jun 06 14:41:16 which semester are you in? Jun 06 14:42:38 3-2 Jun 06 14:42:40 you? Jun 06 14:43:02 done with 6th (including results) Jun 06 14:43:05 phew Jun 06 14:43:09 glad that is over Jun 06 14:43:44 oh same here I mean getting done with 6th Jun 06 14:43:51 :) Jun 06 14:43:54 * Abhishek1 is done with his 4th sem results with a GPA of 9.41 so far Jun 06 14:44:10 and my reaults will take a min of 2 months :) Jun 06 14:44:29 Abhishek1: wow! I have 65% Jun 06 14:45:01 9.7 ;) Jun 06 14:45:13 cool ;) Jun 06 14:45:20 seriuosly my exams are screwed anyway Jun 06 14:45:23 JNTU Jun 06 14:45:24 so Jun 06 14:45:40 and Andhra you know with a 100 clgs in hyd and all Jun 06 14:45:47 9.9 Jun 06 14:46:32 but my branch highest in the uni is 78 so I’m hoping that’ll carry me through Jun 06 14:46:41 karki: Wow! Jun 06 14:47:04 scoring all depends on the university Jun 06 14:47:15 individually CGPA mean nothing Jun 06 14:47:39 so I stopped caring about CGPA long back. best thing I did Jun 06 14:47:47 huh? Jun 06 14:47:47 yep it's all relative anyways Jun 06 14:48:11 It’ll still be quite a prb for me anyway Jun 06 14:48:20 well whatever! Jun 06 14:48:31 so hows GSoC going for you guys? Jun 06 14:56:50 going well, but needs to build up more traction. Jun 06 16:58:33 * karki 's BBB strikes again :/ **** ENDING LOGGING AT Sat Jun 07 02:59:59 2014