From: "Mark Mason" <mason@broadcom.com>
To: linux-mips@linux-mips.org
Subject: A patch for arch/mips/mm/cache.c
Date: Thu, 18 Aug 2005 09:39:48 -0700 [thread overview]
Message-ID: <4304B9D4.4030804@broadcom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
Hello all,
The following patch to cache.c rearranges the logic in cpu_cache_init()
somewhat to make the detection of the processor via the
current_cpu_data.cputype take precedence over the cpu_has_4ktlb test.
This seems to make sense, as the cputype test is significantly more
specific than the 4ktlb test. It also arranges for the panic() to
happen if the 4ktlb test fails as well (the old version would fail
silently).
It also happens to fix things so that the SB1/swarm starts booting
again.... ;)
Please consider this for inclusion.
Thanks,
Mark
[-- Attachment #2: cpu_cache_init.patch --]
[-- Type: text/x-patch, Size: 1492 bytes --]
Index: cache.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/cache.c,v
retrieving revision 1.21
diff -u -r1.21 cache.c
--- cache.c 6 Jul 2005 12:08:14 -0000 1.21
+++ cache.c 18 Aug 2005 16:33:31 -0000
@@ -114,16 +114,7 @@
void __init cpu_cache_init(void)
{
- if (cpu_has_4ktlb) {
-#if defined(CONFIG_CPU_R4X00) || defined(CONFIG_CPU_VR41XX) || \
- defined(CONFIG_CPU_R4300) || defined(CONFIG_CPU_R5000) || \
- defined(CONFIG_CPU_NEVADA) || defined(CONFIG_CPU_R5432) || \
- defined(CONFIG_CPU_R5500) || defined(CONFIG_CPU_MIPS32_R1) || \
- defined(CONFIG_CPU_MIPS64_R1) || defined(CONFIG_CPU_TX49XX) || \
- defined(CONFIG_CPU_RM7000) || defined(CONFIG_CPU_RM9000)
- ld_mmu_r4xx0();
-#endif
- } else switch (current_cpu_data.cputype) {
+ switch (current_cpu_data.cputype) {
#ifdef CONFIG_CPU_R3000
case CPU_R2000:
case CPU_R3000:
@@ -156,6 +147,17 @@
break;
default:
+ if (cpu_has_4ktlb) {
+#if defined(CONFIG_CPU_R4X00) || defined(CONFIG_CPU_VR41XX) || \
+ defined(CONFIG_CPU_R4300) || defined(CONFIG_CPU_R5000) || \
+ defined(CONFIG_CPU_NEVADA) || defined(CONFIG_CPU_R5432) || \
+ defined(CONFIG_CPU_R5500) || defined(CONFIG_CPU_MIPS32_R1) || \
+ defined(CONFIG_CPU_MIPS64_R1) || defined(CONFIG_CPU_TX49XX) || \
+ defined(CONFIG_CPU_RM7000) || defined(CONFIG_CPU_RM9000)
+ ld_mmu_r4xx0();
+ break;
+#endif
+ }
panic("Yeee, unsupported cache architecture.");
}
}
reply other threads:[~2005-08-18 16:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4304B9D4.4030804@broadcom.com \
--to=mason@broadcom.com \
--cc=linux-mips@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox