From owner-svn-ports-all@freebsd.org Thu Jun 4 23:32:27 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7335233627E; Thu, 4 Jun 2020 23:32:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dMWb2WQVz4HGC; Thu, 4 Jun 2020 23:32:27 +0000 (UTC) (envelope-from bdragon@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 51AD627A1D; Thu, 4 Jun 2020 23:32:27 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054NWRPJ088490; Thu, 4 Jun 2020 23:32:27 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054NWQQZ088488; Thu, 4 Jun 2020 23:32:26 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202006042332.054NWQQZ088488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Thu, 4 Jun 2020 23:32:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r537979 - in branches/2020Q2/emulators/qemu40: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in branches/2020Q2/emulators/qemu40: . files X-SVN-Commit-Revision: 537979 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 23:32:27 -0000 Author: bdragon (src committer) Date: Thu Jun 4 23:32:26 2020 New Revision: 537979 URL: https://svnweb.freebsd.org/changeset/ports/537979 Log: MFH: r537912 emulators/qemu40: Apply upstream fix for cacheline detection on big endian Backport qemu 5ca156cfde0f3821f15988619e51cf3cda99aaa6, which fixes cacheline detection on big-endian to use the correct sized variable to store the sysctl result. Fixes "Assertion failed: ((isize & (isize - 1)) == 0)" on BE platforms. Reviewed by: bofh, pkubaj Approved by: pkubaj Obtained from: qemu Differential Revision: https://reviews.freebsd.org/D23246 Approved by: ports-secteam (joneum) Added: branches/2020Q2/emulators/qemu40/files/patch-util-cacheinfo.c - copied unchanged from r537912, head/emulators/qemu40/files/patch-util-cacheinfo.c Modified: branches/2020Q2/emulators/qemu40/Makefile Directory Properties: branches/2020Q2/ (props changed) Modified: branches/2020Q2/emulators/qemu40/Makefile ============================================================================== --- branches/2020Q2/emulators/qemu40/Makefile Thu Jun 4 23:31:29 2020 (r537978) +++ branches/2020Q2/emulators/qemu40/Makefile Thu Jun 4 23:32:26 2020 (r537979) @@ -3,6 +3,7 @@ PORTNAME= qemu PORTVERSION= 4.0.1 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= https://download.qemu.org/ PKGNAMESUFFIX= 40 Copied: branches/2020Q2/emulators/qemu40/files/patch-util-cacheinfo.c (from r537912, head/emulators/qemu40/files/patch-util-cacheinfo.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2020Q2/emulators/qemu40/files/patch-util-cacheinfo.c Thu Jun 4 23:32:26 2020 (r537979, copy of r537912, head/emulators/qemu40/files/patch-util-cacheinfo.c) @@ -0,0 +1,41 @@ +--- util/cacheinfo.c.orig 2019-10-17 15:17:44.000000000 -0500 ++++ util/cacheinfo.c 2020-01-17 21:13:29.459470000 -0600 +@@ -65,25 +65,28 @@ static void sys_cache_info(int *isize, int *dsize) + g_free(buf); + } + +-#elif defined(__APPLE__) \ +- || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#elif defined(__APPLE__) + # include +-# if defined(__APPLE__) +-# define SYSCTL_CACHELINE_NAME "hw.cachelinesize" +-# else +-# define SYSCTL_CACHELINE_NAME "machdep.cacheline_size" +-# endif +- + static void sys_cache_info(int *isize, int *dsize) + { + /* There's only a single sysctl for both I/D cache line sizes. */ + long size; + size_t len = sizeof(size); +- if (!sysctlbyname(SYSCTL_CACHELINE_NAME, &size, &len, NULL, 0)) { ++ if (!sysctlbyname("hw.cachelinesize", &size, &len, NULL, 0)) { + *isize = *dsize = size; + } + } +- ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++# include ++static void sys_cache_info(int *isize, int *dsize) ++{ ++ /* There's only a single sysctl for both I/D cache line sizes. */ ++ int size; ++ size_t len = sizeof(size); ++ if (!sysctlbyname("machdep.cacheline_size", &size, &len, NULL, 0)) { ++ *isize = *dsize = size; ++ } ++} + #else + /* POSIX */ +