Skip to content

Commit

Permalink
runtime: remove unused armArch
Browse files Browse the repository at this point in the history
runtime.armArch is unused on linux/arm since CL 93637. The new code in
runtime/internal/atomic (added by CL 111315) only checks runtime.goarm.

Change-Id: Ic097ee6750e39abb20f45770a1c7c2d925f02408
Reviewed-on: https://go-review.googlesource.com/c/140077
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
tklauser authored and bradfitz committed Oct 5, 2018
1 parent 497fd2c commit 68d5296
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/runtime/os_linux_arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@

package runtime

import (
"internal/cpu"
"unsafe"
)
import "internal/cpu"

const (
_AT_PLATFORM = 15 // introduced in at least 2.6.11

_HWCAP_VFP = 1 << 6 // introduced in at least 2.6.11
_HWCAP_VFPv3 = 1 << 13 // introduced in 2.6.30
)

var randomNumber uint32
var armArch uint8 = 6 // we default to ARMv6

func checkgoarm() {
// On Android, /proc/self/auxv might be unreadable and hwcap won't
Expand Down Expand Up @@ -47,12 +41,6 @@ func archauxv(tag, val uintptr) {
randomNumber = uint32(startupRandomData[4]) | uint32(startupRandomData[5])<<8 |
uint32(startupRandomData[6])<<16 | uint32(startupRandomData[7])<<24

case _AT_PLATFORM: // v5l, v6l, v7l
t := *(*uint8)(unsafe.Pointer(val + 1))
if '5' <= t && t <= '7' {
armArch = t - '0'
}

case _AT_HWCAP:
cpu.HWCap = uint(val)
case _AT_HWCAP2:
Expand Down

0 comments on commit 68d5296

Please sign in to comment.