cirrus_vga: Remove unneeded reset
PATCH 1/1 cirrus_vga: Remove unneeded reset
cirrus_reset is also called by the pci framework, so there is no need to call it in cirrus_init_common.
--- hw/cirrus_vga.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
hw/cirrus_vga.c +0 -1
@@ -3024,7 +3024,6 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) s->vga.cursor_draw_line = cirrus_cursor_draw_line;qemu_register_reset (cirrus_reset, s); -cirrus_reset (s); }/***************************************
Signature · 1 line
1.7.2.5
Hi. cirrus_init_common() is used by both isa and pci cirrus. and isa cirrus isn't qdevfied yet.
So what you want is
- remove qemu_register_reset() and cirrus_reset() from cirrus_init_common()
- add to PCIDeviceInfo cirrus_vga_info
.qdev.reset = cirrus_reset()
in order to use pci reset framework.
- add qemu_register_reset() and cirrus_reset() to isa_cirrus_vga_init() (Hopefully convert isa cirrus to qdev. and use .qdev.reset at best. But it's up to you)
thanks,
Quoted 25 lines · Stefan Weil
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin <[email protected]>Signed-off-by Stefan Weil <[email protected]>--- hw/cirrus_vga.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)hw/cirrus_vga.c +0
-1@@ -3024,7 +3024,6 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) s->vga.cursor_draw_line = cirrus_cursor_draw_line;qemu_register_reset (cirrus_reset, s); -cirrus_reset (s); }/*************************************** Signature · 1 line
1.7.2.5
Signature · 1 line
yamahata
Am 28.03.2011 04:17, schrieb Isaku Yamahata:
Quoted 32 lines
Hi.
cirrus_init_common()is used by both isa and pci cirrus. and isa cirrus isn't qdevfied yet.
So what you want is
- removeqemu_register_reset()andcirrus_reset()fromcirrus_init_common()- add to PCIDeviceInfo
cirrus_vga_info
.qdev.reset =cirrus_reset()
in order to use pci reset framework.- add
qemu_register_reset()andcirrus_reset()toisa_cirrus_vga_init()(Hopefully convert isa cirrus to qdev. and use .qdev.reset at best. But it's up to you)thanks,
Quoted 16 lines · Stefan Weil
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin<[email protected]>Signed-off-by Stefan Weil<[email protected]>--- hw/cirrus_vga.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)hw/cirrus_vga.c +0
-0@@ -3024,7 +3024,6 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) s->vga.cursor_draw_line = cirrus_cursor_draw_line;
Quoted 8 lines
Quoted 7 lines
hw/cirrus_vga.c +0
-1qemu_register_reset (cirrus_reset, s); -cirrus_reset (s); }/*************************************** Signature · 1 line
1.7.2.5
I tested the new code with isa pc, too. In gdb, I could see that it also calls cirrus_reset twice. But isa pc is broken since the switch to sea bios, so obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice.
Stefan
Quoted 43 lines · Stefan Weil
Am 28.03.2011 04:17, schrieb Isaku Yamahata:
Quoted 32 lines
Hi.
cirrus_init_common()is used by both isa and pci cirrus. and isa cirrus isn't qdevfied yet.
So what you want is
- removeqemu_register_reset()andcirrus_reset()fromcirrus_init_common()- add to PCIDeviceInfo
cirrus_vga_info
.qdev.reset =cirrus_reset()
in order to use pci reset framework.- add
qemu_register_reset()andcirrus_reset()toisa_cirrus_vga_init()(Hopefully convert isa cirrus to qdev. and use .qdev.reset at best. But it's up to you)thanks,
Quoted 16 lines · Stefan Weil
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin<[email protected]>Signed-off-by Stefan Weil<[email protected]>--- hw/cirrus_vga.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)hw/cirrus_vga.c +0
-0@@ -3024,7 +3024,6 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) s->vga.cursor_draw_line = cirrus_cursor_draw_line;Quoted 8 lines
Quoted 7 lines
hw/cirrus_vga.c +0
-1qemu_register_reset (cirrus_reset, s); -cirrus_reset (s); }/*************************************** Signature · 1 line
1.7.2.5
Quoted 5 lines
I tested the new code with isa pc, too. In gdb, I could see that it also calls
cirrus_resettwice. But isa pc is broken since the switch to sea bios, so obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice.
Ah, I see. The the second reset is called not via pci reset framework, but qemu reset framework. So removing the above reset call makes sense. It would be another patch to make use of pci reset framework.
Signature · 1 line
yamahata
Quoted 2 lines · Isaku Yamahata
Quoted 1 line · Stefan Weil
Am 28.03.2011 04:17, schrieb Isaku Yamahata:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Stefan Weil
Quoted 5 lines
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin<[email protected]>Signed-off-by Stefan Weil<[email protected]>
[...]
Quoted 9 lines
Quoted 5 lines
I tested the new code with isa pc, too. In gdb, I could see that it also calls
cirrus_resettwice. But isa pc is broken since the switch to sea bios, so obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice.Ah, I see. The the second reset is called not via pci reset framework, but qemu reset framework. So removing the above reset call makes sense. It would be another patch to make use of pci reset framework.
Then the proposed commit message's claim cirrus_reset() is "called by the pci framework" is incorrect, isn't it?
Quoted 18 lines · Markus Armbruster
Quoted 2 lines · Isaku Yamahata
Quoted 1 line · Stefan Weil
Am 28.03.2011 04:17, schrieb Isaku Yamahata:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Stefan Weil
Quoted 5 lines
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin<[email protected]>Signed-off-by Stefan Weil<[email protected]>[...]
Quoted 6 lines
Quoted 5 lines
I tested the new code with isa pc, too. In gdb, I could see that it also calls
cirrus_resettwice. But isa pc is broken since the switch to sea bios, so obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice.
Quoted 6 lines
Quoted 3 lines
Ah, I see. The the second reset is called not via pci reset framework, but qemu reset framework. So removing the above reset call makes sense. It would be another patch to make use of pci reset framework.
Then the proposed commit message's claim
cirrus_reset()is "called by the pci framework" is incorrect, isn't it?
Yes, incorrect. The commit message should be fixed. The code change itself looks correct.
Signature · 1 line
yamahata
Am 28.03.2011 11:24, schrieb Isaku Yamahata:
Quoted 23 lines · Markus Armbruster
Quoted 22 lines
Quoted 2 lines · Isaku Yamahata
Quoted 1 line · Stefan Weil
Am 28.03.2011 04:17, schrieb Isaku Yamahata:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Stefan Weil
Quoted 5 lines
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin<[email protected]>Signed-off-by Stefan Weil<[email protected]>[...]
Quoted 9 lines
Quoted 5 lines
I tested the new code with isa pc, too. In gdb, I could see that it also calls
cirrus_resettwice. But isa pc is broken since the switch to sea bios, so obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice.Ah, I see. The the second reset is called not via pci reset framework, but qemu reset framework. So removing the above reset call makes sense. It would be another patch to make use of pci reset framework.
Quoted 5 lines
Quoted 2 lines
Then the proposed commit message's claim
cirrus_reset()is "called by the pci framework" is incorrect, isn't it?Yes, incorrect. The commit message should be fixed. The code change itself looks correct.
For current qemu it is correct, or is there a working configuration with isa cirrus? I asked that question on #qemu but did not get an answer (Anthony replied that isa was broken long ago).
This was the reason why I wrote the commit text as it is. I don't mind if the committer adds more descriptive text, but the main focus should be fixing isa emulation. I also noticed that some more emulations obviously also include redundant reset calls. These should be fixed, too.
Quoted 36 lines · Stefan Weil
Am 28.03.2011 11:24, schrieb Isaku Yamahata:
Quoted 25 lines · Markus Armbruster
Quoted 24 lines
Quoted 2 lines · Isaku Yamahata
Quoted 1 line · Stefan Weil
Am 28.03.2011 04:17, schrieb Isaku Yamahata:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Stefan Weil
Quoted 5 lines
cirrus_resetis also called by the pci framework, so there is no need to call it incirrus_init_common.Cc Michael S. Tsirkin<[email protected]>Signed-off-by Stefan Weil<[email protected]>[...]
Quoted 11 lines
Quoted 7 lines
I tested the new code with isa pc, too. In gdb, I could see that it also
callscirrus_resettwice. But isa pc is broken since the switch to sea bios, so
obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice.Ah, I see. The the second reset is called not via pci reset framework, but qemu reset framework. So removing the above reset call makes sense. It would be another patch to make use of pci reset framework.
Quoted 5 lines
Quoted 2 lines
Then the proposed commit message's claim
cirrus_reset()is "called by the pci framework" is incorrect, isn't it?Yes, incorrect. The commit message should be fixed. The code change itself looks correct.
For current qemu it is correct, or is there a working configuration with isa cirrus? I asked that question on #qemu but did not get an answer (Anthony replied that isa was broken long ago).
Quoted 5 lines
This was the reason why I wrote the commit text as it is. I don't mind if the committer adds more descriptive text, but the main focus should be fixing isa emulation. I also noticed that some more emulations obviously also include redundant reset calls. These should be fixed, too.
*I tweaked the commit log a bit to make everyone happy and applied that.
Thanks!