kernel.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /* cpu.c */
  23. extern void cpu_probe(void);
  24. /* traps_32.c */
  25. extern void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
  26. unsigned long npc, unsigned long psr);
  27. /* irq_32.c */
  28. extern struct irqaction static_irqaction[];
  29. extern int static_irq_count;
  30. extern spinlock_t irq_action_lock;
  31. extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
  32. extern void init_IRQ(void);
  33. /* sun4m_irq.c */
  34. extern void sun4m_init_IRQ(void);
  35. extern void sun4m_unmask_profile_irq(void);
  36. extern void sun4m_clear_profile_irq(int cpu);
  37. /* sun4d_irq.c */
  38. extern spinlock_t sun4d_imsk_lock;
  39. extern void sun4d_init_IRQ(void);
  40. extern int sun4d_request_irq(unsigned int irq,
  41. irq_handler_t handler,
  42. unsigned long irqflags,
  43. const char *devname, void *dev_id);
  44. extern int show_sun4d_interrupts(struct seq_file *, void *);
  45. extern void sun4d_distribute_irqs(void);
  46. extern void sun4d_free_irq(unsigned int irq, void *dev_id);
  47. /* head_32.S */
  48. extern unsigned int t_nmi[];
  49. extern unsigned int linux_trap_ipi15_sun4d[];
  50. extern unsigned int linux_trap_ipi15_sun4m[];
  51. extern struct tt_entry trapbase_cpu1;
  52. extern struct tt_entry trapbase_cpu2;
  53. extern struct tt_entry trapbase_cpu3;
  54. extern char cputypval[];
  55. /* entry.S */
  56. extern unsigned long lvl14_save[4];
  57. extern unsigned int real_irq_entry[];
  58. extern unsigned int smp4d_ticker[];
  59. extern unsigned int patchme_maybe_smp_msg[];
  60. extern void floppy_hardint(void);
  61. /* trampoline_32.S */
  62. extern unsigned long sun4m_cpu_startup;
  63. extern unsigned long sun4d_cpu_startup;
  64. #else /* CONFIG_SPARC32 */
  65. #endif /* CONFIG_SPARC32 */
  66. #endif /* !(__SPARC_KERNEL_H) */