From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-mips@linux-mips.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Huacai Chen <chenhc@lemote.com>,
Paul Burton <paulburton@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Mike Rapoport <rppt@kernel.org>,
Liangliang Huang <huanglllzu@gmail.com>,
Oleksij Rempel <linux@rempel-privat.de>,
Kamal Dasu <kdasu.kdev@gmail.com>,
Ralf Baechle <ralf@linux-mips.org>,
bcm-kernel-feedback-list@broadcom.com (open list:BROADCOM BMIPS
MIPS ARCHITECTURE),
linux-mips@vger.kernel.org (open list:BROADCOM BMIPS MIPS
ARCHITECTURE), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH mips-fixes 1/2] MIPS: mm: BMIPS5000 has inclusive physical caches
Date: Wed, 19 Aug 2020 11:26:44 -0700 [thread overview]
Message-ID: <20200819182645.30132-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20200819182645.30132-1-f.fainelli@gmail.com>
When the BMIPS generic cpu-feature-overrides.h file was introduced,
cpu_has_inclusive_caches/MIPS_CPU_INCLUSIVE_CACHES was not set for
BMIPS5000 CPUs. Correct this when we have initialized the MIPS secondary
cache successfully.
Fixes: f337967d6d87 ("MIPS: BMIPS: Add cpu-feature-overrides.h")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/mips/mm/c-r4k.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index fc5a6d25f74f..0ef717093262 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -1712,7 +1712,11 @@ static void setup_scache(void)
printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
scache_size >> 10,
way_string[c->scache.ways], c->scache.linesz);
+
+ if (current_cpu_type() == CPU_BMIPS5000)
+ c->options |= MIPS_CPU_INCLUSIVE_CACHES;
}
+
#else
if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
--
2.17.1
next prev parent reply other threads:[~2020-08-19 18:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 18:26 [PATCH mips-fixes 0/2] MIPS: BMIPS: couple of fixes Florian Fainelli
2020-08-19 18:26 ` Florian Fainelli [this message]
2020-08-19 18:26 ` [PATCH mips-fixes 2/2] MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores Florian Fainelli
2020-08-21 7:47 ` [PATCH mips-fixes 0/2] MIPS: BMIPS: couple of fixes Thomas Bogendoerfer
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=20200819182645.30132-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=chenhc@lemote.com \
--cc=huanglllzu@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kdasu.kdev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=paulburton@kernel.org \
--cc=ralf@linux-mips.org \
--cc=rppt@kernel.org \
--cc=tsbogend@alpha.franken.de \
/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