qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init()
@ 2020-10-12 16:05 Philippe Mathieu-Daudé
  2020-10-12 16:05 ` [PATCH 1/2] hw/mips/malta: Move gt64120 related code together Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-12 16:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: Aleksandar Markovic, Aleksandar Rikalo, Aurelien Jarno,
	Philippe Mathieu-Daudé

Move some code around to make this big function
easier to review.

Philippe Mathieu-Daudé (2):
  hw/mips/malta: Move gt64120 related code together
  hw/mips/malta: Use clearer qdev style

 hw/mips/malta.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] hw/mips/malta: Move gt64120 related code together
  2020-10-12 16:05 [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Philippe Mathieu-Daudé
@ 2020-10-12 16:05 ` Philippe Mathieu-Daudé
  2020-10-12 16:05 ` [PATCH 2/2] hw/mips/malta: Use clearer qdev style Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-12 16:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: Aleksandar Markovic, Aleksandar Rikalo, Aurelien Jarno,
	Philippe Mathieu-Daudé

The 'empty_slot' region created is related to the gt64120.
Move its creation close to the gt64120 instance creation.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/mips/malta.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 4019c9dc1a8..fe8f6f7ef51 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1235,13 +1235,6 @@ void mips_malta_init(MachineState *machine)
     DeviceState *dev = qdev_new(TYPE_MIPS_MALTA);
     MaltaState *s = MIPS_MALTA(dev);
 
-    /*
-     * The whole address space decoded by the GT-64120A doesn't generate
-     * exception when accessing invalid memory. Create an empty slot to
-     * emulate this feature.
-     */
-    empty_slot_init("GT64120", 0, 0x20000000);
-
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
 
     /* create CPU */
@@ -1395,6 +1388,12 @@ void mips_malta_init(MachineState *machine)
 
     /* Northbridge */
     pci_bus = gt64120_register(s->i8259);
+    /*
+     * The whole address space decoded by the GT-64120A doesn't generate
+     * exception when accessing invalid memory. Create an empty slot to
+     * emulate this feature.
+     */
+    empty_slot_init("GT64120", 0, 0x20000000);
 
     /* Southbridge */
     dev = piix4_create(pci_bus, &isa_bus, &smbus);
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] hw/mips/malta: Use clearer qdev style
  2020-10-12 16:05 [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Philippe Mathieu-Daudé
  2020-10-12 16:05 ` [PATCH 1/2] hw/mips/malta: Move gt64120 related code together Philippe Mathieu-Daudé
@ 2020-10-12 16:05 ` Philippe Mathieu-Daudé
  2020-10-13 23:59 ` [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Richard Henderson
  2020-10-16 13:52 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-12 16:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: Aleksandar Markovic, Aleksandar Rikalo, Aurelien Jarno,
	Philippe Mathieu-Daudé

In order to be consistent with the other code base uses,
rewrite slightly how the MIPS_MALTA object is created.
No logical change.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/mips/malta.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index fe8f6f7ef51..6c447d159e3 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1231,11 +1231,11 @@ void mips_malta_init(MachineState *machine)
     DriveInfo *dinfo;
     int fl_idx = 0;
     int be;
+    MaltaState *s;
+    DeviceState *dev;
 
-    DeviceState *dev = qdev_new(TYPE_MIPS_MALTA);
-    MaltaState *s = MIPS_MALTA(dev);
-
-    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+    s = MIPS_MALTA(qdev_new(TYPE_MIPS_MALTA));
+    sysbus_realize_and_unref(SYS_BUS_DEVICE(s), &error_fatal);
 
     /* create CPU */
     mips_create_cpu(machine, s, &cbus_irq, &i8259_irq);
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init()
  2020-10-12 16:05 [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Philippe Mathieu-Daudé
  2020-10-12 16:05 ` [PATCH 1/2] hw/mips/malta: Move gt64120 related code together Philippe Mathieu-Daudé
  2020-10-12 16:05 ` [PATCH 2/2] hw/mips/malta: Use clearer qdev style Philippe Mathieu-Daudé
@ 2020-10-13 23:59 ` Richard Henderson
  2020-10-16 13:52 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2020-10-13 23:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Aleksandar Markovic, Aleksandar Rikalo, Aurelien Jarno

On 10/12/20 9:05 AM, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (2):
>   hw/mips/malta: Move gt64120 related code together
>   hw/mips/malta: Use clearer qdev style

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init()
  2020-10-12 16:05 [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2020-10-13 23:59 ` [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Richard Henderson
@ 2020-10-16 13:52 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-16 13:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aleksandar Markovic, Aleksandar Rikalo, Aurelien Jarno

On 10/12/20 6:05 PM, Philippe Mathieu-Daudé wrote:
> Move some code around to make this big function
> easier to review.
> 
> Philippe Mathieu-Daudé (2):
>    hw/mips/malta: Move gt64120 related code together
>    hw/mips/malta: Use clearer qdev style
> 
>   hw/mips/malta.c | 21 ++++++++++-----------
>   1 file changed, 10 insertions(+), 11 deletions(-)
> 

Thanks, applied to mips-next.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-16 13:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 16:05 [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Philippe Mathieu-Daudé
2020-10-12 16:05 ` [PATCH 1/2] hw/mips/malta: Move gt64120 related code together Philippe Mathieu-Daudé
2020-10-12 16:05 ` [PATCH 2/2] hw/mips/malta: Use clearer qdev style Philippe Mathieu-Daudé
2020-10-13 23:59 ` [PATCH 0/2] hw/mips/malta: Minor housekeeping in mips_malta_init() Richard Henderson
2020-10-16 13:52 ` Philippe Mathieu-Daudé

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).