Hi Alex,
I've posetd a small back patch for the kernel to solve this here. Look
about 6 weeks ago.
Ciao,
Peter
On Sun, 14 Jan 2007, Alex Rier wrote:
> Hi,
>
> I'm porting DaVinci Video Capture driver davinci_vpfe, ccdc,
> CMEMK and DSPLINKK to 2.6.19-rc3-omap1.
>
> All the drivers and there dependencies compile, link and load.
> But when I try to run "decode", CMEMK fails in get_phys().
> (I've put some extra prints into get_phys).
> See below...
>
>
> //--------- cmemk.c -------------------------------------------
> unsigned long get_phys(unsigned long virtp)
> {
> pgd_t *pgd;
> pmd_t *pmd;
> pte_t *pte;
> struct mm_struct *mm = current->mm;
>
> pgd = pgd_offset(mm, virtp);
> __D("get_phys(): pgd = 0x%X virtp = 0x%X \n",
> (unsigned)pgd_val(pgd), (unsigned)virtp); // TBD: A.R. Debug
> if (!(pgd_none(*pgd) || pgd_bad(*pgd))) {
> pmd = pmd_offset(pgd, virtp);
> __D("get_phys(): pmd = 0x%X \n", (unsigned)pmd_val(pmd)); //
> TBD: A.R. Debug
> __D("get_phys(): pmd_none = 0x%X pmd_bad = 0x%X \n",
> (unsigned)pmd_none(*pmd), (unsigned)pmd_bad(*pmd)); // TBD: A.R. Debug
>
> if (!(pmd_none(*pmd) || pmd_bad(*pmd))) {
> pte = pte_offset_kernel(pmd, virtp);
> __D("get_phys(): pte = 0x%X pte_present = %d \n",
> (unsigned)pte_val(pte), (unsigned)pte_present(*pte));
> // TBD: A.R. Debug
>
> if (pte_present(*pte)) {
> __D("get_phys(): pte_page = 0x%X page_address = 0x%X
> virtp & ~PAGE_MASK = 0x%X \n",
> (unsigned)pte_page(*pte),
> (unsigned)page_address(pte_page(*pte)),
> (unsigned)(virtp & ~PAGE_MASK)); // TBD: A.R.
> Debug
> return __pa(page_address(pte_page(*pte)) +
> (virtp & ~PAGE_MASK));
> }
> }
> }
>
> return 0;
> }
> //------------------------------------------------------------
>
> ==== 2.6.19-rc3-omap1 DMESG ====
> MEMK Debug: ** CMEM kernel module built: Jan 10 2007 14:44:55
> CMEMK Debug: Allocated major number: 254
> CMEMK Debug: Allocating 1 buffers of size 3145728 (requested 3145728)
> CMEMK Debug: alloc_pool_buffer: Called for size 3145728
> CMEMK Debug: alloc_pool_buffer: Fits req 3145728 < avail: 8388608
> CMEMK Debug: alloc_pool_buffer: new available block size is 5242880
> CMEMK Debug: alloc_pool_buffer: returning allocated buffer at 0xc9500000
> CMEMK Debug: get_phys(): pgd = 0xC6713250 virtp = 0xC9500000
> CMEMK Debug: get_phys(): pmd = 0xC6713250
> CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x2
> CMEMK Debug: Allocated buffer 0, virtual 0xc9500000 and physical 0x0 and
> size 3145728
> CMEMK Debug: Busylist for pool 0:
> CMEMK Debug: Freelist for pool 0:
> CMEMK Debug: Free: Buffer with id 0 and physical address 0x0
> CMEMK Debug: Allocating 1 buffers of size 204800 (requested 202752)
> CMEMK Debug: alloc_pool_buffer: Called for size 204800
> CMEMK Debug: alloc_pool_buffer: Fits req 204800 < avail: 5242880
> CMEMK Debug: alloc_pool_buffer: new available block size is 5038080
> CMEMK Debug: alloc_pool_buffer: returning allocated buffer at 0xc94ce000
> CMEMK Debug: get_phys(): pgd = 0xC6713250 virtp = 0xC94CE000
> CMEMK Debug: get_phys(): pmd = 0xC6713250
> CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x2
> CMEMK Debug: Allocated buffer 0, virtual 0xc94ce000 and physical 0x0 and
> size 204800
> ......
> CMEMK Debug: GETSIZE ioctl received
> CMEMK Debug: GETSIZE returning 3145728
> CMEMK Debug: mmap: vma->vm_start = 0x41598000
> CMEMK Debug: mmap: vma->vm_pgoff = 0x0
> CMEMK Debug: mmap: vma->vm_end = 0x41898000
> CMEMK Debug: mmap: size = 0x300000
> CMEMK Debug: GETPHYS ioctl received.
> CMEMK Debug: get_phys(): pgd = 0xC6665050 virtp = 0x41598000
> CMEMK Debug: get_phys(): pmd = 0xC6665050
> CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x0
> CMEMK Debug: get_phys(): pte = 0xC6105E60 pte_present = 1
> CMEMK Debug: get_phys(): pte_page = 0xBF303000 page_address = 0x40000000
> virtp & ~PAGE_MASK = 0x0
> CMEMK Error: GETPHYS: Failed to convert virtual 0x41598000 to physical.
> ........
> ================
>
>
> Do you have an idea why does it work with 2.6.10-mvl401 and fails with
> 2.6.19-rc3-omap1?
>
> Thanks,
> Alex
>
>
> This mail passed through VIGILANT TECHNOLOGY Mail-SeCure.
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals & computer
> viruses.
> ************************************************************************************
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>
| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [EMAIL PROTECTED] |
| D-13355 Berlin / Germany |
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source