Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3594111imm; Mon, 6 Aug 2018 07:27:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdhSlCAiYCH4wC/ocrrhaLXqw+JhnLZE3Y7Yay65PIpBGkV/xtzJrY7nlcPv2aubfWMrB/y X-Received: by 2002:a63:5463:: with SMTP id e35-v6mr15002429pgm.115.1533565653797; Mon, 06 Aug 2018 07:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533565653; cv=none; d=google.com; s=arc-20160816; b=yxDy4fBUzh8aIGpK9pwr7WfsXGuOA1LhcnD5HTHtqzviGPZY8FDqcoS/vuudL0a8zE uvmP6BKo9PhEaNsK/090/wVeWj/KxCW2g1nvhq9N9+xu2KZ13MAKEdvZMq8ixQiFrRZd OxN11d+AGSGHNeHEdAQBbE3PThmXgFRyjQz1iOd902ppqXCPjBmo7aUTQb/MvC9hmz9h efxAct2dsE1wCIWzUkp8MbAw0eqDqZltRIb1jJ+zsydDW4zsqop1d7fzgI4sYq5woF9R UDSp1sX6pEVmWeMv04BKNfTBPeFP+cWPxJXXk8+40RxournN9BYRGJ4naF/srXyMoc9A 1yiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=9ARIkLiY11rDG9/rZ/cPO3BJiQ7xZmnfWQ/SzR+12wA=; b=vRk2O2r+C5KTKyu/eo+1eGCPnqBRn+uJBPIT+dyywXz4WfCedMNxgwRV3+HkwORJdS TmOWzyUwEQjW88F0miiLsysc9dDRZffDf/4wm5+3houyR2kP7BdBQUVxqFrKmOjmrTiK AdsTsicd7PHwmRukYDz/EtsDHgw01veArFO2FN4VEuFkP5acRFCTcOoeNebcJn2/lls2 sDfzTqs6naGLbOONvuiaB7r8MwFIP6x2CXzmLdKMtUZhWYXqjSlpLp++BtawqWLBnuQX h5qZaWnXsz427RMm9kQFR4PiIhSMuh7yXZM/TVUatyVb7n/HeyJcKMzpPr3ZUJOx3UzG V2/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13-v6si10681028pgp.560.2018.08.06.07.27.18; Mon, 06 Aug 2018 07:27:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732147AbeHFQfm (ORCPT + 99 others); Mon, 6 Aug 2018 12:35:42 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39856 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbeHFQfl (ORCPT ); Mon, 6 Aug 2018 12:35:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D1B387A9; Mon, 6 Aug 2018 07:26:20 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A24043F5D0; Mon, 6 Aug 2018 07:26:20 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 702621AE2D8E; Mon, 6 Aug 2018 15:26:24 +0100 (BST) Date: Mon, 6 Aug 2018 15:26:24 +0100 From: Will Deacon To: gengdongjiu Cc: Dongjiu Geng , Catalin Marinas , mark.rutland@arm.com, Len Brown , rafael.j.wysocki@intel.com, erik.schmauss@intel.com, robert.moore@intel.com, arm-mail-list , Linux Kernel Mailing List , linux-acpi@vger.kernel.org, devel@acpica.org Subject: Re: [PATCH] arm64: clean the additional checks before calling ghes_notify_sea() Message-ID: <20180806142623.GA15275@arm.com> References: <1532638907-46129-1-git-send-email-gengdongjiu@huawei.com> <20180727100617.GB25592@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 05, 2018 at 10:35:03AM +0800, gengdongjiu wrote: > 2018-07-27 18:06 GMT+08:00 Will Deacon : > > On Thu, Jul 26, 2018 at 05:01:47PM -0400, Dongjiu Geng wrote: > >> In order to remove the additional check before calling the > >> ghes_notify_sea(), make stub definition when !CONFIG_ACPI_APEI_SEA. > >> > >> Signed-off-by: Dongjiu Geng > >> --- > > > > Acked-by: Will Deacon > > Will, > This patch will be applied, right? thanks I haven't queued it in the arm64 tree, since it touches include/acpi/ghes.h and you don't have an ack from the acpi folks. I acked it so that you could route it via the acpi tree without me holding you up. Will > >> This cleanup is ever mentioned by Mark Rutland in [1] > >> > >> [1]: > >> https://lkml.org/lkml/2018/5/31/289 > >> --- > >> arch/arm64/mm/fault.c | 7 +------ > >> include/acpi/ghes.h | 4 ++++ > >> 2 files changed, 5 insertions(+), 6 deletions(-) > >> > >> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > >> index b8eecc7..9ffe01d 100644 > >> --- a/arch/arm64/mm/fault.c > >> +++ b/arch/arm64/mm/fault.c > >> @@ -727,12 +727,7 @@ static int do_sea(unsigned long addr, unsigned int esr, struct pt_regs *regs) > >> > >> int handle_guest_sea(phys_addr_t addr, unsigned int esr) > >> { > >> - int ret = -ENOENT; > >> - > >> - if (IS_ENABLED(CONFIG_ACPI_APEI_SEA)) > >> - ret = ghes_notify_sea(); > >> - > >> - return ret; > >> + return ghes_notify_sea(); > >> } > >> > >> asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, > >> diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h > >> index 1624e2b..82cb4eb 100644 > >> --- a/include/acpi/ghes.h > >> +++ b/include/acpi/ghes.h > >> @@ -118,6 +118,10 @@ static inline void *acpi_hest_get_next(struct acpi_hest_generic_data *gdata) > >> (void *)section - (void *)(estatus + 1) < estatus->data_length; \ > >> section = acpi_hest_get_next(section)) > >> > >> +#ifdef CONFIG_ACPI_APEI_SEA > >> int ghes_notify_sea(void); > >> +#else > >> +static inline int ghes_notify_sea(void) { return -ENOENT; } > >> +#endif > >> > >> #endif /* GHES_H */ > >> -- > >> 1.9.1 > >>