kernel-ark/arch/mips
Maciej W. Rozycki 60b0d65541 [MIPS] SYNC emulation for MIPS I processors
Userland, including the C library and the dynamic linker, is keen to use
the SYNC instruction, even for "generic" MIPS I binaries these days.
Which makes it less than useful on MIPS I processors.

This change adds the emulation, but as our do_ri() infrastructure was not
really prepared to take yet another instruction, I have rewritten it and
its callees slightly as follows.

Now there is only a single place a possible signal is thrown from.  The
place is at the end of do_ri().  The instruction word is fetched in
do_ri() and passed down to handlers.  The handlers are called in sequence
and return a result that lets the caller decide upon further processing.
If the result is positive, then the handler has picked the instruction,
but a signal should be thrown and the result is the signal number.  If the
result is zero, then the handler has successfully simulated the
instruction.  If the result is negative, then the handler did not handle
the instruction; to make it more obvious the calls do not follow the usual
0/-Exxx result convention they now return -1 instead of -EFAULT.

The calculation of the return EPC is now at the beginning.  The reason is
it is easier to handle it there as emulation callees may modify a register
and an instruction may be located in delay slot of a branch whose result
depends on the register.  It has to be undone if a signal is to be raised,
but it is not a problem as this is the slow-path case, and both actions
are done in single places now rather than the former being scattered
through emulation handlers.

The part of do_cpu() being covered follows the changes to do_ri().

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

---
2007-10-17 18:28:47 +01:00
..
au1000 [MIPS] Alchemy: Get rid of au1xxx_irq_map_t. 2007-10-16 18:23:48 +01:00
basler/excite [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
bcm47xx [MIPS] Deforest the function pointer jungle in the time code. 2007-10-11 23:46:08 +01:00
boot [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
cobalt [MIPS] Cobalt: Remove cobalt_machine_power_off() 2007-10-11 23:46:14 +01:00
configs Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2007-10-11 19:40:14 -07:00
dec [MIPS] Allow hardwiring of the CPU type to a single type for optimization. 2007-10-11 23:46:15 +01:00
emma2rh [MIPS] Deforest the function pointer jungle in the time code. 2007-10-11 23:46:08 +01:00
fw [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
gt64120/wrppmc [MIPS] WRPPMC serial support move to platform device 2007-10-11 23:46:19 +01:00
jazz [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
jmr3927 rtc: make rtc-ds1742 driver hotplug-aware 2007-10-16 09:43:13 -07:00
kernel [MIPS] SYNC emulation for MIPS I processors 2007-10-17 18:28:47 +01:00
lasat [MIPS] Lasat: Fix build by conversion to irq_cpu.c. 2007-10-16 18:23:47 +01:00
lemote/lm2e [MIPS] Deforest the function pointer jungle in the time code. 2007-10-11 23:46:08 +01:00
lib [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
math-emu [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
mips-boards [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
mipssim [MIPS] MIPSsim: Fix booting from NFS root 2007-10-16 18:23:49 +01:00
mm Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
oprofile [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
pci spin_lock_unlocked cleanups 2007-10-17 08:43:01 -07:00
philips/pnx8550 [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
pmc-sierra [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
qemu [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
sgi-ip22 [MIPS] IP22: Enable -Werror. 2007-10-16 18:23:47 +01:00
sgi-ip27 [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
sgi-ip32 [MIPS] IP32: Fix build by conversion to irq_cpu.c. 2007-10-16 18:23:45 +01:00
sibyte [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
sni [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
tx4927 rtc: make rtc-ds1742 driver hotplug-aware 2007-10-16 09:43:13 -07:00
tx4938 [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
vr41xx [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
defconfig
Kconfig [MIPS] Lasat: Fix build by conversion to irq_cpu.c. 2007-10-16 18:23:47 +01:00
Kconfig.debug
Makefile lk201: remove obsolete driver 2007-10-17 08:42:57 -07:00