From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4764412040460183133==" MIME-Version: 1.0 From: Will Deacon Subject: Re: [Devel] [PATCH] arm64: clean the additional checks before calling ghes_notify_sea() Date: Fri, 27 Jul 2018 11:06:18 +0100 Message-ID: <20180727100617.GB25592@arm.com> In-Reply-To: 1532638907-46129-1-git-send-email-gengdongjiu@huawei.com List-ID: To: devel@acpica.org --===============4764412040460183133== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 e= sr, struct pt_regs *regs) > = > int handle_guest_sea(phys_addr_t addr, unsigned int esr) > { > - int ret =3D -ENOENT; > - > - if (IS_ENABLED(CONFIG_ACPI_APEI_SEA)) > - ret =3D ghes_notify_sea(); > - > - return ret; > + return ghes_notify_sea(); > } > = > asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned in= t 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_h= est_generic_data *gdata) > (void *)section - (void *)(estatus + 1) < estatus->data_length; \ > section =3D 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 >=20 --===============4764412040460183133==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH] arm64: clean the additional checks before calling ghes_notify_sea() Date: Fri, 27 Jul 2018 11:06:18 +0100 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 Return-path: Content-Disposition: inline In-Reply-To: <1532638907-46129-1-git-send-email-gengdongjiu@huawei.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-acpi@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 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Fri, 27 Jul 2018 11:06:18 +0100 Subject: [PATCH] arm64: clean the additional checks before calling ghes_notify_sea() In-Reply-To: <1532638907-46129-1-git-send-email-gengdongjiu@huawei.com> References: <1532638907-46129-1-git-send-email-gengdongjiu@huawei.com> Message-ID: <20180727100617.GB25592@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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 >