From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
"Ian Jackson" <iwj@xenproject.org>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Frédéric Pierret" <frederic.pierret@qubes-os.org>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/2] x86/hpet: Factor hpet_enable_legacy_replacement_mode() out of hpet_setup()
Date: Fri, 26 Mar 2021 10:59:30 +0100 [thread overview]
Message-ID: <3ef41d04-cff0-5828-8373-af5f42a4f857@suse.com> (raw)
In-Reply-To: <20210325165224.10306-2-andrew.cooper3@citrix.com>
On 25.03.2021 17:52, Andrew Cooper wrote:
> ... in preparation to introduce a second caller.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Generally
Reviewed-by: Jan Beulich <jbeulich@suse.com>
but I think there's one small code change needed plus I have two
nits (and I expect that this change wouldn't be committed without
patch 2, as making the function non-static isn't warranted
otherwise):
> --- a/xen/arch/x86/hpet.c
> +++ b/xen/arch/x86/hpet.c
> @@ -754,11 +754,70 @@ int hpet_legacy_irq_tick(void)
> }
>
> static u32 *hpet_boot_cfg;
> +static u64 __initdata hpet_rate;
Use uint64_t as you move this here?
> +bool __init hpet_enable_legacy_replacement_mode(void)
> +{
> + unsigned int id, cfg, c0_cfg, ticks, count;
> +
> + if ( !hpet_rate ||
I think you need to also honor opt_hpet here.
> + !((id = hpet_read32(HPET_ID)) & HPET_ID_LEGSUP) ||
I don't think I see a need for the assignment and hence the local
variable. Dropping it would make the code easier to read imo.
Jan
next prev parent reply other threads:[~2021-03-26 9:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 16:52 [PATCH for-4.15 0/2] x86/hpet: Try to unbreak Ryzen 1800X systems Andrew Cooper
2021-03-25 16:52 ` [PATCH 1/2] x86/hpet: Factor hpet_enable_legacy_replacement_mode() out of hpet_setup() Andrew Cooper
2021-03-26 9:59 ` Jan Beulich [this message]
2021-03-26 10:53 ` Andrew Cooper
2021-03-26 10:55 ` Jan Beulich
2021-03-25 16:52 ` [PATCH 2/2] x86/hpet: Don't enable legacy replacement mode unconditionally Andrew Cooper
2021-03-25 17:00 ` Andrew Cooper
2021-03-25 17:21 ` [PATCH v1.1 " Andrew Cooper
2021-03-26 9:51 ` Jan Beulich
2021-03-26 16:32 ` Andrew Cooper
2021-03-26 16:48 ` Jan Beulich
2021-03-26 16:53 ` Andrew Cooper
2021-03-26 12:03 ` Ian Jackson
2021-03-26 12:29 ` Ian Jackson
2021-03-26 13:03 ` Tamas K Lengyel
2021-03-26 13:15 ` Ian Jackson
2021-03-26 13:37 ` Jan Beulich
2021-03-26 14:07 ` Ian Jackson
2021-03-26 14:23 ` Marek Marczykowski-Górecki
2021-03-26 15:02 ` Tamas K Lengyel
2021-03-29 13:30 ` Roger Pau Monné
2021-03-26 13:31 ` Jan Beulich
2021-03-26 13:39 ` Ian Jackson
2021-03-26 13:30 ` Jan Beulich
2021-03-26 13:43 ` Marek Marczykowski-Górecki
2021-03-26 14:02 ` Jan Beulich
2021-03-26 13:50 ` Frédéric Pierret
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=3ef41d04-cff0-5828-8373-af5f42a4f857@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=frederic.pierret@qubes-os.org \
--cc=iwj@xenproject.org \
--cc=marmarek@invisiblethingslab.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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).