Re: [PATCH] MIPS: Allow modules to set board_be_handler

From: Thomas Bogendoerfer
Date: Tue Nov 09 2021 - 10:31:40 EST


On Fri, Nov 05, 2021 at 10:30:47AM -0700, Florian Fainelli wrote:
> After making the brcmstb_gisb driver modular with 707a4cdf86e5 ("bus:
> brcmstb_gisb: Allow building as module") Guenter reported that mips
> allmodconfig failed to link because board_be_handler was referenced.
>
> Thomas indicated that if we were to continue making the brcmstb_gisb
> driver modular for MIPS we would need to introduce a function that
> allows setting the board_be_handler and export that function towards
> modules.
>
> This is what is being done here: board_be_handler is made static and is
> now settable with a mips_set_be_handler() function which is exported.
>
> Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> Suggested-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
> Fixes: 707a4cdf86e5 ("bus: brcmstb_gisb: Allow building as module")
> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
> ---
> arch/mips/dec/setup.c | 6 +++---
> arch/mips/include/asm/traps.h | 2 +-
> arch/mips/kernel/traps.c | 8 +++++++-
> arch/mips/sgi-ip22/ip22-berr.c | 2 +-
> arch/mips/sgi-ip22/ip28-berr.c | 2 +-
> arch/mips/sgi-ip27/ip27-berr.c | 2 +-
> arch/mips/sgi-ip32/ip32-berr.c | 2 +-
> arch/mips/sibyte/swarm/setup.c | 2 +-
> arch/mips/txx9/generic/setup_tx4927.c | 2 +-
> arch/mips/txx9/generic/setup_tx4938.c | 2 +-
> arch/mips/txx9/generic/setup_tx4939.c | 2 +-
> drivers/bus/brcmstb_gisb.c | 2 +-
> 12 files changed, 20 insertions(+), 14 deletions(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]