Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: add openbsd/mips64 port #40995

Closed
4a6f656c opened this issue Aug 23, 2020 · 27 comments
Closed

all: add openbsd/mips64 port #40995

4a6f656c opened this issue Aug 23, 2020 · 27 comments

Comments

@4a6f656c
Copy link
Contributor

This is a tracking bug for getting an openbsd/mips64 port upstreamed - code exists for this at:

https://github.com/4a6f656c/go/tree/openbsd-mips64

@gopherbot
Copy link

Change https://golang.org/cl/250118 mentions this issue: dashboard: add openbsd-mips64-joelsing builder (reverse)

@gopherbot
Copy link

Change https://golang.org/cl/250119 mentions this issue: unix: add support for openbsd/mips64

@gopherbot
Copy link

Change https://golang.org/cl/250183 mentions this issue: runtime: use stacks from system for openbsd/mips64

@gopherbot
Copy link

Change https://golang.org/cl/250579 mentions this issue: runtime: add defs for openbsd/mips64

@gopherbot
Copy link

Change https://golang.org/cl/250578 mentions this issue: cmd/dist: add openbsd/mips64 as incomplete port

@gopherbot
Copy link

Change https://golang.org/cl/250580 mentions this issue: runtime: add support for openbsd/mips64

@gopherbot
Copy link

Change https://golang.org/cl/250581 mentions this issue: syscall: add support for openbsd/mips64

@gopherbot
Copy link

Change https://golang.org/cl/250583 mentions this issue: cmd/dist: detect gohostarch for openbsd/mips64

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-OpenBSD labels Aug 25, 2020
@dmitshur
Copy link
Contributor

Thanks for making this tracking issue @4a6f656c.

The first entry under https://golang.org/wiki/PortingPolicy#requirements-for-a-new-port is:

Before any code relating to a port can be added to the main Go repository, the following must all be done:

  • A proposal must be filed and accepted in which the Go team accepts overall responsibility for having the new port in the core Go tree. In general, each new port carries an upkeep cost separate from the direct maintenance. That cost varies by port, depending on how similar a new port is to existing ones. The cost must be balanced by an overall benefit in the form of potential new users or use cases for Go.

I'm asking because I can't find an answer in this issue, but has a proposal been already filed, or is that a future task? Or was the intention to use this issue as a proposal?

/cc @andybons @cagedmantis @toothrot

@dmitshur dmitshur added this to the Unplanned milestone Aug 25, 2020
@gopherbot
Copy link

Change https://golang.org/cl/250582 mentions this issue: cmd/link: add support for openbsd/mips64

gopherbot pushed a commit to golang/sys that referenced this issue Aug 26, 2020
Update golang/go#40995

Change-Id: Ic5cbeea2a4b54bd047a8bffab8eb84579854fce3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/250119
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@4a6f656c
Copy link
Contributor Author

Thanks for making this tracking issue @4a6f656c.

The first entry under https://golang.org/wiki/PortingPolicy#requirements-for-a-new-port is:

Before any code relating to a port can be added to the main Go repository, the following must all be done:

  • A proposal must be filed and accepted in which the Go team accepts overall responsibility for having the new port in the core Go tree. In general, each new port carries an upkeep cost separate from the direct maintenance. That cost varies by port, depending on how similar a new port is to existing ones. The cost must be balanced by an overall benefit in the form of potential new users or use cases for Go.

I'm asking because I can't find an answer in this issue, but has a proposal been already filed, or is that a future task? Or was the intention to use this issue as a proposal?

@dmitshur

I was not aware that a proposal was a requirement (obviously this is a relatively new addition to that page and not something I've done for the other eight Go ports that I've authored and/or upstreamed :). As an aside, it would be good if these requirements are going to be enforced then it be done consistently (for example, code exists in the Go 1.15 release for an incomplete port), not to mention that it can take multiple months just to get a builder key...

