* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" [not found] <CAJOGg3z6LJPDsdPNBxajgy8_wQxfhYBRxe4EiurZf3kPU5A5Bw@mail.gmail.com> @ 2026-08-04 19:08 ` Wysocki, Rafael J 2026-08-05 16:01 ` Rafael J. Wysocki (Intel) 0 siblings, 1 reply; 9+ messages in thread From: Wysocki, Rafael J @ 2026-08-04 19:08 UTC (permalink / raw) To: Julien Cc: regressions, jarkko, linux-integrity, Rafael J. Wysocki, linux-acpi@vger.kernel.org Hi, On 8/2/2026 2:54 PM, Julien wrote: > Hello, > > Please keep in mind this is my first time reporting a Linux kernel > regression. > > Since commit 48fe2cddc85c ("tpm_crb: Convert ACPI driver to a platform > one"), my TPM device is no longer available. Both /dev/tpm0 and > /dev/tpmrm0 are missing. > > Log messages: > platform MSFT0101:00: failed to claim resource 1: [mem > 0xfed40000-0xfed40fff] > acpi MSFT0101:00: platform device creation failed: -16 > So there's no platform device for the driver to bind to. I think that these messages have been present in the kernel logs for quite some time, but previously they were not connected to any functional issues. > I added some debug logging: > ACPI resourcet[0] = [mem 0xfed40040-0xfed4103f flags 0x200] > ACPI resourcet[1] = [mem 0xfed40000-0xfed40fff flags 0x200] > > I think the failure happens in kernel/resource.c: __insert_resource() > because of the two memory regions overlapping. > This is quite plausible, but if that's the case, it should be fixable. Let me figure out something. > I am attaching the TPM SSDT and the SDDT defining PTTB ACPI variable > address. > The value of PPTB > dd if=/dev/mem bs=1 skip=$((0x8AE5CFDC)) count=8 | hexdump -C > 40 00 d4 fe 00 00 00 00 > > Hardware information: > Manufacturer: Acer > Model: Aspire ES1-572 > BIOS vendor: Insyde Corp. > BIOS version: V1.16 > BIOS date: 09/18/2018 > > Thanks > > #regzbot introduced: 48fe2cddc85c > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-04 19:08 ` [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" Wysocki, Rafael J @ 2026-08-05 16:01 ` Rafael J. Wysocki (Intel) 2026-08-06 9:54 ` Julien 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki (Intel) @ 2026-08-05 16:01 UTC (permalink / raw) To: Wysocki, Rafael J Cc: Julien, regressions, jarkko, linux-integrity, Rafael J. Wysocki, linux-acpi@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1431 bytes --] On Tue, Aug 4, 2026 at 9:08 PM Wysocki, Rafael J <rafael.j.wysocki@intel.com> wrote: > > Hi, > > On 8/2/2026 2:54 PM, Julien wrote: > > Hello, > > > > Please keep in mind this is my first time reporting a Linux kernel > > regression. > > > > Since commit 48fe2cddc85c ("tpm_crb: Convert ACPI driver to a platform > > one"), my TPM device is no longer available. Both /dev/tpm0 and > > /dev/tpmrm0 are missing. > > > > Log messages: > > platform MSFT0101:00: failed to claim resource 1: [mem > > 0xfed40000-0xfed40fff] > > acpi MSFT0101:00: platform device creation failed: -16 > > > So there's no platform device for the driver to bind to. > > I think that these messages have been present in the kernel logs for > quite some time, but previously they were not connected to any > functional issues. > > > > I added some debug logging: > > ACPI resourcet[0] = [mem 0xfed40040-0xfed4103f flags 0x200] > > ACPI resourcet[1] = [mem 0xfed40000-0xfed40fff flags 0x200] > > > > I think the failure happens in kernel/resource.c: __insert_resource() > > because of the two memory regions overlapping. > > > This is quite plausible, but if that's the case, it should be fixable. > > Let me figure out something. Please try the attached patch and let me know how it goes. It applies on top of the current mainline, but it may be adjusted to older kernels, so please let me know if you need that. [-- Attachment #2: acpi-platform-adjust-resources.patch --] [-- Type: text/x-patch, Size: 1780 bytes --] --- drivers/acpi/acpi_platform.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -71,6 +71,39 @@ static struct notifier_block acpi_platfo .notifier_call = acpi_platform_device_remove_notify, }; +static void acpi_platform_adjust_resource(struct acpi_device *adev, + struct resource *new_res, + const struct resource *resources, + unsigned int count) +{ + unsigned int i; + + if (!(new_res->flags & (IORESOURCE_IO | IORESOURCE_MEM))) + return; + + for (i = 0; i < count; i++) { + const struct resource *res = &resources[i]; + + if (resource_type(new_res) != resource_type(res)) + continue; + + if (!resource_overlaps(new_res, res)) + continue; + + dev_info(&adev->dev, "Adjusting resource %pR to %pR\n", new_res, res); + /* + * Extend the new resource to include the one that has been + * processed already to avoid resource insertion failures during + * platform device registration. + */ + if (res->start < new_res->start) + new_res->start = res->start; + + if (res->end > new_res->end) + new_res->end = res->end; + } +} + static void acpi_platform_fill_resource(struct acpi_device *adev, const struct resource *src, struct resource *dest) { @@ -151,10 +184,12 @@ struct platform_device *acpi_create_plat return ERR_PTR(-ENOMEM); } count = 0; - list_for_each_entry(rentry, &resource_list, node) + list_for_each_entry(rentry, &resource_list, node) { + acpi_platform_adjust_resource(adev, rentry->res, + resources, count); acpi_platform_fill_resource(adev, rentry->res, &resources[count++]); - + } acpi_dev_free_resource_list(&resource_list); } } ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-05 16:01 ` Rafael J. Wysocki (Intel) @ 2026-08-06 9:54 ` Julien 2026-08-06 10:45 ` Rafael J. Wysocki (Intel) 0 siblings, 1 reply; 9+ messages in thread From: Julien @ 2026-08-06 9:54 UTC (permalink / raw) To: Rafael J. Wysocki (Intel) Cc: Wysocki, Rafael J, regressions, jarkko, linux-integrity, linux-acpi@vger.kernel.org > Please try the attached patch and let me know how it goes. > > It applies on top of the current mainline, but it may be adjusted to > older kernels, so please let me know if you need that. Thanks. The patch seems to be working. /dev/tpm0 and /dev/tpmrm0 are back and a command like tpm2_get_random 16 succeeds. > I think that these messages have been present in the kernel logs for > quite some time, but previously they were not connected to any > functional issues. You are right that the messages were already present before. I see them in the commit before "tpm_crb: Convert ACPI driver to a platform one". Here is what the logs say now: acpi MSFT0101:00: Adjusting resource [mem 0xfed4000-0xfed40fff] to [mem 0xfed40040-0xfed4103f] tpm_crb_acpi MSFT0101:00: [Firmware Bug]: Bad ACPI memory layout The second message was already there before too. I'm sorry for sending multiple times the same email. I'm still learning. On Wed, Aug 5, 2026 at 6:01 PM Rafael J. Wysocki (Intel) <rafael@kernel.org> wrote: > > On Tue, Aug 4, 2026 at 9:08 PM Wysocki, Rafael J > <rafael.j.wysocki@intel.com> wrote: > > > > Hi, > > > > On 8/2/2026 2:54 PM, Julien wrote: > > > Hello, > > > > > > Please keep in mind this is my first time reporting a Linux kernel > > > regression. > > > > > > Since commit 48fe2cddc85c ("tpm_crb: Convert ACPI driver to a platform > > > one"), my TPM device is no longer available. Both /dev/tpm0 and > > > /dev/tpmrm0 are missing. > > > > > > Log messages: > > > platform MSFT0101:00: failed to claim resource 1: [mem > > > 0xfed40000-0xfed40fff] > > > acpi MSFT0101:00: platform device creation failed: -16 > > > > > So there's no platform device for the driver to bind to. > > > > I think that these messages have been present in the kernel logs for > > quite some time, but previously they were not connected to any > > functional issues. > > > > > > > I added some debug logging: > > > ACPI resourcet[0] = [mem 0xfed40040-0xfed4103f flags 0x200] > > > ACPI resourcet[1] = [mem 0xfed40000-0xfed40fff flags 0x200] > > > > > > I think the failure happens in kernel/resource.c: __insert_resource() > > > because of the two memory regions overlapping. > > > > > This is quite plausible, but if that's the case, it should be fixable. > > > > Let me figure out something. > > Please try the attached patch and let me know how it goes. > > It applies on top of the current mainline, but it may be adjusted to > older kernels, so please let me know if you need that. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-06 9:54 ` Julien @ 2026-08-06 10:45 ` Rafael J. Wysocki (Intel) 2026-08-06 19:58 ` Rafael J. Wysocki (Intel) 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki (Intel) @ 2026-08-06 10:45 UTC (permalink / raw) To: Julien Cc: Rafael J. Wysocki (Intel), Wysocki, Rafael J, regressions, jarkko, linux-integrity, linux-acpi@vger.kernel.org On Thu, Aug 6, 2026 at 11:55 AM Julien <julien82453@gmail.com> wrote: > > > Please try the attached patch and let me know how it goes. > > > > It applies on top of the current mainline, but it may be adjusted to > > older kernels, so please let me know if you need that. > > Thanks. The patch seems to be working. /dev/tpm0 and /dev/tpmrm0 are > back and a command like tpm2_get_random 16 succeeds. > > > I think that these messages have been present in the kernel logs for > > quite some time, but previously they were not connected to any > > functional issues. > > You are right that the messages were already present before. I see > them in the commit before "tpm_crb: Convert ACPI driver to a platform > one". > > Here is what the logs say now: > acpi MSFT0101:00: Adjusting resource [mem 0xfed4000-0xfed40fff] to > [mem 0xfed40040-0xfed4103f] > tpm_crb_acpi MSFT0101:00: [Firmware Bug]: Bad ACPI memory layout > > The second message was already there before too. > > I'm sorry for sending multiple times the same email. I'm still learning. No worries. I sometimes do that too. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-06 10:45 ` Rafael J. Wysocki (Intel) @ 2026-08-06 19:58 ` Rafael J. Wysocki (Intel) 2026-08-07 10:45 ` Rafael J. Wysocki (Intel) 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki (Intel) @ 2026-08-06 19:58 UTC (permalink / raw) To: Julien Cc: Wysocki, Rafael J, regressions, jarkko, linux-integrity, linux-acpi@vger.kernel.org On Thu, Aug 6, 2026 at 12:45 PM Rafael J. Wysocki (Intel) <rafael@kernel.org> wrote: > > On Thu, Aug 6, 2026 at 11:55 AM Julien <julien82453@gmail.com> wrote: > > > > > Please try the attached patch and let me know how it goes. > > > > > > It applies on top of the current mainline, but it may be adjusted to > > > older kernels, so please let me know if you need that. > > > > Thanks. The patch seems to be working. /dev/tpm0 and /dev/tpmrm0 are > > back and a command like tpm2_get_random 16 succeeds. Please test the v2 of the patch at: https://lore.kernel.org/linux-acpi/12954206.O9o76ZdvQC@rafael.j.wysocki/ The v1 had an issue pointed out by Sashiko. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-06 19:58 ` Rafael J. Wysocki (Intel) @ 2026-08-07 10:45 ` Rafael J. Wysocki (Intel) 2026-08-07 12:26 ` Julien 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki (Intel) @ 2026-08-07 10:45 UTC (permalink / raw) To: Julien; +Cc: regressions, jarkko, linux-integrity, linux-acpi@vger.kernel.org On Thu, Aug 6, 2026 at 9:58 PM Rafael J. Wysocki (Intel) <rafael@kernel.org> wrote: > > On Thu, Aug 6, 2026 at 12:45 PM Rafael J. Wysocki (Intel) > <rafael@kernel.org> wrote: > > > > On Thu, Aug 6, 2026 at 11:55 AM Julien <julien82453@gmail.com> wrote: > > > > > > > Please try the attached patch and let me know how it goes. > > > > > > > > It applies on top of the current mainline, but it may be adjusted to > > > > older kernels, so please let me know if you need that. > > > > > > Thanks. The patch seems to be working. /dev/tpm0 and /dev/tpmrm0 are > > > back and a command like tpm2_get_random 16 succeeds. > > Please test the v2 of the patch at: > > https://lore.kernel.org/linux-acpi/12954206.O9o76ZdvQC@rafael.j.wysocki/ > > The v1 had an issue pointed out by Sashiko. And there is a v3 already: https://lore.kernel.org/linux-acpi/12955541.O9o76ZdvQC@rafael.j.wysocki/ so please test this one if possible. Thanks! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-07 10:45 ` Rafael J. Wysocki (Intel) @ 2026-08-07 12:26 ` Julien 2026-08-07 12:46 ` Rafael J. Wysocki (Intel) 0 siblings, 1 reply; 9+ messages in thread From: Julien @ 2026-08-07 12:26 UTC (permalink / raw) To: Rafael J. Wysocki (Intel) Cc: regressions, jarkko, linux-integrity, linux-acpi@vger.kernel.org On Fri, Aug 7, 2026 at 12:45 PM Rafael J. Wysocki (Intel) <rafael@kernel.org> wrote: > And there is a v3 already: > > https://lore.kernel.org/linux-acpi/12955541.O9o76ZdvQC@rafael.j.wysocki/ > > so please test this one if possible. > > Thanks! Yes it still works. The logs: MSFT0101:00: [mem 0xfed40000-0xfed4103f] expanded to avoid overlap tpm_crb_acpi MSFT0101:00: [Firmware Bug]: Bad ACPI memory layout ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-07 12:26 ` Julien @ 2026-08-07 12:46 ` Rafael J. Wysocki (Intel) 2026-08-10 15:34 ` Jarkko Sakkinen 0 siblings, 1 reply; 9+ messages in thread From: Rafael J. Wysocki (Intel) @ 2026-08-07 12:46 UTC (permalink / raw) To: Julien Cc: Rafael J. Wysocki (Intel), regressions, jarkko, linux-integrity, linux-acpi@vger.kernel.org On Fri, Aug 7, 2026 at 2:26 PM Julien <julien82453@gmail.com> wrote: > > On Fri, Aug 7, 2026 at 12:45 PM Rafael J. Wysocki (Intel) > <rafael@kernel.org> wrote: > > And there is a v3 already: > > > > https://lore.kernel.org/linux-acpi/12955541.O9o76ZdvQC@rafael.j.wysocki/ > > > > so please test this one if possible. > > > > Thanks! > > Yes it still works. > > The logs: > MSFT0101:00: [mem 0xfed40000-0xfed4103f] expanded to avoid overlap > tpm_crb_acpi MSFT0101:00: [Firmware Bug]: Bad ACPI memory layout Thanks for the confirmation! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" 2026-08-07 12:46 ` Rafael J. Wysocki (Intel) @ 2026-08-10 15:34 ` Jarkko Sakkinen 0 siblings, 0 replies; 9+ messages in thread From: Jarkko Sakkinen @ 2026-08-10 15:34 UTC (permalink / raw) To: Rafael J. Wysocki (Intel) Cc: Julien, regressions, linux-integrity, linux-acpi@vger.kernel.org On Fri, Aug 07, 2026 at 02:46:16PM +0200, Rafael J. Wysocki (Intel) wrote: > On Fri, Aug 7, 2026 at 2:26 PM Julien <julien82453@gmail.com> wrote: > > > > On Fri, Aug 7, 2026 at 12:45 PM Rafael J. Wysocki (Intel) > > <rafael@kernel.org> wrote: > > > And there is a v3 already: > > > > > > https://lore.kernel.org/linux-acpi/12955541.O9o76ZdvQC@rafael.j.wysocki/ > > > > > > so please test this one if possible. > > > > > > Thanks! > > > > Yes it still works. > > > > The logs: > > MSFT0101:00: [mem 0xfed40000-0xfed4103f] expanded to avoid overlap > > tpm_crb_acpi MSFT0101:00: [Firmware Bug]: Bad ACPI memory layout > > Thanks for the confirmation! I'll check your patch asap. Sorry for latency, it's the holiday season in Finland. BR, Jarkko ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-08-10 15:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAJOGg3z6LJPDsdPNBxajgy8_wQxfhYBRxe4EiurZf3kPU5A5Bw@mail.gmail.com>
2026-08-04 19:08 ` [REGRESSION] no TPM device after "tpm_crb: Convert ACPI driver to a platform one" Wysocki, Rafael J
2026-08-05 16:01 ` Rafael J. Wysocki (Intel)
2026-08-06 9:54 ` Julien
2026-08-06 10:45 ` Rafael J. Wysocki (Intel)
2026-08-06 19:58 ` Rafael J. Wysocki (Intel)
2026-08-07 10:45 ` Rafael J. Wysocki (Intel)
2026-08-07 12:26 ` Julien
2026-08-07 12:46 ` Rafael J. Wysocki (Intel)
2026-08-10 15:34 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox