From patchwork Thu Jan 5 00:07:03 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: 9498083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34A01606B4 for ; Thu, 5 Jan 2017 00:07:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 208C42818A for ; Thu, 5 Jan 2017 00:07:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14C882832B; Thu, 5 Jan 2017 00:07:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID,T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 885DA2818A for ; Thu, 5 Jan 2017 00:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032054AbdAEAHF (ORCPT ); Wed, 4 Jan 2017 19:07:05 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33219 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032052AbdAEAHE (ORCPT ); Wed, 4 Jan 2017 19:07:04 -0500 Received: by mail-oi0-f65.google.com with SMTP id f201so76984014oib.0; Wed, 04 Jan 2017 16:07:04 -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=Qo+yZ4wfbRzpQS1GMqc1pyjMtq2uixwEmV4tI7uxu3A=; b=qg/aDqL5yH7ekg3+BuebCe5aphO7OhsJPoqky98T7fStGFilKZGlqsm6eyH+oKcKMv Rgl4hrSxH6RnJ3SFwDn/H0l6dLM2mMtEtwwxeXFrLq14H2S+wx8TDBVNEqOe6aZy+23k iDwkAzwHDH64RH7atXItDSdE2zpXwl5zX8/NVqAtP+w9wVTMsoiH5K7/uPW5iFEwTzNg prRJCjOAvqK/CczwZz5a07aUn80XFFI4Vy11BVD25S9jTkxi2iOxCcS17496eX8yXF7h rrDRKVcT4Atkp3jwB/vBXUNtbzkh6RRd+BpY+pqIlTubQVT8hz+Y8081zufdJJ/NWSO1 4amw== 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=Qo+yZ4wfbRzpQS1GMqc1pyjMtq2uixwEmV4tI7uxu3A=; b=ZCf5FVYmoGU0kHuWJAnKTFR6PTtONDoITm06gcaIdT7id+bIGG49Y2XS75Bp7WelTJ atK4vLr7oRu8Z8fl1puFxHm7oCED/VQyTvYw5ddHnaxDm88IySLnk5zlny4cilb9wB/o S8qrjlA1GPwie5dcRdcOCSZlPK5yZkhHHe7JjooJSLJwYmC4mNfZ9oPkfrZFWYguWfpd AU5f8jdYTtgOPpx0fKL1RyBu1GlSiDIk91ZsFUlIexwUz7bxCknEqFAdzQHQDxLnvogg 7BIAd7pJWiwgamwIm2sdWh8iIvNdeUbOjZSSwH1hdE8Dp/enstMV9FpC9IKc15R/L+br 31DA== X-Gm-Message-State: AIkVDXKb5yoNMGQchZjHysrlncaWfuaejDNDf5s833zDw+EdLrJGLh1jrKfQZFKmdSCNBIzmm0ybwRQOx92EXg== X-Received: by 10.157.27.112 with SMTP id l103mr30907043otl.196.1483574823601; Wed, 04 Jan 2017 16:07:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.12.152 with HTTP; Wed, 4 Jan 2017 16:07:03 -0800 (PST) In-Reply-To: References: From: "Rafael J. Wysocki" Date: Thu, 5 Jan 2017 01:07:03 +0100 X-Google-Sender-Auth: acv45jvHPl821OkDpqPTAKKkMs4 Message-ID: Subject: Re: [GIT PULL] More ACPI updates for v4.10-rc1 To: Linus Torvalds Cc: "Rafael J. Wysocki" , Lv Zheng , Bob Moore , Linux Kernel Mailing List , ACPI Devel Maling List Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jan 5, 2017 at 12:46 AM, Linus Torvalds wrote: > On Wed, Jan 4, 2017 at 3:19 PM, Linus Torvalds > wrote: >> >> This is my normal desktop, so pretty plain HW. >> >> It doesn't happen on my laptop, so it's obviously hw-related or >> possibly config-related. > > .. and here's the stack trace. Thanks! I reproduced it too in the meantime (but on an older system I rarely use). > Side note: should the '\n' be deleted? ACPI_ERROR() seems to add that > silly "where it happened" at the end, but due to the '\n' we end up > with two lines... > > Linus > > --- > > ACPI Warning: Table ffffffffb0e6c0a0, Validation count is zero > before decrement > (20160930/tbutils-456) > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 0 at drivers/acpi/acpica/tbutils.c:457 > acpi_tb_put_table+0x4e/0x62 > Modules linked in: > CPU: 0 PID: 0 Comm: swapper Not tainted > 4.10.0-rc2-00103-g4cf184638bcf-dirty #1 > Hardware name: System manufacturer System Product Name/Z170-K, BIOS > 1803 05/06/2016 > Call Trace: > acpi_tb_put_table+0x4e/0x62 > acpi_put_table+0x40/0x4d > detect_intel_iommu+0x9d/0xed > pci_iommu_alloc+0x50/0x6c > mem_init+0xf/0x8a > start_kernel+0x21e/0x454 > x86_64_start_reservations+0x24/0x26 > x86_64_start_kernel+0x182/0x193 > start_cpu+0x14/0x14 > ---[ end trace 5e897a808e950ddc ]--- And the attached thing makes it go away for me. I'll post a proper patch shorlty. Cheers, Rafael --- drivers/iommu/dmar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: linux-pm/drivers/iommu/dmar.c =================================================================== --- linux-pm.orig/drivers/iommu/dmar.c +++ linux-pm/drivers/iommu/dmar.c @@ -903,8 +903,10 @@ int __init detect_intel_iommu(void) x86_init.iommu.iommu_init = intel_iommu_init; #endif - acpi_put_table(dmar_tbl); - dmar_tbl = NULL; + if (dmar_tbl) { + acpi_put_table(dmar_tbl); + dmar_tbl = NULL; + } up_write(&dmar_global_lock); return ret ? 1 : -ENODEV;