WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] Re: Add Function to completely flush the I-Cache for a processo

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] Re: Add Function to completely flush the I-Cache for a processor
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Mon, 02 Oct 2006 17:18:09 -0500
Delivery-date: Mon, 02 Oct 2006 15:18:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1GUVsB-0000Y7-LH@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <E1GUVsB-0000Y7-LH@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2006-10-02 at 22:02 +0000, Xen patchbot-xenppc-unstable wrote:
> 
> +void cpu_flush_icache(void)
> +{
> +    union hid1 hid1;
> +    ulong flags;
> +    ulong ra;
>
> +    local_irq_save(flags);
> +
> +    /* uses special processor mode that forces a real address match */
> +    hid1.word = mfhid1();
> +    hid1.bits.en_icbi = 1;
> +    mthid1(hid1.word);

icbi uses effective addresses, not real addresses. The docs say that bit
is "Enable forced Instruction Cache Block Invalidate (icbi) match mode,"
which I don't understand.

Are you saying that bit makes the invalidate work on real addresses
rather than effective? Why would we want that? Doesn't this loop work
just fine with effective addresses?

> +    for (ra = 0; ra < cpu_caches.isize; ra += cpu_caches.iline_size)
> +        icbi(ra);
> +
> +    sync();
> +
> +    hid1.bits.en_icbi = 0;
> +    mthid1(hid1.word);
> +
> +    local_irq_save(flags);
> +} 

^^^ local_irq_restore

-- 
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

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