[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/1] x86/acpi: Use FADT flags to determine the PMTMR width


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 Jun 2020 12:13:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s+UPrxyc4/+1Zs7EAwGKH1DqHIk5F3sdmAc6aSj1IYs=; b=JBpUE+U1oul/FEAc/Nhbe632S1neW4Qf2zQxoY3lSIXXkSHFUDnVrfTnx8IUMatA074tTVT8CajbpWOqKLysCe0VVC19AlLjkj9kWqTgqUvcGKYzT6HggKDajuHixIGnQlUE44FSt8O+u19hE5vbwOJa/afTXTmWEw0wEjCWBetvyYGrt08PTd60KNW2JfGja1a2l6Ayq/FH7GamgpHzTDjD2wPdstENIwEpHy11SNa0YkQpFNjWyrBWiq9/AXbKGr/gzBFM7kx7bmxjxNWBC7e7z4vX7Aw0TvQmKYxc0UmpS20rpHKFsfcwljbfbhI721AVciC9H/daNNif5FRTzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WR5JBbEA45jQ11tvnYYANudscsx/5bEMetrsX+mQ5Y4PMcjnmG+0gv6LqW/g7F0DBzQfxmuFH2wkysQUEwNKhziKNG/SmGv+RRGSS4EERu1DUwUzahy3vgIYifejtwgcJT7spyqJ0JKhArFbxEhL3+Ve8EZ4R9172u3h86K8MKI5Z7FreTMhy3dzlMNFBoaOqPKoYWJ7Sxv1Gu6PmhMWWk6ezykfX02RaR7jx+kQcQfX6tFzeWfMuldNOUb1L/U0cHjptbC5wqL9nQUXCdZrrHlzd08SXgVPQbou6S1yvr6tO6L9TQR39AtlHEwyolwgop8dynvIJ215CrW5uGJ/Kg==
  • Authentication-results: student.uw.edu.pl; dkim=none (message not signed) header.d=none; student.uw.edu.pl; dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, jakub@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, marmarek@xxxxxxxxxxxxxxxxxxxxxx, Grzegorz Uriasz <gorbak25@xxxxxxxxx>, j.nowak26@xxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, contact@xxxxxxxxxxxx
  • Delivery-date: Mon, 22 Jun 2020 10:13:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.