From patchwork Tue Jan 10 09:41:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9506829 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 736E9601E9 for ; Tue, 10 Jan 2017 09:41:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 621A828423 for ; Tue, 10 Jan 2017 09:41:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5572E28458; Tue, 10 Jan 2017 09:41:29 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 DC93A28423 for ; Tue, 10 Jan 2017 09:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759513AbdAJJl1 (ORCPT ); Tue, 10 Jan 2017 04:41:27 -0500 Received: from mail.skyhub.de ([78.46.96.112]:48941 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751647AbdAJJl0 (ORCPT ); Tue, 10 Jan 2017 04:41:26 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aku5LrdaoCP6; Tue, 10 Jan 2017 10:41:25 +0100 (CET) Received: from pd.tnic (pD9F6AF83.dip0.t-ipconnect.de [217.246.175.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id BB3BC245A8D; Tue, 10 Jan 2017 10:41:24 +0100 (CET) Received: by pd.tnic (Postfix, from userid 1000) id 3EF67160A45; Tue, 10 Jan 2017 10:41:22 +0100 (CET) Date: Tue, 10 Jan 2017 10:41:22 +0100 From: Borislav Petkov To: "Rafael J. Wysocki" Cc: "Paul E. McKenney" , "Zheng, Lv" , "Wysocki, Rafael J" , "Moore, Robert" , J?rg R?del , lkml , Linux ACPI Subject: Re: 174cc7187e6f ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel Message-ID: <20170110094122.hpg4sluemkzomeiw@pd.tnic> References: <20170108130355.vxhjmj6dlkqw6hyq@pd.tnic> <1AE640813FDE7649BE1B193DEA596E886CE27B7E@SHSMSX101.ccr.corp.intel.com> <1AE640813FDE7649BE1B193DEA596E886CE27BEE@SHSMSX101.ccr.corp.intel.com> <20170109093329.jd7uwlcpci4icpd3@pd.tnic> <20170109221831.GC3800@linux.vnet.ibm.com> <20170109231501.xrhwsv46mznw3kqt@pd.tnic> <20170109233204.GG3800@linux.vnet.ibm.com> <20170109234039.mfefmv5dv4shxnfn@pd.tnic> <20170109235211.yetponvbexvalkir@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20161014 (1.7.1) 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 Tue, Jan 10, 2017 at 02:27:16AM +0100, Rafael J. Wysocki wrote: > Well, if the https://patchwork.kernel.org/patch/9504277/ patch from Lv > worked, the attached one should work too (please test), but it can be > justified in a slightly more convincing way. No workie: The pr_err() gets issued before the box hangs. Lv's version which set the bool in acpi_os_map_generic_address() did work though. diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 57fb5f4..acb6118 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -378,7 +378,11 @@ static void acpi_os_drop_map_ref(struct acpi_ioremap *map) static void acpi_os_map_cleanup(struct acpi_ioremap *map) { if (!map->refcount) { - synchronize_rcu_expedited(); + if (acpi_os_initialized) { + pr_err("%s: acpi_os_initialized\n", __func__); + synchronize_rcu_expedited(); + } + acpi_unmap(map->phys, map->virt); kfree(map); }