* How many colours does the ARC cache have?
@ 2023-02-10 17:06 Matthew Wilcox
2023-02-16 4:59 ` Vineet Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2023-02-10 17:06 UTC (permalink / raw)
To: linux-snps-arc
I see a discrepancy here ...
arch/arc/include/asm/shmparam.h:
/* Handle upto 2 cache bins */
#define SHMLBA (2 * PAGE_SIZE)
arch/arc/include/asm/cacheflush.h:
#define CACHE_COLORS_NUM 4
(there are some other problems with the arc cache flushing code; I'm
working on patches to address them, but those are things I understand a
little better. I know nothing about the ARC architecture itself)
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How many colours does the ARC cache have?
2023-02-10 17:06 How many colours does the ARC cache have? Matthew Wilcox
@ 2023-02-16 4:59 ` Vineet Gupta
2023-02-18 19:03 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2023-02-16 4:59 UTC (permalink / raw)
To: Matthew Wilcox, linux-snps-arc; +Cc: Alexey Brodkin
On 2/10/23 09:06, Matthew Wilcox wrote:
> I see a discrepancy here ...
>
> arch/arc/include/asm/shmparam.h:
> /* Handle upto 2 cache bins */
> #define SHMLBA (2 * PAGE_SIZE)
>
> arch/arc/include/asm/cacheflush.h:
> #define CACHE_COLORS_NUM 4
The initial aliasing dcache support assumed 2 colors but was later
bumped to 4, w/o making the adjustment in shmparam.h
> (there are some other problems with the arc cache flushing code;
The VIPT aliasing config (which is pretty much dead and unused) or
regular parts ?
> I'm working on patches to address them, but those are things I understand a
> little better. I know nothing about the ARC architecture itself)
Legacy ARC700 cpus had VIPT D$. The cache size was configurable by Soc
builder and the specific geometry could yield an aliasing configuration
(e.g. standard page size 8K, 4 way set associative D$: so D$ > 32K were
aliasing and needed CONFIG_ARC_CACHE_VIPT_ALIASING). Although there was
ever only 1 customer who taped out an aliasing cache config.
The newer ARC HS cores have PIPT D$ and thus don't need the aliasing
support.
FWIW we could rip out all the VIPT aliasing code as I don't think it is
needed anymore. @Alexey can you confirm ?
-Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How many colours does the ARC cache have?
2023-02-16 4:59 ` Vineet Gupta
@ 2023-02-18 19:03 ` Matthew Wilcox
0 siblings, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2023-02-18 19:03 UTC (permalink / raw)
To: Vineet Gupta; +Cc: linux-snps-arc, Alexey Brodkin
On Wed, Feb 15, 2023 at 08:59:18PM -0800, Vineet Gupta wrote:
> On 2/10/23 09:06, Matthew Wilcox wrote:
> > I see a discrepancy here ...
> >
> > arch/arc/include/asm/shmparam.h:
> > /* Handle upto 2 cache bins */
> > #define SHMLBA (2 * PAGE_SIZE)
> >
> > arch/arc/include/asm/cacheflush.h:
> > #define CACHE_COLORS_NUM 4
>
> The initial aliasing dcache support assumed 2 colors but was later bumped to
> 4, w/o making the adjustment in shmparam.h
OK. Will you fix it yourself, or do you want me to send a patch?
> > (there are some other problems with the arc cache flushing code;
>
> The VIPT aliasing config (which is pretty much dead and unused) or regular
> parts ?
I'm not sure. This is incorrect in flush_dcache_page():
} else if (page_mapcount(page)) {
[...]
unsigned long vaddr = page->index << PAGE_SHIFT;
If the page being flushed is a tail page, then page->index is not
valid, so you're essentially flushing a random address. I have a
fix for it that I sent out earlier this week.
> > I'm working on patches to address them, but those are things I understand a
> > little better. I know nothing about the ARC architecture itself)
>
> Legacy ARC700 cpus had VIPT D$. The cache size was configurable by Soc
> builder and the specific geometry could yield an aliasing configuration
> (e.g. standard page size 8K, 4 way set associative D$: so D$ > 32K were
> aliasing and needed CONFIG_ARC_CACHE_VIPT_ALIASING). Although there was ever
> only 1 customer who taped out an aliasing cache config.
>
> The newer ARC HS cores have PIPT D$ and thus don't need the aliasing
> support.
>
> FWIW we could rip out all the VIPT aliasing code as I don't think it is
> needed anymore. @Alexey can you confirm ?
>
> -Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-18 19:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 17:06 How many colours does the ARC cache have? Matthew Wilcox
2023-02-16 4:59 ` Vineet Gupta
2023-02-18 19:03 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox