[PATCH]: unaligned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux