linux-mips
[Top] [All Lists]

Re: Broadcom Swarm support

To: Kaz Kylheku <KKylheku@zeugmasystems.com>
Subject: Re: Broadcom Swarm support
From: Ralf Baechle <ralf@linux-mips.org>
Date: Sat, 27 Jun 2009 16:49:02 +0100
Cc: Aurelien Jarno <aurelien@aurel32.net>, linux-mips@linux-mips.org
In-reply-to: <DDFD17CC94A9BD49A82147DDF7D545C501C3539B@exchange.ZeugmaSystems.local>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20090624063453.GA16846@volta.aurel32.net> <DDFD17CC94A9BD49A82147DDF7D545C501C3539B@exchange.ZeugmaSystems.local>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
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.  Iow both
arguments are wrong.  The result is that for start address values normally
passed to flush_icache_range it will optimize the flush into a full cache
flush of I-cache and D-cache - iow you're lucky.

  Ralf

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