All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
@ 2020-10-09 11:38 ` Laurent Vivier
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-09 11:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, qemu-riscv, Michael S. Tsirkin, qemu-trivial,
	Anup Patel, Alistair Francis, Marc-André Lureau,
	Paolo Bonzini

.class_init is already set to serial_mm_class_init.

Remove the duplicate entry.

Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
Cc: marcandre.lureau@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/char/serial.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index 4386adabd466..97f71879ff2a 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
     .class_init = serial_mm_class_init,
     .instance_init = serial_mm_instance_init,
     .instance_size = sizeof(SerialMM),
-    .class_init = serial_mm_class_init,
 };
 
 static void serial_register_types(void)
-- 
2.26.2



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

* [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
@ 2020-10-09 11:38 ` Laurent Vivier
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-09 11:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, qemu-trivial, Paolo Bonzini, Alistair Francis,
	Anup Patel, Michael S. Tsirkin, Marc-André Lureau,
	Laurent Vivier

.class_init is already set to serial_mm_class_init.

Remove the duplicate entry.

Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
Cc: marcandre.lureau@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/char/serial.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index 4386adabd466..97f71879ff2a 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
     .class_init = serial_mm_class_init,
     .instance_init = serial_mm_instance_init,
     .instance_size = sizeof(SerialMM),
-    .class_init = serial_mm_class_init,
 };
 
 static void serial_register_types(void)
-- 
2.26.2



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

* [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
  2020-10-09 11:38 ` Laurent Vivier
@ 2020-10-09 11:38   ` Laurent Vivier
  -1 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-09 11:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, qemu-riscv, Michael S. Tsirkin, qemu-trivial,
	Anup.Patel, Alistair Francis, Marc-André Lureau,
	Paolo Bonzini

The doc [1] doesn't define the endianness, but the kernel driver
uses readl() to access the registers, so we can guess it depends
on the architecture endianness.

As riscv architecture endianness is little it might not change anything
for it.

Moreover, android implementation uses DEVICE_NATIVE_ENDIAN [2]

[1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
[2] https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177

Fixes: 9a5b40b84279 ("hw: rtc: Add Goldfish RTC device")
Cc: Anup.Patel@wdc.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/rtc/goldfish_rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
index 6ddd45cce039..0f4e8185a796 100644
--- a/hw/rtc/goldfish_rtc.c
+++ b/hw/rtc/goldfish_rtc.c
@@ -217,7 +217,7 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
 static const MemoryRegionOps goldfish_rtc_ops = {
     .read = goldfish_rtc_read,
     .write = goldfish_rtc_write,
-    .endianness = DEVICE_LITTLE_ENDIAN,
+    .endianness = DEVICE_NATIVE_ENDIAN,
     .valid = {
         .min_access_size = 4,
         .max_access_size = 4
-- 
2.26.2



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

* [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
@ 2020-10-09 11:38   ` Laurent Vivier
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-09 11:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, qemu-trivial, Paolo Bonzini, Alistair Francis,
	Anup Patel, Michael S. Tsirkin, Marc-André Lureau,
	Laurent Vivier, Anup.Patel

The doc [1] doesn't define the endianness, but the kernel driver
uses readl() to access the registers, so we can guess it depends
on the architecture endianness.

As riscv architecture endianness is little it might not change anything
for it.

Moreover, android implementation uses DEVICE_NATIVE_ENDIAN [2]

[1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
[2] https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177

Fixes: 9a5b40b84279 ("hw: rtc: Add Goldfish RTC device")
Cc: Anup.Patel@wdc.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/rtc/goldfish_rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
index 6ddd45cce039..0f4e8185a796 100644
--- a/hw/rtc/goldfish_rtc.c
+++ b/hw/rtc/goldfish_rtc.c
@@ -217,7 +217,7 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
 static const MemoryRegionOps goldfish_rtc_ops = {
     .read = goldfish_rtc_read,
     .write = goldfish_rtc_write,
-    .endianness = DEVICE_LITTLE_ENDIAN,
+    .endianness = DEVICE_NATIVE_ENDIAN,
     .valid = {
         .min_access_size = 4,
         .max_access_size = 4
-- 
2.26.2



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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
  2020-10-09 11:38 ` Laurent Vivier
@ 2020-10-09 13:16   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-09 13:16 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup Patel,
	Alistair Francis, Paolo Bonzini, Marc-André Lureau

On 10/9/20 1:38 PM, Laurent Vivier wrote:
> .class_init is already set to serial_mm_class_init.
> 
> Remove the duplicate entry.
> 
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com

I was going to send exactly the same one tomorrow =)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>   hw/char/serial.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>       .class_init = serial_mm_class_init,
>       .instance_init = serial_mm_instance_init,
>       .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>   };
>   
>   static void serial_register_types(void)
> 



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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
@ 2020-10-09 13:16   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-09 13:16 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup Patel,
	Alistair Francis, Marc-André Lureau, Paolo Bonzini

On 10/9/20 1:38 PM, Laurent Vivier wrote:
> .class_init is already set to serial_mm_class_init.
> 
> Remove the duplicate entry.
> 
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com

I was going to send exactly the same one tomorrow =)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>   hw/char/serial.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>       .class_init = serial_mm_class_init,
>       .instance_init = serial_mm_instance_init,
>       .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>   };
>   
>   static void serial_register_types(void)
> 



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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
  2020-10-09 11:38 ` Laurent Vivier
@ 2020-10-09 14:58   ` Li Qiang
  -1 siblings, 0 replies; 16+ messages in thread
From: Li Qiang @ 2020-10-09 14:58 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup Patel,
	Qemu Developers, Alistair Francis, Paolo Bonzini,
	Marc-André Lureau

Laurent Vivier <lvivier@redhat.com> 于2020年10月9日周五 下午7:40写道:
>
> .class_init is already set to serial_mm_class_init.
>
> Remove the duplicate entry.
>
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: Li Qiang <liq3ea@gmail.com>

> ---
>  hw/char/serial.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>      .class_init = serial_mm_class_init,
>      .instance_init = serial_mm_instance_init,
>      .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>  };
>
>  static void serial_register_types(void)
> --
> 2.26.2
>
>


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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
@ 2020-10-09 14:58   ` Li Qiang
  0 siblings, 0 replies; 16+ messages in thread
From: Li Qiang @ 2020-10-09 14:58 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Qemu Developers, qemu-riscv, Michael S. Tsirkin, qemu-trivial,
	Anup Patel, Alistair Francis, Marc-André Lureau,
	Paolo Bonzini

Laurent Vivier <lvivier@redhat.com> 于2020年10月9日周五 下午7:40写道:
>
> .class_init is already set to serial_mm_class_init.
>
> Remove the duplicate entry.
>
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: Li Qiang <liq3ea@gmail.com>

> ---
>  hw/char/serial.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>      .class_init = serial_mm_class_init,
>      .instance_init = serial_mm_instance_init,
>      .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>  };
>
>  static void serial_register_types(void)
> --
> 2.26.2
>
>


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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
  2020-10-09 11:38 ` Laurent Vivier
