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