From: Hartvig Ekner <hartvig@ekner.info>
To: Linux MIPS mailing list <linux-mips@linux-mips.org>
Subject: Patch to include/asm-mips/processor.h
Date: Mon, 07 Apr 2003 15:18:25 +0200 [thread overview]
Message-ID: <3E917AA1.13694D03@ekner.info> (raw)
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
I have no idea whether what I did was correct, but at least it is no less incorrect than the code currently
in there, which coredumps now for some reason (I wonder why it never crashed before). The test-bit macro
expects a bit-number, and not a mask which it is given in the current code.
So while fixing this, I also used the normal cpu_data macro for the cpu_has_watch() macro, instead of
looking at CPU(0).
/Hartvig
[-- Attachment #2: processor_patch --]
[-- Type: text/plain, Size: 892 bytes --]
Index: processor.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/processor.h,v
retrieving revision 1.43.2.11
diff -u -r1.43.2.11 processor.h
--- processor.h 7 Apr 2003 02:21:05 -0000 1.43.2.11
+++ processor.h 7 Apr 2003 13:03:07 -0000
@@ -66,14 +66,9 @@
struct cache_desc tcache; /* Tertiary/split secondary cache */
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
-/*
- * Assumption: Options of CPU 0 are a superset of all processors.
- * This is true for all known MIPS systems.
- */
-#define cpu_has_watch (test_bit(MIPS_CPU_WATCH, cpu_data[0].options))
-
extern struct cpuinfo_mips cpu_data[];
-#define current_cpu_data cpu_data[smp_processor_id()]
+#define current_cpu_data cpu_data[smp_processor_id()]
+#define cpu_has_watch (current_cpu_data.options & MIPS_CPU_WATCH)
/*
* System setup and hardware flags..
next reply other threads:[~2003-04-07 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-07 13:18 Hartvig Ekner [this message]
2003-04-07 22:07 ` Patch to include/asm-mips/processor.h Kip Walker
2003-04-09 1:16 ` 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=3E917AA1.13694D03@ekner.info \
--to=hartvig@ekner.info \
--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