m68k: sun3/3x: Add and use "sun3.h"

When building with W=1:

    arch/m68k/sun3/idprom.c:86:6: warning: no previous prototype for ‘sun3_get_model’ [-Wmissing-prototypes]
       86 | void sun3_get_model(char *model)
	  |      ^~~~~~~~~~~~~~
    arch/m68k/sun3/config.c:53:24: warning: no previous prototype for ‘sun3_init’ [-Wmissing-prototypes]
       53 | asmlinkage void __init sun3_init(void)
	  |                        ^~~~~~~~~
    arch/m68k/sun3/mmu_emu.c:117:6: warning: no previous prototype for ‘print_pte_vaddr’ [-Wmissing-prototypes]
      117 | void print_pte_vaddr (unsigned long vaddr)
	  |      ^~~~~~~~~~~~~~~
    arch/m68k/sun3/mmu_emu.c:126:13: warning: no previous prototype for ‘mmu_emu_init’ [-Wmissing-prototypes]
      126 | void __init mmu_emu_init(unsigned long bootmem_end)
	  |             ^~~~~~~~~~~~
    arch/m68k/sun3/mmu_emu.c:353:5: warning: no previous prototype for ‘mmu_emu_handle_fault’ [-Wmissing-prototypes]
      353 | int mmu_emu_handle_fault (unsigned long vaddr, int read_flag, int kernel_fault)
	  |     ^~~~~~~~~~~~~~~~~~~~
    arch/m68k/sun3/leds.c:6:6: warning: no previous prototype for ‘sun3_leds’ [-Wmissing-prototypes]
	6 | void sun3_leds(unsigned char byte)
	  |      ^~~~~~~~~
    arch/m68k/sun3/intersil.c:27:5: warning: no previous prototype for ‘sun3_hwclk’ [-Wmissing-prototypes]
       27 | int sun3_hwclk(int set, struct rtc_time *t)
	  |     ^~~~~~~~~~
    arch/m68k/sun3x/config.c:30:6: warning: no previous prototype for ‘sun3_leds’ [-Wmissing-prototypes]
       30 | void sun3_leds(unsigned char byte)
	  |      ^~~~~~~~~

Fix this by introducing a new header file "sun3.h" for holding the
prototypes of functions implemented in arch/m68k/sun3/ and
arch/m68k/sun3x/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/87856ef9ef8955f459fb691faca921c0a688bc80.1694613528.git.geert@linux-m68k.org
This commit is contained in:
Geert Uytterhoeven 2023-09-13 16:08:42 +02:00
parent f9b34638c0
commit c50b1fc110
11 changed files with 36 additions and 11 deletions

View File

@ -364,7 +364,7 @@ disable_wb:
#if defined(CONFIG_SUN3)
#include <asm/sun3mmu.h>
extern int mmu_emu_handle_fault (unsigned long, int, int);
#include "../sun3/sun3.h"
/* sun3 version of bus_error030 */

View File

@ -18,11 +18,9 @@
#include <asm/io.h>
#include <asm/sun3mmu.h>
#undef SUN3_KMAP_DEBUG
#include "../sun3/sun3.h"
#ifdef SUN3_KMAP_DEBUG
extern void print_pte_vaddr(unsigned long vaddr);
#endif
#undef SUN3_KMAP_DEBUG
extern void mmu_emu_map_pmeg (int context, int vaddr);

View File

@ -24,7 +24,7 @@
#include <asm/machdep.h>
#include <asm/io.h>
extern void mmu_emu_init (unsigned long bootmem_end);
#include "../sun3/sun3.h"
const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n";

View File

@ -35,11 +35,11 @@
#include <asm/sun3ints.h>
#include <asm/config.h>
#include "sun3.h"
char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
static void sun3_sched_init(void);
extern void sun3_get_model (char* model);
extern int sun3_hwclk(int set, struct rtc_time *t);
volatile char* clock_va;
extern unsigned long availmem;

View File

@ -17,6 +17,8 @@
#include <asm/idprom.h>
#include <asm/machines.h> /* Fun with Sun released architectures. */
#include "sun3.h"
struct idprom *idprom;
EXPORT_SYMBOL(idprom);

View File

@ -17,6 +17,7 @@
#include <asm/intersil.h>
#include <asm/machdep.h>
#include "sun3.h"
/* bits to set for start/run of the intersil */
#define STOP_VAL (INTERSIL_STOP | INTERSIL_INT_ENABLE | INTERSIL_24H_MODE)

View File

@ -3,6 +3,8 @@
#include <asm/sun3mmu.h>
#include <asm/io.h>
#include "sun3.h"
void sun3_leds(unsigned char byte)
{
unsigned char dfc;

View File

@ -27,6 +27,7 @@
#include <asm/mmu_context.h>
#include <asm/dvma.h>
#include "sun3.h"
#undef DEBUG_MMU_EMU
#define DEBUG_PROM_MAPS

22
arch/m68k/sun3/sun3.h Normal file
View File

@ -0,0 +1,22 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
struct rtc_time;
/* config.c */
asmlinkage void sun3_init(void);
/* idprom.c */
void sun3_get_model(char *model);
/* intersil.c */
int sun3_hwclk(int set, struct rtc_time *t);
/* leds.c */
void sun3_leds(unsigned char byte);
/* mmu_emu.c */
void mmu_emu_init(unsigned long bootmem_end);
int mmu_emu_handle_fault(unsigned long vaddr, int read_flag, int kernel_fault);
void print_pte_vaddr(unsigned long vaddr);

View File

@ -17,7 +17,7 @@
#include <asm/irq_regs.h>
#include <linux/seq_file.h>
extern void sun3_leds (unsigned char);
#include "sun3.h"
void sun3_disable_interrupts(void)
{

View File

@ -22,11 +22,10 @@
#include <asm/config.h>
#include "time.h"
#include "../sun3/sun3.h"
volatile char *clock_va;
extern void sun3_get_model(char *model);
void sun3_leds(unsigned char byte)
{