diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 5 | ||||
| -rw-r--r-- | sys/amd64/amd64/swtch.s | 5 | ||||
| -rw-r--r-- | sys/i386/i386/swtch.s | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index ed4525fa118b..180b87be8fc7 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -327,6 +327,8 @@ ENTRY(savectx) * have to handle h/w bugs for reloading. We used to lose the * parent's npx state for forks by forgetting to reload. */ + pushfl + cli movl PCPU(NPXPROC),%eax testl %eax,%eax je 1f @@ -347,7 +349,8 @@ ENTRY(savectx) pushl %eax call bcopy addl $12,%esp +1: + popfl #endif /* DEV_NPX */ -1: ret diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s index ed4525fa118b..180b87be8fc7 100644 --- a/sys/amd64/amd64/swtch.s +++ b/sys/amd64/amd64/swtch.s @@ -327,6 +327,8 @@ ENTRY(savectx) * have to handle h/w bugs for reloading. We used to lose the * parent's npx state for forks by forgetting to reload. */ + pushfl + cli movl PCPU(NPXPROC),%eax testl %eax,%eax je 1f @@ -347,7 +349,8 @@ ENTRY(savectx) pushl %eax call bcopy addl $12,%esp +1: + popfl #endif /* DEV_NPX */ -1: ret diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index ed4525fa118b..180b87be8fc7 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -327,6 +327,8 @@ ENTRY(savectx) * have to handle h/w bugs for reloading. We used to lose the * parent's npx state for forks by forgetting to reload. */ + pushfl + cli movl PCPU(NPXPROC),%eax testl %eax,%eax je 1f @@ -347,7 +349,8 @@ ENTRY(savectx) pushl %eax call bcopy addl $12,%esp +1: + popfl #endif /* DEV_NPX */ -1: ret |
