From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id BABDB46F13 for ; Tue, 24 Oct 2023 12:23:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5595968CA21; Tue, 24 Oct 2023 15:23:06 +0300 (EEST) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3966C68C5D2 for ; Tue, 24 Oct 2023 15:23:00 +0300 (EEST) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-5079f9ec8d9so5044775e87.0 for ; Tue, 24 Oct 2023 05:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1698150179; x=1698754979; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=onY4n4A9fRa8pxiNER8hGFZkivB2f9J9CyrI/ZuRfUw=; b=Eune5SJBr99Zdhyu1pcQv4jVI/TV8sBanc9Bf1gaPgw6KU9eRBDEFbaQp6FqaYz8aw 0aLl+mqQpaW5yaIAens0f7dhKHIddcIKj8BMwIMZ1qss2huIoKUOUFhZKL0SavWdRZFA tPKP0H7OQaKJgjy62qKWr7c0xk2Jj0ELmz60C6BrhHDZbjZ/3bhKUXRi2OiWdugJIokb AST4gYD50DIP2Osr+0EPf61DWrmzl+33bL8W3tPOSZ1jz7N2udFk6JIV/tV8AJm6CKKP ZftwI2SNFl/rApA4UNFZR5Q62N7LqLAuNAMXC9WiJQcbOchHOAx9GSYcj5s2jWUcG9K2 SB+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698150179; x=1698754979; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=onY4n4A9fRa8pxiNER8hGFZkivB2f9J9CyrI/ZuRfUw=; b=VdMe/OzCcmtIfr6sO56BtigU4YhJgG2OsVtlsJSM3wovq0pafO/qfv8/7913rigaig poqNzJA+w6TYzz8dgFit1LfQkyufxo9QwZ1YLWWaHVZ5yg3oN6A6H/0PLf9QsuROsXCM gw7yyhWCbo2fBh9VldJaYCEuGLQSVi7b52S1oqmSEBHwAwvk9Et8x3LD0EzTR63Iw0ee y8Pq4CCDVdzEZ+F+wVTwA10y53Uciz2NlMw7YMLzkh5jTHIlUNWYd1On7E0EPhDDAqCp P+7mr1YpZIebXWQ7z0j7q9S6DawxMXbLgbAPwuV4mV03eF34lZYhFM8/8Y0NIfgLHBYz sV0w== X-Gm-Message-State: AOJu0YwsilOXBUM5sQiSvs48BfJlXJuzV+hM44AMfGZVg9ueeDFA8MYz 3ZJfPMqgY1XHGF/dUYXV69bDQa7lKSF/NqzsVWrTHA== X-Google-Smtp-Source: AGHT+IHatmP32bo8YP3L0q8wMoETFVPDudnFTrhRKtr3yNJPq4pGxaLDTELzT3mBbdj/TP8xf4z0Lw== X-Received: by 2002:a19:501c:0:b0:4f8:6d9d:abe0 with SMTP id e28-20020a19501c000000b004f86d9dabe0mr4566256lfb.33.1698150179233; Tue, 24 Oct 2023 05:22:59 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id b5-20020a196445000000b0050307bf2bcbsm2136430lfj.185.2023.10.24.05.22.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 05:22:58 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Oct 2023 15:22:57 +0300 Message-Id: <20231024122258.210941-1-martin@martin.st> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] aarch64: Simplify the linux runtime cpu detection code X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Skip doing the whole getauxval(AT_HWCAP) if HWCAP_CPUID isn't defined. --- libavutil/aarch64/cpu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c index bd780e8591..2b50c426bc 100644 --- a/libavutil/aarch64/cpu.c +++ b/libavutil/aarch64/cpu.c @@ -30,11 +30,9 @@ static int detect_flags(void) { int flags = 0; - unsigned long hwcap; - - hwcap = getauxval(AT_HWCAP); #if defined(HWCAP_CPUID) + unsigned long hwcap = getauxval(AT_HWCAP); // We can check for DOTPROD and I8MM using HWCAP_ASIMDDP and // HWCAP2_I8MM too, avoiding to read the CPUID registers (which triggers // a trap, handled by the kernel). However the HWCAP_* defines for these @@ -53,8 +51,6 @@ static int detect_flags(void) if (((tmp >> 52) & 0xf) == 0x1) flags |= AV_CPU_FLAG_I8MM; } -#else - (void)hwcap; #endif return flags; -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".