URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
199 |
simons |
#ifndef __LINUX_SMP_H
|
2 |
|
|
#define __LINUX_SMP_H
|
3 |
|
|
|
4 |
|
|
/*
|
5 |
|
|
* Generic SMP support
|
6 |
|
|
* Alan Cox. <alan@cymru.net>
|
7 |
|
|
*/
|
8 |
|
|
|
9 |
|
|
#ifdef __SMP__
|
10 |
|
|
#include <asm/smp.h>
|
11 |
|
|
|
12 |
|
|
extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
|
13 |
|
|
extern void smp_boot_cpus(void); /* Boot processor call to load the other CPU's */
|
14 |
|
|
extern void smp_callin(void); /* Processor call in. Must hold processors until .. */
|
15 |
|
|
extern void smp_commence(void); /* Multiprocessors may now schedule */
|
16 |
|
|
extern int smp_num_cpus;
|
17 |
|
|
extern int smp_threads_ready; /* True once the per process idle is forked */
|
18 |
|
|
#ifdef __SMP_PROF__
|
19 |
|
|
extern volatile unsigned long smp_spins[NR_CPUS]; /* count of interrupt spins */
|
20 |
|
|
extern volatile unsigned long smp_spins_sys_idle[]; /* count of idle spins */
|
21 |
|
|
extern volatile unsigned long smp_spins_syscall[]; /* count of syscall spins */
|
22 |
|
|
extern volatile unsigned long smp_spins_syscall_cur[]; /* count of syscall spins for the current
|
23 |
|
|
call */
|
24 |
|
|
extern volatile unsigned long smp_idle_count[1+NR_CPUS];/* count idle ticks */
|
25 |
|
|
extern volatile unsigned long smp_idle_map; /* map with idle cpus */
|
26 |
|
|
#else
|
27 |
|
|
extern volatile unsigned long smp_spins;
|
28 |
|
|
#endif
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
extern volatile unsigned long smp_msg_data;
|
32 |
|
|
extern volatile int smp_src_cpu;
|
33 |
|
|
extern volatile int smp_msg_id;
|
34 |
|
|
|
35 |
|
|
#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */
|
36 |
|
|
#define MSG_ALL 0x8001
|
37 |
|
|
|
38 |
|
|
#define MSG_INVALIDATE_TLB 0x0001 /* Remote processor TLB invalidate */
|
39 |
|
|
#define MSG_STOP_CPU 0x0002 /* Sent to shut down slave CPU's when rebooting */
|
40 |
|
|
#define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU */
|
41 |
|
|
|
42 |
|
|
#else
|
43 |
|
|
|
44 |
|
|
/*
|
45 |
|
|
* These macros fold the SMP functionality into a single CPU system
|
46 |
|
|
*/
|
47 |
|
|
|
48 |
|
|
#define smp_num_cpus 1
|
49 |
|
|
#define smp_processor_id() 0
|
50 |
|
|
#define smp_message_pass(t,m,d,w)
|
51 |
|
|
#define smp_threads_ready 1
|
52 |
|
|
#define kernel_lock()
|
53 |
|
|
#endif
|
54 |
|
|
#endif
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.