MIPS: SiByte: Fix missing function prototypes
PATCH 1/1 MIPS: SiByte: Fix missing function prototypes
The SB1250 SWARM build reports missing prototypes for platform time initialization, SoC setup, IRQ and SMP helpers, and both RTC backends.
--- arch/mips/include/asm/sibyte/sb1250.h | 17 +++++++++++++++++ arch/mips/mm/cerr-sb1.c | 2 -- arch/mips/mm/tlbex.c | 3 +-- arch/mips/sibyte/bcm1480/irq.c | 4 +--- arch/mips/sibyte/bcm1480/smp.c | 6 +----- arch/mips/sibyte/bcm1480/time.c | 4 ++-- arch/mips/sibyte/common/bus_watcher.c | 2 +- arch/mips/sibyte/sb1250/irq.c | 4 +--- arch/mips/sibyte/sb1250/smp.c | 6 +----- arch/mips/sibyte/sb1250/time.c | 4 ++-- arch/mips/sibyte/swarm/rtc.h | 15 +++++++++++++++ arch/mips/sibyte/swarm/rtc_m41t81.c | 1 + arch/mips/sibyte/swarm/rtc_xicor1241.c | 1 + arch/mips/sibyte/swarm/setup.c | 18 ++---------------- 14 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 arch/mips/sibyte/swarm/rtc.h
arch/mips/include/asm/sibyte/sb1250.h +17 -0
@@ -32,9 +32,26 @@ extern unsigned int soc_type;extern unsigned int periph_rev;extern unsigned int zbbus_mhz; +void sb1_cache_error (void ); + +#ifdef CONFIG_SIBYTE_BUS_WATCHER +void check_bus_watcher (void ); +#endif + +int sb1250_m3_workaround_needed (void ); +void sb1250_setup (void ); +void sb1250_clockevent_init (void ); +void sb1250_clocksource_init (void ); +void sb1250_mailbox_interrupt (void ); +extern void sb1250_mask_irq (int cpu,int irq);extern void sb1250_unmask_irq (int cpu,int irq); +void bcm1480_setup (void ); +void sb1480_clockevent_init (void ); +void sb1480_clocksource_init (void ); +void bcm1480_mailbox_interrupt (void ); +extern void bcm1480_time_init (void );extern void bcm1480_mask_irq (int cpu,int irq);extern void bcm1480_unmask_irq (int cpu,int irq);
arch/mips/mm/cerr-sb1.c +0 -2
@@ -158,8 +158,6 @@ static void check_bus_watcher(void) printk("Bus watcher indicates no error\n"); } } -#else -extern void check_bus_watcher (void );#endif asmlinkage void sb1_cache_error(void)
arch/mips/mm/tlbex.c +1 -2
@@ -37,6 +37,7 @@#include <asm/regdef.h> #include <asm/uasm.h> #include <asm/setup.h> +#include <asm/sibyte/sb1250.h> #include <asm/tlbex.h> static int mips_xpa_disabled;
@@ -84,8 +85,6 @@ static inline int r4k_250MHZhwbug(void)return 0 ; } -extern int sb1250_m3_workaround_needed (void ); -static inline int __maybe_unused bcm1250_m3_war (void ) {if (IS_ENABLED (CONFIG_SB1_PASS_2_WORKAROUNDS ))
arch/mips/sibyte/bcm1480/irq.c +1 -3
@@ -198,7 +198,7 @@ static struct irq_chip bcm1480_irq_type = {#endif }; -void __init init_bcm1480_irqs (void ) +static void __init init_bcm1480_irqs (void ) {int i;
@@ -303,8 +303,6 @@ void __init arch_init_irq(void)change_c0_status (ST0_IM , imask); } -extern void bcm1480_mailbox_interrupt (void ); -static inline void dispatch_ip2 (void ) {unsigned long long mask_h, mask_l;
arch/mips/sibyte/bcm1480/smp.c +1 -5
@@ -46,7 +46,7 @@ static void *mailbox_0_regs[] = {/* * SMP init and finish on secondary CPUs */ -void bcm1480_smp_init (void ) +static void bcm1480_smp_init (void ) {unsigned int imask =STATUSF_IP4 |STATUSF_IP3 |STATUSF_IP2 |STATUSF_IP1 |STATUSF_IP0 ;
@@ -83,8 +83,6 @@ static void bcm1480_send_ipi_mask(const struct cpumask *mask,*/ static void bcm1480_init_secondary (void ) { -extern void bcm1480_smp_init (void ); -bcm1480_smp_init (); }
@@ -94,8 +92,6 @@ static void bcm1480_init_secondary(void)*/ static void bcm1480_smp_finish (void ) { -extern void sb1480_clockevent_init (void ); -sb1480_clockevent_init ();local_irq_enable (); }
arch/mips/sibyte/bcm1480/time.c +2 -2
@@ -4,8 +4,8 @@*/ #include <linux/init.h> -extern void sb1480_clockevent_init (void ); -extern void sb1480_clocksource_init (void ); +#include <asm/time.h> +#include <asm/sibyte/sb1250.h> void __init plat_time_init (void ) {
arch/mips/sibyte/common/bus_watcher.c +1 -1
@@ -189,7 +189,7 @@ static irqreturn_t sibyte_bw_int(int irq, void *data)return IRQ_HANDLED ; } -int __init sibyte_bus_watcher (void ) +static int __init sibyte_bus_watcher (void ) {memset (&bw_stats,0 ,sizeof (struct bw_stats_struct )); bw_stats.status_printed =1 ;
arch/mips/sibyte/sb1250/irq.c +1 -3
@@ -179,7 +179,7 @@ static struct irq_chip sb1250_irq_type = {#endif }; -void __init init_sb1250_irqs (void ) +static void __init init_sb1250_irqs (void ) {int i;
@@ -266,8 +266,6 @@ void __init arch_init_irq(void)change_c0_status (ST0_IM , imask); } -extern void sb1250_mailbox_interrupt (void ); -static inline void dispatch_ip2 (void ) {unsigned int cpu =smp_processor_id ();
arch/mips/sibyte/sb1250/smp.c +1 -5
@@ -35,7 +35,7 @@ static void *mailbox_regs[] = {/* * SMP init and finish on secondary CPUs */ -void sb1250_smp_init (void ) +static void sb1250_smp_init (void ) {unsigned int imask =STATUSF_IP4 |STATUSF_IP3 |STATUSF_IP2 |STATUSF_IP1 |STATUSF_IP0 ;
@@ -72,8 +72,6 @@ static inline void sb1250_send_ipi_mask(const struct cpumask *mask,*/ static void sb1250_init_secondary (void ) { -extern void sb1250_smp_init (void ); -sb1250_smp_init (); }
@@ -83,8 +81,6 @@ static void sb1250_init_secondary(void)*/ static void sb1250_smp_finish (void ) { -extern void sb1250_clockevent_init (void ); -sb1250_clockevent_init ();local_irq_enable (); }
arch/mips/sibyte/sb1250/time.c +2 -2
@@ -4,8 +4,8 @@*/ #include <linux/init.h> -extern void sb1250_clocksource_init (void ); -extern void sb1250_clockevent_init (void ); +#include <asm/time.h> +#include <asm/sibyte/sb1250.h> void __init plat_time_init (void ) {
arch/mips/sibyte/swarm/rtc.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef _SIBYTE_SWARM_RTC_H +#define _SIBYTE_SWARM_RTC_H + +#include <linux/time64.h> + +int xicor_probe (void ); +int xicor_set_time (time64_t t); +time64_t xicor_get_time (void ); + +int m41t81_probe (void ); +int m41t81_set_time (time64_t t); +time64_t m41t81_get_time (void ); + +#endif /* _SIBYTE_SWARM_RTC_H */
arch/mips/sibyte/swarm/rtc_m41t81.c +1 -0
@@ -17,6 +17,7 @@#include <asm/sibyte/sb1250_regs.h> #include <asm/sibyte/sb1250_smbus.h> +#include "rtc.h" /* M41T81 definitions */
arch/mips/sibyte/swarm/rtc_xicor1241.c +1 -0
@@ -17,6 +17,7 @@#include <asm/sibyte/sb1250_regs.h> #include <asm/sibyte/sb1250_smbus.h> +#include "rtc.h" /* Xicor 1241 definitions */
arch/mips/sibyte/swarm/setup.c +2 -16
@@ -35,28 +35,14 @@#include <asm/sibyte/sb1250_genbus.h> #include <asm/sibyte/board.h> -#ifdef CONFIG_SIBYTE_BCM1x80 -extern void bcm1480_setup (void ); -#elif defined(CONFIG_SIBYTE_SB1250 ) || defined(CONFIG_SIBYTE_BCM112X ) -extern void sb1250_setup (void ); -#else -#error invalid SiByte board configuration -#endif - -extern int xicor_probe (void ); -extern int xicor_set_time (time64_t ); -extern time64_t xicor_get_time (void ); - -extern int m41t81_probe (void ); -extern int m41t81_set_time (time64_t ); -extern time64_t m41t81_get_time (void ); +#include "rtc.h" const char *get_system_type (void ) {return "SiByte " SIBYTE_BOARD_NAME ; } -int swarm_be_handler (struct pt_regs *regs,int is_fixup) +static int swarm_be_handler (struct pt_regs *regs,int is_fixup) {if (!is_fixup && (regs->cp0_cause &4 )) {/* Data bus error - print PA */
Signature · 1 line
2.53.0
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Florian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.4-rc2 next-20261112]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Fainelli/MIPS-SiByte-Fix-missing-function-prototypes/20261112-115739 base: linus/master patch link: https://lore.kernel.org/r/20261112195824.298915-1-f.fainelli%40gmail.com patch subject: [PATCH] MIPS: SiByte: Fix missing function prototypes config: mips-bcm63xx_defconfig (https://download.01.org/0day-ci/archive/20261114/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 1b1fed44d3dcca649a9877915d57c3357a98124e) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261114/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
In file included from arch/mips/mm/tlbex.c:40:
In file included from arch/mips/include/asm/sibyte/sb1250.h:28:
>> arch/mips/include/asm/sibyte/bcm1480_scd.h:261:9: warning: 'M_SPC_CFG_CLEAR' macro redefined [-Wmacro-redefined]
261 | #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR
| ^
arch/mips/include/asm/sibyte/sb1250_scd.h:392:9: note: previous definition is here
392 | #define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32)
| ^
In file included from arch/mips/mm/tlbex.c:40:
In file included from arch/mips/include/asm/sibyte/sb1250.h:28:
>> arch/mips/include/asm/sibyte/bcm1480_scd.h:262:9: warning: 'M_SPC_CFG_ENABLE' macro redefined [-Wmacro-redefined]
262 | #define M_SPC_CFG_ENABLE M_BCM1480_SPC_CFG_ENABLE
| ^
arch/mips/include/asm/sibyte/sb1250_scd.h:393:9: note: previous definition is here
393 | #define M_SPC_CFG_ENABLE _SB_MAKEMASK1(33)
| ^2 warnings generated.
vim +/M_SPC_CFG_CLEAR +261 arch/mips/include/asm/sibyte/bcm1480_scd.h
4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 252 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 253 /* 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 254 * System Performance Counter Control Register (Table 32) 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 255 * Register: PERF_CNT_CFG_1 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 256 * BCM1480 specific 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 257 */ 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 258 #define M_BCM1480_SPC_CFG_CLEAR _SB_MAKEMASK1(0) 4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 259 #define M_BCM1480_SPC_CFG_ENABLE _SB_MAKEMASK1(1) 8deab1144b5535 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 260 #if SIBYTE_HDR_FEATURE_CHIP(1480) 8deab1144b5535 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 @261 #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR 8deab1144b5535 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 @262 #define M_SPC_CFG_ENABLE M_BCM1480_SPC_CFG_ENABLE 8deab1144b5535 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 263 #endif
4cbf2beac2265b include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 264
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Florian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.4-rc2 next-20261112]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Fainelli/MIPS-SiByte-Fix-missing-function-prototypes/20261112-115739 base: linus/master patch link: https://lore.kernel.org/r/20261112195824.298915-1-f.fainelli%40gmail.com patch subject: [PATCH] MIPS: SiByte: Fix missing function prototypes config: mips-ip27_defconfig (https://download.01.org/0day-ci/archive/20261114/[email protected]/config) compiler: mips64-linux-gcc (GCC) 16.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261114/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
In file included from arch/mips/include/asm/sibyte/sb1250.h:28,
from arch/mips/mm/tlbex.c:40:
>> arch/mips/include/asm/sibyte/bcm1480_scd.h:261:9: warning: 'M_SPC_CFG_CLEAR' redefined
261 | #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR
| ^~~~~~~~~~~~~~~
In file included from arch/mips/include/asm/sibyte/sb1250.h:27:
arch/mips/include/asm/sibyte/sb1250_scd.h:392:9: note: this is the location of the previous definition
392 | #define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32)
| ^~~~~~~~~~~~~~~
>> arch/mips/include/asm/sibyte/bcm1480_scd.h:262:9: warning: 'M_SPC_CFG_ENABLE' redefined
262 | #define M_SPC_CFG_ENABLE M_BCM1480_SPC_CFG_ENABLE
| ^~~~~~~~~~~~~~~~
arch/mips/include/asm/sibyte/sb1250_scd.h:393:9: note: this is the location of the previous definition
393 | #define M_SPC_CFG_ENABLE _SB_MAKEMASK1(33)
| ^~~~~~~~~~~~~~~~vim +/M_SPC_CFG_CLEAR +261 arch/mips/include/asm/sibyte/bcm1480_scd.h
4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 252 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 253 /* 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 254 * System Performance Counter Control Register (Table 32) 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 255 * Register: PERF_CNT_CFG_1 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 256 * BCM1480 specific 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 257 */ 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 258 #define M_BCM1480_SPC_CFG_CLEAR _SB_MAKEMASK1(0) 4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 259 #define M_BCM1480_SPC_CFG_ENABLE _SB_MAKEMASK1(1) 8deab1144b55354 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 260 #if SIBYTE_HDR_FEATURE_CHIP(1480) 8deab1144b55354 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 @261 #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR 8deab1144b55354 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 @262 #define M_SPC_CFG_ENABLE M_BCM1480_SPC_CFG_ENABLE 8deab1144b55354 include/asm-mips/sibyte/bcm1480_scd.h Mark Mason 2007-03-28 263 #endif
4cbf2beac2265b3 include/asm-mips/sibyte/bcm1480_scd.h Andrew Isaacson 2005-10-19 264
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki