* [Qemu-devel] [PATCH] sparc64 reverse cas and casx arguments
@ 2008-09-21 20:59 Igor Kovalenko
2008-09-22 16:20 ` Blue Swirl
0 siblings, 1 reply; 3+ messages in thread
From: Igor Kovalenko @ 2008-09-21 20:59 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
Hi!
The following patch should fix a problem with sparc64 cas and casx
emulation where value to be stored and value to be compared are passed
in reverse order to helper function.
This also fixes a problem with booting linux iso where kernel tries to
clear memory bitmap bit with casx but fails to find any cleared bit
later.
Please apply.
PS: if anyone can send me a patch for gdb to load and use System.map
file while doing remote debugging that would be great :)
--
Kind regards,
Igor V. Kovalenko
[-- Attachment #2: qemu-cas-reverse-args-20080921.patch --]
[-- Type: application/octet-stream, Size: 878 bytes --]
Index: target-sparc/op_helper.c
===================================================================
--- target-sparc/op_helper.c (revision 5283)
+++ target-sparc/op_helper.c (working copy)
@@ -2194,8 +2226,8 @@
helper_st_asi(addr, val, asi, size);
}
-target_ulong helper_cas_asi(target_ulong addr, target_ulong val1,
- target_ulong val2, uint32_t asi)
+target_ulong helper_cas_asi(target_ulong addr, target_ulong val2,
+ target_ulong val1, uint32_t asi)
{
target_ulong ret;
@@ -2207,8 +2239,8 @@
return ret;
}
-target_ulong helper_casx_asi(target_ulong addr, target_ulong val1,
- target_ulong val2, uint32_t asi)
+target_ulong helper_casx_asi(target_ulong addr, target_ulong val2,
+ target_ulong val1, uint32_t asi)
{
target_ulong ret;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc64 reverse cas and casx arguments
2008-09-21 20:59 [Qemu-devel] [PATCH] sparc64 reverse cas and casx arguments Igor Kovalenko
@ 2008-09-22 16:20 ` Blue Swirl
2008-09-22 20:13 ` Igor Kovalenko
0 siblings, 1 reply; 3+ messages in thread
From: Blue Swirl @ 2008-09-22 16:20 UTC (permalink / raw)
To: qemu-devel
On 9/21/08, Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote:
> Hi!
>
> The following patch should fix a problem with sparc64 cas and casx
> emulation where value to be stored and value to be compared are passed
> in reverse order to helper function.
>
> This also fixes a problem with booting linux iso where kernel tries to
> clear memory bitmap bit with casx but fails to find any cleared bit
> later.
>
> Please apply.
Thanks for spotting. I think a cleaner solution would be to rearrange
the code so that the argument names match the instruction field names.
> PS: if anyone can send me a patch for gdb to load and use System.map
> file while doing remote debugging that would be great :)
I have usually compiled the kernel with -g flag and then used the
vmlinux file when debugging.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc64 reverse cas and casx arguments
2008-09-22 16:20 ` Blue Swirl
@ 2008-09-22 20:13 ` Igor Kovalenko
0 siblings, 0 replies; 3+ messages in thread
From: Igor Kovalenko @ 2008-09-22 20:13 UTC (permalink / raw)
To: qemu-devel
On Mon, Sep 22, 2008 at 8:20 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
> On 9/21/08, Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote:
>> Hi!
>>
>> The following patch should fix a problem with sparc64 cas and casx
>> emulation where value to be stored and value to be compared are passed
>> in reverse order to helper function.
>>
> Thanks for spotting. I think a cleaner solution would be to rearrange
> the code so that the argument names match the instruction field names.
I think the problem is at call site but anyway obviously the committed
change fixes the problem.
>> PS: if anyone can send me a patch for gdb to load and use System.map
>> file while doing remote debugging that would be great :)
>
> I have usually compiled the kernel with -g flag and then used the
> vmlinux file when debugging.
>
... I wanted to save some time building the kernel for officially
released distribution (this time, gentoo 2008.0)
--
Kind regards,
Igor V. Kovalenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-22 20:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-21 20:59 [Qemu-devel] [PATCH] sparc64 reverse cas and casx arguments Igor Kovalenko
2008-09-22 16:20 ` Blue Swirl
2008-09-22 20:13 ` Igor Kovalenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).