[PATCH] Re: pre-2.1.116-1 fails compile in bugs.h

Rafael Reilova (rreilova@ececs.uc.edu)
Mon, 10 Aug 1998 02:36:09 -0400 (EDT)


Hi all,

The following patch fixes it for me.

Linus, Is there a reason why you don't want the Cyrix definitions/macros
in processor.h? This stuff is useful for other things beyond CPU
reconition, I have experimental support for the Cyrixes MTRR that uses the
stuff. It is more useful if in a readily accessible include somewhere,
IMHO.

Cheers,

Rafael

--- pre-linux-2.1.116-1/arch/i386/kernel/setup.c Mon Aug 10 01:42:58 1998
+++ linux/arch/i386/kernel/setup.c Mon Aug 10 01:52:56 1998
@@ -255,27 +255,6 @@
}

/*
- * Cyrix CPU configuration register indexes
- */
-#define CX86_CCR2 0xc2
-#define CX86_CCR3 0xc3
-#define CX86_CCR4 0xe8
-#define CX86_CCR5 0xe9
-#define CX86_DIR0 0xfe
-#define CX86_DIR1 0xff
-
-/*
- * Cyrix CPU indexed register access macros
- */
-
-#define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); })
-
-#define setCx86(reg, data) do { \
- outb((reg), 0x22); \
- outb((data), 0x23); \
-} while (0)
-
-/*
* Use the Cyrix DEVID CPU registers if avail. to get more detailed info.
*/
__initfunc(static void do_cyrix_devid(struct cpuinfo_x86 *c))
diff -u --recursive pre-linux-2.1.116-1/include/asm-i386/processor.h linux/include/asm-i386/processor.h
--- pre-linux-2.1.116-1/include/asm-i386/processor.h Mon Aug 10 01:42:59 1998
+++ linux/include/asm-i386/processor.h Mon Aug 10 01:52:52 1998
@@ -48,6 +48,27 @@
#define X86_VENDOR_UNKNOWN 0xff

/*
+ * Cyrix CPU configuration register indexes
+ */
+#define CX86_CCR2 0xc2
+#define CX86_CCR3 0xc3
+#define CX86_CCR4 0xe8
+#define CX86_CCR5 0xe9
+#define CX86_DIR0 0xfe
+#define CX86_DIR1 0xff
+
+/*
+ * Cyrix CPU indexed register access macros
+ */
+
+#define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); })
+
+#define setCx86(reg, data) do { \
+ outb((reg), 0x22); \
+ outb((data), 0x23); \
+} while (0)
+
+/*
* capabilities of CPUs
*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html