From owner-svn-src-all@freebsd.org Mon Feb 6 14:58:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C46CD3547; Mon, 6 Feb 2017 14:58:25 +0000 (UTC) (envelope-from sgalabov@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 mx1.freebsd.org (Postfix) with ESMTPS id 6DAC7183D; Mon, 6 Feb 2017 14:58:25 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16EwOs3015634; Mon, 6 Feb 2017 14:58:24 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16EwOjU015633; Mon, 6 Feb 2017 14:58:24 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201702061458.v16EwOjU015633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Mon, 6 Feb 2017 14:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313343 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2017 14:58:25 -0000 Author: sgalabov Date: Mon Feb 6 14:58:24 2017 New Revision: 313343 URL: https://svnweb.freebsd.org/changeset/base/313343 Log: sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a u_int8_t variable to store the result of cpu_get_control(). It should really use a u_int variable, the same way as done for cpu_ident() in the same function, as both cpuid and control registers are 32-bit.. This issue causes users of identcpu-v4 to incorrectly report things such as icache status (bit 12 in cpu control register) and basically anything defined in bits above bit 7 :-) Reviewed by: manu Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D9460 Modified: head/sys/arm/arm/identcpu-v4.c Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 (r313342) +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 (r313343) @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) void identify_arm_cpu(void) { - u_int cpuid; - u_int8_t ctrl; + u_int cpuid, ctrl; int i; ctrl = cpu_get_control();