635 void cpu_delete_intrstat(cpu_t *);
636 int cpu_kstat_intrstat_update(kstat_t *, int);
637 void cpu_intr_swtch_enter(kthread_t *);
638 void cpu_intr_swtch_exit(kthread_t *);
639
640 void mbox_lock_init(void); /* initialize cross-call locks */
641 void mbox_init(int cpun); /* initialize cross-calls */
642 void poke_cpu(int cpun); /* interrupt another CPU (to preempt) */
643
644 /*
645 * values for safe_list. Pause state that CPUs are in.
646 */
647 #define PAUSE_IDLE 0 /* normal state */
648 #define PAUSE_READY 1 /* paused thread ready to spl */
649 #define PAUSE_WAIT 2 /* paused thread is spl-ed high */
650 #define PAUSE_DIE 3 /* tell pause thread to leave */
651 #define PAUSE_DEAD 4 /* pause thread has left */
652
653 void mach_cpu_pause(volatile char *);
654
655 void pause_cpus(cpu_t *off_cp);
656 void start_cpus(void);
657 int cpus_paused(void);
658
659 void cpu_pause_init(void);
660 cpu_t *cpu_get(processorid_t cpun); /* get the CPU struct associated */
661
662 int cpu_online(cpu_t *cp); /* take cpu online */
663 int cpu_offline(cpu_t *cp, int flags); /* take cpu offline */
664 int cpu_spare(cpu_t *cp, int flags); /* take cpu to spare */
665 int cpu_faulted(cpu_t *cp, int flags); /* take cpu to faulted */
666 int cpu_poweron(cpu_t *cp); /* take powered-off cpu to offline */
667 int cpu_poweroff(cpu_t *cp); /* take offline cpu to powered-off */
668
669 cpu_t *cpu_intr_next(cpu_t *cp); /* get next online CPU taking intrs */
670 int cpu_intr_count(cpu_t *cp); /* count # of CPUs handling intrs */
671 int cpu_intr_on(cpu_t *cp); /* CPU taking I/O interrupts? */
672 void cpu_intr_enable(cpu_t *cp); /* enable I/O interrupts */
673 int cpu_intr_disable(cpu_t *cp); /* disable I/O interrupts */
674 void cpu_intr_alloc(cpu_t *cp, int n); /* allocate interrupt threads */
675
|
635 void cpu_delete_intrstat(cpu_t *);
636 int cpu_kstat_intrstat_update(kstat_t *, int);
637 void cpu_intr_swtch_enter(kthread_t *);
638 void cpu_intr_swtch_exit(kthread_t *);
639
640 void mbox_lock_init(void); /* initialize cross-call locks */
641 void mbox_init(int cpun); /* initialize cross-calls */
642 void poke_cpu(int cpun); /* interrupt another CPU (to preempt) */
643
644 /*
645 * values for safe_list. Pause state that CPUs are in.
646 */
647 #define PAUSE_IDLE 0 /* normal state */
648 #define PAUSE_READY 1 /* paused thread ready to spl */
649 #define PAUSE_WAIT 2 /* paused thread is spl-ed high */
650 #define PAUSE_DIE 3 /* tell pause thread to leave */
651 #define PAUSE_DEAD 4 /* pause thread has left */
652
653 void mach_cpu_pause(volatile char *);
654
655 void pause_cpus(cpu_t *off_cp, void *(*func)(void *));
656 void start_cpus(void);
657 int cpus_paused(void);
658
659 void cpu_pause_init(void);
660 cpu_t *cpu_get(processorid_t cpun); /* get the CPU struct associated */
661
662 int cpu_online(cpu_t *cp); /* take cpu online */
663 int cpu_offline(cpu_t *cp, int flags); /* take cpu offline */
664 int cpu_spare(cpu_t *cp, int flags); /* take cpu to spare */
665 int cpu_faulted(cpu_t *cp, int flags); /* take cpu to faulted */
666 int cpu_poweron(cpu_t *cp); /* take powered-off cpu to offline */
667 int cpu_poweroff(cpu_t *cp); /* take offline cpu to powered-off */
668
669 cpu_t *cpu_intr_next(cpu_t *cp); /* get next online CPU taking intrs */
670 int cpu_intr_count(cpu_t *cp); /* count # of CPUs handling intrs */
671 int cpu_intr_on(cpu_t *cp); /* CPU taking I/O interrupts? */
672 void cpu_intr_enable(cpu_t *cp); /* enable I/O interrupts */
673 int cpu_intr_disable(cpu_t *cp); /* disable I/O interrupts */
674 void cpu_intr_alloc(cpu_t *cp, int n); /* allocate interrupt threads */
675
|