From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
<linux-mips@linux-mips.org>
Subject: Re: [PATCH] MIPS: mm: c-r4k: Detect instruction cache aliases
Date: Wed, 29 Jan 2014 13:41:57 +0000 [thread overview]
Message-ID: <52E90525.7010704@imgtec.com> (raw)
In-Reply-To: <52E9029C.80300@cogentembedded.com>
Hi Sergei,
On 01/29/2014 01:31 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 29-01-2014 17:10, Markos Chandras wrote:
>
>> The *Aptiv cores can use the CONF7/IAR bit to detect if the core
>> has hardware support to remove instruction cache aliasing.
>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>> ---
>> This patch is for the upstream-sfr/mips-for-linux-next tree
> [...]
>
>> diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
>> index 13b549a..e790524 100644
>> --- a/arch/mips/mm/c-r4k.c
>> +++ b/arch/mips/mm/c-r4k.c
>> @@ -1110,7 +1110,10 @@ static void probe_pcache(void)
>> case CPU_PROAPTIV:
>> if (current_cpu_type() == CPU_74K)
>> alias_74k_erratum(c);
>> - if ((read_c0_config7() & (1 << 16))) {
>> + if (!(read_c0_config7() & MIPS_CONF7_IAR))
>> + if (c->icache.waysize > PAGE_SIZE)
>
> Why not fold these to a single *if*?
I suppose I could do that. Thanks
>
>> + c->icache.flags |= MIPS_CACHE_ALIASES;
>> + if (read_c0_config7() & MIPS_CONF7_AR) {
>
> You didn't document this change. Ideally, it should be in a separate
> patch.
Nothing has changed. Instead of using the '16' magic value, I just
documented that bit along with the IAR one.
--
markos
WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: mm: c-r4k: Detect instruction cache aliases
Date: Wed, 29 Jan 2014 13:41:57 +0000 [thread overview]
Message-ID: <52E90525.7010704@imgtec.com> (raw)
Message-ID: <20140129134157.-cDXBVB_hErJpcJmxo7xsKEpFs4vn9Eh5zEmyHxflFw@z> (raw)
In-Reply-To: <52E9029C.80300@cogentembedded.com>
Hi Sergei,
On 01/29/2014 01:31 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 29-01-2014 17:10, Markos Chandras wrote:
>
>> The *Aptiv cores can use the CONF7/IAR bit to detect if the core
>> has hardware support to remove instruction cache aliasing.
>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>> ---
>> This patch is for the upstream-sfr/mips-for-linux-next tree
> [...]
>
>> diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
>> index 13b549a..e790524 100644
>> --- a/arch/mips/mm/c-r4k.c
>> +++ b/arch/mips/mm/c-r4k.c
>> @@ -1110,7 +1110,10 @@ static void probe_pcache(void)
>> case CPU_PROAPTIV:
>> if (current_cpu_type() == CPU_74K)
>> alias_74k_erratum(c);
>> - if ((read_c0_config7() & (1 << 16))) {
>> + if (!(read_c0_config7() & MIPS_CONF7_IAR))
>> + if (c->icache.waysize > PAGE_SIZE)
>
> Why not fold these to a single *if*?
I suppose I could do that. Thanks
>
>> + c->icache.flags |= MIPS_CACHE_ALIASES;
>> + if (read_c0_config7() & MIPS_CONF7_AR) {
>
> You didn't document this change. Ideally, it should be in a separate
> patch.
Nothing has changed. Instead of using the '16' magic value, I just
documented that bit along with the IAR one.
--
markos
next prev parent reply other threads:[~2014-01-29 13:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 13:10 [PATCH] MIPS: mm: c-r4k: Detect instruction cache aliases Markos Chandras
2014-01-29 13:10 ` Markos Chandras
2014-01-29 13:31 ` Sergei Shtylyov
2014-01-29 13:41 ` Markos Chandras [this message]
2014-01-29 13:41 ` Markos Chandras
2014-01-29 18:10 ` Sergei Shtylyov
2014-01-29 17:17 ` Markos Chandras
2014-01-29 17:17 ` Markos Chandras
2014-01-30 17:21 ` [PATCH v2] " Markos Chandras
2014-01-30 17:21 ` Markos Chandras
2014-01-30 18:33 ` Sergei Shtylyov
2014-01-30 17:35 ` Markos Chandras
2014-01-30 17:35 ` Markos Chandras
2014-02-04 15:57 ` Ralf Baechle
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=52E90525.7010704@imgtec.com \
--to=markos.chandras@imgtec.com \
--cc=linux-mips@linux-mips.org \
--cc=sergei.shtylyov@cogentembedded.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 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.