public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Palmer Dabbelt <palmer@dabbelt•com>, Paul Walmsley <paul@pwsan•com>
Cc: Charlie Jenkins <charlie@rivosinc•com>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Palmer Dabbelt <palmer@rivosinc•com>,
	Yong-Xuan Wang <yongxuan.wang@sifive•com>
Subject: linux-next: manual merge of the risc-v tree with Linus' tree
Date: Fri, 31 Jan 2025 11:39:11 +1100	[thread overview]
Message-ID: <20250131113911.12653c4b@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3434 bytes --]

Hi all,

Today's linux-next merge of the risc-v tree got a conflict in:

  tools/testing/selftests/riscv/vector/vstate_prctl.c

between commit:

  ebdc22c51ace ("tools: selftests: riscv: Add test count for vstate_prctl")

from Linus' tree and commits:

  57d7713af93e ("selftests: riscv: Fix vector tests")
  c384c5d4a2ae ("selftests: riscv: Support xtheadvector in vector tests")

from the risc-v tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/riscv/vector/vstate_prctl.c
index 40b3bffcbb40,62fbb17a0556..000000000000
--- a/tools/testing/selftests/riscv/vector/vstate_prctl.c
+++ b/tools/testing/selftests/riscv/vector/vstate_prctl.c
@@@ -67,45 -29,44 +29,46 @@@ int test_and_compare_child(long provide
  	return 0;
  }
  
- #define PR_RISCV_V_VSTATE_CTRL_CUR_SHIFT	0
- #define PR_RISCV_V_VSTATE_CTRL_NEXT_SHIFT	2
+ #define PR_RISCV_V_VSTATE_CTRL_CUR_SHIFT 0
+ #define PR_RISCV_V_VSTATE_CTRL_NEXT_SHIFT 2
  
- int main(void)
+ TEST(get_control_no_v)
  {
- 	struct riscv_hwprobe pair;
- 	long flag, expected;
  	long rc;
  
 +	ksft_set_plan(1);
 +
- 	pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0;
- 	rc = riscv_hwprobe(&pair, 1, 0, NULL, 0);
- 	if (rc < 0) {
- 		ksft_test_result_fail("hwprobe() failed with %ld\n", rc);
- 		return -1;
- 	}
+ 	if (is_vector_supported() || is_xtheadvector_supported())
+ 		SKIP(return, "Test expects vector to be not supported");
  
- 	if (pair.key != RISCV_HWPROBE_KEY_IMA_EXT_0) {
- 		ksft_test_result_fail("hwprobe cannot probe RISCV_HWPROBE_KEY_IMA_EXT_0\n");
- 		return -2;
- 	}
+ 	rc = prctl(PR_RISCV_V_GET_CONTROL);
+ 	EXPECT_EQ(-1, rc)
+ 	TH_LOG("GET_CONTROL should fail on kernel/hw without ZVE32X");
+ 	EXPECT_EQ(EINVAL, errno)
+ 	TH_LOG("GET_CONTROL should fail on kernel/hw without ZVE32X");
+ }
  
- 	if (!(pair.value & RISCV_HWPROBE_EXT_ZVE32X)) {
- 		rc = prctl(PR_RISCV_V_GET_CONTROL);
- 		if (rc != -1 || errno != EINVAL) {
- 			ksft_test_result_fail("GET_CONTROL should fail on kernel/hw without ZVE32X\n");
- 			return -3;
- 		}
+ TEST(set_control_no_v)
+ {
+ 	long rc;
  
- 		rc = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
- 		if (rc != -1 || errno != EINVAL) {
- 			ksft_test_result_fail("SET_CONTROL should fail on kernel/hw without ZVE32X\n");
- 			return -4;
- 		}
+ 	if (is_vector_supported() || is_xtheadvector_supported())
+ 		SKIP(return, "Test expects vector to be not supported");
  
- 		ksft_test_result_skip("Vector not supported\n");
- 		return 0;
- 	}
+ 	rc = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
+ 	EXPECT_EQ(-1, rc)
+ 	TH_LOG("SET_CONTROL should fail on kernel/hw without ZVE32X");
+ 	EXPECT_EQ(EINVAL, errno)
+ 	TH_LOG("SET_CONTROL should fail on kernel/hw without ZVE32X");
+ }
+ 
+ TEST(vstate_on_current)
+ {
+ 	long flag;
+ 	long rc;
+ 
+ 	if (!is_vector_supported() && !is_xtheadvector_supported())
+ 		SKIP(return, "Vector not supported");
  
  	flag = PR_RISCV_V_VSTATE_CTRL_ON;
  	rc = prctl(PR_RISCV_V_SET_CONTROL, flag);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2025-01-31  0:39 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31  0:39 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-08-08  0:36 linux-next: manual merge of the risc-v tree with Linus' tree Stephen Rothwell
2025-08-08  0:33 Stephen Rothwell
2025-01-31  0:42 Stephen Rothwell
2024-09-18  0:05 Stephen Rothwell
2024-05-22 23:17 Stephen Rothwell
2024-05-23  6:54 ` Yangyu Chen
2024-05-15 23:36 Stephen Rothwell
2024-05-16  2:17 ` Yangyu Chen
2024-05-16  4:40   ` Stephen Rothwell
2024-02-11 22:55 Stephen Rothwell
2024-01-07 22:49 Stephen Rothwell
2024-01-11 17:20 ` Palmer Dabbelt
2023-11-02 22:14 Stephen Rothwell
2023-08-30 23:29 Stephen Rothwell
2023-08-31 17:50 ` Nick Desaulniers
2023-09-01 15:46   ` Palmer Dabbelt
2023-08-30 23:25 Stephen Rothwell
2023-07-04 23:46 Stephen Rothwell
2023-06-04 22:51 Stephen Rothwell
2023-02-05 22:48 Stephen Rothwell
2023-02-05 22:40 Stephen Rothwell
2023-02-05 22:43 ` Stephen Rothwell
2023-01-08 21:42 Stephen Rothwell
2022-12-12 23:03 Stephen Rothwell
2022-10-13 22:11 Stephen Rothwell
2022-07-24 23:33 Stephen Rothwell
2022-03-22 22:06 Stephen Rothwell
2021-12-19 22:47 Stephen Rothwell
2021-07-05 23:32 Stephen Rothwell
2021-06-14 23:26 Stephen Rothwell
2021-04-26 23:42 Stephen Rothwell
2021-03-30 22:40 Stephen Rothwell
2021-04-02  4:33 ` Palmer Dabbelt
2021-02-23 22:00 Stephen Rothwell
2020-10-25 22:01 Stephen Rothwell
2020-01-13 22:05 Stephen Rothwell
2020-01-05 22:32 Stephen Rothwell
2020-01-06  1:50 ` Paul Walmsley
2020-01-06  1:55   ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250131113911.12653c4b@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=charlie@rivosinc$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=palmer@dabbelt$(echo .)com \
    --cc=palmer@rivosinc$(echo .)com \
    --cc=paul@pwsan$(echo .)com \
    --cc=yongxuan.wang@sifive$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox