From owner-svn-src-head@freebsd.org Fri Jun 15 13:53:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 377F310070EC; Fri, 15 Jun 2018 13:53:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1F336E933; Fri, 15 Jun 2018 13:53:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C309218409; Fri, 15 Jun 2018 13:53:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5FDrb3v033356; Fri, 15 Jun 2018 13:53:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5FDrbcO033355; Fri, 15 Jun 2018 13:53:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806151353.w5FDrbcO033355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 Jun 2018 13:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335198 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 335198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2018 13:53:38 -0000 Author: emaste Date: Fri Jun 15 13:53:37 2018 New Revision: 335198 URL: https://svnweb.freebsd.org/changeset/base/335198 Log: Add stubbed arm64 linuxulator /proc/cpuinfo handler Sponsored by: Turing Robotic Industries Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Fri Jun 15 13:49:11 2018 (r335197) +++ head/sys/compat/linprocfs/linprocfs.c Fri Jun 15 13:53:37 2018 (r335198) @@ -317,6 +317,32 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) return (0); } +#else +/* ARM64TODO: implement non-stubbed linprocfs_docpuinfo */ +static int +linprocfs_docpuinfo(PFS_FILL_ARGS) +{ + int i; + + for (i = 0; i < mp_ncpus; ++i) { + sbuf_printf(sb, + "processor\t: %d\n" + "BogoMIPS\t: %d.%02d\n", + i, 0, 0); + sbuf_cat(sb, "Features\t: "); + sbuf_cat(sb, "\n"); + sbuf_printf(sb, + "CPU implementer\t: \n" + "CPU architecture: \n" + "CPU variant\t: 0x%x\n" + "CPU part\t: 0x%x\n" + "CPU revision\t: %d\n", + 0, 0, 0); + sbuf_cat(sb, "\n"); + } + + return (0); +} #endif /* __i386__ || __amd64__ */ /* @@ -1653,7 +1679,7 @@ linprocfs_uninit(PFS_INIT_ARGS) } PSEUDOFS(linprocfs, 1, VFCF_JAIL); -#if defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) MODULE_DEPEND(linprocfs, linux_common, 1, 1, 1); #else MODULE_DEPEND(linprocfs, linux, 1, 1, 1);