summaryrefslogtreecommitdiff
path: root/sys/i386/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/cpufunc.h27
-rw-r--r--sys/i386/include/mptable.h6
-rw-r--r--sys/i386/include/pcb.h3
-rw-r--r--sys/i386/include/pcpu.h6
-rw-r--r--sys/i386/include/proc.h1
5 files changed, 21 insertions, 22 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index ed1da94bae9e..2b0abcc6aae6 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -45,6 +45,8 @@
#include <sys/cdefs.h>
#include <machine/psl.h>
+struct thread;
+
__BEGIN_DECLS
#define readb(va) (*(volatile u_int8_t *) (va))
#define readw(va) (*(volatile u_int16_t *) (va))
@@ -54,8 +56,6 @@ __BEGIN_DECLS
#define writew(va, d) (*(volatile u_int16_t *) (va) = (d))
#define writel(va, d) (*(volatile u_int32_t *) (va) = (d))
-#define CRITICAL_FORK (read_eflags() | PSL_I)
-
#ifdef __GNUC__
#ifdef SWTCH_OPTIM_STATS
@@ -562,22 +562,6 @@ load_dr7(u_int sel)
__asm __volatile("movl %0,%%dr7" : : "r" (sel));
}
-static __inline critical_t
-cpu_critical_enter(void)
-{
- critical_t eflags;
-
- eflags = read_eflags();
- disable_intr();
- return (eflags);
-}
-
-static __inline void
-cpu_critical_exit(critical_t eflags)
-{
- write_eflags(eflags);
-}
-
static __inline register_t
intr_disable(void)
{
@@ -629,8 +613,6 @@ u_int rfs(void);
u_int rgs(void);
void load_fs(u_int sel);
void load_gs(u_int sel);
-critical_t cpu_critical_enter(void);
-void cpu_critical_exit(critical_t eflags);
#endif /* __GNUC__ */
@@ -642,6 +624,11 @@ u_int rcr0(void);
u_int rcr3(void);
u_int rcr4(void);
void reset_dbregs(void);
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
+void cpu_critical_fork_exit(void);
+void cpu_thread_link(struct thread *td);
+
__END_DECLS
#endif /* !_MACHINE_CPUFUNC_H_ */
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 4f891db6d430..50c91c7af0cc 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -2310,6 +2310,9 @@ ap_init(void)
/*
* For statclock, we send an IPI to all CPU's to have them call this
* function.
+ *
+ * WARNING! unpend() will call statclock_process() directly and skip this
+ * routine.
*/
void
forwarded_statclock(struct trapframe frame)
@@ -2341,6 +2344,9 @@ forward_statclock(void)
* sched_lock if we could simply peek at the CPU to determine the user/kernel
* state and call hardclock_process() on the CPU receiving the clock interrupt
* and then just use a simple IPI to handle any ast's if needed.
+ *
+ * WARNING! unpend() will call hardclock_process() directly and skip this
+ * routine.
*/
void
forwarded_hardclock(struct trapframe frame)
diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h
index b2f1bc43a9cf..860b3b5143b4 100644
--- a/sys/i386/include/pcb.h
+++ b/sys/i386/include/pcb.h
@@ -69,7 +69,8 @@ struct pcb {
caddr_t pcb_onfault; /* copyin/out fault recovery */
int pcb_gs;
struct pcb_ext *pcb_ext; /* optional pcb extension */
- u_long __pcb_spare[3]; /* adjust to avoid core dump size changes */
+ int pcb_psl; /* process status long */
+ u_long __pcb_spare[2]; /* adjust to avoid core dump size changes */
};
/*
diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h
index 5fecb9871e6f..eba526c9b8e7 100644
--- a/sys/i386/include/pcpu.h
+++ b/sys/i386/include/pcpu.h
@@ -50,7 +50,11 @@
struct i386tss pc_common_tss; \
struct segment_descriptor pc_common_tssd; \
struct segment_descriptor *pc_tss_gdt; \
- int pc_currentldt
+ int pc_currentldt; \
+ u_int32_t pc_int_pending; /* master int pending flag */ \
+ u_int32_t pc_ipending; /* pending slow interrupts */ \
+ u_int32_t pc_fpending; /* pending fast interrupts */ \
+ u_int32_t pc_spending /* pending soft interrupts */
/*
* Evaluates to the byte offset of the per-cpu variable name.
diff --git a/sys/i386/include/proc.h b/sys/i386/include/proc.h
index f011b5c37149..d7d5ef73acff 100644
--- a/sys/i386/include/proc.h
+++ b/sys/i386/include/proc.h
@@ -51,6 +51,7 @@ struct proc_ldt {
* Machine-dependent part of the proc structure for i386.
*/
struct mdthread {
+ register_t md_savecrit;
};
struct mdproc {