diff --git a/UPDATING b/UPDATING index ed08c78df016..fcb9817bb902 100644 --- a/UPDATING +++ b/UPDATING @@ -51,6 +51,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170625: + The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is + a very major ABI incompatible change, so users of FreeBSD/powerpc must + be careful when performing source upgrades. It is best to run + 'make installworld' from an alternate root system, either a live + CD/memory stick, or a temporary root partition. Additionally, all ports + must be recompiled. powerpc64 is largely unaffected, except in the case + of 32-bit compatibility. All 32-bit binaries will be affected. + 20170623: Forward compatibility for the "ino64" project have been committed. This will allow most new binaries to run on older kernels in a limited diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 63f64ad7361d..912367741b4c 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -203,8 +203,8 @@ Machine-dependent type sizes: .It mips64el Ta 8 Ta 8 Ta 8 .It mips64elhf Ta 8 Ta 8 Ta 8 .It mips64hf Ta 8 Ta 8 Ta 8 -.It powerpc Ta 4 Ta 8 Ta 4 -.It powerpcspe Ta 4 Ta 8 Ta 4 +.It powerpc Ta 4 Ta 8 Ta 8 +.It powerpcspe Ta 4 Ta 8 Ta 8 .It powerpc64 Ta 8 Ta 8 Ta 8 .It riscv64 Ta 8 Ta 16 Ta 8 .It riscv64sf Ta 8 Ta 16 Ta 8 diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 86211b556a1d..20b8a7028a54 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -45,7 +45,7 @@ /* * Being a newer port, 32-bit FreeBSD/MIPS uses 64-bit time_t. */ -#ifdef __mips__ +#if defined (__mips__) || defined(__powerpc__) typedef int64_t time32_t; #else typedef int32_t time32_t; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 826b1b3e9784..013350f57b6b 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -109,13 +109,13 @@ __FBSDID("$FreeBSD$"); FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); -#ifndef __mips__ +#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct timeval32) == 8); CTASSERT(sizeof(struct timespec32) == 8); CTASSERT(sizeof(struct itimerval32) == 16); #endif CTASSERT(sizeof(struct statfs32) == 256); -#ifndef __mips__ +#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); @@ -125,7 +125,7 @@ CTASSERT(sizeof(struct msghdr32) == 28); #ifdef __amd64__ CTASSERT(sizeof(struct stat32) == 208); #endif -#ifndef __mips__ +#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct freebsd11_stat32) == 96); #endif CTASSERT(sizeof(struct sigaction32) == 24); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 23616705bafd..36e2d45de584 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1283,7 +1283,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, #endif case BIOCGETIF: case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCGRTIMEOUT32: #endif case BIOCGSTATS: @@ -1295,7 +1295,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, case FIONREAD: case BIOCLOCK: case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCSRTIMEOUT32: #endif case BIOCIMMEDIATE: @@ -1519,7 +1519,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, * Set read timeout. */ case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCSRTIMEOUT32: #endif { @@ -1550,12 +1550,12 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, * Get read timeout. */ case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCGRTIMEOUT32: #endif { struct timeval *tv; -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) struct timeval32 *tv32; struct timeval tv64; @@ -1567,7 +1567,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, tv->tv_sec = d->bd_rtout / hz; tv->tv_usec = (d->bd_rtout % hz) * tick; -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) if (cmd == BIOCGRTIMEOUT32) { tv32 = (struct timeval32 *)addr; tv32->tv_sec = tv->tv_sec; diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h index fc2285fecfec..0e5a941b4617 100644 --- a/sys/powerpc/include/_types.h +++ b/sys/powerpc/include/_types.h @@ -98,16 +98,18 @@ typedef __int64_t __register_t; typedef __int64_t __segsz_t; /* segment size (in pages) */ typedef __uint64_t __size_t; /* sizeof() */ typedef __int64_t __ssize_t; /* byte count or error */ -typedef __int64_t __time_t; /* time()... */ -typedef __uint64_t __uintfptr_t; -typedef __uint64_t __uintptr_t; #else typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int32_t __register_t; typedef __int32_t __segsz_t; /* segment size (in pages) */ typedef __uint32_t __size_t; /* sizeof() */ typedef __int32_t __ssize_t; /* byte count or error */ -typedef __int32_t __time_t; /* time()... */ +#endif +typedef __int64_t __time_t; /* time()... */ +#ifdef __LP64__ +typedef __uint64_t __uintfptr_t; +typedef __uint64_t __uintptr_t; +#else typedef __uint32_t __uintfptr_t; typedef __uint32_t __uintptr_t; #endif diff --git a/sys/powerpc/include/proc.h b/sys/powerpc/include/proc.h index d11cf8812952..4e3cb629b685 100644 --- a/sys/powerpc/include/proc.h +++ b/sys/powerpc/include/proc.h @@ -48,9 +48,9 @@ struct mdproc { #ifdef __powerpc64__ #define KINFO_PROC_SIZE 1088 -#define KINFO_PROC32_SIZE 768 +#define KINFO_PROC32_SIZE 816 #else -#define KINFO_PROC_SIZE 768 +#define KINFO_PROC_SIZE 816 #endif struct syscall_args { diff --git a/sys/sys/acct.h b/sys/sys/acct.h index fc033b588124..9bf6800a4eb0 100644 --- a/sys/sys/acct.h +++ b/sys/sys/acct.h @@ -66,9 +66,6 @@ struct acctv3 { float ac_io; /* count of IO blocks */ __dev_t ac_tty; /* controlling tty */ uint32_t ac_pad0; -#if defined(__powerpc__) && !defined(_LP64) - uint32_t ac_pad1; -#endif uint16_t ac_len2; /* record length */ union { uint32_t ac_align; /* force v1 compatible alignment */ diff --git a/sys/sys/param.h b/sys/sys/param.h index 8ff864d408f2..de0766e445e8 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200035 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200036 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,