Return-Path: <pgsql-hackers-owner+M20576@postgresql.org>
Received: from cart.mp.agile.tv (cart.mp.agile.tv [192.168.0.4])
	by surfers.oz.agile.tv (8.11.6/8.11.2) with ESMTP id g2R9pWE28921
	for <whunter@oz.agile.tv>; Wed, 27 Mar 2002 19:51:32 +1000
Received: from gatekeeper.agile.tv (ns1.agile.tv [64.232.86.197])
	by cart.mp.agile.tv (8.11.6/emg20020209-int) with ESMTP id g2R9pVH11035
	for <whunter@oz.agile.tv>; Wed, 27 Mar 2002 01:51:31 -0800
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by gatekeeper.agile.tv (8.11.0/emg20010629-ext) with ESMTP id
	g2R9pUY02444
	for <whunter@oz.agile.tv>; Wed, 27 Mar 2002 01:51:31 -0800
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by postgresql.org (Postfix) with SMTP
	id 031F6475E9A; Wed, 27 Mar 2002 04:47:40 -0500 (EST)
Received: from anchor-post-36.mail.demon.net (anchor-post-36.mail.demon.net
	[194.217.242.94])
	by postgresql.org (Postfix) with ESMTP id 37948475B54
	for <pgsql-hackers@postgresql.org>;
	Wed, 27 Mar 2002 04:46:15 -0500 (EST)
Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk)
	by anchor-post-36.mail.demon.net with esmtp (Exim 3.35 #1)
	id 16qA0U-000G0E-0a; Wed, 27 Mar 2002 09:46:15 +0000
Received: from localhost ([127.0.0.1] helo=localhost.localdomain ident=olly)
	by linda.lfix.co.uk with esmtp (Exim 3.35 #1 (Debian))
	id 16qA0L-0002BF-00; Wed, 27 Mar 2002 09:46:05 +0000
Subject: [HACKERS] Linux/mips compile: [Fwd: Bug#139003: a little bit more is
	needed...]
From: Oliver Elphick <olly@lfix.co.uk>
To: pgsql-hackers@postgresql.org
Cc: rmurray@debian.org
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="=-Zd+0ZcrpBCpp9VY6uMyv"
X-Mailer: Evolution/1.0.2 
Date: 27 Mar 2002 09:46:04 +0000
Message-Id: <1017222365.1228.274.camel@linda>
Mime-Version: 1.0
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org

--=-Zd+0ZcrpBCpp9VY6uMyv
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

-----Forwarded Message-----

From: rmurray@debian.org
To: 139003@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Bug#139003: a little bit more is needed...
Date: 27 Mar 2002 00:21:18 -0800

reopen 139003
thanks

Looks like a small patch is needed as well to do the right thing on Linux.

The patch enables the mips2 ISA for the ll/sc operations, and then restores
it when done.  The kernel/libc emulation code will take over on CPUs without
ll/sc, and on CPUs with it, it'll use the operations provided by the CPU.

Combined with the earlier fix (removing -mips2), postgresql builds again on
mips and mipsel.  The patch is against 7.2-7.

diff -urN postgresql-7.2/src/backend/storage/lmgr/s_lock.c postgresql-7.2.f=
ixed/src/backend/storage/lmgr/s_lock.c
--- postgresql-7.2/src/backend/storage/lmgr/s_lock.c	Mon Nov  5 18:46:28 20=
01
+++ postgresql-7.2.fixed/src/backend/storage/lmgr/s_lock.c	Wed Mar 27 07:46=
:59 2002
@@ -173,9 +173,12 @@
 .global	tas						\n\
 tas:							\n\
 			.frame	$sp, 0, $31	\n\
+			.set push		\n\
+			.set mips2		\n\n
 			ll		$14, 0($4)	\n\
 			or		$15, $14, 1	\n\
 			sc		$15, 0($4)	\n\
+			.set pop			\n\
 			beq		$15, 0, fail\n\
 			bne		$14, 0, fail\n\
 			li		$2, 0		\n\



--=-Zd+0ZcrpBCpp9VY6uMyv
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA8oZTcYU1MND4dDBwRAoauAJ4t+mR9gTqOYDdaDKLKytoPj811YwCgz/4k
D34xRYM+se1wuNOGGQST3Yo=
=Hmbh
-----END PGP SIGNATURE-----

--=-Zd+0ZcrpBCpp9VY6uMyv--
