From 757c3cdd5a4748e13d2aa6f57f6b8a0767bcae44 Mon Sep 17 00:00:00 2001 From: "Joe Richey joerichey@google.com" Date: Wed, 6 Sep 2017 15:16:59 -0700 Subject: [PATCH] unix: defer Getpagesize() to runtime In general, page size is not a function of the archetecture. This was addressed in the Go standard library here: https://go-review.googlesource.com/25051 This change simply defers to the standard library "syscall" package, which in turn defers to the runtime. This helps in addressing golang/go#10180 and also fixes a bug on ppc64. Currently, we return 65536 as the page size on ppc64, but the kernel supports 4k and 64k sizes, see here: http://elixir.free-electrons.com/linux/v4.13/source/arch/powerpc/include/asm/page.h#L24 Now that various page size calculations are not needed, various components are now dead code and can also be removed. This CL reverts: https://go-review.googlesource.com/14483 and part of: https://go-review.googlesource.com/30755 Change-Id: I9d7a2d96359054e0dca9c985b026c8072b2eeaf3 Reviewed-on: https://go-review.googlesource.com/62111 Reviewed-by: Austin Clements Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot --- unix/gccgo_linux_sparc64.go | 20 -------------------- unix/linux/types.go | 4 ---- unix/pagesize_unix.go | 15 +++++++++++++++ unix/syscall_darwin_386.go | 2 -- unix/syscall_darwin_amd64.go | 2 -- unix/syscall_darwin_arm.go | 2 -- unix/syscall_darwin_arm64.go | 2 -- unix/syscall_dragonfly_amd64.go | 2 -- unix/syscall_freebsd_386.go | 2 -- unix/syscall_freebsd_amd64.go | 2 -- unix/syscall_freebsd_arm.go | 2 -- unix/syscall_linux_386.go | 2 -- unix/syscall_linux_amd64.go | 2 -- unix/syscall_linux_arm.go | 2 -- unix/syscall_linux_arm64.go | 2 -- unix/syscall_linux_mips64x.go | 2 -- unix/syscall_linux_mipsx.go | 2 -- unix/syscall_linux_ppc64x.go | 2 -- unix/syscall_linux_s390x.go | 2 -- unix/syscall_linux_sparc64.go | 20 -------------------- unix/syscall_netbsd_386.go | 2 -- unix/syscall_netbsd_amd64.go | 2 -- unix/syscall_netbsd_arm.go | 2 -- unix/syscall_openbsd_386.go | 2 -- unix/syscall_openbsd_amd64.go | 2 -- unix/syscall_openbsd_arm.go | 4 ---- unix/syscall_solaris.go | 16 ---------------- unix/types_solaris.go | 4 ---- unix/zsyscall_solaris_amd64.go | 14 +------------- unix/ztypes_linux_386.go | 2 -- unix/ztypes_linux_amd64.go | 2 -- unix/ztypes_linux_arm.go | 2 -- unix/ztypes_linux_arm64.go | 2 -- unix/ztypes_linux_mips.go | 2 -- unix/ztypes_linux_mips64.go | 2 -- unix/ztypes_linux_mips64le.go | 2 -- unix/ztypes_linux_mipsle.go | 2 -- unix/ztypes_linux_ppc64.go | 2 -- unix/ztypes_linux_ppc64le.go | 2 -- unix/ztypes_linux_s390x.go | 2 -- 40 files changed, 16 insertions(+), 145 deletions(-) delete mode 100644 unix/gccgo_linux_sparc64.go create mode 100644 unix/pagesize_unix.go diff --git a/unix/gccgo_linux_sparc64.go b/unix/gccgo_linux_sparc64.go deleted file mode 100644 index 56332692c..000000000 --- a/unix/gccgo_linux_sparc64.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gccgo,linux,sparc64 - -package unix - -import "syscall" - -//extern sysconf -func realSysconf(name int) int64 - -func sysconf(name int) (n int64, err syscall.Errno) { - r := realSysconf(name) - if r < 0 { - return 0, syscall.GetErrno() - } - return r, 0 -} diff --git a/unix/linux/types.go b/unix/linux/types.go index 0c381eb59..426be5eb4 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -535,10 +535,6 @@ const RNDGETENTCNT = C.RNDGETENTCNT const PERF_IOC_FLAG_GROUP = C.PERF_IOC_FLAG_GROUP -// sysconf information - -const _SC_PAGESIZE = C._SC_PAGESIZE - // Terminal handling type Termios C.termios_t diff --git a/unix/pagesize_unix.go b/unix/pagesize_unix.go new file mode 100644 index 000000000..45afcf72d --- /dev/null +++ b/unix/pagesize_unix.go @@ -0,0 +1,15 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// For Unix, get the pagesize from the runtime. + +package unix + +import "syscall" + +func Getpagesize() int { + return syscall.Getpagesize() +} diff --git a/unix/syscall_darwin_386.go b/unix/syscall_darwin_386.go index c172a3da5..76634f7ab 100644 --- a/unix/syscall_darwin_386.go +++ b/unix/syscall_darwin_386.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_darwin_amd64.go b/unix/syscall_darwin_amd64.go index c6c99c13a..7be02dab9 100644 --- a/unix/syscall_darwin_amd64.go +++ b/unix/syscall_darwin_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_darwin_arm.go b/unix/syscall_darwin_arm.go index d286cf408..26b66972f 100644 --- a/unix/syscall_darwin_arm.go +++ b/unix/syscall_darwin_arm.go @@ -9,8 +9,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_darwin_arm64.go b/unix/syscall_darwin_arm64.go index c33905cdc..4d67a8742 100644 --- a/unix/syscall_darwin_arm64.go +++ b/unix/syscall_darwin_arm64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 16384 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_dragonfly_amd64.go b/unix/syscall_dragonfly_amd64.go index da7cb7982..6d8952d5a 100644 --- a/unix/syscall_dragonfly_amd64.go +++ b/unix/syscall_dragonfly_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_freebsd_386.go b/unix/syscall_freebsd_386.go index 6a0cd804d..4cf5f453f 100644 --- a/unix/syscall_freebsd_386.go +++ b/unix/syscall_freebsd_386.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_freebsd_amd64.go b/unix/syscall_freebsd_amd64.go index e142540ef..b8036e726 100644 --- a/unix/syscall_freebsd_amd64.go +++ b/unix/syscall_freebsd_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_freebsd_arm.go b/unix/syscall_freebsd_arm.go index 5504cb125..5a3bb6a15 100644 --- a/unix/syscall_freebsd_arm.go +++ b/unix/syscall_freebsd_arm.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_linux_386.go b/unix/syscall_linux_386.go index 2b881b979..f4c826a45 100644 --- a/unix/syscall_linux_386.go +++ b/unix/syscall_linux_386.go @@ -14,8 +14,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_linux_amd64.go b/unix/syscall_linux_amd64.go index 9516a3fd7..0715200dc 100644 --- a/unix/syscall_linux_amd64.go +++ b/unix/syscall_linux_amd64.go @@ -69,8 +69,6 @@ func Gettimeofday(tv *Timeval) (err error) { return nil } -func Getpagesize() int { return 4096 } - func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval errno := gettimeofday(&tv) diff --git a/unix/syscall_linux_arm.go b/unix/syscall_linux_arm.go index 71d870228..2b79c84a6 100644 --- a/unix/syscall_linux_arm.go +++ b/unix/syscall_linux_arm.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_linux_arm64.go b/unix/syscall_linux_arm64.go index 4a136396c..68cc975db 100644 --- a/unix/syscall_linux_arm64.go +++ b/unix/syscall_linux_arm64.go @@ -66,8 +66,6 @@ func Lstat(path string, stat *Stat_t) (err error) { //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } diff --git a/unix/syscall_linux_mips64x.go b/unix/syscall_linux_mips64x.go index 73318e5c6..977df441b 100644 --- a/unix/syscall_linux_mips64x.go +++ b/unix/syscall_linux_mips64x.go @@ -55,8 +55,6 @@ package unix //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { diff --git a/unix/syscall_linux_mipsx.go b/unix/syscall_linux_mipsx.go index b83d93fdf..25a5a0da5 100644 --- a/unix/syscall_linux_mipsx.go +++ b/unix/syscall_linux_mipsx.go @@ -235,5 +235,3 @@ func Poll(fds []PollFd, timeout int) (n int, err error) { } return poll(&fds[0], len(fds), timeout) } - -func Getpagesize() int { return 4096 } diff --git a/unix/syscall_linux_ppc64x.go b/unix/syscall_linux_ppc64x.go index 60770f627..28b7f350d 100644 --- a/unix/syscall_linux_ppc64x.go +++ b/unix/syscall_linux_ppc64x.go @@ -61,8 +61,6 @@ package unix //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) diff --git a/unix/syscall_linux_s390x.go b/unix/syscall_linux_s390x.go index 1708a4bbf..3845fc9c4 100644 --- a/unix/syscall_linux_s390x.go +++ b/unix/syscall_linux_s390x.go @@ -46,8 +46,6 @@ import ( //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) //sysnb setgroups(n int, list *_Gid_t) (err error) -func Getpagesize() int { return 4096 } - //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { diff --git a/unix/syscall_linux_sparc64.go b/unix/syscall_linux_sparc64.go index 20b7454d7..bd9de3e9d 100644 --- a/unix/syscall_linux_sparc64.go +++ b/unix/syscall_linux_sparc64.go @@ -6,11 +6,6 @@ package unix -import ( - "sync/atomic" - "syscall" -) - //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Dup2(oldfd int, newfd int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) @@ -63,21 +58,6 @@ import ( //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func sysconf(name int) (n int64, err syscall.Errno) - -// pageSize caches the value of Getpagesize, since it can't change -// once the system is booted. -var pageSize int64 // accessed atomically - -func Getpagesize() int { - n := atomic.LoadInt64(&pageSize) - if n == 0 { - n, _ = sysconf(_SC_PAGESIZE) - atomic.StoreInt64(&pageSize, n) - } - return int(n) -} - func Ioperm(from int, num int, on int) (err error) { return ENOSYS } diff --git a/unix/syscall_netbsd_386.go b/unix/syscall_netbsd_386.go index afaca0983..baefa411e 100644 --- a/unix/syscall_netbsd_386.go +++ b/unix/syscall_netbsd_386.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_netbsd_amd64.go b/unix/syscall_netbsd_amd64.go index a6ff04ce5..59c2ab7eb 100644 --- a/unix/syscall_netbsd_amd64.go +++ b/unix/syscall_netbsd_amd64.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_netbsd_arm.go b/unix/syscall_netbsd_arm.go index 68a6969b2..7208108a3 100644 --- a/unix/syscall_netbsd_arm.go +++ b/unix/syscall_netbsd_arm.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_openbsd_386.go b/unix/syscall_openbsd_386.go index a66ddc59c..d3809b426 100644 --- a/unix/syscall_openbsd_386.go +++ b/unix/syscall_openbsd_386.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_openbsd_amd64.go b/unix/syscall_openbsd_amd64.go index 0776c1faf..9a9dfceff 100644 --- a/unix/syscall_openbsd_amd64.go +++ b/unix/syscall_openbsd_amd64.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_openbsd_arm.go b/unix/syscall_openbsd_arm.go index 14ddaf3f3..ba8649056 100644 --- a/unix/syscall_openbsd_arm.go +++ b/unix/syscall_openbsd_arm.go @@ -6,10 +6,6 @@ package unix -import "syscall" - -func Getpagesize() int { return syscall.Getpagesize() } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/unix/syscall_solaris.go b/unix/syscall_solaris.go index 0d4e5c4e6..dbb166e00 100644 --- a/unix/syscall_solaris.go +++ b/unix/syscall_solaris.go @@ -13,7 +13,6 @@ package unix import ( - "sync/atomic" "syscall" "unsafe" ) @@ -699,18 +698,3 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e func Munmap(b []byte) (err error) { return mapper.Munmap(b) } - -//sys sysconf(name int) (n int64, err error) - -// pageSize caches the value of Getpagesize, since it can't change -// once the system is booted. -var pageSize int64 // accessed atomically - -func Getpagesize() int { - n := atomic.LoadInt64(&pageSize) - if n == 0 { - n, _ = sysconf(_SC_PAGESIZE) - atomic.StoreInt64(&pageSize, n) - } - return int(n) -} diff --git a/unix/types_solaris.go b/unix/types_solaris.go index 393c7f04f..6d7461401 100644 --- a/unix/types_solaris.go +++ b/unix/types_solaris.go @@ -256,10 +256,6 @@ type BpfTimeval C.struct_bpf_timeval type BpfHdr C.struct_bpf_hdr -// sysconf information - -const _SC_PAGESIZE = C._SC_PAGESIZE - // Terminal handling type Termios C.struct_termios diff --git a/unix/zsyscall_solaris_amd64.go b/unix/zsyscall_solaris_amd64.go index 4287133d0..32b0209a5 100644 --- a/unix/zsyscall_solaris_amd64.go +++ b/unix/zsyscall_solaris_amd64.go @@ -129,7 +129,6 @@ import ( //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" -//go:cgo_import_dynamic libc_sysconf sysconf "libc.so" //go:linkname procpipe libc_pipe //go:linkname procgetsockname libc_getsockname @@ -250,7 +249,6 @@ import ( //go:linkname procgetpeername libc_getpeername //go:linkname procsetsockopt libc_setsockopt //go:linkname procrecvfrom libc_recvfrom -//go:linkname procsysconf libc_sysconf var ( procpipe, @@ -371,8 +369,7 @@ var ( proc__xnet_getsockopt, procgetpeername, procsetsockopt, - procrecvfrom, - procsysconf syscallFunc + procrecvfrom syscallFunc ) func pipe(p *[2]_C_int) (n int, err error) { @@ -1589,12 +1586,3 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl } return } - -func sysconf(name int) (n int64, err error) { - r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsysconf)), 1, uintptr(name), 0, 0, 0, 0, 0) - n = int64(r0) - if e1 != 0 { - err = e1 - } - return -} diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go index 01e6573e0..8b30c6997 100644 --- a/unix/ztypes_linux_386.go +++ b/unix/ztypes_linux_386.go @@ -673,8 +673,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go index 7843f4450..cf0358986 100644 --- a/unix/ztypes_linux_amd64.go +++ b/unix/ztypes_linux_amd64.go @@ -691,8 +691,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index a7b88b761..8ef7d85f1 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -662,8 +662,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_arm64.go b/unix/ztypes_linux_arm64.go index 2d6e1d79f..311026867 100644 --- a/unix/ztypes_linux_arm64.go +++ b/unix/ztypes_linux_arm64.go @@ -670,8 +670,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_mips.go b/unix/ztypes_linux_mips.go index 5b647509d..d2c1bc2c8 100644 --- a/unix/ztypes_linux_mips.go +++ b/unix/ztypes_linux_mips.go @@ -667,8 +667,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_mips64.go b/unix/ztypes_linux_mips64.go index 17c942dfc..ec7a0cd27 100644 --- a/unix/ztypes_linux_mips64.go +++ b/unix/ztypes_linux_mips64.go @@ -672,8 +672,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_mips64le.go b/unix/ztypes_linux_mips64le.go index eee3bce38..bbe08d7db 100644 --- a/unix/ztypes_linux_mips64le.go +++ b/unix/ztypes_linux_mips64le.go @@ -672,8 +672,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go index 47aded5d8..75ee05ab4 100644 --- a/unix/ztypes_linux_mipsle.go +++ b/unix/ztypes_linux_mipsle.go @@ -667,8 +667,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_ppc64.go b/unix/ztypes_linux_ppc64.go index 2c5caad04..30a257f83 100644 --- a/unix/ztypes_linux_ppc64.go +++ b/unix/ztypes_linux_ppc64.go @@ -680,8 +680,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go index 60d82b001..bebed6f11 100644 --- a/unix/ztypes_linux_ppc64le.go +++ b/unix/ztypes_linux_ppc64le.go @@ -680,8 +680,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/unix/ztypes_linux_s390x.go b/unix/ztypes_linux_s390x.go index c29138e36..286661b35 100644 --- a/unix/ztypes_linux_s390x.go +++ b/unix/ztypes_linux_s390x.go @@ -697,8 +697,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32