Skip to content

Commit edadeb0

Browse files
committed
Remove support for HPPA (a/k/a PA-RISC) architecture.
This old CPU architecture hasn't been produced in decades, and whatever instances might still survive are surely too underpowered for anyone to consider running Postgres on in production. We'd nonetheless continued to carry code support for it (largely at my insistence), because its unique implementation of spinlocks seemed like a good edge case for our spinlock infrastructure. However, our last buildfarm animal of this type was retired last year, and it seems quite unlikely that another will emerge. Without the ability to run tests, the argument that this is useful test code fails to hold water. Furthermore, carrying code support for an untestable architecture has costs not to be ignored. So, remove HPPA-specific code, in the same vein as commits 718aa43 and 92d70b7. Discussion: https://postgr.es/m/3351991.1697728588@sss.pgh.pa.us
1 parent 7967d10 commit edadeb0

File tree

8 files changed

+5
-107
lines changed

8 files changed

+5
-107
lines changed

contrib/pgcrypto/crypt-blowfish.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#ifdef __i386__
4242
#define BF_ASM 0 /* 1 */
4343
#define BF_SCALE 1
44-
#elif defined(__x86_64__) || defined(__hppa__)
44+
#elif defined(__x86_64__)
4545
#define BF_ASM 0
4646
#define BF_SCALE 1
4747
#else

doc/src/sgml/installation.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3390,8 +3390,8 @@ export MANPATH
33903390

33913391
<para>
33923392
In general, <productname>PostgreSQL</productname> can be expected to work on
3393-
these CPU architectures: x86, PowerPC, S/390, SPARC, ARM, MIPS, RISC-V,
3394-
and PA-RISC, including
3393+
these CPU architectures: x86, PowerPC, S/390, SPARC, ARM, MIPS,
3394+
and RISC-V, including
33953395
big-endian, little-endian, 32-bit, and 64-bit variants where applicable.
33963396
It is often
33973397
possible to build on an unsupported CPU type by configuring with
@@ -3422,7 +3422,8 @@ export MANPATH
34223422
<para>
34233423
Historical versions of <productname>PostgreSQL</productname> or POSTGRES
34243424
also ran on CPU architectures including Alpha, Itanium, M32R, M68K,
3425-
M88K, NS32K, SuperH, and VAX, and operating systems including 4.3BSD, AIX, BEOS,
3425+
M88K, NS32K, PA-RISC, SuperH, and VAX,
3426+
and operating systems including 4.3BSD, AIX, BEOS,
34263427
BSD/OS, DG/UX, Dynix, HP-UX, IRIX, NeXTSTEP, QNX, SCO, SINIX, Sprite, SunOS,
34273428
Tru64 UNIX, and ULTRIX.
34283429
</para>

src/backend/storage/lmgr/s_lock.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ s_lock(volatile slock_t *lock, const char *file, int line, const char *func)
116116
void
117117
s_unlock(volatile slock_t *lock)
118118
{
119-
#ifdef TAS_ACTIVE_WORD
120-
/* HP's PA-RISC */
121-
*TAS_ACTIVE_WORD(lock) = -1;
122-
#else
123119
*lock = 0;
124-
#endif
125120
}
126121
#endif
127122

src/include/port/atomics.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@
6969
#include "port/atomics/arch-x86.h"
7070
#elif defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__)
7171
#include "port/atomics/arch-ppc.h"
72-
#elif defined(__hppa) || defined(__hppa__)
73-
#include "port/atomics/arch-hppa.h"
7472
#endif
7573

7674
/*

src/include/port/atomics/arch-hppa.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/include/port/atomics/fallback.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ typedef struct pg_atomic_flag
7575
* be content with just one byte instead of 4, but that's not too much
7676
* waste.
7777
*/
78-
#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC, GCC and HP compilers */
79-
int sema[4];
80-
#else
8178
int sema;
82-
#endif
8379
volatile bool value;
8480
} pg_atomic_flag;
8581

@@ -93,11 +89,7 @@ typedef struct pg_atomic_flag
9389
typedef struct pg_atomic_uint32
9490
{
9591
/* Check pg_atomic_flag's definition above for an explanation */
96-
#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC */
97-
int sema[4];
98-
#else
9992
int sema;
100-
#endif
10193
volatile uint32 value;
10294
} pg_atomic_uint32;
10395

