From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949AbdBUQxN (ORCPT ); Tue, 21 Feb 2017 11:53:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41024 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbdBUQxF (ORCPT ); Tue, 21 Feb 2017 11:53:05 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8F789609C6 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org Subject: Re: [PATCH V10 05/10] acpi: apei: handle SEA notification type for ARMv8 To: Ard Biesheuvel References: <1487188282-2568-1-git-send-email-tbaicar@codeaurora.org> <1487188282-2568-6-git-send-email-tbaicar@codeaurora.org> Cc: Christoffer Dall , Marc Zyngier , Paolo Bonzini , rkrcmar@redhat.com, Russell King , Catalin Marinas , Will Deacon , "Rafael J. Wysocki" , Len Brown , Matt Fleming , Robert Moore , Lv Zheng , nkaje@codeaurora.org, "Jonathan (Zhixiong) Zhang" , Mark Rutland , James Morse , Andrew Morton , eun.taik.lee@samsung.com, sandeepa.s.prabhu@gmail.com, Laura Abbott , shijie.huang@arm.com, Richard Ruigrok , Paul Gortmaker , Tomasz Nowicki , Fu Wei , Steven Rostedt , bristot@redhat.com, "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , KVM devel mailing list , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-efi@vger.kernel.org" , devel@acpica.org, "Suzuki K. Poulose" , Punit Agrawal , astone@redhat.com, harba@codeaurora.org, Hanjun Guo , john.garry@huawei.com, shiju.jose@huawei.com From: "Baicar, Tyler" Message-ID: <8c6130c4-7ccd-1f8a-7c7b-7d097f9b298a@codeaurora.org> Date: Tue, 21 Feb 2017 09:52:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Ard, On 2/16/2017 11:32 AM, Ard Biesheuvel wrote: > On 15 February 2017 at 19:51, Tyler Baicar wrote: >> ARM APEI extension proposal added SEA (Synchronous External Abort) >> notification type for ARMv8. >> Add a new GHES error source handling function for SEA. If an error >> source's notification type is SEA, then this function can be registered >> into the SEA exception handler. That way GHES will parse and report >> SEA exceptions when they occur. >> An SEA can interrupt code that had interrupts masked and is treated as >> an NMI. To aid this the page of address space for mapping APEI buffers >> while in_nmi() is always reserved, and ghes_ioremap_pfn_nmi() is >> changed to use the helper methods to find the prot_t to map with in >> the same way as ghes_ioremap_pfn_irq(). >> >> Signed-off-by: Tyler Baicar >> Signed-off-by: Jonathan (Zhixiong) Zhang >> Signed-off-by: Naveen Kaje >> --- >> arch/arm64/Kconfig | 2 ++ >> arch/arm64/mm/fault.c | 13 ++++++++ >> drivers/acpi/apei/Kconfig | 14 +++++++++ >> drivers/acpi/apei/ghes.c | 77 +++++++++++++++++++++++++++++++++++++++++++---- >> include/acpi/ghes.h | 7 +++++ >> 5 files changed, 107 insertions(+), 6 deletions(-) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 1117421..8557556 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> >> @@ -498,6 +500,17 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs) >> pr_err("Synchronous External Abort: %s (0x%08x) at 0x%016lx\n", >> fault_name(esr), esr, addr); >> >> + /* >> + * Synchronous aborts may interrupt code which had interrupts masked. >> + * Before calling out into the wider kernel tell the interested >> + * subsystems. >> + */ >> + if(IS_ENABLED(HAVE_ACPI_APEI_SEA)) { > Missing space after 'if' I'll add that in. >> + nmi_enter(); >> + ghes_notify_sea(); >> + nmi_exit(); >> + } >> + >> info.si_signo = SIGBUS; >> info.si_errno = 0; >> info.si_code = 0; >> diff --git a/drivers/acpi/apei/Kconfig b/drivers/acpi/apei/Kconfig >> index b0140c8..ef7f7bd 100644 >> --- a/drivers/acpi/apei/Kconfig >> +++ b/drivers/acpi/apei/Kconfig >> @@ -4,6 +4,20 @@ config HAVE_ACPI_APEI >> config HAVE_ACPI_APEI_NMI >> bool >> >> +config HAVE_ACPI_APEI_SEA > HAVE_xxx Kconfig options are typically non user selectable, so I > suggest to drop the HAVE_ prefix here. Also, you should probably make > it 'default y' rather than select it elsewhere; this will still honour > the dependency on ARM64 && ACPI_APEI_GHES > Okay, I will drop the HAVE_ and add in the default y Thanks, Tyler -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.