That said, we might as well use this issue as the proposal (unless you prefer/require a separate one):

  • OpenBSD runs on octeon hardware, which is mips64 based - being able to use Go and run Go based software on this platform would be beneficial.

  • The Go toolchain already supports mips64 and are there existing OpenBSD ports (386, amd64, arm, arm64) - as such, the code requirement for this port is minimal (effectively openbsd/mips64 specific runtime, syscall glue).

  • This platform is big endian, strict alignment and has large physical pages - various aspects of this find bugs in code and have already identified bugs in the Go codebase (fixes for which I'll upstream if/when the port lands).

  • Code for this port exists and passes all tests on Go 1.15.

Please let me know if further details are required.

@dmitshur
Copy link
Contributor

@4a6f656c That is no problem and completely understandable—the requirements on the PortingPolicy page have been adjusted recently, as you noticed. We do want to move towards a more consistent enforcement of the requirements, and this change was a part of that process.

Using this issue as the proposal is completely fine; I'll re-title and milestone it that way. Thank you.

@dmitshur dmitshur changed the title all: add openbsd/mips64 port proposal: all: add openbsd/mips64 port Aug 27, 2020
@dmitshur dmitshur modified the milestones: Unplanned, Proposal Aug 27, 2020
@dmitshur dmitshur removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 27, 2020
@4a6f656c
Copy link
Contributor Author

@dmitshur what kind of time frame should I expect on this?

@dmitshur
Copy link
Contributor

@4a6f656c I’m not sure. According to https://github.com/golang/proposal#proposal-review, proposal review meetings happen approximately weekly, but this week may be unusual.

@andybons Do you have a better answer for this?

@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Sep 11, 2020
@ianlancetaylor
Copy link
Contributor

There was no proposal review meeting this week.

@rsc rsc moved this from Incoming to Active in Proposals (old) Sep 16, 2020
@rsc
Copy link
Contributor

rsc commented Sep 16, 2020

Given that we already have openbsd and we have mips64, then assuming we can arrange a builder this seems fine and can be fast-tracked. This seems like a likely accept.

@4a6f656c It takes seconds to generate a builder key. If it took months, it meant we missed an email until being reminded; sorry about that. Please ping us sooner if that happens again.

@rsc rsc moved this from Active to Likely Accept in Proposals (old) Sep 16, 2020
@rsc rsc added this to the Backlog milestone Sep 23, 2020
@rsc rsc changed the title proposal: all: add openbsd/mips64 port all: add openbsd/mips64 port Sep 23, 2020
gopherbot pushed a commit that referenced this issue Oct 3, 2020
Update #40995

Change-Id: I2cf9b85a960f479eaa59bf58081d03a0467bc2b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/250582
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
gopherbot pushed a commit to golang/build that referenced this issue Oct 16, 2020
Update golang/go#40995

Change-Id: Ie733438ab1823d65109e684a6a5e3098cdfdb252
Reviewed-on: https://go-review.googlesource.com/c/build/+/250118
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit that referenced this issue Oct 18, 2020
On OpenBSD/octeon `uname -m` returns 'octeon' and we need `uname -p` to determine
the processor type (mips64).

Update #40995

Change-Id: I37c53ca2c372ab958fff17917d82d41f4b0a0393
Reviewed-on: https://go-review.googlesource.com/c/go/+/250583
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
gopherbot pushed a commit that referenced this issue Oct 24, 2020
Update #40995

Change-Id: Id497f7688b00658b50feb7338157e0411b861910
Reviewed-on: https://go-review.googlesource.com/c/go/+/250578
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
gopherbot pushed a commit that referenced this issue Oct 28, 2020
Update #40995

Change-Id: I6963ead1a7c4520092361cce80edb17010e7f436
Reviewed-on: https://go-review.googlesource.com/c/go/+/250579
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot
Copy link

Change https://golang.org/cl/265959 mentions this issue: cpu: make x/sys/cpu build on non-linux mips64x

gopherbot pushed a commit that referenced this issue Oct 29, 2020
Update #40995

Change-Id: Ie028dfd87ef8731804567a0501f1f7758e8dd203
Reviewed-on: https://go-review.googlesource.com/c/go/+/250580
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
gopherbot pushed a commit to golang/sys that referenced this issue Oct 29, 2020
Update golang/go#40995

Change-Id: Icab9865e59350c11da32bf8af2d0830001e41323
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265959
Trust: Joel Sing <joel@sing.id.au>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Oct 29, 2020
Update #40995

Change-Id: I7afa520ab5ddd6d1b8c7960f400b7b3a1b67d976
Reviewed-on: https://go-review.googlesource.com/c/go/+/250581
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot
Copy link

Change https://golang.org/cl/266918 mentions this issue: vendor: update golang.org/x/sys/cpu to latest

@gopherbot
Copy link

Change https://golang.org/cl/266919 mentions this issue: runtime: allow physical page aligned stacks to be allocated

gopherbot pushed a commit that referenced this issue Nov 4, 2020
Add a physPageAlignedStack boolean which if set, results in over allocation
by a physical page, the allocation being rounded to physical page alignment
and the unused memory surrounding the allocation being freed again.

OpenBSD/octeon has 16KB physical pages and requires stacks to be physical page
aligned in order for them to be remapped as MAP_STACK. This change allows Go
to work on this platform.

Based on a suggestion from mknyszek in issue #41008.

Updates #40995
Fixes #41008

Change-Id: Ia5d652292b515916db473043b41f6030094461d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/266919
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/267606 mentions this issue: cmd/dist: remove openbsd/mips64 from incomplete ports

@gopherbot
Copy link

Change https://golang.org/cl/267605 mentions this issue: syscall: use correct type for TIOCSPGRP/TIOCGPGRP

gopherbot pushed a commit that referenced this issue Nov 6, 2020
Remove openbsd/mips64 from incomplete ports lists - all of the necessary code
has landed and we want to run tests so we can see/deal with remaining failures.

Update #40995

Change-Id: I5d4f89af82ff3abe57570a9a8abf889498093d32
Reviewed-on: https://go-review.googlesource.com/c/go/+/267606
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
gopherbot pushed a commit that referenced this issue Nov 13, 2020
These ioctls take a pid_t (generally a C integer aka int32) and not an int64 - we
currently get away with this on little endian 64 bit platforms, since the bytes
fall into the correct place, however this breaks on big endian 64 bit platforms
(like openbsd/mips64).

Update #40995

Change-Id: I622a0543fd562d97f76a7376a84fd2641e6d6a24
Reviewed-on: https://go-review.googlesource.com/c/go/+/267605
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/274772 mentions this issue: internal/socket: add support for openbsd/mips64

gopherbot pushed a commit to golang/net that referenced this issue Dec 2, 2020
For golang/go#40995

Change-Id: I415ce04a3fb419de933ab4bb5d2afbacbbaff80c
Reviewed-on: https://go-review.googlesource.com/c/net/+/274772
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
@aclements
Copy link
Member

What's the status of openbsd/mips64 at this point? Should there be a release note for this?

@4a6f656c
Copy link
Contributor Author

4a6f656c commented Dec 4, 2020

What's the status of openbsd/mips64 at this point? Should there be a release note for this?

The openbsd/mips64 port is complete and stable, although some functionality (primarily cgo) is still missing. As such, it probably qualifies for inclusion in the release notes.

@gopherbot
Copy link

Change https://golang.org/cl/275333 mentions this issue: dashboard: remove known issue from openbsd-mips64-jsing builder

@gopherbot
Copy link

Change https://golang.org/cl/275787 mentions this issue: doc/go1.16: announce openbsd/mips64 port

gopherbot pushed a commit that referenced this issue Dec 7, 2020
Updates #40995.
For #40700.

Change-Id: I4dced8d70e2f1fa2da98e2eb1a5f1f829f55bb6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/275787
Trust: Austin Clements <austin@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
@golang golang locked and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

6 participants