qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com, qemu-s390x@nongnu.org, cohuck@redhat.com,
	david@redhat.com
Subject: Re: [PATCH v4 2/9] pc-bios: s390x: Consolidate timing functions into time.h
Date: Mon, 22 Jun 2020 12:04:33 +0200	[thread overview]
Message-ID: <9f1346c6-1561-5bb7-fc02-d364d34f017f@redhat.com> (raw)
In-Reply-To: <98bf10d9-76cb-0196-5fef-8a4e3a5b1c4f@redhat.com>

On 22/06/2020 12.02, Thomas Huth wrote:
> On 22/06/2020 09.42, Janosch Frank wrote:
>> Let's consolidate timing related functions into one header.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---
>>  pc-bios/s390-ccw/menu.c        |  1 +
>>  pc-bios/s390-ccw/netmain.c     | 15 +++------------
>>  pc-bios/s390-ccw/s390-ccw.h    |  8 ++++----
>>  pc-bios/s390-ccw/s390-time.h   | 23 +++++++++++++++++++++++
>>  pc-bios/s390-ccw/virtio-net.c  |  1 +
>>  pc-bios/s390-ccw/virtio-scsi.c |  1 +
>>  pc-bios/s390-ccw/virtio.c      | 18 +++---------------
>>  7 files changed, 36 insertions(+), 31 deletions(-)
>>  create mode 100644 pc-bios/s390-ccw/s390-time.h
>>
>> diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
>> index ce3815b201..de8260a5d6 100644
>> --- a/pc-bios/s390-ccw/menu.c
>> +++ b/pc-bios/s390-ccw/menu.c
>> @@ -12,6 +12,7 @@
>>  #include "libc.h"
>>  #include "s390-ccw.h"
>>  #include "sclp.h"
>> +#include "s390-time.h"
> 
> You could maybe drop these additional includes...
> 
>> diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
>> index 21f27e7990..fae1de363f 100644
>> --- a/pc-bios/s390-ccw/s390-ccw.h
>> +++ b/pc-bios/s390-ccw/s390-ccw.h
>> @@ -74,8 +74,6 @@ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
>>  bool virtio_is_supported(SubChannelId schid);
>>  void virtio_blk_setup_device(SubChannelId schid);
>>  int virtio_read(ulong sector, void *load_addr);
>> -u64 get_clock(void);
>> -ulong get_second(void);
>>  
>>  /* bootmap.c */
>>  void zipl_load(void);
>> @@ -153,11 +151,13 @@ static inline void yield(void)
>>  
>>  #define MAX_SECTOR_SIZE 4096
>>  
>> +#include "s390-time.h"
> 
> ... since you already include s390-time.h here in this central header
> file...
> 
>>  static inline void sleep(unsigned int seconds)
>>  {
>> -    ulong target = get_second() + seconds;
>> +    ulong target = get_time_seconds() + seconds;
>>  
>> -    while (get_second() < target) {
>> +    while (get_time_seconds() < target) {
>>          yield();
>>      }
>>  }
> 
> ... or you could move the sleep() function into s390-time.h, too?

Never mind, I just saw that you move it in the next patch to a different
header. That's fine.

 Thomas



  reply	other threads:[~2020-06-22 10:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  7:42 [PATCH v4 0/9] pc-bios: s390x: Cleanup part 1 Janosch Frank
2020-06-22  7:42 ` [PATCH v4 1/9] pc-bios: s390x: cio.c cleanup and compile fix Janosch Frank
2020-06-22  7:42 ` [PATCH v4 2/9] pc-bios: s390x: Consolidate timing functions into time.h Janosch Frank
2020-06-22 10:02   ` Thomas Huth
2020-06-22 10:04     ` Thomas Huth [this message]
2020-06-22  7:42 ` [PATCH v4 3/9] pc-bios: s390x: Move sleep and yield to helper.h Janosch Frank
2020-06-22 10:05   ` Thomas Huth
2020-06-22 11:10   ` David Hildenbrand
2020-06-22  7:42 ` [PATCH v4 4/9] pc-bios: s390x: Get rid of magic offsets into the lowcore Janosch Frank
2020-06-22  7:42 ` [PATCH v4 5/9] pc-bios: s390x: Rename and use PSW_MASK_ZMODE constant Janosch Frank
2020-06-22 11:40   ` Thomas Huth
2020-06-22 13:01     ` Janosch Frank
2020-06-22  7:42 ` [PATCH v4 6/9] pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR Janosch Frank
2020-06-22  7:42 ` [PATCH v4 7/9] pc-bios: s390x: Move panic() into header and add infinite loop Janosch Frank
2020-06-22 11:48   ` Thomas Huth
2020-06-22  7:42 ` [PATCH v4 8/9] pc-bios: s390x: Use ebcdic2ascii table Janosch Frank
2020-06-22  7:42 ` [PATCH v4 9/9] pc-bios: s390x: Make u32 ptr check explicit Janosch Frank
2020-06-22  8:06 ` [PATCH v4 0/9] pc-bios: s390x: Cleanup part 1 no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f1346c6-1561-5bb7-fc02-d364d34f017f@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).