qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Rename round_page() to round_pageq()
@ 2017-09-11 20:00 Kamil Rytarowski
  2017-09-11 20:16 ` Peter Maydell
  2017-09-11 20:16 ` [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN() Kamil Rytarowski
  0 siblings, 2 replies; 6+ messages in thread
From: Kamil Rytarowski @ 2017-09-11 20:00 UTC (permalink / raw)
  To: qemu-trivial; +Cc: qemu-devel, Kamil Rytarowski

This change fixes conflict with the DragonFly BSD headers.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
---
 hw/ppc/mac_newworld.c | 8 ++++----
 hw/ppc/mac_oldworld.c | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index d466634997..b9d4bca74f 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -124,7 +124,7 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
 }
 
-static hwaddr round_page(hwaddr addr)
+static hwaddr round_pageq(hwaddr addr)
 {
     return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
 }
@@ -256,7 +256,7 @@ static void ppc_core99_init(MachineState *machine)
         }
         /* load initrd */
         if (initrd_filename) {
-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            initrd_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
             initrd_size = load_image_targphys(initrd_filename, initrd_base,
                                               ram_size - initrd_base);
             if (initrd_size < 0) {
@@ -264,11 +264,11 @@ static void ppc_core99_init(MachineState *machine)
                              initrd_filename);
                 exit(1);
             }
-            cmdline_base = round_page(initrd_base + initrd_size);
+            cmdline_base = round_pageq(initrd_base + initrd_size);
         } else {
             initrd_base = 0;
             initrd_size = 0;
-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            cmdline_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
         }
         ppc_boot_device = 'm';
     } else {
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index fcac399562..50fefb339b 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -66,7 +66,7 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
 }
 
-static hwaddr round_page(hwaddr addr)
+static hwaddr round_pageq(hwaddr addr)
 {
     return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
 }
@@ -191,7 +191,7 @@ static void ppc_heathrow_init(MachineState *machine)
         }
         /* load initrd */
         if (initrd_filename) {
-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            initrd_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
             initrd_size = load_image_targphys(initrd_filename, initrd_base,
                                               ram_size - initrd_base);
             if (initrd_size < 0) {
@@ -199,11 +199,11 @@ static void ppc_heathrow_init(MachineState *machine)
                              initrd_filename);
                 exit(1);
             }
-            cmdline_base = round_page(initrd_base + initrd_size);
+            cmdline_base = round_pageq(initrd_base + initrd_size);
         } else {
             initrd_base = 0;
             initrd_size = 0;
-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            cmdline_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
         }
         ppc_boot_device = 'm';
     } else {
-- 
2.14.1

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

* Re: [Qemu-devel] [PATCH] Rename round_page() to round_pageq()
  2017-09-11 20:00 [Qemu-devel] [PATCH] Rename round_page() to round_pageq() Kamil Rytarowski
@ 2017-09-11 20:16 ` Peter Maydell
  2017-09-11 20:24   ` Kamil Rytarowski
  2017-09-11 20:16 ` [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN() Kamil Rytarowski
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2017-09-11 20:16 UTC (permalink / raw)
  To: Kamil Rytarowski; +Cc: QEMU Trivial, QEMU Developers

On 11 September 2017 at 21:00, Kamil Rytarowski <n54@gmx.com> wrote:
> This change fixes conflict with the DragonFly BSD headers.
>
> Signed-off-by: Kamil Rytarowski <n54@gmx.com>

What's the rationale for calling it round_pageq()
in particular?

thanks
-- PMM

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

* [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN()
  2017-09-11 20:00 [Qemu-devel] [PATCH] Rename round_page() to round_pageq() Kamil Rytarowski
  2017-09-11 20:16 ` Peter Maydell
@ 2017-09-11 20:16 ` Kamil Rytarowski
  2017-09-12 11:46   ` Thomas Huth
  2017-09-14  7:41   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  1 sibling, 2 replies; 6+ messages in thread
From: Kamil Rytarowski @ 2017-09-11 20:16 UTC (permalink / raw)
  To: qemu-trivial; +Cc: qemu-devel, peter.maydell, Kamil Rytarowski

This change fixes conflict with the DragonFly BSD headers.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
---
 hw/ppc/mac_newworld.c | 11 +++--------
 hw/ppc/mac_oldworld.c | 11 +++--------
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index d466634997..51bf83019b 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -124,11 +124,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
 }
 
-static hwaddr round_page(hwaddr addr)
-{
-    return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
-}
-
 static void ppc_core99_reset(void *opaque)
 {
     PowerPCCPU *cpu = opaque;
@@ -256,7 +251,7 @@ static void ppc_core99_init(MachineState *machine)
         }
         /* load initrd */
         if (initrd_filename) {
-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
             initrd_size = load_image_targphys(initrd_filename, initrd_base,
                                               ram_size - initrd_base);
             if (initrd_size < 0) {
@@ -264,11 +259,11 @@ static void ppc_core99_init(MachineState *machine)
                              initrd_filename);
                 exit(1);
             }
-            cmdline_base = round_page(initrd_base + initrd_size);
+            cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size);
         } else {
             initrd_base = 0;
             initrd_size = 0;
-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
         }
         ppc_boot_device = 'm';
     } else {
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index fcac399562..feb31911ca 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -66,11 +66,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
 }
 
-static hwaddr round_page(hwaddr addr)
-{
-    return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
-}
-
 static void ppc_heathrow_reset(void *opaque)
 {
     PowerPCCPU *cpu = opaque;
@@ -191,7 +186,7 @@ static void ppc_heathrow_init(MachineState *machine)
         }
         /* load initrd */
         if (initrd_filename) {
-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
             initrd_size = load_image_targphys(initrd_filename, initrd_base,
                                               ram_size - initrd_base);
             if (initrd_size < 0) {
@@ -199,11 +194,11 @@ static void ppc_heathrow_init(MachineState *machine)
                              initrd_filename);
                 exit(1);
             }
