linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: [5.12 regression] DSDT overriding from initrd no longer works
Date: Mon, 12 Apr 2021 20:53:31 +0200	[thread overview]
Message-ID: <273d3ea7-aa74-6556-7fef-fb65b620bc95@redhat.com> (raw)
In-Reply-To: <CAJZ5v0gOMZbyD5r+bCL9vD6_NrFz0nAq+eY2QDtxOY4DfsXG6w@mail.gmail.com>

Hi,

On 4/12/21 8:11 PM, Rafael J. Wysocki wrote:
> On Mon, Apr 12, 2021 at 8:01 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>>
>> On Mon, Apr 12, 2021 at 7:38 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>>
>>> Hi Rafael,
>>>
>>> Sorry about the timing of reporting this regression.
>>
>> Oh well.
>>
>>> I just noticed that overriding the DSDT (*) from the initrd will not work in 5.12,
>>> this is caused by:
>>>
>>> commit 1a1c130ab757 ("ACPI: tables: x86: Reserve memory occupied by ACPI tables")
>>>
>>> This makes the initial acpi_locate_initial_tables() call happen earlier
>>> then before, but the acpi_table_upgrade) call in arch/x86/kernel/setup.c is
>>> not moved up, so the tables in the initrd are now only parsed and saved
>>> after the initial ACPI table scanning has already been done.
>>>
>>> I guess fixing this might be as easy as moving the acpi_table_upgrade) call
>>> higher in arch/x86/kernel/setup.c but I'm not sure if that is save to do.
>>
>> Why do you think it may not be safe?
> 
> OK, so it won't work in some cases, because acpi_table_upgrade() needs
> to be called after reserve_initrd(),

Right I notice it was sitting right after reserve_initrd() which made me think
that it probably needed to be after that. Sorry I should have mentioned that
in my original email.

> so I guess the commit above will
> need to be reverted.

One possible solution which I was wondering about is to modify
acpi_table_initrd_scan() to have it call acpi_tb_override_table()
instead of acpi_install_table() for existing tables using the matching
logic from acpi_table_initrd_override(). But I'm not sure when the
parsing of the DSDT is done. If acpi_table_initrd_scan() runs before
the first parsing of the DSDT is done then I think that that should work.

This might be more 5.13 material though and for 5.12 a revert is
probably best.

I also just remembered that at least the Intel audio folks rely on
DSDT overrides to get some (prototype) boards in their CI to work.

Regards,

Hans



  reply	other threads:[~2021-04-12 18:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 17:38 [5.12 regression] DSDT overriding from initrd no longer works Hans de Goede
2021-04-12 18:01 ` Rafael J. Wysocki
2021-04-12 18:11   ` Rafael J. Wysocki
2021-04-12 18:53     ` Hans de Goede [this message]
2021-04-13  9:35       ` Rafael J. Wysocki
2021-04-13 10:52         ` 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=273d3ea7-aa74-6556-7fef-fb65b620bc95@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-acpi@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;
as well as URLs for NNTP newsgroup(s).