Thread (54 messages) flat view 54 messages, 14 authors, 2001-01-23

Re: [Dri-devel] PPC Lockup (ati-pcigart-branch)

From: Dan Malek <hidden>
Date: 2001-01-22 21:13:26

OK, since I was stupid and couldn't see the forest for the trees,
let's take some giant steps backward and try again.....

Michel Dänzer wrote:
I've narrowed down the problem by modifying the code like this:

        for ( i = entry->handle, j = 0 ; j < pages ; i += PAGE_SIZE, j++ ) {
                printk("i: %08lx\n", i);
                pgd = pgd_offset_k( i );
                printk("pgd: %08lx\n", pgd);
                pmd = pmd_offset( pgd, i );
                printk("pmd: %08lx\n", pmd);
                pte = pte_offset( pmd, i );
                printk("pte: %08lx\n", pte);

I do this:

		pgd = pgd_offset_k(i);
		if (pgd) {
			pmd = pmd_offset(pgd, i);
			if (pmd && pmd_present(*pmd)) {
				pte = pte_offset(pmd, i);
				if (pte && pte_present(*pte)) {
					/* Do your stuff */
				}
			}
		}
The kernel output is as follows:

[drm] drm_sg_alloc
i: ca292000
pgd: c014dca0
pmd: c014dca0
pte: 00000a48
Using my code above, the 'if (pmd && pmd_present(*pmd))' would have
been false (the pmd_present would have failed).  Now, the confusing
part is if entry->handle is the result of a vmalloc this shouldn't
happen......So, Roman was right, no pte table.......

What kernel and system are you using?  Where in the course of
system operation (driver init, application open(), etc.) are you
running this code?

I apologize for my confusion.


	-- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help