qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dong, Eddie" <eddie.dong@intel.com>
To: Tyler Ng <tkng@rivosinc.com>
Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Alistair Francis <Alistair.Francis@wdc.com>,
	"Meng, Bin" <bin.meng@windriver.com>,
	Thomas Huth <thuth@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Laurent Vivier <lvivier@redhat.com>
Subject: RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime
Date: Thu, 29 Sep 2022 18:11:16 +0000	[thread overview]
Message-ID: <DM6PR11MB3050E5C5A223C617DB6A209D8A579@DM6PR11MB3050.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAB88-qOtDc3EMGcPGdiLicYE3DiUD_2NHjeMDRYzn3SoiZdmrQ@mail.gmail.com>

Using a union can better reflect this. Also, it can avoid the convert from 2 32-bits register to 64 bits, like the above code does.
ibex_timer_update_irqs() also does this conversion.

It took me a bit of time, but now I think I understand what you mean: a union of 2 uint32_t's (perhaps packed into a struct or an array) and a uint64_t would make it easier to access the components, is that what you mean? That is pretty handy, thanks.


YES.  You decide😊

Thanks Eddie

      reply	other threads:[~2022-09-29 18:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 15:58 [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime Tyler Ng
2022-09-22 21:45 ` Philippe Mathieu-Daudé via
2022-09-26 23:37   ` Tyler Ng
2022-09-26 21:05 ` Dong, Eddie
2022-09-26 23:38   ` Tyler Ng
2022-09-28 22:59     ` Dong, Eddie
2022-09-29 16:02       ` Tyler Ng
2022-09-29 18:11         ` Dong, Eddie [this message]

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=DM6PR11MB3050E5C5A223C617DB6A209D8A579@DM6PR11MB3050.namprd11.prod.outlook.com \
    --to=eddie.dong@intel.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=bin.meng@windriver.com \
    --cc=lvivier@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=tkng@rivosinc.com \
    /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).