@@ -111,11 +103,7 @@ typedef struct pg_atomic_uint32
111103
typedef struct pg_atomic_uint64
112104
{
113105
/* Check pg_atomic_flag's definition above for an explanation */
114-
#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC */
115-
int sema[4];
116-
#else
117106
int sema;
118-
#endif
119107
volatile uint64 value;
120108
} pg_atomic_uint64;
121109

src/include/storage/s_lock.h

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -526,71 +526,6 @@ do \
526526
#endif /* __mips__ && !__sgi */
527527

528528

529-
#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC */
530-
/*
531-
* HP's PA-RISC
532-
*
533-
* Because LDCWX requires a 16-byte-aligned address, we declare slock_t as a
534-
* 16-byte struct. The active word in the struct is whichever has the aligned
535-
* address; the other three words just sit at -1.
536-
*/
537-
#define HAS_TEST_AND_SET
538-
539-
typedef struct
540-
{
541-
int sema[4];
542-
} slock_t;
543-
544-
#define TAS_ACTIVE_WORD(lock) ((volatile int *) (((uintptr_t) (lock) + 15) & ~15))
545-
546-
static __inline__ int
547-
tas(volatile slock_t *lock)
548-
{
549-
volatile int *lockword = TAS_ACTIVE_WORD(lock);
550-
int lockval;
551-
552-
/*
553-
* The LDCWX instruction atomically clears the target word and
554-
* returns the previous value. Hence, if the instruction returns
555-
* 0, someone else has already acquired the lock before we tested
556-
* it (i.e., we have failed).
557-
*
558-
* Notice that this means that we actually clear the word to set
559-
* the lock and set the word to clear the lock. This is the
560-
* opposite behavior from the SPARC LDSTUB instruction. For some
561-
* reason everything that H-P does is rather baroque...
562-
*
563-
* For details about the LDCWX instruction, see the "Precision
564-
* Architecture and Instruction Reference Manual" (09740-90014 of June
565-
* 1987), p. 5-38.
566-
*/
567-
__asm__ __volatile__(
568-
" ldcwx 0(0,%2),%0 \n"
569-
: "=r"(lockval), "+m"(*lockword)
570-
: "r"(lockword)
571-
: "memory");
572-
return (lockval == 0);
573-
}
574-
575-
#define S_UNLOCK(lock) \
576-
do { \
577-
__asm__ __volatile__("" : : : "memory"); \
578-
*TAS_ACTIVE_WORD(lock) = -1; \
579-
} while (0)
580-
581-
#define S_INIT_LOCK(lock) \
582-
do { \
583-
volatile slock_t *lock_ = (lock); \
584-
lock_->sema[0] = -1; \
585-
lock_->sema[1] = -1; \
586-
lock_->sema[2] = -1; \
587-
lock_->sema[3] = -1; \
588-
} while (0)
589-
590-
#define S_LOCK_FREE(lock) (*TAS_ACTIVE_WORD(lock) != 0)
591-
592-
#endif /* __hppa || __hppa__ */
593-
594529

595530
/*
596531
* If we have no platform-specific knowledge, but we found that the compiler

src/tools/pginclude/headerscheck

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,10 @@ do
107107
# Likewise, these files are platform-specific, and the one
108108
# relevant to our platform will be included by atomics.h.
109109
test "$f" = src/include/port/atomics/arch-arm.h && continue
110-
test "$f" = src/include/port/atomics/arch-hppa.h && continue
111110
test "$f" = src/include/port/atomics/arch-ppc.h && continue
112111
test "$f" = src/include/port/atomics/arch-x86.h && continue
113112
test "$f" = src/include/port/atomics/fallback.h && continue
114113
test "$f" = src/include/port/atomics/generic.h && continue
115-
test "$f" = src/include/port/atomics/generic-acc.h && continue
116114
test "$f" = src/include/port/atomics/generic-gcc.h && continue
117115
test "$f" = src/include/port/atomics/generic-msvc.h && continue
118116
test "$f" = src/include/port/atomics/generic-sunpro.h && continue

0 commit comments

Comments
 (0)