From patchwork Wed Jan 10 21:52:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 761462 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2094407wrz; Wed, 10 Jan 2024 13:53:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxXS0iP2NZIvOcFYR4vooTLRf1/zcgnBmOIx45RG/MYsGhsrC1Xd4D6/oYiiGKQ4CRW6kU X-Received: by 2002:ac8:7c49:0:b0:429:bf1b:2b49 with SMTP id o9-20020ac87c49000000b00429bf1b2b49mr160149qtv.111.1704923605656; Wed, 10 Jan 2024 13:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704923605; cv=none; d=google.com; s=arc-20160816; b=Fsfd8hosxeu7w4o5nlTgaJ2rbjCj/cMtjM0I32ly2OTrrocgAll/drqihDFonMmq6N 7HCtF+bfDq8xRIQxCQ8EVp1k2MQMxJ/mxB32FS6mcCl9m6BL8uQacM3/EgWL+kjqc2zl x35ko71x1MSEaEGZds4ZLBRk23pCmitV8+2FQXHNv21XN/rxaOnOZqWC40iU5QeYBavO vCP+cp1iKXMjeBnb3d10/2jpfiWmLTHX2kJBV+KP9hciEAHGfF51z5FVKaOdMjpZFza7 haM+DhtIkjcxbLz4rDMM49ts/8EWeGUzNSxhjLHtXxbnQdlUrj4VB/fwipy6Y2NpYgbe 1oew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VNe84Wm/eO/XQH/99RqV1VT7/D2nQwtaPsBh5uvsHFY=; fh=v0tj5pRql4YXVB7DGuYBhfB3Z81N8oL83BHvAm6usCM=; b=vQyZbOK1T341I+XoL9EfOORDaQVgjLT/MsDgYj6FykGnpikdJQjfUcy5PyMQOJKRsY tWSF5n5cPOSKUjU+oCTd16D/PFs1pE96B+SlQJ4wypwCBdV51Wprkx93cYlV8dJCqUdE W2onW77YqfOX4FKye6t5pPPgEaxLQ5Fkd5KODxCj+ZdONujZ7a7tr45q891bF5c8L6i4 fb/yTlcVPxmuFZU6uDuHXTeZYHfNg2dqeGh37YYcMfZCzVrlybDm8T/qMCirEBsjGPKb QK+AGp8RgOzypJPEzhFt/boNkiU9nWquu/AunwwKpE5TcDihcQ2qVu8X0mnpvxM+BA0z mCvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S4YJkeK1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jd21-20020a05622a719500b00429ab4014f4si3749850qtb.178.2024.01.10.13.53.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2024 13:53:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S4YJkeK1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNgV9-0003iF-3u; Wed, 10 Jan 2024 16:52:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNgUx-0003fO-Cw for qemu-devel@nongnu.org; Wed, 10 Jan 2024 16:52:31 -0500 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNgUt-0005k7-C1 for qemu-devel@nongnu.org; Wed, 10 Jan 2024 16:52:28 -0500 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-7831362c9bcso356011985a.1 for ; Wed, 10 Jan 2024 13:52:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704923546; x=1705528346; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VNe84Wm/eO/XQH/99RqV1VT7/D2nQwtaPsBh5uvsHFY=; b=S4YJkeK12jwLuaSCbYc56I/O5CQa+IiWGgvr3WCpBP1ctclCWCykRYTbWxGwyop81d Hgbo1XecebJ83kSPkKiWyfFMgFMp0PjdB3XIMa6bz+geml7PFEbqpIIf0wQEjbw0ovQG TZugNPSo9F1q7symZnEJUs94Uo0/iU5sJ/ZCpxylUG8nixOp7ucPcUTHQ2ac1YhIyHc+ vLZ2hHpYBIUNynMdy42wZcHNdF86bx6tChTfCg1VJSSQN3vNAVvGwYToHMHbQBX7l2Y/ oZxqqIa127mHFVBMsgmQHASDfbb1Lfc19GicpMcrWSh2q45HhX2abB/eF5cv3khEb0lu JeXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704923546; x=1705528346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VNe84Wm/eO/XQH/99RqV1VT7/D2nQwtaPsBh5uvsHFY=; b=a891wmEh0fDjUyBmME4J+xoQwKNFiy9v9Y6/mc0LtZhcMvsOXil70lCCGedapYpERr mehvFQvezxRSf+mlPCcsxEM5j+zLt3WyGtME0UJTf6C1X3p+9ojBrEdFP/IxqZQiBkdZ ORJ+ulC05GrCUNv5jP+uoyuaKLlQb6PlCD1mZwPnTtBLDZdkeQPZmFmzLl5atmNkd+bX XbWgcCY9eIrTXdnvOGOQwWdbV+vk3/ux6IHCp20tUobwZLP7L65O0BkiFlwzPdo2md/9 MxSey4kRt7vTKaHv0m4iKsBNyOK+dXDeflOwnBhfonIp5S7viAakjDutrxRlslpXyiCt iRJw== X-Gm-Message-State: AOJu0YxgT9DknlDt/+A928LYwje4XQX6ZyKQYbGtMgBL6NCB+vONIPGB b8dAE4RdRE0mgrBAoqbnUgtU3Kcr54XJN/On/fpxIf+xxa3CwpAU X-Received: by 2002:a05:620a:2589:b0:783:1a6e:99bd with SMTP id x9-20020a05620a258900b007831a6e99bdmr256898qko.53.1704923546267; Wed, 10 Jan 2024 13:52:26 -0800 (PST) Received: from stoup.. ([172.58.27.160]) by smtp.gmail.com with ESMTPSA id z8-20020ae9c108000000b0078313c87609sm1888387qki.100.2024.01.10.13.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 13:52:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Natanael Copa , qemu-stable@nongnu.org Subject: [PULL 4/4] util: fix build with musl libc on ppc64le Date: Thu, 11 Jan 2024 08:52:04 +1100 Message-Id: <20240110215204.9353-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240110215204.9353-1-richard.henderson@linaro.org> References: <20240110215204.9353-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Natanael Copa Use PPC_FEATURE2_ISEL and PPC_FEATURE2_VEC_CRYPTO from linux headers instead of the GNU specific PPC_FEATURE2_HAS_ISEL and PPC_FEATURE2_HAS_VEC_CRYPTO. This fixes build with musl libc. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1861 Signed-off-by: Natanael Copa Fixes: 63922f467a ("tcg/ppc: Replace HAVE_ISEL macro with a variable") Fixes: 68f340d4cd ("tcg/ppc: Enable Altivec detection") Message-Id: <20231219105236.7059-1-ncopa@alpinelinux.org> Signed-off-by: Richard Henderson --- util/cpuinfo-ppc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 1ea3db0ac8..b2d8893a06 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -6,10 +6,10 @@ #include "qemu/osdep.h" #include "host/cpuinfo.h" +#include #ifdef CONFIG_GETAUXVAL # include #else -# include # include "elf.h" #endif @@ -40,7 +40,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info |= CPUINFO_V2_06; } - if (hwcap2 & PPC_FEATURE2_HAS_ISEL) { + if (hwcap2 & PPC_FEATURE2_ISEL) { info |= CPUINFO_ISEL; } if (hwcap & PPC_FEATURE_HAS_ALTIVEC) { @@ -53,7 +53,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) * always have both anyway, since VSX came with Power7 * and crypto came with Power8. */ - if (hwcap2 & PPC_FEATURE2_HAS_VEC_CRYPTO) { + if (hwcap2 & PPC_FEATURE2_VEC_CRYPTO) { info |= CPUINFO_CRYPTO; } }