pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. @ 2019-06-23 00:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-06-23 00:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1323bfce55109dd54ee164828aab7983d3020a25 Modified Files -------------- src/include/storage/s_lock.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. @ 2019-06-23 00:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-06-23 00:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/40dde829070ddebd3f8bbf06d8e1cc4bff2e0c06 Modified Files -------------- src/include/storage/s_lock.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. @ 2019-06-23 00:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-06-23 00:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/05399b14889e32f2714b428836c841b08d1d5258 Modified Files -------------- src/include/storage/s_lock.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. @ 2019-06-23 00:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-06-23 00:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9895e3a36a72beec296a319c0462a1aa691ead53 Modified Files -------------- src/include/storage/s_lock.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. @ 2019-06-23 00:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-06-23 00:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/36d2c3ad33f8af9415e41b12822516a3e1e68486 Modified Files -------------- src/include/storage/s_lock.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. @ 2019-06-23 00:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-06-23 00:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2854e2ab6806cc705d7ff92dd1f60f1cd70da98c Modified Files -------------- src/include/storage/s_lock.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2019-06-23 00:32 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-23 00:32 pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. Tom Lane <tgl@sss.pgh.pa.us> 2019-06-23 00:32 pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. Tom Lane <tgl@sss.pgh.pa.us> 2019-06-23 00:32 pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. Tom Lane <tgl@sss.pgh.pa.us> 2019-06-23 00:32 pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. Tom Lane <tgl@sss.pgh.pa.us> 2019-06-23 00:32 pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. Tom Lane <tgl@sss.pgh.pa.us> 2019-06-23 00:32 pgsql: Fix spinlock assembly code for MIPS so it works on MIPS r6. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox