freebsd-skq/sys/mips
neel c282e9faa8 Fix a problem seen when a new process was returning to userland
through fork_trampoline.

This was caused because we were clearing the SR_INT_IE and setting
SR_EXL bits of the status register at the same time. This meant
that if an interrupt happened while this MTC0 was making its way
through the pipeline the exception processing would see the
status register with SR_EXL bit set. This in turn would mean that
the COP_0_EXC_PC would not be updated so the return from exception
would be to an incorrect address.

It is easy to verify this fix by a program that forks in a loop
and the child just exits:

	while (1) {
	pid_t pid = vfork();
	if (pid == 0)
	       _exit(0);
	if (pid != -1)
	       waitpid(pid, NULL, 0);
	}

Also remove two instances where we set SR_EXL bit gratuitously in exception.S.

Approved by: imp (mentor)
2010-01-26 02:26:04 +00:00
..
adm5120 - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00
alchemy - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00
atheros - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00
cavium Export knowledge of the special bus space we use for the console to 2010-01-25 19:27:20 +00:00
compile
conf Fix device name for root.... 2010-01-25 16:55:31 +00:00
idt - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00
include Fix a problem seen when a new process was returning to userland 2010-01-26 02:26:04 +00:00
malta - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00
mips Fix a problem seen when a new process was returning to userland 2010-01-26 02:26:04 +00:00
rmi Changes the order of the setting the int happened (inside 2010-01-24 01:06:02 +00:00
sentry5 - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00
sibyte - Call post-boot fixup function in order to get proper static 2010-01-25 00:44:05 +00:00