RE: [PATCH v7 3/8] EDAC:ghes: Move ghes_edac.force_load to ghes module parameter

From: Justin He
Date: Sat Oct 08 2022 - 04:14:51 EST




> -----Original Message-----
> From: Borislav Petkov <bp@xxxxxxxxx>
> Sent: Wednesday, October 5, 2022 11:14 PM
> To: Justin He <Justin.He@xxxxxxx>
> Cc: Len Brown <lenb@xxxxxxxxxx>; James Morse <James.Morse@xxxxxxx>;
> Tony Luck <tony.luck@xxxxxxxxx>; Mauro Carvalho Chehab
> <mchehab@xxxxxxxxxx>; Robert Richter <rric@xxxxxxxxxx>; Robert Moore
> <robert.moore@xxxxxxxxx>; Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>; Yazen
> Ghannam <yazen.ghannam@xxxxxxx>; Jan Luebbe <jlu@xxxxxxxxxxxxxx>;
> Khuong Dinh <khuong@xxxxxxxxxxxxxxxxxxxxxx>; Kani Toshi
> <toshi.kani@xxxxxxx>; Ard Biesheuvel <ardb@xxxxxxxxxx>;
> linux-acpi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> linux-edac@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx; Rafael J . Wysocki
> <rafael@xxxxxxxxxx>; Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx>; Jarkko
> Sakkinen <jarkko@xxxxxxxxxx>; linux-efi@xxxxxxxxxxxxxxx; nd <nd@xxxxxxx>
> Subject: Re: [PATCH v7 3/8] EDAC:ghes: Move ghes_edac.force_load to ghes
> module parameter
>
> On Thu, Sep 29, 2022 at 02:37:21AM +0000, Jia He wrote:
> > ghes_edac_register() is too late to set this module flag ghes_edac.force_load.
> > Also, other edac drivers should not be able to control this flag.
> >
> > Move this flag to the module parameter in ghes instead.
> >
> > Suggested-by: Toshi Kani <toshi.kani@xxxxxxx>
> > Signed-off-by: Jia He <justin.he@xxxxxxx>
> > Reviewed-by: Toshi Kani <toshi.kani@xxxxxxx>
> > ---
> > drivers/acpi/apei/ghes.c | 8 ++++++++ drivers/edac/ghes_edac.c | 10
> > +++-------
> > include/acpi/apei.h | 2 ++
> > 3 files changed, 13 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index
> > 8cb65f757d06..b0a6445c6da2 100644
> > --- a/drivers/acpi/apei/ghes.c
> > +++ b/drivers/acpi/apei/ghes.c
> > @@ -109,6 +109,14 @@ static inline bool is_hest_type_generic_v2(struct
> > ghes *ghes) bool ghes_disable; module_param_named(disable,
> > ghes_disable, bool, 0);
> >
> > +/*
> > + * "ghes.edac_force_enable" forcibly enables ghes_edac and skips the
> > +platform
> > + * check.
> > + */
> > +bool ghes_edac_force_enable;
> > +EXPORT_SYMBOL(ghes_edac_force_enable);
> > +module_param_named(edac_force_enable, ghes_edac_force_enable, bool,
> > +0);
>
> Why is this exported?
>
> In the exemplary patch I sent you, that thing is static.
Sorry for the carelessness


--
Cheers,
Justin (Jia He)