linux-mips
[Top] [All Lists]

[PATCH]: read_c0_* return always a long

To: Ralf Baechle <ralf@linux-mips.org>, linux mips mailing list <linux-mips@linux-mips.org>
Subject: [PATCH]: read_c0_* return always a long
From: Juan Quintela <quintela@mandrakesoft.com>
Date: 19 Dec 2002 12:03:40 +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi
        this function returns a long, nuke a call to read_c0_errorepc
        and use right types for variables and printks.

Later, Juan.

Index: arch/mips/kernel/traps.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/traps.c,v
retrieving revision 1.99.2.38
diff -u -r1.99.2.38 traps.c
--- arch/mips/kernel/traps.c    17 Dec 2002 23:41:01 -0000      1.99.2.38
+++ arch/mips/kernel/traps.c    19 Dec 2002 10:17:47 -0000
@@ -781,14 +781,14 @@
 
 asmlinkage void cache_parity_error(void)
 {
-       unsigned int reg_val;
+       unsigned long reg_val;
 
        /* For the moment, report the problem and hang. */
        reg_val = read_c0_errorepc();
        printk("Cache error exception:\n");
-       printk("cp0_errorepc == %08x\n", read_c0_errorepc());
+       printk("cp0_errorepc == %08lx\n", reg_val);
        reg_val = read_c0_cacheerr();
-       printk("c0_cacheerr == %08x\n", reg_val);
+       printk("c0_cacheerr == %08lx\n", reg_val);
 
        printk("Decoded c0_cacheerr: %s cache fault in %s reference.\n",
               reg_val & (1<<30) ? "secondary" : "primary",


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH]: read_c0_* return always a long, Juan Quintela <=