Thread (9 messages) 9 messages, 4 authors, 2006-11-21

Re: [PATCH 2/5] [POWERPC] 8xx: generic 8xx code arch/powerpc port

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-11-16 22:48:53

But wha do you need this for anyway?  It's not used anywhere currently,
and it's not 8xx-specific at all?
quoted
+unsigned long va_to_phys(unsigned long address)
+{
+	pte_t *pte;
+
+	pte = va_to_pte(address);
+	if (pte)
+		return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK)));
+	return (0);
+}
Shouldn't you use virt_to_phys instead?

Also for the last two I'd prefer if you'd find a way to avoid adding
them.
I think those 2 are used for cases where they either have a non-linear
mapping a-la Amiga/APUS or in cases where they try to get addresses of
things in the vmalloc area no ?.

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help