[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <i2PhAcMufioQc2nhVgO9T23CcF8UsgJo8CWPOl_7lV3iF00GdywfpQa2Hu-yPX3bD4o5wpfUtIsRBIhFH1j3k9aNoUJfgGALNWUUjMokpFc=@protonmail.com>
Date: Tue, 26 Mar 2024 14:20:34 +0000
From: A <akira.2020@...tonmail.com>
To: Yazen Ghannam <yazen.ghannam@....com>, "bp@...en8.de" <bp@...en8.de>, "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RAS/AMD/FMPM: Fix build when debugfs is not enabled
On Tuesday, March 26th, 2024 at 13:41, Yazen Ghannam <yazen.ghannam@....com> wrote:
>
>
>
> On 3/25/24 14:37, Borislav Petkov wrote:
>
> > From: "Borislav Petkov (AMD)" bp@...en8.de
> >
> > Have the driver depend on DEBUG_FS as it is useless without it.
>
>
> This isn't true which is why the module doesn't fail to load if debugfs
> is not available.
>
> > Fixes: 6f15e617cc99 ("RAS: Introduce a FRU memory poison manager")
> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218640
> > Reported-by: anthony s.k. akira.2020@...tonmail.com
> > Signed-off-by: Borislav Petkov (AMD) bp@...en8.de
> > Cc: Yazen Ghannam yazen.ghannam@....com
> > ---
> > drivers/ras/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/ras/Kconfig b/drivers/ras/Kconfig
> > index fc4f4bb94a4c..41697e326fa6 100644
> > --- a/drivers/ras/Kconfig
> > +++ b/drivers/ras/Kconfig
> > @@ -37,7 +37,7 @@ source "drivers/ras/amd/atl/Kconfig"
> > config RAS_FMPM
> > tristate "FRU Memory Poison Manager"
> > default m
> > - depends on AMD_ATL && ACPI_APEI
> > + depends on AMD_ATL && ACPI_APEI && DEBUG_FS
>
>
> This was my first thought too. However, besides not true as stated
> above, this also leaves the issue open for others to hit.
>
> I think the fix below (not tested) would be more appropriate.
>
> What do you think?
>
> Thanks,
> Yazen
>
> diff --git a/drivers/ras/debugfs.h b/drivers/ras/debugfs.h
> index 4749ccdeeba1..ab95831e7710 100644
> --- a/drivers/ras/debugfs.h
> +++ b/drivers/ras/debugfs.h
> @@ -4,6 +4,10 @@
>
> #include <linux/debugfs.h>
>
>
> +#if IS_ENABLED(DEBUG_FS)
> struct dentry *ras_get_debugfs_root(void);
> +#else
> +static inline struct dentry ras_get_debugfs_root(void) { return NULL; }
> +#endif / DEBUG_FS /
>
> #endif / RAS_DEBUGFS_H */
this also works, just tested
this time round, `make oldconfig` asks if i want to build RAS_FMPM, i built it as module, compilation succeeds.
thanks
kind regards,
anthony s.k.
Powered by blists - more mailing lists