postgresql/src/include/storage
Tom Lane 05399b1488 Fix spinlock assembly code for MIPS so it works on MIPS r6.
Original MIPS-I processors didn't have the LL/SC instructions (nor any
other userland synchronization primitive).  If the build toolchain
targets that ISA variant by default, as an astonishingly large fraction
of MIPS platforms still do, the assembler won't take LL/SC without
coercion in the form of a ".set mips2" instruction.  But we issued that
unconditionally, making it an ISA downgrade for chips later than MIPS2.
That breaks things for the latest MIPS r6 ISA, which encodes these
instructions differently.  Adjust the code so we don't change ISA level
if it's >= 2.

Note that this patch doesn't change what happens on an actual MIPS-I
processor: either the kernel will emulate these instructions
transparently, or you'll get a SIGILL failure.  That tradeoff seemed
fine in 2002 when this code was added (cf 3cbe6b247), and it's even
more so today when MIPS-I is basically extinct.  But let's add a
comment about that.

YunQiang Su (with cosmetic adjustments by me).  Back-patch to all
supported branches.

Discussion: https://postgr.es/m/15844-8f62fe7e163939b3@postgresql.org
2019-06-22 20:31:50 -04:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
block.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
buf.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
buf_internals.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
buffile.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
bufmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
bufpage.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
checksum.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
checksum_impl.h Make checksum_impl.h safe to compile with -fstrict-aliasing. 2018-08-31 12:26:47 -04:00
condition_variable.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
copydir.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
dsm.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
dsm_impl.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
fd.h PANIC on fsync() failure. 2018-11-19 13:40:57 +13:00
freespace.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
fsm_internals.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
indexfsm.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
ipc.h Consistently test for in-use shared memory. 2019-04-12 22:36:42 -07:00
item.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
itemid.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
itemptr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
large_object.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
latch.h Fix misc typos, mostly in comments. 2018-07-18 16:18:27 +03:00
lmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
lock.h Fix longstanding recursion hazard in sinval message processing. 2018-09-07 18:04:56 -04:00
lockdefs.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
lwlock.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
off.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pg_sema.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pg_shmem.h Consistently test for in-use shared memory. 2019-04-12 22:36:42 -07:00
pmsignal.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
predicate.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
predicate_internals.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
proc.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
procarray.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
proclist.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
proclist_types.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
procsignal.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
reinit.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
relfilenode.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
s_lock.h Fix spinlock assembly code for MIPS so it works on MIPS r6. 2019-06-22 20:31:50 -04:00
shm_mq.h Clean up shm_mq cleanup. 2017-08-31 15:10:24 -04:00
shm_toc.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
shmem.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
sinval.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
sinvaladt.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
smgr.h Track unowned relations in doubly-linked list 2019-03-27 03:19:33 +01:00
spin.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
standby.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
standbydefs.h Fix bugs in vacuum of shared rels, by keeping their relcache entries current. 2018-06-12 11:13:21 -07:00