From patchwork Thu Jul 27 23:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13330968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28632C001DC for ; Thu, 27 Jul 2023 23:27:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231703AbjG0X1I (ORCPT ); Thu, 27 Jul 2023 19:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231618AbjG0X1H (ORCPT ); Thu, 27 Jul 2023 19:27:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDF62D40 for ; Thu, 27 Jul 2023 16:27:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5FBEF61F8C for ; Thu, 27 Jul 2023 23:27:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46960C433CC; Thu, 27 Jul 2023 23:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690500425; bh=U9eF72eZ37CI1cE+xa8X28h+BbO8qk9SjWJn/oLYilE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OrYEkASthgU4BOmTQSZsyI6Zu2kEP+1oN+V2Qyabjpcv3eLyHdT8vXXL5m9LNwtGv hjVsCWRewoRwjCgX0zCLlyLfVHd+8zyLW6zjx9fzEasiGhGmBXNY+3h3xBHG465CI+ Ks9Lf1Vsi5IbwsSrHwNF3flnjGFS0u4dGN9KYZzDjKZj/Niexr7yS4ofqROTmGYlq+ HZBm17eGJgXoa7joDPunZgw30CjYa3FFqA5yuFQiusdJ9dL9G8/YBqmxk0rK1+cscY W0I3QfkL0mCWFk0zzbBT9mhVuN3A6BNoK/Hx1o1SMiJz7cfRj2t+FmnmeVFKyD8CA0 BU6U8QIHsGBuw== From: Mark Brown Date: Fri, 28 Jul 2023 00:26:16 +0100 Subject: [PATCH v4 5/6] kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton MIME-Version: 1.0 Message-Id: <20230728-arm64-signal-memcpy-fix-v4-5-0c1290db5d46@kernel.org> References: <20230728-arm64-signal-memcpy-fix-v4-0-0c1290db5d46@kernel.org> In-Reply-To: <20230728-arm64-signal-memcpy-fix-v4-0-0c1290db5d46@kernel.org> To: Catalin Marinas , Will Deacon , Shuah Khan , Arnaldo Carvalho de Melo Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1124; i=broonie@kernel.org; h=from:subject:message-id; bh=U9eF72eZ37CI1cE+xa8X28h+BbO8qk9SjWJn/oLYilE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkwv09X8Mjn1yqAaOEMjsKIen70RXP0QJW8nIpTkh3 lnMxM1qJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZML9PQAKCRAk1otyXVSH0OI2B/ 9hXA4a3MhVplF/KUp49gZNZsDo+mb986YfPqBSVFgJXJR84jb8JBGk33xkR+fP78xIbq1x+YlH3Cor Trtjoa9QCbFbP5CpMW81jl7+0MRED48409wD74jGIxqWDnK9qEtdc+iZGmnC8u9EWP542zl1qZM4jT ZT3uWzmROX6NM1HUHTqy2vu6zsJtG6Gphkx5B0Xi437PUT1HT9deIP1RzLjg7Nih13uwVu1yeWM3aZ qUTXbOdZyXgfv32g2tOrXccCWBLmvRU4mD/biSzv4fH1f6SvqDospwE2+RYxtwMbd46t1i1ZYzjAnD jHeXqfxXILhpxL8v413Cr7UILUrRJe X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org We had open coded the definition of OPTIMIZER_HIDE_VAR() as a fix but now that we have the generic tools/include available and that has had a definition of OPTIMIZER_HIDE_VAR() we can switch to the define. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/signal/test_signals_utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.h b/tools/testing/selftests/arm64/signal/test_signals_utils.h index c7f5627171dd..762c8fe9c54a 100644 --- a/tools/testing/selftests/arm64/signal/test_signals_utils.h +++ b/tools/testing/selftests/arm64/signal/test_signals_utils.h @@ -8,6 +8,8 @@ #include #include +#include + #include "test_signals.h" int test_init(struct tdescr *td); @@ -76,7 +78,7 @@ static __always_inline bool get_current_context(struct tdescr *td, */ for (i = 0; i < td->live_sz; i++) { uc[i] = 0; - __asm__ ("" : "=r" (uc[i]) : "0" (uc[i])); + OPTIMIZER_HIDE_VAR(uc[0]); } td->live_uc = dest_uc;