kernel.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #ifndef __SPARC_KERNEL_H
  2. #define __SPARC_KERNEL_H
  3. #include <linux/interrupt.h>
  4. #include <asm/traps.h>
  5. #include <asm/head.h>
  6. #include <asm/io.h>
  7. /* cpu.c */
  8. extern const char *sparc_pmu_type;
  9. extern unsigned int fsr_storage;
  10. extern int ncpus_probed;
  11. #ifdef CONFIG_SPARC64
  12. /* setup_64.c */
  13. struct seq_file;
  14. extern void cpucap_info(struct seq_file *);
  15. static inline unsigned long kimage_addr_to_ra(const char *p)
  16. {
  17. unsigned long val = (unsigned long) p;
  18. return kern_base + (val - KERNBASE);
  19. }
  20. #endif
  21. #ifdef CONFIG_SPARC32
  22. /* setup_32.c */
  23. void sparc32_start_kernel(struct linux_romvec *rp);
  24. /* cpu.c */
  25. extern void cpu_probe(void);
  26. /* traps_32.c */
  27. extern void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
  28. unsigned long npc, unsigned long psr);
  29. /* irq_32.c */
  30. extern struct irqaction static_irqaction[];
  31. extern int static_irq_count;
  32. extern spinlock_t irq_action_lock;
  33. extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
  34. extern void init_IRQ(void);
  35. /* sun4m_irq.c */
  36. extern void sun4m_init_IRQ(void);
  37. extern void sun4m_unmask_profile_irq(void);
  38. extern void sun4m_clear_profile_irq(int cpu);
  39. /* sun4m_smp.c */
  40. void sun4m_cpu_pre_starting(void *arg);
  41. void sun4m_cpu_pre_online(void *arg);
  42. /* sun4d_irq.c */
  43. extern spinlock_t sun4d_imsk_lock;
  44. extern void sun4d_init_IRQ(void);
  45. extern int sun4d_request_irq(unsigned int irq,
  46. irq_handler_t handler,
  47. unsigned long irqflags,
  48. const char *devname, void *dev_id);
  49. extern int show_sun4d_interrupts(struct seq_file *, void *);
  50. extern void sun4d_distribute_irqs(void);
  51. extern void sun4d_free_irq(unsigned int irq, void *dev_id);
  52. /* sun4d_smp.c */
  53. void sun4d_cpu_pre_starting(void *arg);
  54. void sun4d_cpu_pre_online(void *arg);
  55. /* leon_smp.c */
  56. void leon_cpu_pre_starting(void *arg);
  57. void leon_cpu_pre_online(void *arg);
  58. /* head_32.S */
  59. extern unsigned int t_nmi[];
  60. extern unsigned int linux_trap_ipi15_sun4d[];
  61. extern unsigned int linux_trap_ipi15_sun4m[];
  62. extern struct tt_entry trapbase_cpu1;
  63. extern struct tt_entry trapbase_cpu2;
  64. extern struct tt_entry trapbase_cpu3;
  65. extern char cputypval[];
  66. /* entry.S */
  67. extern unsigned long lvl14_save[4];
  68. extern unsigned int real_irq_entry[];
  69. extern unsigned int smp4d_ticker[];
  70. extern unsigned int patchme_maybe_smp_msg[];
  71. extern void floppy_hardint(void);
  72. /* trampoline_32.S */
  73. extern unsigned long sun4m_cpu_startup;
  74. extern unsigned long sun4d_cpu_startup;
  75. /* process_32.c */
  76. asmlinkage int sparc_do_fork(unsigned long clone_flags,
  77. unsigned long stack_start,
  78. struct pt_regs *regs,
  79. unsigned long stack_size);
  80. /* signal_32.c */
  81. asmlinkage void do_sigreturn(struct pt_regs *regs);
  82. asmlinkage void do_rt_sigreturn(struct pt_regs *regs);
  83. void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
  84. unsigned long thread_info_flags);
  85. asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr,
  86. struct sigstack __user *ossptr,
  87. unsigned long sp);
  88. /* windows.c */
  89. void try_to_clear_window_buffer(struct pt_regs *regs, int who);
  90. /* tadpole.c */
  91. void __init clock_stop_probe(void);
  92. /* auxio_32.c */
  93. void __init auxio_probe(void);
  94. void __init auxio_power_probe(void);
  95. #else /* CONFIG_SPARC32 */
  96. #endif /* CONFIG_SPARC32 */
  97. #endif /* !(__SPARC_KERNEL_H) */