@ 2020-10-09 22:01   ` Alistair Francis
  -1 siblings, 0 replies; 16+ messages in thread
From: Alistair Francis @ 2020-10-09 22:01 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: open list:RISC-V, Michael S. Tsirkin, QEMU Trivial, Anup Patel,
	qemu-devel@nongnu.org Developers, Alistair Francis,
	Paolo Bonzini, Marc-André Lureau

On Fri, Oct 9, 2020 at 4:39 AM Laurent Vivier <lvivier@redhat.com> wrote:
>
> .class_init is already set to serial_mm_class_init.
>
> Remove the duplicate entry.
>
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/char/serial.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>      .class_init = serial_mm_class_init,
>      .instance_init = serial_mm_instance_init,
>      .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>  };
>
>  static void serial_register_types(void)
> --
> 2.26.2
>
>


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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
@ 2020-10-09 22:01   ` Alistair Francis
  0 siblings, 0 replies; 16+ messages in thread
From: Alistair Francis @ 2020-10-09 22:01 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-devel@nongnu.org Developers, open list:RISC-V,
	Michael S. Tsirkin, QEMU Trivial, Anup Patel, Alistair Francis,
	Marc-André Lureau, Paolo Bonzini

On Fri, Oct 9, 2020 at 4:39 AM Laurent Vivier <lvivier@redhat.com> wrote:
>
> .class_init is already set to serial_mm_class_init.
>
> Remove the duplicate entry.
>
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/char/serial.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>      .class_init = serial_mm_class_init,
>      .instance_init = serial_mm_instance_init,
>      .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>  };
>
>  static void serial_register_types(void)
> --
> 2.26.2
>
>


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