-            cmdline_base = round_page(initrd_base + initrd_size);
+            cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size);
         } else {
             initrd_base = 0;
             initrd_size = 0;
-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
         }
         ppc_boot_device = 'm';
     } else {
-- 
2.14.1

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

* Re: [Qemu-devel] [PATCH] Rename round_page() to round_pageq()
  2017-09-11 20:16 ` Peter Maydell
@ 2017-09-11 20:24   ` Kamil Rytarowski
  0 siblings, 0 replies; 6+ messages in thread
From: Kamil Rytarowski @ 2017-09-11 20:24 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Trivial, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On 11.09.2017 22:16, Peter Maydell wrote:
> On 11 September 2017 at 21:00, Kamil Rytarowski <n54@gmx.com> wrote:
>> This change fixes conflict with the DragonFly BSD headers.
>>
>> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
> 
> What's the rationale for calling it round_pageq()
> in particular?
> 
> thanks
> -- PMM
> 

It might be a bad taste, but q stands for qemu.. I'm going to send a
better patch soon with a switch to TARGET_PAGE_ALIGN().


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN()
  2017-09-11 20:16 ` [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN() Kamil Rytarowski
@ 2017-09-12 11:46   ` Thomas Huth
  2017-09-14  7:41   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2017-09-12 11:46 UTC (permalink / raw)
  To: Kamil Rytarowski, qemu-trivial
  Cc: peter.maydell, qemu-devel, qemu-ppc, David Gibson

On 11.09.2017 22:16, Kamil Rytarowski wrote:
> This change fixes conflict with the DragonFly BSD headers.
> 
> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
> ---
>  hw/ppc/mac_newworld.c | 11 +++--------
>  hw/ppc/mac_oldworld.c | 11 +++--------
>  2 files changed, 6 insertions(+), 16 deletions(-)
> 
> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> index d466634997..51bf83019b 100644
> --- a/hw/ppc/mac_newworld.c
> +++ b/hw/ppc/mac_newworld.c
> @@ -124,11 +124,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
>      return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
>  }
>  
> -static hwaddr round_page(hwaddr addr)
> -{
> -    return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
> -}
> -
>  static void ppc_core99_reset(void *opaque)
>  {
>      PowerPCCPU *cpu = opaque;
> @@ -256,7 +251,7 @@ static void ppc_core99_init(MachineState *machine)
>          }
>          /* load initrd */
>          if (initrd_filename) {
> -            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
> +            initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
>              initrd_size = load_image_targphys(initrd_filename, initrd_base,
>                                                ram_size - initrd_base);
>              if (initrd_size < 0) {
> @@ -264,11 +259,11 @@ static void ppc_core99_init(MachineState *machine)
>                               initrd_filename);
>                  exit(1);
>              }
> -            cmdline_base = round_page(initrd_base + initrd_size);
> +            cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size);
>          } else {
>              initrd_base = 0;
>              initrd_size = 0;
> -            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
> +            cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
>          }
>          ppc_boot_device = 'm';
>      } else {
> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
> index fcac399562..feb31911ca 100644
> --- a/hw/ppc/mac_oldworld.c
> +++ b/hw/ppc/mac_oldworld.c
> @@ -66,11 +66,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
>      return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
>  }
>  
> -static hwaddr round_page(hwaddr addr)
> -{
> -    return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
> -}
> -
>  static void ppc_heathrow_reset(void *opaque)
>  {
>      PowerPCCPU *cpu = opaque;
> @@ -191,7 +186,7 @@ static void ppc_heathrow_init(MachineState *machine)
>          }
>          /* load initrd */
>          if (initrd_filename) {
> -            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
> +            initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
>              initrd_size = load_image_targphys(initrd_filename, initrd_base,
>                                                ram_size - initrd_base);
>              if (initrd_size < 0) {
> @@ -199,11 +194,11 @@ static void ppc_heathrow_init(MachineState *machine)
>                               initrd_filename);
>                  exit(1);
>              }
> -            cmdline_base = round_page(initrd_base + initrd_size);
> +            cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size);
>          } else {
>              initrd_base = 0;
>              initrd_size = 0;
> -            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
> +            cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
>          }
>          ppc_boot_device = 'm';
>      } else {
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

(and please make sure to CC: qemu-ppc@nongnu.org for ppc related changes)

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN()
  2017-09-11 20:16 ` [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN() Kamil Rytarowski
  2017-09-12 11:46   ` Thomas Huth
@ 2017-09-14  7:41   ` Michael Tokarev
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2017-09-14  7:41 UTC (permalink / raw)
  To: Kamil Rytarowski, qemu-trivial
  Cc: peter.maydell, qemu-devel, list@suse.de:PowerPC list:PowerPC

11.09.2017 23:16, Kamil Rytarowski пишет:
> This change fixes conflict with the DragonFly BSD headers.

Applied to -trivial, thanks!

/mjt

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

end of thread, other threads:[~2017-09-14  7:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 20:00 [Qemu-devel] [PATCH] Rename round_page() to round_pageq() Kamil Rytarowski
2017-09-11 20:16 ` Peter Maydell
2017-09-11 20:24   ` Kamil Rytarowski
2017-09-11 20:16 ` [Qemu-devel] [PATCH v2] Replace round_page() with TARGET_PAGE_ALIGN() Kamil Rytarowski
2017-09-12 11:46   ` Thomas Huth
2017-09-14  7:41   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

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