public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Hans de Goede <hdegoede@redhat.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>
Cc: linux-acpi@vger.kernel.org,
	Linux regressions mailing list <regressions@lists.linux.dev>,
	stable@vger.kernel.org, August Wikerfors <git@augustwikerfors.se>
Subject: Re: [PATCH] ACPI: resource: revert "Remove "Zen" specific match and quirks"
Date: Mon, 7 Aug 2023 06:39:02 -0500	[thread overview]
Message-ID: <561f0807-a78c-4dab-b8ef-a0f0836902d9@amd.com> (raw)
In-Reply-To: <8f0cbe61-99aa-8c45-c29e-69c27ba96d81@redhat.com>

>> We haven't even given a try to fixing it; I think the revert is still hasty.
>>
>> I don't have a machine that can reproduce this failure, but I did confirm that my keyboard still works with this:
>>
>> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
>> index 1dd8d5aebf678..b74d7d8cc8630 100644
>> --- a/drivers/acpi/resource.c
>> +++ b/drivers/acpi/resource.c
>> @@ -19,7 +19,7 @@
>>   #include <linux/dmi.h>
>>
>>   #ifdef CONFIG_X86
>> -#define valid_IRQ(i) (((i) != 0) && ((i) != 2))
>> +#define valid_IRQ(i) ((i) > 2)
>>   static inline bool acpi_iospace_resource_valid(struct resource *res)
>>   {
>>          /* On X86 IO space is limited to the [0 - 64K] IO port range */
>>
>> Can we perhaps see if that works instead for some affected people?
> 
> That does not just skip the override stuff, it will make the kernel return irqresource_disabled(res, 1) for the kbd IRQ:
> 
> static inline void irqresource_disabled(struct resource *res, u32 irq)
> {
>          res->start = irq;
>          res->end = irq;
>          res->flags |= IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET;
> }
> 
> Now not much code seems to actually check the IORESOURCE_DISABLED | IORESOURCE_UNSET flags, so this might still work but it does not seem like the right thing to do.
> 

Right; so it makes the resource get skipped when PNP is enumerated.

To me it seems that it should match the theme of 'don't reprogram the 
polarity and triggering for the IRQ'.  When the IRQ is set up by i8042 
then it will try to go and get a resource and wouldn't find one.  So 
when the IRQ is set up it should match the values already programmed.

I do wonder if both IRQ 1 and IRQ 12 both would need to be skipped for 
this to work (if people are affected by both i8042 devices).

  reply	other threads:[~2023-08-07 11:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 15:14 [PATCH] ACPI: resource: revert "Remove "Zen" specific match and quirks" Hans de Goede
2023-08-06 15:51 ` August Wikerfors
2023-08-06 15:58 ` Linux regression tracking (Thorsten Leemhuis)
2023-08-06 17:13 ` Mario Limonciello
2023-08-06 18:20   ` Hans de Goede
2023-08-07  4:38     ` Mario Limonciello
2023-08-07  5:52       ` Linux regression tracking (Thorsten Leemhuis)
2023-08-07  7:44       ` Hans de Goede
2023-08-07 11:39         ` Mario Limonciello [this message]
2023-08-07 17:06           ` Hans de Goede
2023-08-07 17:08             ` Mario Limonciello
2023-08-07 15:19 ` Hans de Goede
2023-08-08  8:36   ` Hans de Goede
2023-08-08 11:18     ` Rafael J. Wysocki
2023-08-08 13:31       ` Hans de Goede
2023-08-08 13:37         ` Rafael J. Wysocki
2023-08-08 13:59           ` Hans de Goede

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=561f0807-a78c-4dab-b8ef-a0f0836902d9@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=git@augustwikerfors.se \
    --cc=hdegoede@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.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