kernel.h 5.6 KB

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