Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@mandrakesoft.com>
To: Ralf Baechle <ralf@linux-mips.org>, mipslist <linux-mips@linux-mips.org>
Subject: [PATCH]: unaligned
Date: 19 Dec 2002 11:40:38 +0100	[thread overview]
Message-ID: <m27ke6mgux.fsf@demo.mitica> (raw)


Hi
        - asm wants a unsigned long
        - verify_area wants a void *
one of the two places need a cast.

Once there, ralf? forgot that emulate_load_store returns void, then
nuke the return 1 part.

Later, Juan.


Index: arch/mips/kernel/unaligned.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/unaligned.c,v
retrieving revision 1.15.2.11
diff -u -r1.15.2.11 unaligned.c
--- arch/mips/kernel/unaligned.c	17 Dec 2002 23:20:08 -0000	1.15.2.11
+++ arch/mips/kernel/unaligned.c	19 Dec 2002 10:17:48 -0000
@@ -139,7 +139,7 @@
 	 * The remaining opcodes are the ones that are really of interest.
 	 */
 	case lh_op:
-		if (verify_area(VERIFY_READ, addr, 2))
+		if (verify_area(VERIFY_READ, (void *)addr, 2))
 			goto sigbus;
 
 		__asm__(".set\tnoat\n"
@@ -171,7 +171,7 @@
 		break;
 
 	case lw_op:
-		if (verify_area(VERIFY_READ, addr, 4))
+		if (verify_area(VERIFY_READ, (void *)addr, 4))
 			goto sigbus;
 
 		__asm__(
@@ -200,7 +200,7 @@
 		break;
 
 	case lhu_op:
-		if (verify_area(VERIFY_READ, addr, 2))
+		if (verify_area(VERIFY_READ, (void *)addr, 2))
 			goto sigbus;
 
 		__asm__(
@@ -241,7 +241,7 @@
 		 * would blow up, so for now we don't handle unaligned 64-bit
 		 * instructions on 32-bit kernels.
 		 */
-		if (verify_area(VERIFY_READ, addr, 4))
+		if (verify_area(VERIFY_READ, (void *)addr, 4))
 			goto sigbus;
 
 		__asm__(
@@ -284,7 +284,7 @@
 		 * would blow up, so for now we don't handle unaligned 64-bit
 		 * instructions on 32-bit kernels.
 		 */
-		if (verify_area(VERIFY_READ, addr, 8))
+		if (verify_area(VERIFY_READ, (void *)addr, 8))
 			goto sigbus;
 
 		__asm__(
@@ -317,7 +317,7 @@
 		goto sigill;
 
 	case sh_op:
-		if (verify_area(VERIFY_WRITE, addr, 2))
+		if (verify_area(VERIFY_WRITE, (void *)addr, 2))
 			goto sigbus;
 
 		value = regs->regs[insn.i_format.rt];
@@ -353,7 +353,7 @@
 		break;
 
 	case sw_op:
-		if (verify_area(VERIFY_WRITE, addr, 4))
+		if (verify_area(VERIFY_WRITE, (void *)addr, 4))
 			goto sigbus;
 
 		value = regs->regs[insn.i_format.rt];
@@ -391,7 +391,7 @@
 		 * would blow up, so for now we don't handle unaligned 64-bit
 		 * instructions on 32-bit kernels.
 		 */
-		if (verify_area(VERIFY_WRITE, addr, 8))
+		if (verify_area(VERIFY_WRITE, (void *)addr, 8))
 			goto sigbus;
 
 		value = regs->regs[insn.i_format.rt];
@@ -469,7 +469,7 @@
 		printk(KERN_DEBUG "%s: Forwarding exception at [<%lx>] (%lx)\n",
 		       current->comm, regs->cp0_epc, new_epc);
 		regs->cp0_epc = new_epc;
-		return 1;
+		return;
 	}
 
 	die_if_kernel ("Unhandled kernel unaligned access", regs);


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

             reply	other threads:[~2002-12-19 10:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-19 10:40 Juan Quintela [this message]
2002-12-19 13:31 ` [PATCH]: unaligned Ralf Baechle
2002-12-19 13:57   ` Juan Quintela
2002-12-19 13:53     ` 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=m27ke6mgux.fsf@demo.mitica \
    --to=quintela@mandrakesoft.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@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