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-ia64-devel

Re: [Xen-ia64-devel] [patch] sn2 global_tlb_purge implementation

To: Jes Sorensen <jes@xxxxxxx>
Subject: Re: [Xen-ia64-devel] [patch] sn2 global_tlb_purge implementation
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Tue, 19 Jun 2007 15:34:28 -0600
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 19 Jun 2007 14:32:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <46778E00.8090301@xxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
References: <46778E00.8090301@xxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2007-06-19 at 10:04 +0200, Jes Sorensen wrote:
> diff -r f5c03237a7f0 -r 5f526ad0298b 
> xen/arch/ia64/linux-xen/sn/kernel/sn2_smp.c
> --- a/xen/arch/ia64/linux-xen/sn/kernel/sn2_smp.c     Tue Jun 19 09:35:38 
> 2007 +0200
> +++ b/xen/arch/ia64/linux-xen/sn/kernel/sn2_smp.c     Tue Jun 19 09:59:52 
> 2007 +0200
> @@ -160,21 +160,97 @@ void sn_tlb_migrate_finish(struct mm_str
>  // static cpumask_t mask_all = CPU_MASK_ALL;
>  #endif

   Minor nit, but don't you want that ifdef XEN down below right here?
Thanks,

        Alex

> +static DEFINE_SPINLOCK(sn2_ptcg_lock);
> +
> +struct sn_flush_struct {
> +     unsigned long start;
> +     unsigned long end;
> +     unsigned long nbits;
> +};
> +
> +static void sn_flush_ptcga_cpu(void *ptr)
> +{
> +     struct sn_flush_struct *sn_flush = ptr;
> +     unsigned long start, end, nbits;
> +
> +     start = sn_flush->start;
> +     end = sn_flush->end;
> +     nbits = sn_flush->nbits;
> +
> +     /*
> +      * Contention me harder!!!
> +      */
> +     /* HW requires global serialization of ptc.ga.  */
> +     spin_lock(&sn2_ptcg_lock);
> +     {
> +             do {
> +                     /*
> +                      * Flush ALAT entries also.
> +                      */
> +                     ia64_ptcga(start, (nbits<<2));
> +                     ia64_srlz_i();
> +                     start += (1UL << nbits);
> +             } while (start < end);
> +     }
> +     spin_unlock(&sn2_ptcg_lock);
> +}
> +
> +#ifdef XEN
>  void
> -#ifndef XEN
> +sn2_global_tlb_purge(unsigned long start,
> +                  unsigned long end, unsigned long nbits)

-- 
Alex Williamson                             HP Open Source & Linux Org.


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