From patchwork Sun Jan 8 02:20:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 90297 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp308470qgi; Sat, 7 Jan 2017 18:20:25 -0800 (PST) X-Received: by 10.84.138.3 with SMTP id 3mr182116198plo.108.1483842025441; Sat, 07 Jan 2017 18:20:25 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d198si84350709pga.322.2017.01.07.18.20.25; Sat, 07 Jan 2017 18:20:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933281AbdAHCUW (ORCPT + 7 others); Sat, 7 Jan 2017 21:20:22 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:32921 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933053AbdAHCUV (ORCPT ); Sat, 7 Jan 2017 21:20:21 -0500 Received: by mail-oi0-f66.google.com with SMTP id j15so7109665oih.0; Sat, 07 Jan 2017 18:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=rCkIj+F98q6U5QywbzpidIoE69EBsG0qipxDGzWC39Y=; b=Gneoc3ppFJA9F1dE2z7abGNIdLDZNkct81Kj/YOSSQTNVU1CDz4UwebUhzSsNVTFyI 2ZXGLSpksXaDfNho/xel5o1fRg0XCTpcrQlAasYi4bqDg9DfjOwCY2zjxYftUTTHeEr0 FXXAT2io+/ZC2/eZlwneOqLG1u1WgW4wt1J8WCr3mUl8B6mxvDthvt1XZ9lvGoxeVdXZ 6s3I+84rue+OAWycYbJjQ5wNt1vF8dMplkTPKR5nHBoI/X2NJ6uqxVf1fxo8PVZSuA7a Vi61jW1LhcMB4qYlsycagI1sZmFZOANU+H5q3o67xeMQasF7AbtdrSY/fWIcDl7RdP+G Xniw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=rCkIj+F98q6U5QywbzpidIoE69EBsG0qipxDGzWC39Y=; b=Wzt2kQbsk9VYzC2DPQSui9CPIDNjod1v0L9YGtg1WhNaev7/lUgLH8z/h7HQPrCz58 IeS7C3YyAgTPUE7x6LubTK15dpRAYhokvf40yXe2pxDk8P1DcIWVriNEZpcVG1bMuBpj 0yBBZWcwzMjh0BfLFDU4tG+L3jWhGlI8GzoKhu+CNEnOYLNdp+ldtlH0Ve1gcBiaChnT kB5uhsEcr0vmQ5ykEKoIwkFlVX1+b5ZVrmqmdhaC9ZC+NG4jcE6xieZi8oJ4VCQd/tzq RZaK0zzN2gkQvjF0SzpXgsL1+1onzXtCWiCsG3C6in12ukH4v/xJZXDElyZnI7FaYJyN mGOQ== X-Gm-Message-State: AIkVDXIQ5yUz8/QR1dcCFa9y67qEKqZjPuYeXVqydfzTFEu9nNLYp0uydsbKa6pzA1zcoPk94YopO4Dl6yo0gQ== X-Received: by 10.202.199.133 with SMTP id x127mr35282524oif.56.1483842020476; Sat, 07 Jan 2017 18:20:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.12.152 with HTTP; Sat, 7 Jan 2017 18:20:20 -0800 (PST) In-Reply-To: References: <20170107204227.bwdb5yzrjpiggkmo@pd.tnic> <4034dde8-ffc1-18e2-f40c-00cf37471793@intel.com> <20170108000702.wrov5ajeou2y3tuy@pd.tnic> <20170108003730.hlcqkhdxtah65z66@pd.tnic> <20170108010158.b62eovaxsbmhfnkb@pd.tnic> From: "Rafael J. Wysocki" Date: Sun, 8 Jan 2017 03:20:20 +0100 X-Google-Sender-Auth: 8DP-0A5Q0Lfc54_pEiAXlU_s_Tg Message-ID: Subject: Re: 174cc7187e6f ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel To: "Rafael J. Wysocki" Cc: Borislav Petkov , "Rafael J. Wysocki" , Lv Zheng , Bob Moore , =?UTF-8?B?SsO2cmcgUsO2ZGVs?= , lkml , Linux ACPI Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Sun, Jan 8, 2017 at 2:45 AM, Rafael J. Wysocki wrote: > On Sun, Jan 8, 2017 at 2:01 AM, Borislav Petkov 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 >> >> >>> 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? Well, there is a bug in early_amd_iommu_init() that may matter in theory if the table checksum is incorrect. Please see if the attached makes any difference. Thanks, Rafael Reviewed-by: Borislav Petkov --- drivers/iommu/amd_iommu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ -2230,7 +2230,7 @@ static int __init early_amd_iommu_init(v */ ret = check_ivrs_checksum(ivrs_base); if (ret) - return ret; + goto out; amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base); DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);