mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yunfeng Ye <yeyunfeng@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Dexuan-Linux Cui <dexuan.linux@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"hushiyuan@huawei.com" <hushiyuan@huawei.com>,
	"linfeilong@huawei.com" <linfeilong@huawei.com>,
	Dexuan Cui <decui@microsoft.com>
Subject: Re: [PATCH v2] ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100
Date: Tue, 19 Nov 2019 10:22:05 +0800	[thread overview]
Message-ID: <9eff3584-a25b-ca47-d38f-ce83862baa18@huawei.com> (raw)
In-Reply-To: <CAJZ5v0iAbf7qQeyeR6CVYTX8v=OpEcbFksTHgQ0LAZk-QKqHpQ@mail.gmail.com>



On 2019/11/19 5:15, Rafael J. Wysocki wrote:
> On Mon, Nov 18, 2019 at 8:44 PM Dexuan-Linux Cui <dexuan.linux@gmail.com> wrote:
>>
>> On Mon, Nov 18, 2019 at 1:04 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
>>>
>>> On Sat, Nov 16, 2019 at 9:06 PM Dan Williams <dan.j.williams@intel.com> wrote:
>>>>
>>>> On Wed, Nov 13, 2019 at 11:17 PM Yunfeng Ye <yeyunfeng@huawei.com> wrote:
>>>>>
>>>>> The commit 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel
>>>>> parameter cover all GPEs") says:
>>>>>   "Use a bitmap of size 0xFF instead of a u64 for the GPE mask so 256
>>>>>    GPEs can be masked"
>>>>>
>>>>> But the masking of GPE 0xFF it not supported and the check condition
>>>>> "gpe > ACPI_MASKABLE_GPE_MAX" is not valid because the type of gpe is
>>>>> u8.
>>>>>
>>>>> So modify the macro ACPI_MASKABLE_GPE_MAX to 0x100, and drop the "gpe >
>>>>> ACPI_MASKABLE_GPE_MAX" check. In addition, update the docs "Format" for
>>>>> acpi_mask_gpe parameter.
>>>>>
>>>>> Fixes: 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs")
>>>>> Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
>>>>> ---
>>>>> v1 -> v2:
>>>>>  - drop the "gpe > ACPI_MASKABLE_GPE_MAX" check
>>>>>  - update the docs "Format" from <int> to <byte> for acpi_mask_gpe parameter
>>>>>  - update the commit comment
>>>>>
>>>>>  Documentation/admin-guide/kernel-parameters.txt | 2 +-
>>>>>  drivers/acpi/sysfs.c                            | 4 ++--
>>>>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> Bisect flags commit eb09878e1301 "ACPI: sysfs: Change
>>>> ACPI_MASKABLE_GPE_MAX to 0x100" in -next as the reason for a boot
>>>> regression in my qemu-kvm test environment. It spews:
>>>>
>>>> [    1.456728] ACPI: Masking GPE 0x0.
>>>> ...
>>>> [  161.721420] ACPI: Masking GPE 0x0.
>>>>
>>>> ...and then hangs.
>>>>
>>>> A straight revert gets the configuration back on its feet.
>>>>
>>>> qemu-system-x86_64 --version
>>>> QEMU emulator version 4.0.50 (v4.0.0-928-g49c6c6ac0cd8)
>>>
>>> OK, I'll drop it then, thanks!
>>
>> We're seeing the same issue wtih 5.4.0-rc7-next-20191118 on a Linux VM
>> running on Hyper-V :
>>
>> [    0.133029] ACPI: 1 ACPI AML tables successfully acquired and loaded
>> [    0.144023] ACPI: Interpreter enabled
>> [    0.145023] ACPI: (supports S0 S5)
>> [    0.146023] ACPI: Using IOAPIC for interrupt routing
>> [    0.147024] PCI: Using host bridge windows from ACPI; if necessary,
>> use "pci=nocrs" and report a bug
>> [    0.148031] ACPI: Masking GPE 0x0.
>> ...
>> [  774.839023] ACPI: Masking GPE 0x0.
>> [  774.840023] ACPI: Masking GPE 0x0.
>>
>> I guess the patch is only tested on a physical machine and not on a VM...
> 
> It looks like the patch hasn't been tested at all.
> 
> Please try to change the data type of gpe in
> acpi_gpe_apply_masked_gpes() to u16 and see if that helps.
> 
Sorry for this problem, I have no good test after modification according to
inspection opinions.

The first version patch is ok, the type of gpe is changed to u32. and I have
test it before.

thanks.
> .
> 


  reply	other threads:[~2019-11-19  2:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14  7:16 Yunfeng Ye
2019-11-14  8:49 ` Rafael J. Wysocki
2019-11-16 20:05 ` Dan Williams
2019-11-18  9:03   ` Rafael J. Wysocki
2019-11-18 19:44     ` Dexuan-Linux Cui
2019-11-18 21:15       ` Rafael J. Wysocki
2019-11-19  2:22         ` Yunfeng Ye [this message]
2019-11-19  8:43           ` Rafael J. Wysocki

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=9eff3584-a25b-ca47-d38f-ce83862baa18@huawei.com \
    --to=yeyunfeng@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=decui@microsoft.com \
    --cc=dexuan.linux@gmail.com \
    --cc=hushiyuan@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linfeilong@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /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

all inboxes | Powered by JetHome®