From patchwork Fri Jul 13 00:34:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10522467 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 4823C6032C for ; Fri, 13 Jul 2018 00:33:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32FFB292D0 for ; Fri, 13 Jul 2018 00:33:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 242DC297F3; Fri, 13 Jul 2018 00:33:30 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE316292D0 for ; Fri, 13 Jul 2018 00:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M63p8oVwWcbuR46eyItCZi3jcQbyRtfzVoFRHyhL/Ek=; b=bp6u/3ti3VCm8b 2lQ1s3JFZteB6cAKXCG6FsTs39+GKc7/pkTsPd1rLF06bkte/t9SGWKcR6Hceu4C+XzjPFwTF2tDC MXTnNM9S3Y6xNhs6nTVdCSXAYzar9mueFs73WjKRBCKSLK2mm2l8+GRr4R2GMSmUSmokxrebA0h0q 9bPj2YodNAXRnkFMCeByLLSgt/2RhyxI9QDOWRJ3sCObWITQEx1b9tFB/cwki2jZhD3VL/ukC8XWi VbUoYLpnYK010WRZZ+kDfdUUqkXZ6XLmqn2EOOKDUMtbXhZSgpNpWT7NgwY3VHk4y3k37xwTWXGRD s9qxj+E3lKaHC5stKJOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdm1V-00035o-C3; Fri, 13 Jul 2018 00:33:25 +0000 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdm1S-0002ru-EH for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2018 00:33:24 +0000 Received: by mail-pl0-x244.google.com with SMTP id k1-v6so11377818plt.2 for ; Thu, 12 Jul 2018 17:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Br+Ut7Adx8WfxmtbhyErzhCOz+hxoNRE6rn4bCoOl6Y=; b=XseuU/ScbDlqDh/a/SDhgRypjR2J4tgn9O8osFn9eaPIhB3fuDCZMp1x6WCcwrBGkO 6YjKGC9LYEZEYlXMY3hXpIHs+2712SAV4/aK9MBrn5XYNi4AexMQXlXKtrbexKlxXMY+ cP2gwnceDH1CPmMVPrMEAh6cZrAbT8CT2LBNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Br+Ut7Adx8WfxmtbhyErzhCOz+hxoNRE6rn4bCoOl6Y=; b=m8NfEw8g9Qs7TipkdwSVRA5ueaGk39MZH8S1E2BIANL+OP4Uqs8AP4vkDt9KceyAnL T5hR1t693YoB7qfHRHd7KPOXzSBMb+XXDCglfji+F7w9Dt4Jm/4LQUAT/9QfOutsjjj6 ZbwiJ7JeJfgh7hyX5gc+I5+1v/NxtOd0TLL7B+3lffxm5sHZjN84zMAkg86evFrjfDYk kWKiG4/DQBKuz9AJxdcavF+QEgaS5h8wWgCu9rlarsjltc0De7HBuiS24BH+h/DuynDw gZc/mXG/MhI+t9Wbc2IfsEd5nbquaazyAwtpdbHH5+i+rDgRcCiqKv7ZDSo1GNQIfYyq e0ag== X-Gm-Message-State: AOUpUlFXnsPXXyPey24hN2wiYc6tyUt3O/0ts9EAi55C0K7YoofB2Qud DewEgk+An3hC6sCHwMT2qzKlRQ== X-Google-Smtp-Source: AAOMgpeR3fIKT0gAPz1A4UMTWTvYboCWGZjzcP9Wk622cOgH1FzkFY1cI1Tb+TWCfRIi0TyHh7W0vQ== X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr4199676plb.273.1531441991391; Thu, 12 Jul 2018 17:33:11 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id d188-v6sm41666859pfc.96.2018.07.12.17.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 17:33:10 -0700 (PDT) Date: Fri, 13 Jul 2018 09:34:36 +0900 From: AKASHI Takahiro To: Will Deacon Subject: Re: [PATCH v3.1 0/4] arm64: kexec,kdump: fix boot failures on acpi-only system Message-ID: <20180713003434.GZ28220@linaro.org> Mail-Followup-To: AKASHI Takahiro , Will Deacon , catalin.marinas@arm.com, ard.biesheuvel@linaro.org, tbaicar@codeaurora.org, bhsharma@redhat.com, dyoung@redhat.com, james.morse@arm.com, mark.rutland@arm.com, al.stone@linaro.org, graeme.gregory@linaro.org, hanjun.guo@linaro.org, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org References: <20180709234229.20181-1-takahiro.akashi@linaro.org> <20180712164918.GA26935@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180712164918.GA26935@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_173322_694915_F59E6AE2 X-CRM114-Status: GOOD ( 18.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, lorenzo.pieralisi@arm.com, graeme.gregory@linaro.org, al.stone@linaro.org, ard.biesheuvel@linaro.org, catalin.marinas@arm.com, bhsharma@redhat.com, tbaicar@codeaurora.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, james.morse@arm.com, hanjun.guo@linaro.org, sudeep.holla@arm.com, dyoung@redhat.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jul 12, 2018 at 05:49:19PM +0100, Will Deacon wrote: > Hi Akashi, > > On Tue, Jul 10, 2018 at 08:42:25AM +0900, AKASHI Takahiro wrote: > > This patch series is a set of bug fixes to address kexec/kdump > > failures which are sometimes observed on ACPI-only system and reported > > in LAK-ML before. > > I tried picking this up, along with Ard's fixup, but I'm seeing a build > failure for allmodconfig: > > arch/arm64/kernel/acpi.o: In function `__acpi_get_mem_attribute': > acpi.c:(.text+0x60): undefined reference to `efi_mem_attributes' > > I didn't investigate further. Please can you fix this? Because CONFIG_ACPI is on and CONFIG_EFI is off. This can happen in allmodconfig as CONFIG_EFI depends on !CONFIG_CPU_BIG_ENDIAN, which is actually on in this case. Looking at __acpi_get_mem_attributes(), since there is no information available on memory attributes, what we can do at best is * return PAGE_KERNEL (= cacheable) for mapped memory, * return DEVICE_nGnRnE (= non-cacheable) otherwise (See a hunk to be applied on top of my patch#4.) I think that, after applying, acpi_os_ioremap() would work almost in the same way as the original before my patchset given that MAP memblock attribute is used only under CONFIG_EFI for now. Make sense? -Takahiro AKASHI > Will ---8<--- diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index ed46dc188b22..cad3ed2666ef 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -238,6 +238,7 @@ void __init acpi_boot_table_init(void) pgprot_t __acpi_get_mem_attribute(phys_addr_t addr) { +#ifdef CONFIG_EFI /* * According to "Table 8 Map: EFI memory types to AArch64 memory * types" of UEFI 2.5 section 2.3.6.1, each EFI memory type is @@ -255,5 +256,9 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr) return __pgprot(PROT_NORMAL_WT); if (attr & EFI_MEMORY_WC) return __pgprot(PROT_NORMAL_NC); +#else + if (memblock_is_map_memory(addr)) + return PAGE_KERNEL; +#endif return __pgprot(PROT_DEVICE_nGnRnE); }