Commit 4d369680 authored by Vineet Gupta's avatar Vineet Gupta

ARC: -Wmissing-prototype warning fixes

Anrd reported [1] new compiler warnings due to -Wmissing-protype.
These are for non static functions mostly used in asm code hence not
exported already. Fix this by adding the prototypes.

[1] https://lore.kernel.org/lkml/20230810141947.1236730-1-arnd@kernel.orgReviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
parent 2ccdd1b1
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <asm/processor.h> /* For VMALLOC_START */ #include <asm/processor.h> /* For VMALLOC_START */
#include <asm/mmu.h> #include <asm/mmu.h>
#ifdef __ASSEMBLY__
#ifdef CONFIG_ISA_ARCOMPACT #ifdef CONFIG_ISA_ARCOMPACT
#include <asm/entry-compact.h> /* ISA specific bits */ #include <asm/entry-compact.h> /* ISA specific bits */
#else #else
...@@ -295,4 +297,23 @@ ...@@ -295,4 +297,23 @@
#endif /* CONFIG_ARC_CURR_IN_REG */ #endif /* CONFIG_ARC_CURR_IN_REG */
#else /* !__ASSEMBLY__ */
extern void do_signal(struct pt_regs *);
extern void do_notify_resume(struct pt_regs *);
extern int do_privilege_fault(unsigned long, struct pt_regs *);
extern int do_extension_fault(unsigned long, struct pt_regs *);
extern int insterror_is_error(unsigned long, struct pt_regs *);
extern int do_memory_error(unsigned long, struct pt_regs *);
extern int trap_is_brkpt(unsigned long, struct pt_regs *);
extern int do_misaligned_error(unsigned long, struct pt_regs *);
extern int do_trap5_error(unsigned long, struct pt_regs *);
extern int do_misaligned_access(unsigned long, struct pt_regs *, struct callee_regs *);
extern void do_machine_check_fault(unsigned long, struct pt_regs *);
extern void do_non_swi_trap(unsigned long, struct pt_regs *);
extern void do_insterror_or_kprobe(unsigned long, struct pt_regs *);
extern void do_page_fault(unsigned long, struct pt_regs *);
#endif
#endif /* __ASM_ARC_ENTRY_H */ #endif /* __ASM_ARC_ENTRY_H */
...@@ -25,5 +25,6 @@ ...@@ -25,5 +25,6 @@
#include <asm-generic/irq.h> #include <asm-generic/irq.h>
extern void arc_init_IRQ(void); extern void arc_init_IRQ(void);
extern void arch_do_IRQ(unsigned int, struct pt_regs *);
#endif #endif
...@@ -14,6 +14,8 @@ typedef struct { ...@@ -14,6 +14,8 @@ typedef struct {
unsigned long asid[NR_CPUS]; /* 8 bit MMU PID + Generation cycle */ unsigned long asid[NR_CPUS]; /* 8 bit MMU PID + Generation cycle */
} mm_context_t; } mm_context_t;
extern void do_tlb_overlap_fault(unsigned long, unsigned long, struct pt_regs *);
#endif #endif
#include <asm/mmu-arcv2.h> #include <asm/mmu-arcv2.h>
......
...@@ -181,6 +181,9 @@ static inline unsigned long regs_get_register(struct pt_regs *regs, ...@@ -181,6 +181,9 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
return *(unsigned long *)((unsigned long)regs + offset); return *(unsigned long *)((unsigned long)regs + offset);
} }
extern int syscall_trace_entry(struct pt_regs *);
extern void syscall_trace_exit(struct pt_regs *);
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __ASM_PTRACE_H */ #endif /* __ASM_PTRACE_H */
...@@ -42,4 +42,6 @@ extern void arc_cache_init(void); ...@@ -42,4 +42,6 @@ extern void arc_cache_init(void);
extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len); extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len);
extern void read_decode_cache_bcr(void); extern void read_decode_cache_bcr(void);
extern void __init handle_uboot_args(void);
#endif /* __ASMARC_SETUP_H */ #endif /* __ASMARC_SETUP_H */
...@@ -29,6 +29,8 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); ...@@ -29,6 +29,8 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
extern void __init smp_init_cpus(void); extern void __init smp_init_cpus(void);
extern void first_lines_of_secondary(void); extern void first_lines_of_secondary(void);
extern const char *arc_platform_smp_cpuinfo(void); extern const char *arc_platform_smp_cpuinfo(void);
extern void arc_platform_smp_wait_to_boot(int);
extern void start_kernel_secondary(void);
/* /*
* API expected BY platform smp code (FROM arch smp code) * API expected BY platform smp code (FROM arch smp code)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
*/ */
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <linux/sched.h> #include <asm/switch_to.h>
#include <linux/sched/debug.h> #include <linux/sched/debug.h>
#define KSP_WORD_OFF ((TASK_THREAD + THREAD_KSP) / 4) #define KSP_WORD_OFF ((TASK_THREAD + THREAD_KSP) / 4)
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <asm/mach_desc.h> #include <asm/mach_desc.h>
#include <asm/serial.h>
#ifdef CONFIG_SERIAL_EARLYCON #ifdef CONFIG_SERIAL_EARLYCON
......
...@@ -108,7 +108,7 @@ static void arcv2_irq_unmask(struct irq_data *data) ...@@ -108,7 +108,7 @@ static void arcv2_irq_unmask(struct irq_data *data)
write_aux_reg(AUX_IRQ_ENABLE, 1); write_aux_reg(AUX_IRQ_ENABLE, 1);
} }
void arcv2_irq_enable(struct irq_data *data) static void arcv2_irq_enable(struct irq_data *data)
{ {
/* set default priority */ /* set default priority */
write_aux_reg(AUX_IRQ_SELECT, data->hwirq); write_aux_reg(AUX_IRQ_SELECT, data->hwirq);
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <linux/sched/task_stack.h> #include <linux/sched/task_stack.h>
#include <asm/ucontext.h> #include <asm/ucontext.h>
#include <asm/entry.h>
struct rt_sigframe { struct rt_sigframe {
struct siginfo info; struct siginfo info;
......
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <asm/processor.h>
#include <asm/setup.h>
#include <asm/mach_desc.h> #include <asm/mach_desc.h>
#include <asm/setup.h>
#include <asm/smp.h>
#include <asm/processor.h>
#ifndef CONFIG_ARC_HAS_LLSC #ifndef CONFIG_ARC_HAS_LLSC
arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED; arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED;
...@@ -351,7 +352,7 @@ static inline int __do_IPI(unsigned long msg) ...@@ -351,7 +352,7 @@ static inline int __do_IPI(unsigned long msg)
* arch-common ISR to handle for inter-processor interrupts * arch-common ISR to handle for inter-processor interrupts
* Has hooks for platform specific IPI * Has hooks for platform specific IPI
*/ */
irqreturn_t do_IPI(int irq, void *dev_id) static irqreturn_t do_IPI(int irq, void *dev_id)
{ {
unsigned long pending; unsigned long pending;
unsigned long __maybe_unused copy; unsigned long __maybe_unused copy;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <asm/arcregs.h> #include <asm/arcregs.h>
#include <asm/unwind.h> #include <asm/unwind.h>
#include <asm/stacktrace.h>
#include <asm/switch_to.h> #include <asm/switch_to.h>
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/kprobes.h> #include <linux/kprobes.h>
#include <linux/kgdb.h> #include <linux/kgdb.h>
#include <asm/entry.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <asm/kprobes.h> #include <asm/kprobes.h>
......
...@@ -581,7 +581,7 @@ static void __ic_line_inv_vaddr(phys_addr_t paddr, unsigned long vaddr, ...@@ -581,7 +581,7 @@ static void __ic_line_inv_vaddr(phys_addr_t paddr, unsigned long vaddr,
#endif /* CONFIG_ARC_HAS_ICACHE */ #endif /* CONFIG_ARC_HAS_ICACHE */
noinline void slc_op_rgn(phys_addr_t paddr, unsigned long sz, const int op) static noinline void slc_op_rgn(phys_addr_t paddr, unsigned long sz, const int op)
{ {
#ifdef CONFIG_ISA_ARCV2 #ifdef CONFIG_ISA_ARCV2
/* /*
...@@ -644,7 +644,7 @@ noinline void slc_op_rgn(phys_addr_t paddr, unsigned long sz, const int op) ...@@ -644,7 +644,7 @@ noinline void slc_op_rgn(phys_addr_t paddr, unsigned long sz, const int op)
#endif #endif
} }
noinline void slc_op_line(phys_addr_t paddr, unsigned long sz, const int op) static __maybe_unused noinline void slc_op_line(phys_addr_t paddr, unsigned long sz, const int op)
{ {
#ifdef CONFIG_ISA_ARCV2 #ifdef CONFIG_ISA_ARCV2
/* /*
...@@ -1069,7 +1069,7 @@ SYSCALL_DEFINE3(cacheflush, uint32_t, start, uint32_t, sz, uint32_t, flags) ...@@ -1069,7 +1069,7 @@ SYSCALL_DEFINE3(cacheflush, uint32_t, start, uint32_t, sz, uint32_t, flags)
* 3. All Caches need to be disabled when setting up IOC to elide any in-flight * 3. All Caches need to be disabled when setting up IOC to elide any in-flight
* Coherency transactions * Coherency transactions
*/ */
noinline void __init arc_ioc_setup(void) static noinline void __init arc_ioc_setup(void)
{ {
unsigned int ioc_base, mem_sz; unsigned int ioc_base, mem_sz;
...@@ -1131,7 +1131,7 @@ noinline void __init arc_ioc_setup(void) ...@@ -1131,7 +1131,7 @@ noinline void __init arc_ioc_setup(void)
* one core suffices for all * one core suffices for all
* - IOC setup / dma callbacks only need to be done once * - IOC setup / dma callbacks only need to be done once
*/ */
void __init arc_cache_init_master(void) static noinline void __init arc_cache_init_master(void)
{ {
unsigned int __maybe_unused cpu = smp_processor_id(); unsigned int __maybe_unused cpu = smp_processor_id();
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/kdebug.h> #include <linux/kdebug.h>
#include <linux/perf_event.h> #include <linux/perf_event.h>
#include <linux/mm_types.h> #include <linux/mm_types.h>
#include <asm/entry.h>
#include <asm/mmu.h> #include <asm/mmu.h>
/* /*
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/setup.h>
#include <asm/arcregs.h> #include <asm/arcregs.h>
pgd_t swapper_pg_dir[PTRS_PER_PGD] __aligned(PAGE_SIZE); pgd_t swapper_pg_dir[PTRS_PER_PGD] __aligned(PAGE_SIZE);
......
...@@ -389,7 +389,7 @@ void flush_tlb_kernel_range(unsigned long start, unsigned long end) ...@@ -389,7 +389,7 @@ void flush_tlb_kernel_range(unsigned long start, unsigned long end)
/* /*
* Routine to create a TLB entry * Routine to create a TLB entry
*/ */
void create_tlb(struct vm_area_struct *vma, unsigned long vaddr, pte_t *ptep) static void create_tlb(struct vm_area_struct *vma, unsigned long vaddr, pte_t *ptep)
{ {
unsigned long flags; unsigned long flags;
unsigned int asid_or_sasid, rwx; unsigned int asid_or_sasid, rwx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment