Bug 216104 - arm cpufunc.h uses only mis-spelled __ARM_ARCH_6ZK__ for __ARM_ARCH_6KZ__
Summary: arm cpufunc.h uses only mis-spelled __ARM_ARCH_6ZK__ for __ARM_ARCH_6KZ__
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-15 10:29 UTC by Larry Rosenman
Modified: 2017-01-16 16:55 UTC (History)
1 user (show)

See Also:
ler: mfc-stable11?
ler: mfc-stable10?


Attachments
patch for __ARM_ARCH_6KZ__ (434 bytes, patch)
2017-01-15 10:29 UTC, Larry Rosenman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer freebsd_triage 2017-01-15 10:29:59 UTC
Created attachment 178906 [details]
patch for __ARM_ARCH_6KZ__

arm's cpufunc.h doesn't use the __ARM_ARCH_6KZ__ define which clang (since 3.8) defines. 

See PR 216065 for fallout of this with sysutils/lsof. 

Vic Abell has worked around it, but we should fix it.

see:
Comment #9 from mikael.urankar@gmail.com ---
ARM_NARCH and ARM_NMMUS are 0 because clang defines __ARM_ARCH_6KZ__ since
clang3.8 iirc.

6ZK is a mispelling of 6KZ:
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01679.html
Comment 1 Larry Rosenman freebsd_committer freebsd_triage 2017-01-15 12:09:38 UTC
to test that the issue is fixed, you CAN USE LSOF 4.90G FROM MASTER_SITE_LOCAL/ler/lsof

without the patches I applied.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-16 16:45:11 UTC
A commit references this bug:

Author: ian
Date: Mon Jan 16 16:44:14 UTC 2017
New revision: 312292
URL: https://svnweb.freebsd.org/changeset/base/312292

Log:
  Remove arm's cpuconf.h, and references to it, after moving a few lines from
  it into pmap-v4.h where they are used.  Other than those few lines of
  support for different MMU types, nothing in cpuconf.h has been used in our
  code for quite a while.

  The file existed to set up a variety of symbols to describe the
  architecture.  Over the past few years we have converted all of our source
  to use the new architecture symbols standardized by ARM Inc, and predefined
  by both clang and gcc.

  PR:		216104

Changes:
  head/sys/arm/arm/bus_space_asm_generic.S
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/arm/identcpu-v4.c
  head/sys/arm/arm/locore-v4.S
  head/sys/arm/arm/locore-v6.S
  head/sys/arm/include/atomic.h
  head/sys/arm/include/cpuconf.h
  head/sys/arm/include/cpufunc.h
  head/sys/arm/include/pcpu.h
  head/sys/arm/include/pmap-v4.h
Comment 3 Ian Lepore freebsd_committer freebsd_triage 2017-01-16 16:55:10 UTC
Instead of applying the supplied patch (thanks!), I just deleted the whole cpuconf.h file, and thus removed the unnecessary check that was failing when the file got included by lsof.

This fix can be MFC'd to stable-11, but perhaps not to stable-10 (some kernel sources in 10 may still refer to the old arch symbols from cpuconf.h), so the workaround applied to lsof in bug 216065 may have to remain in place for a while.