From patchwork Mon Aug 22 21:04:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 1086412 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7ML456C015900 for ; Mon, 22 Aug 2011 21:04:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663Ab1HVVEE (ORCPT ); Mon, 22 Aug 2011 17:04:04 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:64541 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535Ab1HVVED (ORCPT ); Mon, 22 Aug 2011 17:04:03 -0400 Received: by yie30 with SMTP id 30so3882814yie.19 for ; Mon, 22 Aug 2011 14:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/OhSGBgI0xX37T3n4vzd7pg6HzunMHk6Y0Di0FqMaVI=; b=kRQIo1940rv2ZWBt24BSwQ5SVvnFdBV/uPP1UsPAIMmNUC2gSUqw3RXah3uaI1FRk/ jey9A35vk30JLdngNUZShNH6E+0DtpC70FiS/bThgoniIX1NoZGhvq25nS1wt5PBXRUV hQqU4eXltbQU5vAL9TTY2UXZ5jAQEyDoNAAdg= MIME-Version: 1.0 Received: by 10.236.187.74 with SMTP id x50mr17431712yhm.76.1314047042995; Mon, 22 Aug 2011 14:04:02 -0700 (PDT) Received: by 10.236.95.9 with HTTP; Mon, 22 Aug 2011 14:04:02 -0700 (PDT) In-Reply-To: References: <4E520149.3010802@intel.com> Date: Mon, 22 Aug 2011 14:04:02 -0700 Message-ID: Subject: Re: APEI: Can not request iomem region for GARs From: Yinghai Lu To: Bjorn Helgaas Cc: Huang Ying , Pavel Ivanov , linux-kernel , "linux-acpi@vger.kernel.org" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 22 Aug 2011 21:04:05 +0000 (UTC) On Mon, Aug 22, 2011 at 9:45 AM, Bjorn Helgaas wrote: > On Mon, Aug 22, 2011 at 1:12 AM, Huang Ying wrote: >> Do you have time to try the patch attached with the mail? >> acpi_nvs.patch should go first. > > In this case, we have an ACPI NVS region, and the APEI code is > essentially a driver for some registers that reside there.  APEI is > the entity that manages those registers, and it needs to enforce > mutual exclusion so nobody else touches them behind its back, so I > think it makes sense for it to request the register regions and mark > them busy. > > My proposal is to change e820 so it either leaves ACPI NVS out of the > iomem_resource tree or puts it in but leaves it non-busy. assume Huang Ying only tested with UEFI native boot? i have one local patch for legacy mode booting, and it's similar to what Bjorn suggested. Please check the attached patch. Thanks Yinghai Lu Subject: [PATCH] x86: allow NVS can be accessed by driver APEI related... Signed-off-by: Yinghai Lu --- arch/x86/kernel/e820.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6/arch/x86/kernel/e820.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/e820.c +++ linux-2.6/arch/x86/kernel/e820.c @@ -995,7 +995,8 @@ void __init e820_reserve_resources(void) * pcibios_resource_survey() */ if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) { - res->flags |= IORESOURCE_BUSY; + if (e820.map[i].type != E820_NVS) + res->flags |= IORESOURCE_BUSY; insert_resource(&iomem_resource, res); } res++;