Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #ifndef __SPARC_KERNEL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define __SPARC_KERNEL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/interrupt.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include <linux/ftrace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <asm/traps.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <asm/head.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <asm/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) /* cpu.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) extern const char *sparc_pmu_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) extern unsigned int fsr_storage;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) extern int ncpus_probed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) /* process{_32,_64}.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) asmlinkage long sparc_clone(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) asmlinkage long sparc_fork(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) asmlinkage long sparc_vfork(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #ifdef CONFIG_SPARC64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) /* setup_64.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) struct seq_file;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) void cpucap_info(struct seq_file *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) static inline unsigned long kimage_addr_to_ra(const void *p)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	unsigned long val = (unsigned long) p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	return kern_base + (val - KERNBASE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) /* sys_sparc_64.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) asmlinkage long sys_kern_features(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) /* unaligned_64.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) int handle_popc(u32 insn, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) /* smp_64.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) /* kgdb_64.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) void __irq_entry smp_kgdb_capture_client(int irq, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) /* pci.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) #ifdef CONFIG_PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) int ali_sound_dma_hack(struct device *dev, u64 device_mask);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) #define ali_sound_dma_hack(dev, mask)	(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) /* signal32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) void do_sigreturn32(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) asmlinkage void do_rt_sigreturn32(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) void do_signal32(struct pt_regs * regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) /* time_64.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) void __init time_init_early(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) /* compat_audit.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) extern unsigned int sparc32_dir_class[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) extern unsigned int sparc32_chattr_class[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) extern unsigned int sparc32_write_class[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) extern unsigned int sparc32_read_class[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) extern unsigned int sparc32_signal_class[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) int sparc32_classify_syscall(unsigned int syscall);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) #ifdef CONFIG_SPARC32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) /* setup_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) struct linux_romvec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) void sparc32_start_kernel(struct linux_romvec *rp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) /* cpu.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) void cpu_probe(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) /* traps_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)                        unsigned long npc, unsigned long psr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) /* irq_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) extern struct irqaction static_irqaction[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) extern int static_irq_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) extern spinlock_t irq_action_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) void init_IRQ(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) /* sun4m_irq.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) void sun4m_init_IRQ(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) void sun4m_unmask_profile_irq(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) void sun4m_clear_profile_irq(int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) /* sun4m_smp.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) void sun4m_cpu_pre_starting(void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) void sun4m_cpu_pre_online(void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) void __init smp4m_boot_cpus(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) int smp4m_boot_one_cpu(int i, struct task_struct *idle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) void __init smp4m_smp_done(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) void smp4m_cross_call_irq(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) void smp4m_percpu_timer_interrupt(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) /* sun4d_irq.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) extern spinlock_t sun4d_imsk_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) void sun4d_init_IRQ(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) int sun4d_request_irq(unsigned int irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)                       irq_handler_t handler,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)                       unsigned long irqflags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)                       const char *devname, void *dev_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) int show_sun4d_interrupts(struct seq_file *, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) void sun4d_distribute_irqs(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) void sun4d_free_irq(unsigned int irq, void *dev_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) /* sun4d_smp.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) void sun4d_cpu_pre_starting(void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) void sun4d_cpu_pre_online(void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) void __init smp4d_boot_cpus(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) int smp4d_boot_one_cpu(int i, struct task_struct *idle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) void __init smp4d_smp_done(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) void smp4d_cross_call_irq(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) void smp4d_percpu_timer_interrupt(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) /* leon_smp.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) void leon_cpu_pre_starting(void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) void leon_cpu_pre_online(void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) void leonsmp_ipi_interrupt(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) void leon_cross_call_irq(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) /* head_32.S */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) extern unsigned int t_nmi[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) extern unsigned int linux_trap_ipi15_sun4d[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) extern unsigned int linux_trap_ipi15_sun4m[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) extern struct tt_entry trapbase;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) extern struct tt_entry trapbase_cpu1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) extern struct tt_entry trapbase_cpu2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) extern struct tt_entry trapbase_cpu3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) extern char cputypval[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) /* entry.S */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) extern unsigned long lvl14_save[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) extern unsigned int real_irq_entry[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) extern unsigned int smp4d_ticker[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) extern unsigned int patchme_maybe_smp_msg[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) void floppy_hardint(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) /* trampoline_32.S */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) extern unsigned long sun4m_cpu_startup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) extern unsigned long sun4d_cpu_startup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) /* signal_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) asmlinkage void do_sigreturn(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) asmlinkage void do_rt_sigreturn(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)                       unsigned long thread_info_flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)                                struct sigstack __user *ossptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)                                unsigned long sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) /* ptrace_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) /* unaligned_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) /* windows.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) void try_to_clear_window_buffer(struct pt_regs *regs, int who);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) /* auxio_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) void __init auxio_probe(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) void __init auxio_power_probe(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) /* pcic.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) extern void __iomem *pcic_regs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) void pcic_nmi(unsigned int pend, struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) /* time_32.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) void __init time_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) #else /* CONFIG_SPARC32 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) #endif /* CONFIG_SPARC32 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) #endif /* !(__SPARC_KERNEL_H) */