linux-mips
[Top] [All Lists]

RE: Broadcom Swarm support

To: "Ralf Baechle" <ralf@linux-mips.org>
Subject: RE: Broadcom Swarm support
From: "Kaz Kylheku" <KKylheku@zeugmasystems.com>
Date: Tue, 30 Jun 2009 10:10:47 -0700
Cc: "Aurelien Jarno" <aurelien@aurel32.net>, <linux-mips@linux-mips.org>
In-reply-to: <20090627154902.GA18139@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: Acn3Pu1bxNbhRQ+URyCHewtURsjNxQBoRXuw
Thread-topic: Broadcom Swarm support
Ralf Baechle wrote, on June 27, 2009 8:49 AM
> On Wed, Jun 24, 2009 at 03:18:24PM -0700, Kaz Kylheku wrote:
> 
> > +void __flush_icache_page(struct vm_area_struct *vma, 
> struct page *page)
> > +{
> > +   if (vma->vm_flags & VM_EXEC)
> > +           flush_icache_range((unsigned long) page_address(page),
> > PAGE_SIZE); 
> > +}
> 
> Flush_icache_range takes two arguments, start and end address.  Both
> addresses are the virtual addresses at which the code will 
> run.

Thanks for pointing that out. After wiping some egg of my face,
I'm now testing this change:

 void __flush_icache_page(struct vm_area_struct *vma, struct page *page)
 {
        if (vma->vm_flags & VM_EXEC)
-               flush_icache_range((unsigned long) page_address(page),
PAGE_SIZE);
+               flush_icache_range(vma->vm_start, vma->vm_end);
 }

I see a small performance improvement, suggesting that it's flushing
cache lines more precisely.

But I am now more confused, because it turns out that my kernel still
runs
fine now if I turn the function into a noop!

We must have fixed something since the time I was getting this kernel
running. Or it could be that I'm using a CF from a different
manufacturer.

Still, there is the observation that this flush_icache_page restoration
also gets Aurelien's Swarm up and running.


<Prev in Thread] Current Thread [Next in Thread>