Lists: | pgsql-hackers |
---|
From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | rmurray(at)debian(dot)org |
Subject: | Linux/mips compile: [Fwd: Bug#139003: a little bit more is needed...] |
Date: | 2002-03-27 09:46:04 |
Message-ID: | 1017222365.1228.274.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
-----Forwarded Message-----
From: rmurray(at)debian(dot)org
To: 139003(at)bugs(dot)debian(dot)org
Cc: control(at)bugs(dot)debian(dot)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.fixed/src/backend/storage/lmgr/s_lock.c
--- postgresql-7.2/src/backend/storage/lmgr/s_lock.c Mon Nov 5 18:46:28 2001
+++ 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\
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org, rmurray(at)debian(dot)org |
Subject: | Re: Linux/mips compile: [Fwd: Bug#139003: a little bit more |
Date: | 2002-04-04 06:55:08 |
Message-ID: | 200204040655.g346t8s09612@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Oliver Elphick wrote:
Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.
> -----Forwarded Message-----
>
> From: rmurray(at)debian(dot)org
> To: 139003(at)bugs(dot)debian(dot)org
> Cc: control(at)bugs(dot)debian(dot)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.fixed/src/backend/storage/lmgr/s_lock.c
> --- postgresql-7.2/src/backend/storage/lmgr/s_lock.c Mon Nov 5 18:46:28 2001
> +++ 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\
>
>
-- End of PGP section, PGP failed!
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org, rmurray(at)debian(dot)org |
Subject: | Re: Linux/mips compile: [Fwd: Bug#139003: a little bit more |
Date: | 2002-04-05 11:38:06 |
Message-ID: | 200204051138.g35Bc6Z08752@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Patch applied. Thanks.
---------------------------------------------------------------------------
Oliver Elphick wrote:
Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.
> -----Forwarded Message-----
>
> From: rmurray(at)debian(dot)org
> To: 139003(at)bugs(dot)debian(dot)org
> Cc: control(at)bugs(dot)debian(dot)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.fixed/src/backend/storage/lmgr/s_lock.c
> --- postgresql-7.2/src/backend/storage/lmgr/s_lock.c Mon Nov 5 18:46:28 2001
> +++ 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\
>
>
-- End of PGP section, PGP failed!
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026