|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-ia64-devel] [patch] sn2 global_tlb_purge implementation
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
|
|
|
|
|