diff mbox

174cc7187e6f ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel

Message ID CAJZ5v0jgdctHEEOaAUBNZZPb=ni_DLdkJtmiDkvVP4WQUYr3rA@mail.gmail.com
State New
Headers show

Commit Message

Rafael J. Wysocki Jan. 8, 2017, 12:52 a.m. UTC
On Sun, Jan 8, 2017 at 1:37 AM, Borislav Petkov <bp@alien8.de> wrote:
> On Sun, Jan 08, 2017 at 01:22:55AM +0100, Rafael J. Wysocki wrote:

>> Is an IVRS table actually present on this machine?

>

> Like this?

>

> [    0.000000] ACPI: IVRS 0x000000009CFD6000 0000D0 (v02 AMD    AGESA    00000001 AMD  00000000)


Yup.

So we get the table, but apparently we crash when we attempt to put it.

Let's try to check the obvious just to rule it out (see attached), but
honestly I'm not sure what's going on in there.

Thanks,
Rafael

Comments

Borislav Petkov Jan. 8, 2017, 1:01 a.m. UTC | #1
On Sun, Jan 08, 2017 at 01:52:50AM +0100, Rafael J. Wysocki wrote:
> So we get the table, but apparently we crash when we attempt to put it.


Right, except on 4.10-rc2 we don't crash but we freeze early. These are
the last lines:

...
[    0.004778] mce: CPU supports 7 MCE banks
[    0.004861] LVT offset 1 assigned for vector 0xf9
[    0.004945] Last level iTLB entries: 4KB 512, 2MB 1024, 4MB 512
[    0.005025] Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 512, 1GB 0
[    0.005165] Freeing SMP alternatives memory: 24K
[    0.211154] ftrace: allocating 25022 entries in 98 pages
[    0.219614] smpboot: Max logical packages: 2
<EOF>

> Let's try to check the obvious just to rule it out (see attached), but

> honestly I'm not sure what's going on in there.


No change, same freeze.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Jan. 8, 2017, 1:45 a.m. UTC | #2
On Sun, Jan 8, 2017 at 2:01 AM, Borislav Petkov <bp@alien8.de> wrote:
> On Sun, Jan 08, 2017 at 01:52:50AM +0100, Rafael J. Wysocki wrote:

>> So we get the table, but apparently we crash when we attempt to put it.

>

> Right, except on 4.10-rc2 we don't crash but we freeze early. These are

> the last lines:

>

> ...

> [    0.004778] mce: CPU supports 7 MCE banks

> [    0.004861] LVT offset 1 assigned for vector 0xf9

> [    0.004945] Last level iTLB entries: 4KB 512, 2MB 1024, 4MB 512

> [    0.005025] Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 512, 1GB 0

> [    0.005165] Freeing SMP alternatives memory: 24K

> [    0.211154] ftrace: allocating 25022 entries in 98 pages

> [    0.219614] smpboot: Max logical packages: 2

> <EOF>

>

>> Let's try to check the obvious just to rule it out (see attached), but

>> honestly I'm not sure what's going on in there.

>

> No change, same freeze.


I was afraid that that would be the case.

Can you try to comment out the acpi_put_table() in
early_amd_iommu_init() and see if that makes any difference?

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch


---
 drivers/iommu/amd_iommu_init.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-pm/drivers/iommu/amd_iommu_init.c
===================================================================
--- linux-pm.orig/drivers/iommu/amd_iommu_init.c
+++ linux-pm/drivers/iommu/amd_iommu_init.c
@@ -2337,8 +2337,10 @@  static int __init early_amd_iommu_init(v
 
 out:
 	/* Don't leak any ACPI memory */
-	acpi_put_table(ivrs_base);
-	ivrs_base = NULL;
+	if (ivrs_base) {
+		acpi_put_table(ivrs_base);
+		ivrs_base = NULL;
+	}
 
 	return ret;
 }
@@ -2372,7 +2374,8 @@  static bool detect_ivrs(void)
 		return false;
 	}
 
-	acpi_put_table(ivrs_base);
+	if (ivrs_base)
+		acpi_put_table(ivrs_base);
 
 	/* Make sure ACS will be enabled during PCI probe */
 	pci_request_acs();