Re: [PATCH] parisc: Purge existing TLB entries in set_pte_at and ptep_set_wrprotect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2013-01-13 at 16:52 -0500, John David Anglin wrote:

> +void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
> +{
> +       unsigned long flags, sid;
> +
> +       /* Note: purge_tlb_entries can be called at startup with
> +          no context.  */
> +
> +       /* Disable preemption while we play with %sr1.  */
> +       preempt_disable();
> +       sid = mfsp(1);
> 
There's no need at all to save and restore %sr1 is there?  It's defined
to be a volatile register.  As long as you make sure nothing gets in to
change its value, you never need to restore the previous one.

James
> 
> +       mtsp(mm->context,1);
> +       purge_tlb_start(flags);
> +       pdtlb(addr);
> +       pitlb(addr);
> +       purge_tlb_end(flags);
> +       mtsp(sid,1);
> +       preempt_enable();
> +}

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux