Re: [PATCH 1/3] arch: Export machine_restart() instances so they can be called from modules

From: Lee Jones
Date: Tue Aug 10 2021 - 03:58:24 EST


On Mon, 09 Aug 2021, Geert Uytterhoeven wrote:

> On Tue, Aug 3, 2021 at 5:56 PM Lee Jones <lee.jones@xxxxxxxxxx> wrote:
> > A recent attempt to convert the Power Reset Restart driver to tristate
> > failed because of the following compile error (reported once merged by
> > Stephen Rothwell via Linux Next):
> >
> > ERROR: "machine_restart" [drivers/power/reset/restart-poweroff.ko] undefined!
> >
> > This error occurs since some of the machine_restart() instances are
> > not currently exported for use in modules. This patch aims to rectify
> > that.
> >
> > Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
>
> > NB: If it's safe to omit some of these, let me know and I'll revise the patch.
>
> How do you plan to handle that? Isn't this an all-or-nothing export?

That's the way I see it, but I don't have an in-depth knowledge of all
of the architectures. There may be a method there that isn't part of
the core API. If that's the case, I can drop the export.

> > arch/m68k/kernel/process.c | 1 +
>
> Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Thanks Geert.

I'll pick this up when I do the re-spin shortly.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog