From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will.deacon@arm.com>,
Russell King <linux@arm.linux.org.uk>,
Frank Rowand <frank.rowand@am.sony.com>
Subject: [PATCH v3 3/6] ARM: Allow ASID 0 to be allocated to tasks
Date: Fri, 20 Jan 2012 17:42:29 +0000 [thread overview]
Message-ID: <1327081352-13178-4-git-send-email-catalin.marinas@arm.com> (raw)
In-Reply-To: <1327081352-13178-1-git-send-email-catalin.marinas@arm.com>
From: Will Deacon <will.deacon@arm.com>
Now that ASID 0 is no longer used as a reserved value, allow it to be
allocated to tasks.
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm/mm/context.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 97842a0..efa413a 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -118,7 +118,7 @@ static void reset_context(void *info)
return;
smp_rmb();
- asid = cpu_last_asid + cpu + 1;
+ asid = cpu_last_asid + cpu;
flush_context();
set_mm_context(mm, asid);
@@ -167,13 +167,13 @@ void __new_context(struct mm_struct *mm)
* to start a new version and flush the TLB.
*/
if (unlikely((asid & ~ASID_MASK) == 0)) {
- asid = cpu_last_asid + smp_processor_id() + 1;
+ asid = cpu_last_asid + smp_processor_id();
flush_context();
#ifdef CONFIG_SMP
smp_wmb();
smp_call_function(reset_context, NULL, 1);
#endif
- cpu_last_asid += NR_CPUS;
+ cpu_last_asid += NR_CPUS - 1;
}
set_mm_context(mm, asid);
next prev parent reply other threads:[~2012-01-20 17:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 17:42 [PATCH v3 0/6] ARM: Remove the __ARCH_WANT_INTERRUPTS_ON_CTXSW definition Catalin Marinas
2012-01-20 17:42 ` [PATCH v3 1/6] sched: Introduce the finish_arch_post_lock_switch() scheduler hook Catalin Marinas
2012-02-27 14:48 ` Peter Zijlstra
2012-01-20 17:42 ` [PATCH v3 2/6] ARM: Use TTBR1 instead of reserved context ID Catalin Marinas
2012-01-20 17:42 ` Catalin Marinas [this message]
2012-01-20 17:42 ` [PATCH v3 4/6] ARM: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW on ASID-capable CPUs Catalin Marinas
2012-01-20 17:42 ` [PATCH v3 5/6] ARM: Remove current_mm per-cpu variable Catalin Marinas
2012-01-20 17:42 ` [PATCH v3 6/6] ARM: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW on pre-ARMv6 CPUs Catalin Marinas
2012-01-23 9:15 ` [PATCH v3 0/6] ARM: Remove the __ARCH_WANT_INTERRUPTS_ON_CTXSW definition Peter Zijlstra
2012-01-23 9:26 ` Catalin Marinas
2012-01-23 9:47 ` Russell King - ARM Linux
2012-01-23 9:53 ` Catalin Marinas
2012-01-24 15:14 ` Will Deacon
2012-01-25 10:31 ` Marc Zyngier
2012-02-16 13:58 ` Peter Zijlstra
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=1327081352-13178-4-git-send-email-catalin.marinas@arm.com \
--to=catalin.marinas@arm.com \
--cc=frank.rowand@am.sony.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®