Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp617963imm; Fri, 27 Jul 2018 03:07:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcMaCsXyZpKcWkJX7T9/S5vE/bXjF6w1f2ZPqEBU+LOQPfYhr+Eg6CP6mVzlhczQNHDdCeZ X-Received: by 2002:a63:3c0c:: with SMTP id j12-v6mr5455551pga.440.1532686077310; Fri, 27 Jul 2018 03:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532686077; cv=none; d=google.com; s=arc-20160816; b=oyASkT+6yVHC29NvTI8YUy8kS2mviSrQYxbv1zo0ag8F3Savm8KnjI7/UZ5o2gYSn7 z8UAXREN2nfGBEn3IhW/19zpD3CIGCrkBtCIA0jen6+cIXvW4YqEmYy6UDiRpeJlPUMW J9eK8/QM2FnjIzgM7Tmjo1foeyAhC2YGgIU78nGot1DtqewqFxfm4a4FY4AfmQtIWaGp wQd5Pl0nZnPmlVkU+QE+8jhYoCtQ6pJOR2zMJECC0mdNYV3K4N+DhzeqqJj/rRSAmggQ ypeEhu/4mDL4M1QvhUN5TyxgZ3XomMoqmiUyZ2BmbLZVJdEWy3DGU123kMigIWAY7vnr FoJQ== 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=DkAowEktl+hD70O9C2S/WALrpiFaLbxdhDJ9gT4+uMo=; b=Gf8UiL5gPadZyxys9UwBpEaOqYHeisK9Ayzlch3ySIXLQqoJcYTKTsmRaZt/SBhmBf Yo9vP/0mUlsMIuilOahU1rKU0TgogrH+EjWXB2yafaATXPwO4Y4FFQH0U9fCIRJDojYq zhop92U9guU0BQpC3NB8Zspk0XntkFe9hrBoaMcso+QECwcdibLUlhFOsOz8/ldzY4wj 29DZv48edyqjh3LkbeDRYEnpxYJIiykgkHhCRFOfe7kPqjanuUU5WpxkaIuNZM7e1+vd B6JsKzWRI4eFCtYS51r8NjRob2fq1JmxJYNlu+cODOhDtAiv+QgsFeqiMYI9Wp5wMN4Z q6VA== 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 i28-v6si3747668pfi.105.2018.07.27.03.07.42; Fri, 27 Jul 2018 03:07:57 -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 S2388967AbeG0L13 (ORCPT + 99 others); Fri, 27 Jul 2018 07:27:29 -0400 Received: from foss.arm.com ([217.140.101.70]:40594 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732111AbeG0L12 (ORCPT ); Fri, 27 Jul 2018 07:27:28 -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 0DDA515AD; Fri, 27 Jul 2018 03:06:18 -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 D29D33F575; Fri, 27 Jul 2018 03:06:17 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 564FD1AE13AE; Fri, 27 Jul 2018 11:06:18 +0100 (BST) Date: Fri, 27 Jul 2018 11:06:18 +0100 From: Will Deacon To: Dongjiu Geng Cc: catalin.marinas@arm.com, mark.rutland@arm.com, lenb@kernel.org, rafael.j.wysocki@intel.com, erik.schmauss@intel.com, robert.moore@intel.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org Subject: Re: [PATCH] arm64: clean the additional checks before calling ghes_notify_sea() Message-ID: <20180727100617.GB25592@arm.com> References: <1532638907-46129-1-git-send-email-gengdongjiu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1532638907-46129-1-git-send-email-gengdongjiu@huawei.com> 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 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 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 >