All of lore.kernel.org
 help / color / mirror / Atom feed
From: wolfgang.betz@st.com (Wolfgang BETZ)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] Add Thread Support for the Context ID Register of ARM v6 & v7 Architectures
Date: Wed, 29 Jun 2011 15:05:42 +0200	[thread overview]
Message-ID: <4E0B2326.8090808@st.com> (raw)
In-Reply-To: <20110628090004.GA16009@e102144-lin.cambridge.arm.com>

Ciao Will,

thanks a lot for your statement regarding the ASID overflow issue.
In fact, we have never even tried to resolve this issue, not only 
because most likely there is no perfect solution to it in current 
implementations (i.e. v6 & v7 architectures), but also because it was 
out of our scope.
In STMicroelectronics we are simply customers of Lauterbach's TRACE32 
tool and are very interested in getting an as precise as possible 
insight in what goes on in our systems when running Linux based 
environments, with a particular focus on SMP. Together with Lauterbach 
we are currently working on improving their tool with respect to SMP in 
general and the tracing of context switches in particular. One result of 
this collaboration is the patch I have submitted to the ARM kernel 
mailing list this Monday.
Again, we do not aim in improving the handling of ASIDs, but are just 
caring about getting also the current process ID out of the trace logic. 
As the way to achieve this is not platform-specific, we thought it might 
be a good idea to implement it as an architectural feature and provide 
it through a kernel configuration variable (THREAD_CONTEXTID) for any 
platform supporting the CONTEXTIDR.
Furthermore, we thought it would be a good thing to mainline this 
modification and provide it to the open-source community. I do not know 
if you had the time to take a closer look to our patch, but for sure 
your feedback would be more than welcome.

Best regards,
Wolfgang


On 06/28/2011 11:00 AM, Will Deacon wrote:
> Hi Russell,
>
> On Mon, Jun 27, 2011 at 12:37:08PM +0100, Russell King - ARM Linux wrote:
>> On Mon, Jun 27, 2011 at 01:12:27PM +0200, Wolfgang BETZ wrote:
>>> The aim of this patch is to enable thread support in the context ID register
>>> (CONTEXTIDR) as it comes with ARM architectures v6&  v7.
>>>
>>>   On ARMv6&  v7, we have the following structure in the context ID:
>>>
>>>     31                         7          0
>>>     +-------------------------+-----------+
>>>     |      process ID         |   ASID    |
>>>     +-------------------------+-----------+
>>>     |              context ID             |
>>>     +-------------------------------------+
>>>
>>> - The ASID is used to tag entries in the CPU caches and TLBs.
>>> - The context ID is used by debuggers and trace logic, and
>>>    should be unique within all running processes.
>> When I added ARMv6 and v7 support to the kernel, I purposely ignored that
>> detail because it's silly.
> [...]
>
>> How are you working around this issue?
> I don't know how you could get around this with current implementations, but
> for Cortex-A15 w/ LPAE the ASID lives in the TTBR rather than the context
> ID register, so using the PID is straightforward in that case.
>
> Will
>

  reply	other threads:[~2011-06-29 13:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 11:12 [PATCH 0/1] Add Thread Support for the Context ID Register of ARM v6 & v7 Architectures Wolfgang BETZ
2011-06-27 11:12 ` [PATCH 1/1] " Wolfgang BETZ
2011-06-27 11:37   ` Russell King - ARM Linux
2011-06-28  9:00     ` Will Deacon
2011-06-29 13:05       ` Wolfgang BETZ [this message]
     [not found]     ` <4E097B58.3050301@st.com>
2011-06-28 10:29       ` Russell King - ARM Linux

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=4E0B2326.8090808@st.com \
    --to=wolfgang.betz@st.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.