powerpc/ps3: move udbg_shutdown_ps3gelic prototype

Allmodconfig kernels produce a missing-prototypes warning:

arch/powerpc/platforms/ps3/gelic_udbg.c:239:6: error: no previous prototype for 'udbg_shutdown_ps3gelic' [-Werror=missing-prototypes]

Move the declaration from a local header to asm/ps3.h where it can be
seen from both the caller and the definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
[mpe: Drop CONFIG_PS3GELIC_UDBG to fix build error]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231108125843.3806765-18-arnd@kernel.org
This commit is contained in:
Arnd Bergmann 2023-11-08 13:58:38 +01:00 committed by Michael Ellerman
parent 98b1cc82c4
commit 04c40eed3f
6 changed files with 8 additions and 20 deletions

View file

@ -271,7 +271,6 @@ config PPC_EARLY_DEBUG_USBGECKO
config PPC_EARLY_DEBUG_PS3GELIC config PPC_EARLY_DEBUG_PS3GELIC
bool "Early debugging through the PS3 Ethernet port" bool "Early debugging through the PS3 Ethernet port"
depends on PPC_PS3 depends on PPC_PS3
select PS3GELIC_UDBG
help help
Select this to enable early debugging for the PlayStation3 via Select this to enable early debugging for the PlayStation3 via
UDP broadcasts sent out through the Ethernet port. UDP broadcasts sent out through the Ethernet port.

View file

@ -514,4 +514,10 @@ u64 ps3_get_spe_id(void *arg);
void ps3_early_mm_init(void); void ps3_early_mm_init(void);
#ifdef CONFIG_PPC_EARLY_DEBUG_PS3GELIC
void udbg_shutdown_ps3gelic(void);
#else
static inline void udbg_shutdown_ps3gelic(void) {}
#endif
#endif #endif

View file

@ -167,16 +167,4 @@ config PS3_LPM
profiling support of the Cell processor with programs like profiling support of the Cell processor with programs like
perfmon2, then say Y or M, otherwise say N. perfmon2, then say Y or M, otherwise say N.
config PS3GELIC_UDBG
bool "PS3 udbg output via UDP broadcasts on Ethernet"
depends on PPC_PS3
help
Enables udbg early debugging output by sending broadcast UDP
via the Ethernet port (UDP port number 18194).
This driver uses a trivial implementation and is independent
from the main PS3 gelic network driver.
If in doubt, say N here.
endmenu endmenu

View file

@ -3,7 +3,7 @@ obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
obj-y += interrupt.o exports.o os-area.o obj-y += interrupt.o exports.o os-area.o
obj-y += system-bus.o obj-y += system-bus.o
obj-$(CONFIG_PS3GELIC_UDBG) += gelic_udbg.o obj-$(CONFIG_PPC_EARLY_DEBUG_PS3GELIC) += gelic_udbg.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_SPU_BASE) += spu.o obj-$(CONFIG_SPU_BASE) += spu.o
obj-y += device-init.o obj-y += device-init.o

View file

@ -14,6 +14,7 @@
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/udp.h> #include <linux/udp.h>
#include <asm/ps3.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/udbg.h> #include <asm/udbg.h>
#include <asm/lv1call.h> #include <asm/lv1call.h>

View file

@ -346,12 +346,6 @@ static inline void *port_priv(struct gelic_port *port)
return port->priv; return port->priv;
} }
#ifdef CONFIG_PPC_EARLY_DEBUG_PS3GELIC
void udbg_shutdown_ps3gelic(void);
#else
static inline void udbg_shutdown_ps3gelic(void) {}
#endif
int gelic_card_set_irq_mask(struct gelic_card *card, u64 mask); int gelic_card_set_irq_mask(struct gelic_card *card, u64 mask);
/* shared netdev ops */ /* shared netdev ops */
void gelic_card_up(struct gelic_card *card); void gelic_card_up(struct gelic_card *card);