From nobody Wed Feb 11 01:00:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1562071399; cv=none; d=zoho.com; s=zohoarc; b=BWxz0ftOU+oorplll8RWQo+a6Fyp8k8KvyryWi+uX5Kkv+hqk3ctdAXZXdvT657MLbM+EHqoZbbI8eOZ+clc8RJsUbQNp/fsV5msvmK5oMxC31JGQ0Jy4l0JN504pafLZT3LfkkhfTivUgkG7rCa4GdZ1SM8QECDq1MA9tZraHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562071399; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pz+6WdBBZSOlSC/c8uiWDuWWcfRJ7RzjmzmKTbAHTr8=; b=lpAiI43UauSL9yGqUM7Fm5nhcM1NoxCH/6YVWJZ5MJ5tr8l9hkHdE/UdNDnqoO2CkF35ID4nvn3YtY3pj08FP7q3G+W1Iw2yFwkn1UtFpEFH1k1CucaN5Rf/+oSWG19cDP3FW1bi/tF0l7oJC08j7l+opK9Qt5W1ofyCgxFeNZY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562071399466120.19230487201696; Tue, 2 Jul 2019 05:43:19 -0700 (PDT) Received: from localhost ([::1]:53226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiI7w-0001Gn-SK for importer@patchew.org; Tue, 02 Jul 2019 08:43:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48748) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiI2H-0003yV-FD for qemu-devel@nongnu.org; Tue, 02 Jul 2019 08:37:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiI2E-0000dz-RD for qemu-devel@nongnu.org; Tue, 02 Jul 2019 08:37:25 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:42739) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiI2C-0000XI-CC; Tue, 02 Jul 2019 08:37:20 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N95mR-1idsBW2Q2Z-016AqN; Tue, 02 Jul 2019 14:37:17 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 14:37:11 +0200 Message-Id: <20190702123713.14396-2-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190702123713.14396-1-laurent@vivier.eu> References: <20190702123713.14396-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MpVnjE9ILMkipRn4MKez3x505bdBBbNHNpT4QgWdLUuT25Bmqcz 8o0hcFfpRpjTJVFA/q8MlwlzJ03BZopcx4tsLhBhOFfds31VF3rrF9h/ktu/hczqiYV9JfB wFC9D7rxMB67waIEDZ18YqrSxp4a6GLfqcOXDzxKDv2dRXGEuBuSE4ebOaxxC2UN/tAC/07 nU5OcByicxxvBmlRTvmaw== X-UI-Out-Filterresults: notjunk:1;V03:K0:t2dAFxFol/E=:H8zjlW6jT2n6hR5wCwK1Bv VVoZ9XSpXwBL5uXHAsd/BTMVddGv3yRH+NoxeRW1vIRBmPp/ZN3rO8CnH6h/1bvGxBTj19flf cgVHaIk/bVrS1LhNuEr5UmBSHTELzBbAfZfd+eHpNzm9RtLJ4WxuoN1NrBwEyRbUoHgLy9i29 jTAjmCNRcjoXO/Y82d3Ui2GZ16vh4l0zxx5rNPHdM8bafjMlilRqUukg88VrqgUoW7WqbzQ+O UvzB0WaTNxBrSZtxXYgRPEB8szMjKSAkmaFpD3yPx89K3ukAeKQ71A1HEApmEAkE/X+OhVjla QCyBp5ntDoyXhucCE8CsA6XvfibE3/n88PqyBMkyx7qvnXxAYko9iIUPBkepKppDSrrtco/DX CpCP3qnexDW4rul+IIQOKDf4UBC+kajeXXU9W60yeTzmbhqe2zRhlUaT3s1bqAUDmkAHfhPF2 1DT2vlLLyJpUy3RC5qT7Ixn3E+VunqFbp7PydsIIj6zl9SaapREKPm4eFlDVEiw0Z1RW7aoF/ ChLVbBAeSg5o54qWjItactAhFYRAN7WstovCcnXu359vvWA/pIh+Oe59ZoZK1DYPLo1AZGlLq MMG821E4EEYmWbg5rnG+ukddTI8xF+W0ap7sV0gCYGyDB8hHjGPxxotq0cS9/v7DsYP/KbmD+ 5UhlpByXFI0Lw5Ux/z0bvwfyLy/ujOBqghw3WZkKiwcZnjuly7YuFwFA5+pAwfyJJfxXuulX4 ktF18A/Rowo1n9p6wpqtgP2u7h24HjFznwW6vQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.133 Subject: [Qemu-devel] [PULL 1/3] Fix cacheline detection on FreeBSD/powerpc. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Tokarev , Laurent Vivier , Justin Hibbits , Amit Shah Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Justin Hibbits machdep.cacheline_size is an integer, not a long. Since PowerPC is big-endian this causes sysctlbyname() to fill in the upper bits of the argument, rather than the correct 'lower bits' of the word. Specify the correct type to fix this. Fixes: b255b2c8a548 ("util: add cacheinfo") Signed-off-by: Justin Hibbits Reviewed-by: Laurent Vivier Message-Id: <20190607135653.6ece685d@titan.knownspace> Signed-off-by: Laurent Vivier --- util/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cacheinfo.c b/util/cacheinfo.c index eebe1ce9c5d2..516f837748a3 100644 --- a/util/cacheinfo.c +++ b/util/cacheinfo.c @@ -77,7 +77,7 @@ static void sys_cache_info(int *isize, int *dsize) static void sys_cache_info(int *isize, int *dsize) { /* There's only a single sysctl for both I/D cache line sizes. */ - long size; + int size; size_t len =3D sizeof(size); if (!sysctlbyname(SYSCTL_CACHELINE_NAME, &size, &len, NULL, 0)) { *isize =3D *dsize =3D size; --=20 2.21.0