From patchwork Wed May 1 12:29:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 794284 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 960FC824A3; Wed, 1 May 2024 12:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566561; cv=none; b=TXn8LG4PAREWLEUKWdfof/IHlq/WPKCr+ZiVSTGVDQDsTwW1m0sEhgRwP39CIQqNXu5NQIP+5VUBknJF+VXk/SwhZdZCb3hZfXWa77VqJyA6ITQnnlIQfqP6xLUe/NSj1Kzwc/nSnnFqtsvZ0Z+E5bJtgeIp47WC81GksSTdTcs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566561; c=relaxed/simple; bh=BDVV3j0LA+Ja8NiNd1uE5LhUyS05s3IQNjzH8ZJ04yo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mGHQas3fjXNw1pMobn9qoX1yc4zzzRnIveD6CDN5rcaGuxU3XzoBRv+BT7QSFYQGG5UxlRuMlfER7Ki8bSNviLLWlCCO+uF5oEyn115QG48zlmpFN1S/EiO22CTDzO6V4M+EZ1Dg/J4Rn1gKfbX7smd4UrLvhDiMNuQsbEOAFk4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=I5vY7/Rg; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="I5vY7/Rg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566558; bh=BDVV3j0LA+Ja8NiNd1uE5LhUyS05s3IQNjzH8ZJ04yo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I5vY7/RgxjAEu9tC/qOGjymCqWxP0LFB4g8BhBTsNSxxiXF7fAN9/+J4L0wXjFQQm pJVf+CNs3lsZqLDF5SBpSY31VF5srWR4UiIVLTNZusYOXS5LC0zwApNU9LqkBs05vI jsXqiGPdzIeX3hoFldJWZvZCjIUn519VInUF3JyfGaj6SSWsP+lnvCzFkHooW06VA3 X2mPf7mIdaRYWP2resNQdQ1c+hvXmmZII8+vxUG0xazaAqVD+aHtDVBI9Lgg4vOyZ5 QSsIkwR4dh5USNiqhuUJOslKy/SPjQJCsUXQmYAInhM/VPVe/IeLk88uxws2IsPawc 0bsfyjRTy+NDQ== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 382F8378206E; Wed, 1 May 2024 12:29:11 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 1/8] selftests: x86: Remove dependence of headers file Date: Wed, 1 May 2024 17:29:11 +0500 Message-Id: <20240501122918.3831734-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove header file dependence to remove the following error caught by clang. clang: error: cannot specify -o when generating multiple output files Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 0b872c0a42d20..671b1819694ff 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -72,10 +72,10 @@ all_64: $(BINARIES_64) EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64) -$(BINARIES_32): $(OUTPUT)/%_32: %.c helpers.h +$(BINARIES_32): $(OUTPUT)/%_32: %.c $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm -$(BINARIES_64): $(OUTPUT)/%_64: %.c helpers.h +$(BINARIES_64): $(OUTPUT)/%_64: %.c $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl # x86_64 users should be encouraged to install 32-bit libraries From patchwork Wed May 1 12:29:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 793893 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A21384D0B; Wed, 1 May 2024 12:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566568; cv=none; b=Q/Lpg9es4AOBepw64+9PbEgtdP3ASSBJ2a0LBaJ6PItwsv6dBkrn+VzgeeujDhLEI3il/UfT4toLxMz3yh08CciQC6S5T0G7bUYDw8SFLTbwXCzWrclgRtHSAPNljhTKzi2G+sGfsgJDRva0vOMcN0xebgDFo94jYUmvJN7BKd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566568; c=relaxed/simple; bh=WfmBhJXDCOMhPVuRWWQRpLQZSRvYuCJH93b9CuCJmnE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=g0lPCBzqLca4wxPTGtELlFHORRKZUnp+4s48bzNc9c3D94jT3I4uw+//shr6kpuWiG+3PrcD55drisK4SHrAadkkxuhKKEEb1GUsnKEXtxfwe1JauplnNr9rOM1pZu8Fo0deh0uxexvZ6vfmWA45M4uUhrVUlz9m4f2YzP9FK1I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Rl9XOHpP; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Rl9XOHpP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566565; bh=WfmBhJXDCOMhPVuRWWQRpLQZSRvYuCJH93b9CuCJmnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rl9XOHpPf5q6eDVJX+luXHvfNWz5tvcVMFlviGffV6OBHyRAK0ZYDHJqxBsAEpLwQ Xp9aSZPC+ILKnv5D08JTgbarTHfBw2ZBdRgjuteYHEO2vZBGvbpzckCgRMFTtyAKVZ wtXEzm7t5dO0ocP55AKC7gq2ySvzvnoJw4VlM4yOG5BcEG7NXOxj5FCG2f6vUoyWvG s4cgQgH/Q1hMyyrQXovpjKX4naeWz3qAV2/2wOCC+z0FvBcKP8mhaP1aC1aKTaLBVq deKlEIijzjXMd3FCKt7gv4bfKzV52nWTAyUXTUL26/st4EZurxhBL+ry/0FGPX03yP +/s1aDsZRNLuw== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A3E0B3781FE9; Wed, 1 May 2024 12:29:18 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 2/8] selftests: x86: check_initial_reg_state: remove -no-pie while using -static Date: Wed, 1 May 2024 17:29:12 +0500 Message-Id: <20240501122918.3831734-3-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The -static clang flag ignores -no-pie flag. Hence following warning is generated. Fix the warning by removing the -no-pie flag before specifying -static flag. clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument] Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 671b1819694ff..b0f5b5ff79b8d 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -108,8 +108,9 @@ $(OUTPUT)/test_syscall_vdso_32: thunks_32.S # check_initial_reg_state is special: it needs a custom entry, and it # needs to be static so that its interpreter doesn't destroy its initial # state. -$(OUTPUT)/check_initial_reg_state_32: CFLAGS += -Wl,-ereal_start -static -$(OUTPUT)/check_initial_reg_state_64: CFLAGS += -Wl,-ereal_start -static +CFLAGS2:=$(filter-out -no-pie,$(CFLAGS)) +$(OUTPUT)/check_initial_reg_state_32: CFLAGS2 += -Wl,-ereal_start -static +$(OUTPUT)/check_initial_reg_state_64: CFLAGS2 += -Wl,-ereal_start -static $(OUTPUT)/nx_stack_32: CFLAGS += -Wl,-z,noexecstack $(OUTPUT)/nx_stack_64: CFLAGS += -Wl,-z,noexecstack From patchwork Wed May 1 12:29:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 794283 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E06BD85272; Wed, 1 May 2024 12:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566575; cv=none; b=FUFY+xEjunXYOh0R/23fW4xpqu2QkhkJelQEt0iOVGm81ARumcKD5lIf7rU2Rew05mqx8okqJ7EiUDDbW6GR576C5HNMUVPDLoUCwB0EAjmoJf3hvb47RSTVw3DaCEGgQSTy0h5Juw6aNx+Aw7QaRb5ohis53zdkAa2P+s+4YSU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566575; c=relaxed/simple; bh=6WDcflDy8GlspYBDiWv+GWglNqyttGyX34+sb1SiVNQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fAYjPPhsY/+J0zw3mWPNPRns0RyCfChHulZwtqSVSGkBIEhyAQ0FZWX1vHp6G+5AzM1+lIUqgUZ81YPcWllirXalKVlL0hGr4BuKNnxhZs8PTX5bDqUeOqh4XWrQtQQEKPF4iWVBBo7NH3HdhgNTqOqRkNKRAR9gbtJjWq6lwi8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Pu+ywyID; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Pu+ywyID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566572; bh=6WDcflDy8GlspYBDiWv+GWglNqyttGyX34+sb1SiVNQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pu+ywyIDzBU9RlIHo9/cl2kl0/cO3Hvp08AmGN364thN9b9Yq4UtupENafKu9C9zU RXUh7yZOPrK46jTX330leKZUFi+EiDg77lYMkgk3OiUuXzkMJQxnWw+E7VV0Ve/mJZ lwusdvs/ercDP0qJxCYd7GUKEOYzwiDaLp0OHLwLNnlDYmVfg33a6YGA1wM1L+tslX ScME2Pzg2TE0Eg9LT4qKUEi4/FTQh56KfU6lsDRMceePjOpQ5jIkRMaooIyaV3IkIb lrY+sgUpEnjqByyN/JUuSNch7KdLS2i/naGf5HWZw037w3Mon6mD14vOivwvCano2X J44wKeNNjX80g== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8FBFF37820A4; Wed, 1 May 2024 12:29:26 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 3/8] selftests: x86: test_vsyscall: remove unused function Date: Wed, 1 May 2024 17:29:13 +0500 Message-Id: <20240501122918.3831734-4-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove unused function to fix the following warning: test_vsyscall.c:100:19: warning: unused function 'sys_clock_gettime' [-Wunused-function] 100 | static inline int sys_clock_gettime(clockid_t id, struct timespec *ts) Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/test_vsyscall.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/testing/selftests/x86/test_vsyscall.c b/tools/testing/selftests/x86/test_vsyscall.c index d4c8e8d79d389..1c9895cfc660b 100644 --- a/tools/testing/selftests/x86/test_vsyscall.c +++ b/tools/testing/selftests/x86/test_vsyscall.c @@ -97,11 +97,6 @@ static inline long sys_gtod(struct timeval *tv, struct timezone *tz) return syscall(SYS_gettimeofday, tv, tz); } -static inline int sys_clock_gettime(clockid_t id, struct timespec *ts) -{ - return syscall(SYS_clock_gettime, id, ts); -} - static inline long sys_time(time_t *t) { return syscall(SYS_time, t); From patchwork Wed May 1 12:29:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 793892 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 920B4127B45; Wed, 1 May 2024 12:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566583; cv=none; b=aT1k8CfT9saLTCIVpXJnI4FqV4o7lnSZL3EyVlqCHALEhtdFvoM0ARF0Z9tsRwZ5FmrQyvGUJEA3wYXD+xHpzyRkHvYjEUjX9ACamII1yvsJN1W8cvqKfF5trJr/hZnma5UEcUE9gMDVDR+DczrbaY8bN84prdxqPfYa7V8PCSA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566583; c=relaxed/simple; bh=bEOHjflfaYDMIxFojYVFk6wjf9BpBSYjC7XqEh2ogf4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BB5PO7ietJxRKWFuBf/6u4meuqaXBp2gBKuNzzH/RPfWeSdPkIlz5kOj5Jy99qxrhR2gKVLc6Ozk5K8THIReJjNo46zkbdPlxnXeR0tWLEcA6d0Oh5npjZ3Oxn/ZEwgLUqkC8uayyjm3yuBoeQoBHJV/4QuA4fyA92cze+6/SWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=IGjlV3tr; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="IGjlV3tr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566580; bh=bEOHjflfaYDMIxFojYVFk6wjf9BpBSYjC7XqEh2ogf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IGjlV3tr+chnRnHPU7n4Ev3APh3flAo1DGDbZUNwf+K33t3ZBSlvsU5KSP6oUQ9+Z eoWzoiSzefwwKU+LingcQmYXCqT4drU1t1BzityPy+tZEDFVVOPVKyy+KnSP6/FSdM fC/TcfMCelq8/eSMIomsrJ83LKYQ33WjA7hmlb+CrPeD3INCBFZlCyP8CzHr89yM4v lIdlwrtxCtZSfw4eDkxiQUzxNvKbjE0ZGcFZ+leC+wxc5H+ylwQyGQN1syOajLTBb6 7OXB5NKkEz15vNg3cylN27B6MU8P1sp/08cVLcqsj+/ryv9uWu+Ss0KGqf2/42Gau3 i5SsbaEH1RL6w== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 61ECA3781FE9; Wed, 1 May 2024 12:29:32 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 4/8] selftests: x86: fsgsbase_restore: fix asm directive from =rm to =r Date: Wed, 1 May 2024 17:29:14 +0500 Message-Id: <20240501122918.3831734-5-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The clang gives unknown use of instruction mnemonic error. Fix it by specifying =r only. The operand would be placed in register only. fsgsbase_restore.c:45:16: error: unknown use of instruction mnemonic without a size suffix 45 | asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret)); | ^ :1:2: note: instantiated into assembly here 1 | mov %fs:(0), 20(%esp) | ^ fsgsbase_restore.c:45:16: error: unknown use of instruction mnemonic without a size suffix 45 | asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret)); | ^ :1:2: note: instantiated into assembly here 1 | mov %fs:(0), 20(%esp) | ^ Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/fsgsbase_restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/x86/fsgsbase_restore.c b/tools/testing/selftests/x86/fsgsbase_restore.c index 6fffadc515791..12871b482185b 100644 --- a/tools/testing/selftests/x86/fsgsbase_restore.c +++ b/tools/testing/selftests/x86/fsgsbase_restore.c @@ -42,7 +42,7 @@ static unsigned int dereference_seg_base(void) { int ret; - asm volatile ("mov %" SEG ":(0), %0" : "=rm" (ret)); + asm volatile ("mov %" SEG ":(0), %0" : "=r" (ret)); return ret; } From patchwork Wed May 1 12:29:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 794282 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3945F1272B2; Wed, 1 May 2024 12:29:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566591; cv=none; b=o++LocUnpM7BMgwSoT1bkwPHrT56xpGvZsgXu7mME6PjXNbUMSTuYJNtMCswrTOHxmuHmA/YufBeHzCjZ7m0Yd/cyvVILTorbOLE3XCCmIKT9PBt8ol/XNc9VyK2zXUEznpdyAcPg7z2rnnkh1kdDwOYvFKOT7sYviCU4t3VT8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566591; c=relaxed/simple; bh=02kkD98xtXpmWytoRbt/8oBsWUQRxIDZxvczwotNSNk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=suAiKUaU1AbALz0VOXmuGiFKtEaE5lCZ7rivGJIGBw0xP4F5yNr8nj9B7aROm5SwrW001rwDywxYcD3090zg3dDBIvqH+SSM6wi4ygenVG/fK2TSIq5jmr+gjhZM3WSoSVYKBZWPe35F+IgojOV4DXlevpPKuiuboUXbVHmuYsQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=QQzgQINv; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="QQzgQINv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566588; bh=02kkD98xtXpmWytoRbt/8oBsWUQRxIDZxvczwotNSNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QQzgQINvCL2aW6mGrdXsvXYhDAwpKhaabSivdUJp/R5ctkbSEp6B153BdLRmmoRPa tb08f1q/zhS87GbZaQIn2HnegCia5fm1LH3P6ACwTbTr7MzoHE1akywlmuyLi8AgrV r+i7FPZG865tazojqVkK0EKtbguOY90Qo+NIM3kMivaF+tl49spHBWz49Kd6qgiqX0 jbzp0VbFVrKTE1m1OsAFchGqFmL4gl344LxkNHvHNXJ1tTXWOM2brgtW6cVEIus2EN 6gtZVwhdPqpKb2Nhz07P12/WUY3LzN5cVafwAiwhJM95XTt20SxUPpz9gr4uYGyyQL HofW6llVsrYDg== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id DE68237820A4; Wed, 1 May 2024 12:29:40 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 5/8] selftests: x86: syscall_arg_fault_32: remove unused variable Date: Wed, 1 May 2024 17:29:15 +0500 Message-Id: <20240501122918.3831734-6-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove unused global variable. syscall_arg_fault.c:32:30: warning: unused variable 'sig_traps' [-Wunused-variable] 32 | static volatile sig_atomic_t sig_traps; Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/syscall_arg_fault.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/x86/syscall_arg_fault.c b/tools/testing/selftests/x86/syscall_arg_fault.c index 461fa41a4d02a..48ab065a76f9b 100644 --- a/tools/testing/selftests/x86/syscall_arg_fault.c +++ b/tools/testing/selftests/x86/syscall_arg_fault.c @@ -29,7 +29,6 @@ static void sethandler(int sig, void (*handler)(int, siginfo_t *, void *), err(1, "sigaction"); } -static volatile sig_atomic_t sig_traps; static sigjmp_buf jmpbuf; static volatile sig_atomic_t n_errs; From patchwork Wed May 1 12:29:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 793891 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5849685948; Wed, 1 May 2024 12:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566601; cv=none; b=IcIrE5g5kwtae1kV4XsHgFkDDAPPreCo2Q/x2t44pCVzrZfcaUQ35ypUQuiVQWCGypbLmBGw+nokMH4Et1wA5FtRoEbxxipnw6APOF9a6ijgLcan1MHmhgZNyPWW9jc3tTiDQEkCNsKI/Tm2ZcqNLWBWV28XK3jWAPhw8/tg8ME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566601; c=relaxed/simple; bh=4UmOKDDwYiVFvITkVWtXuu/Yu5UI+nINe1Tzra+7IWk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NHa4srUbv2iqxk/CmYJdGILfJHxj6rDFoJz7sIYPp92OmXkxdJ0fjoOKpYPtDDeH3BfjczuhB4kfxTAEREpO4161OdTWehPIX7YevRcPRsU3qvrCbIh4FSBkfJAsag9g6PSSrM++tCCR3DkZ13FdniHAsYYB4SUKgdWKZM5a6Hk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=n+pu80e4; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="n+pu80e4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566598; bh=4UmOKDDwYiVFvITkVWtXuu/Yu5UI+nINe1Tzra+7IWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n+pu80e4gzO/Mj1WtE/IT4JMPu+55WwZRjc0uAF4ab59BK8ISfDfzyTk4vRzoDLXW ymO/Q0TJDg8D4ZJPMqz7RrsD6lThsV/3NicMhmG8Ca7HrJqzBU5pqytDHpwy/4ekm/ CXsY3XKZKx+awPvLc3wIGplqcOdHnaItqouESfZeT1yy38l0JaT5PMiUMSqi0uPAUI 1NXtvrlXSPr44s70nY+xFqTGxpkYRh7HB6lsE/CwO/wc75MxkB2rYPV6yXiltKxga/ wwCZ9/IxSTRFs7t3vWXwINiael6O8lnL8u9jr6vMTdtZCOmgPAKmHjLN//O7S6+aF7 S4ZwZqBnXexcA== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BEE0E378206E; Wed, 1 May 2024 12:29:49 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 6/8] selftests: x86: test_FISTTP: use fisttps instead of ambigous fisttp Date: Wed, 1 May 2024 17:29:16 +0500 Message-Id: <20240501122918.3831734-7-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use fisttps instead of fisttp to specify correctly that the output variable is of size short. test_FISTTP.c:28:3: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') 28 | " fisttp res16""\n" | ^ :3:2: note: instantiated into assembly here 3 | fisttp res16 | ^ test_FISTTP.c:48:3: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') 48 | " fisttp res16""\n" | ^ :3:2: note: instantiated into assembly here 3 | fisttp res16 | ^ test_FISTTP.c:69:3: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') 69 | " fisttp res16""\n" | ^ :4:2: note: instantiated into assembly here 4 | fisttp res16 | ^ test_FISTTP.c:91:3: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') 91 | " fisttp res16""\n" | ^ :3:2: note: instantiated into assembly here 3 | fisttp res16 | ^ Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/test_FISTTP.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/x86/test_FISTTP.c b/tools/testing/selftests/x86/test_FISTTP.c index 09789c0ce3e9c..b9ae9d8cebcb3 100644 --- a/tools/testing/selftests/x86/test_FISTTP.c +++ b/tools/testing/selftests/x86/test_FISTTP.c @@ -25,7 +25,7 @@ int test(void) feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW); asm volatile ("\n" " fld1""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fld1""\n" " fisttpl res32""\n" " fld1""\n" @@ -45,7 +45,7 @@ int test(void) feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW); asm volatile ("\n" " fldpi""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fldpi""\n" " fisttpl res32""\n" " fldpi""\n" @@ -66,7 +66,7 @@ int test(void) asm volatile ("\n" " fldpi""\n" " fchs""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fldpi""\n" " fchs""\n" " fisttpl res32""\n" @@ -88,7 +88,7 @@ int test(void) feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW); asm volatile ("\n" " fldln2""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fldln2""\n" " fisttpl res32""\n" " fldln2""\n" From patchwork Wed May 1 12:29:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 794281 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F0C512D77C; Wed, 1 May 2024 12:30:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566607; cv=none; b=QhqZUPnLJYHQL0GDUC2zbL49saocYyrMRGDSDXth3fRQ84lJvJx/Ti9kABPTc6QSqeOiCcd3/RNeMr7KmCSyB4Y6z/G1L5ssYkmL0s9o+AAFO+7Dn/bhfO4ZqUQJSPOuKVjiqWH5M1S4KO2IS6Vyyl1lv2syU9No5LcdUKI3HW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566607; c=relaxed/simple; bh=ICc8TWkikh7hnbQHCvyG5ZPw/I4G6lKTAIxkSz7bHIE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uBU7ecHrLjh+OQG0TnlLMsU1vScnEGcMFaMDvhCCxv8ygqKMV8HqRCuLFuQ+kgnQ6fdTPAWY6eDKCK2TmUZFEQ+IjILt38mazkg7S1KFDRz+TGI5qC6LN42CyxopEbG/H8v1vKZGir5NA4gkeBQ8IB7Qy4AxZb+646m24xDPVw8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=IHGSJK5c; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="IHGSJK5c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566605; bh=ICc8TWkikh7hnbQHCvyG5ZPw/I4G6lKTAIxkSz7bHIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IHGSJK5cY+n+Sl0GWGDHbsWePEXls2zJPDWTmX+R1UFWwLIMGBz27qJdTfp0VvdFG Omia/1d95qKGRcwHlIUUAXb/ArR2iPxxOvZ78HsagroM5iu7D2c4ePRieIPi9IL0Gf RexWapuUeXaT3UK+LM/otabKliQr7G7r32dHGgsQv0H7SGGQFKeq9Y3ccoveD7QGek 8xVyyiTGd72XFeZV+gfGpUM68j0MapAJO1ZyNbZzLs+yCAxJkfhImTvTlU50FyHwvr OE4LLFCMVs0rcpkaCsvgDCZKsXy1L26BnGn50aYjXO4KbYTkPQjfNo0siILNm8kwJ1 8ru3j50rV5S/w== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C55EC3781FE9; Wed, 1 May 2024 12:29:58 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 7/8] selftests: x86: fsgsbase: Remove unused function and variable Date: Wed, 1 May 2024 17:29:17 +0500 Message-Id: <20240501122918.3831734-8-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove unused code. fsgsbase.c:112:20: warning: unused function 'wrfsbase' [-Wunused-function] 112 | static inline void wrfsbase(unsigned long fsbase) | ^~~~~~~~ fsgsbase.c:215:22: warning: unused variable 'remote_hard_zero' [-Wunused-variable] 215 | static volatile bool remote_hard_zero; | ^~~~~~~~~~~~~~~~ Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/fsgsbase.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/testing/selftests/x86/fsgsbase.c b/tools/testing/selftests/x86/fsgsbase.c index 8c780cce941da..50cf32de63139 100644 --- a/tools/testing/selftests/x86/fsgsbase.c +++ b/tools/testing/selftests/x86/fsgsbase.c @@ -109,11 +109,6 @@ static inline void wrgsbase(unsigned long gsbase) asm volatile("wrgsbase %0" :: "r" (gsbase) : "memory"); } -static inline void wrfsbase(unsigned long fsbase) -{ - asm volatile("wrfsbase %0" :: "r" (fsbase) : "memory"); -} - enum which_base { FS, GS }; static unsigned long read_base(enum which_base which) @@ -212,7 +207,6 @@ static void mov_0_gs(unsigned long initial_base, bool schedule) } static volatile unsigned long remote_base; -static volatile bool remote_hard_zero; static volatile unsigned int ftx; /* From patchwork Wed May 1 12:29:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 793890 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B51D54FA1; Wed, 1 May 2024 12:30:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566615; cv=none; b=q0q2YSzhcBRpAJgXw7H2jYpfBuMVx+91CyE4vEq24wBYyFQ1qXWzIRbd66gYt8K+hGbZHNQYpj4UFnftyMW5OIXRlaQyo6S3F/COEJpRKnEuxEjgXLaDRexCgg6niGnfhkGNAJzEkZm/PK3f6DqwAr1FDjS7F6muevBbjuDUQz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714566615; c=relaxed/simple; bh=mgHPm9EUU+dtIRu1nbBHCvXwznK9GnXXhda7E8pjDlQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q2SfaE/wIWGqroDoPKYtp3xAd3EfsKxZ5CBpU71tu7U7UxKRG9kfyoLf65IJyRv/BgR2c2KvaqaIO2xDENQiMe6O8mZmd9hnWK3J3pRvsOlO73LcQJkw0pdXDjVY75HSjm++5jXCD+XlZQEed6CAMbGAVM9u8G1FkuYkltoO5dA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=3V3y3Ubp; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="3V3y3Ubp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714566612; bh=mgHPm9EUU+dtIRu1nbBHCvXwznK9GnXXhda7E8pjDlQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=3V3y3Ubp/4aZYxD6j2zXZiIE1Jw6POYUIzI/Xx4nkvdM4HxUu8stqhdLUzry5HwT1 7RoInTTbSgOLHJgQWRi0pTFfRhNtA3cdzhiCtc8tnvU7nQQWuXNvQjVQeY8vdEYXv2 siUulCFYspDhbeONErgDSheKZpODrRP0M/h1/awK5wbGid9pCwNuFG3KptQdJvXXjN o4JnFkrHkSt5Obcvl7Cam8kZ9PrYZtPSenedX5rwe0WDJOg5SwoGeIAjNVVo7jmx0r Hn1pEe+XRc4y76N4IQF0bm6CMgqK5n2dk7ZfYyYYi6oBSwsUMDOKjZTcdySM4FK/K2 y8c9Lo6g4HstQ== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (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) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id D22CF378206E; Wed, 1 May 2024 12:30:05 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Muhammad Usama Anjum , Rick Edgecombe , "Mike Rapoport (IBM)" , Ingo Molnar , Dave Hansen , Alexey Dobriyan , Binbin Wu , "Chang S. Bae" , "Kirill A. Shutemov" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: kernel@collabora.com Subject: [PATCH 8/8] selftests: x86: amx: Remove unused functions Date: Wed, 1 May 2024 17:29:18 +0500 Message-Id: <20240501122918.3831734-9-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240501122918.3831734-1-usama.anjum@collabora.com> References: <20240501122918.3831734-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove unused code. amx.c:42:24: warning: unused function 'xgetbv' [-Wunused-function] 42 | static inline uint64_t xgetbv(uint32_t index) | ^~~~~~ amx.c:167:24: warning: unused function 'get_xstatebv' [-Wunused-function] 167 | static inline uint64_t get_xstatebv(struct xsave_buffer *buffer) | ^~~~~~~~~~~~ Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/amx.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tools/testing/selftests/x86/amx.c b/tools/testing/selftests/x86/amx.c index 95aad6d8849be..1fdf35a4d7f63 100644 --- a/tools/testing/selftests/x86/amx.c +++ b/tools/testing/selftests/x86/amx.c @@ -39,16 +39,6 @@ struct xsave_buffer { }; }; -static inline uint64_t xgetbv(uint32_t index) -{ - uint32_t eax, edx; - - asm volatile("xgetbv;" - : "=a" (eax), "=d" (edx) - : "c" (index)); - return eax + ((uint64_t)edx << 32); -} - static inline void xsave(struct xsave_buffer *xbuf, uint64_t rfbm) { uint32_t rfbm_lo = rfbm; @@ -164,12 +154,6 @@ static inline void clear_xstate_header(struct xsave_buffer *buffer) memset(&buffer->header, 0, sizeof(buffer->header)); } -static inline uint64_t get_xstatebv(struct xsave_buffer *buffer) -{ - /* XSTATE_BV is at the beginning of the header: */ - return *(uint64_t *)&buffer->header; -} - static inline void set_xstatebv(struct xsave_buffer *buffer, uint64_t bv) { /* XSTATE_BV is at the beginning of the header: */