* Re: [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
  2020-10-09 11:38   ` Laurent Vivier
@ 2020-10-09 22:02     ` Alistair Francis
  -1 siblings, 0 replies; 16+ messages in thread
From: Alistair Francis @ 2020-10-09 22:02 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: open list:RISC-V, Michael S. Tsirkin, QEMU Trivial, Anup Patel,
	qemu-devel@nongnu.org Developers, Alistair Francis,
	Paolo Bonzini, Marc-André Lureau

On Fri, Oct 9, 2020 at 4:40 AM Laurent Vivier <lvivier@redhat.com> wrote:
>
> The doc [1] doesn't define the endianness, but the kernel driver
> uses readl() to access the registers, so we can guess it depends
> on the architecture endianness.
>
> As riscv architecture endianness is little it might not change anything
> for it.
>
> Moreover, android implementation uses DEVICE_NATIVE_ENDIAN [2]
>
> [1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
> [2] https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177
>
> Fixes: 9a5b40b84279 ("hw: rtc: Add Goldfish RTC device")
> Cc: Anup.Patel@wdc.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/rtc/goldfish_rtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
> index 6ddd45cce039..0f4e8185a796 100644
> --- a/hw/rtc/goldfish_rtc.c
> +++ b/hw/rtc/goldfish_rtc.c
> @@ -217,7 +217,7 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
>  static const MemoryRegionOps goldfish_rtc_ops = {
>      .read = goldfish_rtc_read,
>      .write = goldfish_rtc_write,
> -    .endianness = DEVICE_LITTLE_ENDIAN,
> +    .endianness = DEVICE_NATIVE_ENDIAN,
>      .valid = {
>          .min_access_size = 4,
>          .max_access_size = 4
> --
> 2.26.2
>
>


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

* Re: [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
@ 2020-10-09 22:02     ` Alistair Francis
  0 siblings, 0 replies; 16+ messages in thread
From: Alistair Francis @ 2020-10-09 22:02 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-devel@nongnu.org Developers, open list:RISC-V,
	Michael S. Tsirkin, QEMU Trivial, Anup Patel, Alistair Francis,
	Marc-André Lureau, Paolo Bonzini

On Fri, Oct 9, 2020 at 4:40 AM Laurent Vivier <lvivier@redhat.com> wrote:
>
> The doc [1] doesn't define the endianness, but the kernel driver
> uses readl() to access the registers, so we can guess it depends
> on the architecture endianness.
>
> As riscv architecture endianness is little it might not change anything
> for it.
>
> Moreover, android implementation uses DEVICE_NATIVE_ENDIAN [2]
>
> [1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
> [2] https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177
>
> Fixes: 9a5b40b84279 ("hw: rtc: Add Goldfish RTC device")
> Cc: Anup.Patel@wdc.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/rtc/goldfish_rtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
> index 6ddd45cce039..0f4e8185a796 100644
> --- a/hw/rtc/goldfish_rtc.c
> +++ b/hw/rtc/goldfish_rtc.c
> @@ -217,7 +217,7 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
>  static const MemoryRegionOps goldfish_rtc_ops = {
>      .read = goldfish_rtc_read,
>      .write = goldfish_rtc_write,
> -    .endianness = DEVICE_LITTLE_ENDIAN,
> +    .endianness = DEVICE_NATIVE_ENDIAN,
>      .valid = {
>          .min_access_size = 4,
>          .max_access_size = 4
> --
> 2.26.2
>
>


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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
  2020-10-09 11:38 ` Laurent Vivier
@ 2020-10-12 14:39   ` Laurent Vivier
  -1 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-12 14:39 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup Patel,
	Alistair Francis, Paolo Bonzini, Marc-André Lureau

Le 09/10/2020 à 13:38, Laurent Vivier a écrit :
> .class_init is already set to serial_mm_class_init.
> 
> Remove the duplicate entry.
> 
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/char/serial.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>      .class_init = serial_mm_class_init,
>      .instance_init = serial_mm_instance_init,
>      .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>  };
>  
>  static void serial_register_types(void)
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info
@ 2020-10-12 14:39   ` Laurent Vivier
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-12 14:39 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup Patel,
	Alistair Francis, Marc-André Lureau, Paolo Bonzini

Le 09/10/2020 à 13:38, Laurent Vivier a écrit :
> .class_init is already set to serial_mm_class_init.
> 
> Remove the duplicate entry.
> 
> Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property")
> Cc: marcandre.lureau@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/char/serial.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 4386adabd466..97f71879ff2a 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1120,7 +1120,6 @@ static const TypeInfo serial_mm_info = {
>      .class_init = serial_mm_class_init,
>      .instance_init = serial_mm_instance_init,
>      .instance_size = sizeof(SerialMM),
> -    .class_init = serial_mm_class_init,
>  };
>  
>  static void serial_register_types(void)
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
  2020-10-09 11:38   ` Laurent Vivier
@ 2020-10-12 14:40     ` Laurent Vivier
  -1 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-12 14:40 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup.Patel,
	Alistair Francis, Paolo Bonzini, Marc-André Lureau

Le 09/10/2020 à 13:38, Laurent Vivier a écrit :
> The doc [1] doesn't define the endianness, but the kernel driver
> uses readl() to access the registers, so we can guess it depends
> on the architecture endianness.
> 
> As riscv architecture endianness is little it might not change anything
> for it.
> 
> Moreover, android implementation uses DEVICE_NATIVE_ENDIAN [2]
> 
> [1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
> [2] https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177
> 
> Fixes: 9a5b40b84279 ("hw: rtc: Add Goldfish RTC device")
> Cc: Anup.Patel@wdc.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/rtc/goldfish_rtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
> index 6ddd45cce039..0f4e8185a796 100644
> --- a/hw/rtc/goldfish_rtc.c
> +++ b/hw/rtc/goldfish_rtc.c
> @@ -217,7 +217,7 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
>  static const MemoryRegionOps goldfish_rtc_ops = {
>      .read = goldfish_rtc_read,
>      .write = goldfish_rtc_write,
> -    .endianness = DEVICE_LITTLE_ENDIAN,
> +    .endianness = DEVICE_NATIVE_ENDIAN,
>      .valid = {
>          .min_access_size = 4,
>          .max_access_size = 4
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN
@ 2020-10-12 14:40     ` Laurent Vivier
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Vivier @ 2020-10-12 14:40 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: qemu-riscv, Michael S. Tsirkin, qemu-trivial, Anup.Patel,
	Alistair Francis, Marc-André Lureau, Paolo Bonzini

Le 09/10/2020 à 13:38, Laurent Vivier a écrit :
> The doc [1] doesn't define the endianness, but the kernel driver
> uses readl() to access the registers, so we can guess it depends
> on the architecture endianness.
> 
> As riscv architecture endianness is little it might not change anything
> for it.
> 
> Moreover, android implementation uses DEVICE_NATIVE_ENDIAN [2]
> 
> [1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
> [2] https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177
> 
> Fixes: 9a5b40b84279 ("hw: rtc: Add Goldfish RTC device")
> Cc: Anup.Patel@wdc.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/rtc/goldfish_rtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/rtc/goldfish_rtc.c b/hw/rtc/goldfish_rtc.c
> index 6ddd45cce039..0f4e8185a796 100644
> --- a/hw/rtc/goldfish_rtc.c
> +++ b/hw/rtc/goldfish_rtc.c
> @@ -217,7 +217,7 @@ static int goldfish_rtc_post_load(void *opaque, int version_id)
>  static const MemoryRegionOps goldfish_rtc_ops = {
>      .read = goldfish_rtc_read,
>      .write = goldfish_rtc_write,
> -    .endianness = DEVICE_LITTLE_ENDIAN,
> +    .endianness = DEVICE_NATIVE_ENDIAN,
>      .valid = {
>          .min_access_size = 4,
>          .max_access_size = 4
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

end of thread, other threads:[~2020-10-12 14:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 11:38 [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info Laurent Vivier
2020-10-09 11:38 ` Laurent Vivier
2020-10-09 11:38 ` [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN Laurent Vivier
2020-10-09 11:38   ` Laurent Vivier
2020-10-09 22:02   ` Alistair Francis
2020-10-09 22:02     ` Alistair Francis
2020-10-12 14:40   ` Laurent Vivier
2020-10-12 14:40     ` Laurent Vivier
2020-10-09 13:16 ` [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info Philippe Mathieu-Daudé
2020-10-09 13:16   ` Philippe Mathieu-Daudé
2020-10-09 14:58 ` Li Qiang
2020-10-09 14:58   ` Li Qiang
2020-10-09 22:01 ` Alistair Francis
2020-10-09 22:01   ` Alistair Francis
2020-10-12 14:39 ` Laurent Vivier
2020-10-12 14:39   ` Laurent Vivier

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.