* [PATCH]: unaligned
@ 2002-12-19 10:40 Juan Quintela
2002-12-19 13:31 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Juan Quintela @ 2002-12-19 10:40 UTC (permalink / raw)
To: Ralf Baechle, mipslist
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH]: unaligned
2002-12-19 10:40 [PATCH]: unaligned Juan Quintela
@ 2002-12-19 13:31 ` Ralf Baechle
2002-12-19 13:57 ` Juan Quintela
0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2002-12-19 13:31 UTC (permalink / raw)
To: Juan Quintela; +Cc: mipslist
On Thu, Dec 19, 2002 at 11:40:38AM +0100, Juan Quintela wrote:
> - asm wants a unsigned long
> - verify_area wants a void *
> one of the two places need a cast.
Making emulate_load_store take a void * as the address argument was much
nicer instead.
> Once there, ralf? forgot that emulate_load_store returns void, then
> nuke the return 1 part.
Already did that.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]: unaligned
2002-12-19 13:31 ` Ralf Baechle
@ 2002-12-19 13:57 ` Juan Quintela
2002-12-19 13:53 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Juan Quintela @ 2002-12-19 13:57 UTC (permalink / raw)
To: Ralf Baechle; +Cc: mipslist
>>>>> "ralf" == Ralf Baechle <ralf@linux-mips.org> writes:
ralf> On Thu, Dec 19, 2002 at 11:40:38AM +0100, Juan Quintela wrote:
>> - asm wants a unsigned long
>> - verify_area wants a void *
>> one of the two places need a cast.
ralf> Making emulate_load_store take a void * as the address argument was much
ralf> nicer instead.
I didn't wanted to touch asm() parts yet :)
>> Once there, ralf? forgot that emulate_load_store returns void, then
>> nuke the return 1 part.
ralf> Already did that.
nice.
Later, Juan.
--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-12-19 13:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-19 10:40 [PATCH]: unaligned Juan Quintela
2002-12-19 13:31 ` Ralf Baechle
2002-12-19 13:57 ` Juan Quintela
2002-12-19 13:53 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.