LKML Archive on lore.kernel.org
 help / Atom feed
* [PATCH RESEND v2] arm64: clean the additional checks before calling ghes_notify_sea()
@ 2018-08-07 16:26 Dongjiu Geng
  2018-08-09 12:32 ` gengdongjiu
  0 siblings, 1 reply; 4+ messages in thread
From: Dongjiu Geng @ 2018-08-07 16:26 UTC (permalink / raw)
  To: will.deacon, rafael.j.wysocki, james.morse, tbaicar,
	linux-arm-kernel, linux-kernel, linux-acpi, devel, linuxarm
  Cc: gengdongjiu

In order to remove the additional check before calling the
ghes_notify_sea(), make stub definition when !CONFIG_ACPI_APEI_SEA.

After this cleanup, we can simply call the ghes_notify_sea() to let
APEI driver handle the SEA notification.

CC: Tyler Baicar <tbaicar@codeaurora.org>
CC: James Morse <james.morse@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Acked-by: Will Deacon <will.deacon@arm.com>
---
This cleanup is ever mentioned by Mark Rutland in [1]

[1]:
https://lkml.org/lkml/2018/5/31/289

Change since v1:
1. Update the commit messages
2. CC Tyler and James
3. Add Acked-by of Will
---
 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND v2] arm64: clean the additional checks before calling ghes_notify_sea()
  2018-08-07 16:26 [PATCH RESEND v2] arm64: clean the additional checks before calling ghes_notify_sea() Dongjiu Geng
@ 2018-08-09 12:32 ` gengdongjiu
       [not found]   ` <CABo9ajBKEWmgh6tBbUnrY8zM3vAH+TKWwBHn-Vz556Up+614Zw@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: gengdongjiu @ 2018-08-09 12:32 UTC (permalink / raw)
  To: Dongjiu Geng
  Cc: Borislav Petkov, Will Deacon, rafael.j.wysocki, James Morse,
	Tyler Baicar, arm-mail-list, Linux Kernel Mailing List,
	linux-acpi, devel, linuxarm

CC Borislav


2018-08-08 0:26 GMT+08:00 Dongjiu Geng <gengdongjiu@huawei.com>:
> In order to remove the additional check before calling the
> ghes_notify_sea(), make stub definition when !CONFIG_ACPI_APEI_SEA.
>
> After this cleanup, we can simply call the ghes_notify_sea() to let
> APEI driver handle the SEA notification.
>
> CC: Tyler Baicar <tbaicar@codeaurora.org>
> CC: James Morse <james.morse@arm.com>
> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
> Acked-by: Will Deacon <will.deacon@arm.com>
> ---
> This cleanup is ever mentioned by Mark Rutland in [1]
>
> [1]:
> https://lkml.org/lkml/2018/5/31/289
>
> Change since v1:
> 1. Update the commit messages
> 2. CC Tyler and James
> 3. Add Acked-by of Will
> ---
>  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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND v2] arm64: clean the additional checks before calling ghes_notify_sea()
       [not found]   ` <CABo9ajBKEWmgh6tBbUnrY8zM3vAH+TKWwBHn-Vz556Up+614Zw@mail.gmail.com>
@ 2018-08-09 22:16     ` gengdongjiu
  2018-08-10  2:14       ` Tyler Baicar
  0 siblings, 1 reply; 4+ messages in thread
From: gengdongjiu @ 2018-08-09 22:16 UTC (permalink / raw)
  To: Tyler Baicar
  Cc: Dongjiu Geng, Borislav Petkov, Will Deacon, rafael.j.wysocki,
	James Morse, Tyler Baicar, arm-mail-list,
	Linux Kernel Mailing List, linux-acpi, devel

2018-08-10 5:05 GMT+08:00 Tyler Baicar <baicar.tyler@gmail.com>:
> On Thu, Aug 9, 2018 at 8:32 AM, gengdongjiu <gengdj.1984@gmail.com> wrote:
>>
>> 2018-08-08 0:26 GMT+08:00 Dongjiu Geng <gengdongjiu@huawei.com>:
>> > In order to remove the additional check before calling the
>> > ghes_notify_sea(), make stub definition when !CONFIG_ACPI_APEI_SEA.
>> >
>> > After this cleanup, we can simply call the ghes_notify_sea() to let
>> > APEI driver handle the SEA notification.
>> >
>> > CC: Tyler Baicar <tbaicar@codeaurora.org>
>> > CC: James Morse <james.morse@arm.com>
>> > Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
>> > Acked-by: Will Deacon <will.deacon@arm.com>
>> > ---
>> > This cleanup is ever mentioned by Mark Rutland in [1]
>> >
>> > [1]:
>> > https://lkml.org/lkml/2018/5/31/289
>> >
>
> FWIW - Looks good to me!

Thanks very much for this comments and review,
whether I can get your "Acked-by" or "Reviewed-by"? thanks

>
> Thanks,
> Tyler

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND v2] arm64: clean the additional checks before calling ghes_notify_sea()
  2018-08-09 22:16     ` gengdongjiu
@ 2018-08-10  2:14       ` Tyler Baicar
  0 siblings, 0 replies; 4+ messages in thread
From: Tyler Baicar @ 2018-08-10  2:14 UTC (permalink / raw)
  To: gengdongjiu
  Cc: Dongjiu Geng, Borislav Petkov, Will Deacon, rafael.j.wysocki,
	James Morse, Tyler Baicar, arm-mail-list,
	Linux Kernel Mailing List, linux-acpi, devel

On Thu, Aug 9, 2018 at 6:16 PM, gengdongjiu <gengdj.1984@gmail.com> wrote:
> 2018-08-10 5:05 GMT+08:00 Tyler Baicar <baicar.tyler@gmail.com>:
>> On Thu, Aug 9, 2018 at 8:32 AM, gengdongjiu <gengdj.1984@gmail.com> wrote:
>>>
>>> 2018-08-08 0:26 GMT+08:00 Dongjiu Geng <gengdongjiu@huawei.com>:
>>> > In order to remove the additional check before calling the
>>> > ghes_notify_sea(), make stub definition when !CONFIG_ACPI_APEI_SEA.
>>> >
>>> > After this cleanup, we can simply call the ghes_notify_sea() to let
>>> > APEI driver handle the SEA notification.
>>> >
>>> > CC: Tyler Baicar <tbaicar@codeaurora.org>
>>> > CC: James Morse <james.morse@arm.com>
>>> > Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
>>> > Acked-by: Will Deacon <will.deacon@arm.com>
>>> > ---
>>> > This cleanup is ever mentioned by Mark Rutland in [1]
>>> >
>>> > [1]:
>>> > https://lkml.org/lkml/2018/5/31/289
>>> >
>>
>> FWIW - Looks good to me!
>
> Thanks very much for this comments and review,
> whether I can get your "Acked-by" or "Reviewed-by"? thanks
>
Sorry, yes!

Reviewed-by: Tyler Baicar <baicar.tyler@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 16:26 [PATCH RESEND v2] arm64: clean the additional checks before calling ghes_notify_sea() Dongjiu Geng
2018-08-09 12:32 ` gengdongjiu
     [not found]   ` <CABo9ajBKEWmgh6tBbUnrY8zM3vAH+TKWwBHn-Vz556Up+614Zw@mail.gmail.com>
2018-08-09 22:16     ` gengdongjiu
2018-08-10  2:14       ` Tyler Baicar

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox