1129198Scognet/* $FreeBSD$ */
2129198Scognet
3129198Scognet#ifndef _MACHINE_SMP_H_
4129198Scognet#define _MACHINE_SMP_H_
5129198Scognet
6239268Sgonzo#include <sys/_cpuset.h>
7253768Scognet#include <machine/pcb.h>
8239268Sgonzo
9298068Sandrew#ifdef INTRNG
10289529Sianenum {
11289529Sian	IPI_AST,
12289529Sian	IPI_PREEMPT,
13289529Sian	IPI_RENDEZVOUS,
14289529Sian	IPI_STOP,
15289529Sian	IPI_STOP_HARD = IPI_STOP, /* These are synonyms on arm. */
16289529Sian	IPI_HARDCLOCK,
17295073Smmel	IPI_TLB,		/* Not used now, but keep it reserved. */
18295073Smmel	IPI_CACHE,		/* Not used now, but keep it reserved. */
19292426Sadrian	INTR_IPI_COUNT
20289529Sian};
21289529Sian#else
22239268Sgonzo#define IPI_AST		0
23239268Sgonzo#define IPI_PREEMPT	2
24239268Sgonzo#define IPI_RENDEZVOUS	3
25239268Sgonzo#define IPI_STOP	4
26265023Sian#define IPI_STOP_HARD	4
27239268Sgonzo#define IPI_HARDCLOCK	6
28295073Smmel#define IPI_TLB		7	/* Not used now, but keep it reserved. */
29295073Smmel#define IPI_CACHE	8	/* Not used now, but keep it reserved. */
30289529Sian#endif /* INTRNG */
31239268Sgonzo
32239268Sgonzovoid	init_secondary(int cpu);
33262409Sianvoid	mpentry(void);
34239268Sgonzo
35239268Sgonzovoid	ipi_all_but_self(u_int ipi);
36239268Sgonzovoid	ipi_cpu(int cpu, u_int ipi);
37239268Sgonzovoid	ipi_selected(cpuset_t cpus, u_int ipi);
38239268Sgonzo
39239268Sgonzo/* PIC interface */
40298068Sandrew#ifndef INTRNG
41239268Sgonzovoid	pic_ipi_send(cpuset_t cpus, u_int ipi);
42239268Sgonzovoid	pic_ipi_clear(int ipi);
43276180Sandrewint	pic_ipi_read(int arg);
44289529Sian#endif
45239268Sgonzo
46239268Sgonzo/* Platform interface */
47239268Sgonzovoid	platform_mp_setmaxid(void);
48239268Sgonzovoid	platform_mp_start_ap(void);
49239268Sgonzo
50253762Scognet/* global data in mp_machdep.c */
51253762Scognetextern struct pcb               stoppcbs[];
52253762Scognet
53129198Scognet#endif /* !_MACHINE_SMP_H_ */
54