linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maximilian Luz <luzmaximilian@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Sachi King <nakato@nakato.io>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] x86/i8259: Work around buggy legacy PIC
Date: Thu, 13 May 2021 12:11:51 +0200	[thread overview]
Message-ID: <e7dbd4d1-f23f-42f0-e912-032ba32f9ec8@gmail.com> (raw)
In-Reply-To: <9b70d8113c084848b8d9293c4428d71b@AcuMS.aculab.com>

On 5/13/21 10:10 AM, David Laight wrote:
> From: Maximilian Luz
>> Sent: 12 May 2021 22:05
>>
>> The legacy PIC on the AMD variant of the Microsoft Surface Laptop 4 has
>> some problems on boot. For some reason it consistently does not respond
>> on the first try, requiring a couple more tries before it finally
>> responds.
> 
> That seems very strange, something else must be going on that causes the grief.
> The 8259 will be built into to the one of the cpu support chips.
> I can't imagine that requires anything special.

Right, it's definitely strange. Both Sachi (I imagine) and I don't know
much about these devices, so we're open for suggestions.

For reference: [1] and following comments are the discussion where we
(mostly Sachi) discovered the issue, tracking this from
platform_get_irq() returning -EINVAL to the PIC not probing. It also has
a dmesg log [2] attached, but as far as we can tell

     [    0.105820] Using NULL legacy PIC

is the only relevant line to that in there.

And lastly, if that's any help at all: The PIC device is described in
ACPI in [3]. The Surface Laptop 3 also has an AMD CPU (although a prior
generation) and has the PIC described in the exact same way (can also be
found in that repository), but doesn't exhibit that behavior (and
doesn't show the "Using NULL legacy PIC" line). I expect there's not
much you can change to that definition so that's probably irrelevant
here.

Again, I don't really know anything about these devices, so my guess
would be bad hardware revision or bad firmware revision. All I know is
that retrying seems to "fix" it.

> It's not as though you have a real 8259 - which even a 286 can
> break the inter-cycle recovery on (with the circuit from the
> application note).

Right, I imagine that's some emulation for legacy reasons?

Regards,
Max

[1]: https://github.com/linux-surface/linux-surface/issues/425#issuecomment-831921098
[2]: https://github.com/linux-surface/linux-surface/files/6421166/dmesg-2021-05-04_22-11.txt
[3]: https://github.com/linux-surface/acpidumps/blob/69d5ecc1954ea5e90829b8e33541308e7451e951/surface_laptop_4_amd/dsdt.dsl#L1201-L1221

  reply	other threads:[~2021-05-13 10:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 21:04 [PATCH] x86/i8259: Work around buggy legacy PIC Maximilian Luz
2021-05-13  8:10 ` David Laight
2021-05-13 10:11   ` Maximilian Luz [this message]
2021-05-13 10:36     ` David Laight
2021-05-14 13:01       ` Thomas Gleixner
2021-05-14 13:13         ` David Laight
2021-05-14 16:19           ` Ingo Molnar
2021-05-14 19:41       ` Sachi King
2021-05-14 10:51         ` David Laight
2021-05-14 11:58         ` Maximilian Luz
2021-05-14 17:32           ` Thomas Gleixner
2021-05-14 17:35             ` H. Peter Anvin
2021-05-14 22:47               ` Maximilian Luz
2021-05-17 18:40                 ` Thomas Gleixner
2021-05-17 19:25                   ` Maximilian Luz
2021-05-17 23:27                     ` Thomas Gleixner
2021-05-18  8:28                       ` Andy Shevchenko
2021-05-18 19:58                       ` Sachi King
2021-05-18 15:45                         ` Thomas Gleixner
2021-05-14 13:44     ` Thomas Gleixner
2021-05-14 16:12       ` David Laight
2021-05-14 17:28         ` H. Peter Anvin

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=e7dbd4d1-f23f-42f0-e912-032ba32f9ec8@gmail.com \
    --to=luzmaximilian@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nakato@nakato.io \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).