Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Maksim Rayskiy <maksim.rayskiy@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>,
	"Kevin D. Kissell" <kevink@paralogos.com>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH RESEND] MIPS: Add local_flush_tlb_all_mm to clear all mm contexts on calling cpu
Date: Wed, 29 Dec 2010 23:41:39 +0300	[thread overview]
Message-ID: <4D1B9D03.1090109@mvista.com> (raw)
In-Reply-To: <AANLkTi=_2aqFiB4Qgez8f-tiiqv19+VHDzX2TJ7jZ2Ha@mail.gmail.com>

Hello.

Maksim Rayskiy wrote:

> I hope this one does not get mangled.

    It seems OK.

> The thing is I do not know how
> to control it in gmail web client.

    Such remarks should follow the --- tear line.

> From 9a03661a40407e14ee75295f5541f371f0a7cdda Mon Sep 17 00:00:00 2001
> From: Maksim Rayskiy <maksim.rayskiy@gmail.com>
> Date: Tue, 30 Nov 2010 11:34:31 -0800
> Subject: [PATCH] MIPS: Add local_flush_tlb_all_mm to clear all mm
> contexts on calling cpu

    Don't include this header in the patch, as it will have to be hand edited 
out of it by the maintainer.

> When hotplug removing a cpu, all mm context TLB entries must be cleared
> to avoid ASID conflict when cpu is restarted.
> New functions local_flush_tlb_all_mm() and all-cpu version
> flush_tlb_all_mm() are added.
> To function properly, local_flush_tlb_all_mm() must be called when
> mm_cpumask for all
> mm context on given cpu is cleared.

> Signed-off-by: Maksim Rayskiy <maksim.rayskiy@gmail.com>
[...]

> diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
> index c618eed..5c03218 100644
> --- a/arch/mips/mm/tlb-r4k.c
> +++ b/arch/mips/mm/tlb-r4k.c
> @@ -66,6 +66,18 @@ extern void build_tlb_refill_handler(void);
> 
>  #endif
> 
> +/* This function will clear all mm contexts on calling cpu
> + * To produce desired effect it must be called
> + * when mm_cpumask for all mm contexts is cleared
> + */
> +void local_flush_tlb_all_mm(void)
> +{
> +	struct task_struct *p;

    An empty line wouldn't hurt here.

> +	for_each_process(p)
> +		if (p->mm)
> +			local_flush_tlb_mm(p->mm);
> +}
> +
>  void local_flush_tlb_all(void)
>  {
>  	unsigned long flags;

WBR, Sergei

  reply	other threads:[~2010-12-29 20:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29 20:21 [PATCH RESEND] MIPS: Add local_flush_tlb_all_mm to clear all mm contexts on calling cpu Maksim Rayskiy
2010-12-29 20:41 ` Sergei Shtylyov [this message]
2010-12-29 23:18   ` Maksim Rayskiy
  -- strict thread matches above, loose matches on Subject: below --
2010-12-29 19:04 Maksim Rayskiy
2010-12-29 19:25 ` David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D1B9D03.1090109@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=kevink@paralogos.com \
    --cc=linux-mips@linux-mips.org \
    --cc=maksim.rayskiy@gmail.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox