All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Wei Liu <wl@xen.org>,
	jakub@bartmin.ski, Andrew Cooper <andrew.cooper3@citrix.com>,
	marmarek@invisiblethingslab.com,
	Grzegorz Uriasz <gorbak25@gmail.com>,
	j.nowak26@student.uw.edu.pl, xen-devel@lists.xenproject.org,
	contact@puzio.waw.pl
Subject: Re: [PATCH v3 1/1] x86/acpi: Use FADT flags to determine the PMTMR width
Date: Mon, 22 Jun 2020 12:13:04 +0200	[thread overview]
Message-ID: <6c286697-99d6-93f3-1bbf-925ce54c08fb@suse.com> (raw)
In-Reply-To: <20200622085400.GG735@Air-de-Roger>

On 22.06.2020 10:54, Roger Pau Monné wrote:
> On Fri, Jun 19, 2020 at 10:00:16PM +0000, Grzegorz Uriasz wrote:
>> @@ -490,8 +497,12 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
>>   	 */
>>  	if (!pmtmr_ioport) {
>>  		pmtmr_ioport = fadt->pm_timer_block;
>> -		pmtmr_width = fadt->pm_timer_length == 4 ? 24 : 0;
>> +		pmtmr_width = fadt->pm_timer_length == 4 ? 32 : 0;
>>  	}
>> +	if (pmtmr_width < 32 && fadt->flags & ACPI_FADT_32BIT_TIMER)
>> +        printk(KERN_WARNING PREFIX "PM-Timer is too short\n");
> 
> Indentation. Also this should be a fatal error likely? You should set
> pmtmr_ioport = 0?

Not sure, to be honest. It's entirely fuzzy what mode to use in this
case, yet assuming a working 24-bit timer looks valid in this case.
And indeed we'd use the timer (with a 24-bit mask) exactly when
pmtmr_width == 24 (alongside the bogus set ACPI_FADT_32BIT_TIMER bit).

What I do notice only now though is that inside the if() there's a
pair of parentheses missing.

Jan


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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 22:00 [PATCH v3 0/1] Fix broken suspend on some machines Grzegorz Uriasz
2020-06-19 22:00 ` [PATCH v3 1/1] x86/acpi: Use FADT flags to determine the PMTMR width Grzegorz Uriasz
2020-06-22  8:49   ` Jan Beulich
2020-06-24 15:31     ` Ping: " Jan Beulich
2020-06-25  6:55       ` Paul Durrant
2020-06-22  8:54   ` Roger Pau Monné
2020-06-22  8:58     ` Roger Pau Monné
2020-06-22 10:13     ` Jan Beulich [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=6c286697-99d6-93f3-1bbf-925ce54c08fb@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=contact@puzio.waw.pl \
    --cc=gorbak25@gmail.com \
    --cc=j.nowak26@student.uw.edu.pl \
    --cc=jakub@bartmin.ski \
    --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 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.